CN117172918A - Transaction processing method and device - Google Patents

Transaction processing method and device Download PDF

Info

Publication number
CN117172918A
CN117172918A CN202311041343.8A CN202311041343A CN117172918A CN 117172918 A CN117172918 A CN 117172918A CN 202311041343 A CN202311041343 A CN 202311041343A CN 117172918 A CN117172918 A CN 117172918A
Authority
CN
China
Prior art keywords
account
transaction
balance
shared memory
distributed shared
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
CN202311041343.8A
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.)
Zhongdian Jinxin Software Co Ltd
Original Assignee
Zhongdian Jinxin Software 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 Zhongdian Jinxin Software Co Ltd filed Critical Zhongdian Jinxin Software Co Ltd
Priority to CN202311041343.8A priority Critical patent/CN117172918A/en
Publication of CN117172918A publication Critical patent/CN117172918A/en
Pending legal-status Critical Current

Links

Landscapes

  • Financial Or Insurance-Related Operations Such As Payment And Settlement (AREA)

Abstract

The application provides a transaction processing method and device, and relates to the technical field of Internet and big data. The method comprises the following steps: when a target account corresponding to the account identifier in the transaction request is a hot spot account, judging whether the distributed shared memory is in an available state or not; when the distributed shared memory is in an available state and the account balance of the target account in the distributed shared memory is greater than or equal to the transaction amount in the transaction request, updating the account balance according to the transaction amount; processing transaction business related to the transaction request; and determining that the transaction request is successfully processed in response to the transaction service being processed. Therefore, the checking and updating of the atomic account balance in the distributed shared memory can be realized by storing the actual account balance of each hot spot account in the distributed shared memory, and the problem of overdraft of money caused by deducting the account balance by a buffer scheme under a high concurrency scene can be avoided by means of the high-speed reading and writing capability of the distributed shared memory.

Description

Transaction processing method and device
Technical Field
The application relates to the technical field of Internet and big data, in particular to a transaction processing method and device.
Background
A hot spot account refers to an account that is updated at a high frequency, for example, when a large number of account balance update requests are concentrated on a certain account in a short time, the account may be referred to as a hot spot account. The hot spot account can comprise an add-on account, a subtract-on account and a double-frequency account, wherein the add-on account is an account with frequent balance increase, the subtract-on account is an account with frequent balance decrease, and the double-frequency account is an account with frequent balance increase and deduction.
In the related art, because the number of transaction requests of the hot account is large, in order to ensure that each transaction request is accepted, the transaction requests of the hot account can be processed through a buffering scheme. For example, when the number of transaction requests of the hot-spot account is less than 100/s, the core service system of the financial institution (such as a bank) can normally process each transaction request of the hot-spot account, and when the number of transaction requests of the hot-spot account is greater than 100/s (such as 120/s), the core service system can normally process 100 transaction requests of the hot-spot account, and add the remaining 20 transaction requests to the processing queue, and when the concurrent number of the transaction requests is smaller, process each transaction request in the processing queue.
Although the above manner can ensure that each transaction request is processed, the transaction requests in the processing queue are processed asynchronously by the core service system, and the asynchronous processing manner is easy to risk account overdrawing for the frequency-reduced account.
Disclosure of Invention
The present application aims to solve at least one of the technical problems in the related art to some extent.
The application provides a transaction processing method and a transaction processing device, which can realize the examination and update of atomic account balances in a distributed shared memory by storing the actual account balances of each hot spot account in the distributed shared memory, can solve the performance problem caused by database line locking in a high concurrency scene by means of the high-speed reading and writing capability of the distributed shared memory, and can also avoid the overdrawing problem caused by deducting the account balances by a buffer scheme in the high concurrency scene.
An embodiment of a first aspect of the present application provides a transaction processing method, including:
acquiring a first transaction request; the first transaction request carries a first account identifier and first transaction information;
when a first target account corresponding to the first account identifier is a hot spot account, judging whether the distributed shared memory is in an available state or not; wherein, the distributed shared memory stores account balance of at least one hot spot account;
Updating the first account balance according to the first transaction amount when the distributed shared memory is in an available state and the first account balance of the first target account in the distributed shared memory is greater than or equal to the first transaction amount in the first transaction information;
and processing the first transaction service related to the first transaction request, and determining that the first transaction request is successfully processed in response to the processing of the first transaction service.
An embodiment of a second aspect of the present application proposes a transaction processing device comprising:
the acquisition module is used for acquiring the first transaction request; the first transaction request carries a first account identifier and first transaction information;
the judging module is used for judging whether the distributed shared memory is in an available state or not when the first target account corresponding to the first account identifier is a hot spot account; wherein, the distributed shared memory stores account balance of at least one hot spot account;
the updating module is used for updating the balance of the first account according to the first transaction amount when the distributed shared memory is in an available state and the balance of the first account of the first target account in the distributed shared memory is larger than or equal to the first transaction amount in the first transaction information;
The first processing module is used for processing a first transaction service related to the first transaction request and determining that the first transaction request is successfully processed in response to the processing of the first transaction service.
An embodiment of a third aspect of the present application provides an electronic device, including: a memory, a processor and a computer program stored on the memory and executable on the processor, the processor implementing a transaction processing method as proposed by an embodiment of the first aspect of the application when executing the program.
An embodiment of a fourth aspect of the present application proposes a non-transitory computer readable storage medium having stored thereon a computer program which, when executed by a processor, implements a transaction processing method as proposed by an embodiment of the first aspect of the present application.
An embodiment of a fifth aspect of the present application proposes a computer program product which, when executed by a processor, performs a transaction processing method as proposed by an embodiment of the first aspect of the present application.
The technical scheme provided by the embodiment of the application at least has the following beneficial effects:
1. by storing the actual account balance of each hot spot account in the distributed shared memory, the examination and update of atomic account balance in the distributed shared memory can be realized, the performance problem caused by database line locking in a high concurrency scene can be solved by means of the high-speed reading and writing capability of the distributed shared memory, and meanwhile, the overdue problem caused by account balance deduction in a buffering scheme in the high concurrency scene can be avoided.
2. Based on two sets of mechanisms (a distributed shared memory in a high-efficiency mode and a database in a bottom-supporting mode), transaction requests are processed, so that the risk of a core business system of a financial institution can be reduced, and the success rate of the transaction is improved. And under the condition that the account balance of the hot spot account does not exist in the distributed shared memory, the account balance of the hot spot account in the distributed shared memory is updated by adopting a balance synchronization mechanism, so that the processing efficiency of the transaction request can be improved, and the transaction success rate can be improved.
3. Based on two sets of mechanisms (a high-efficiency mode distributed shared memory and a backing mode database), the balance inquiry request is processed, so that the account balance inquiry efficiency is improved.
Additional aspects and advantages of the application will be set forth in part in the description which follows and, in part, will be obvious from the description, or may be learned by practice of the application.
Drawings
The foregoing and/or additional aspects and advantages of the application will become apparent and readily appreciated from the following description of the embodiments, taken in conjunction with the accompanying drawings, in which:
FIG. 1 is a flow chart of a transaction processing method according to an embodiment of the present application;
FIG. 2 is a flow chart of another transaction processing method according to an embodiment of the present application;
FIG. 3 is a flow chart of another transaction processing method according to an embodiment of the present application;
FIG. 4 is a flow chart of another transaction processing method according to an embodiment of the present application;
FIG. 5a is a schematic diagram of a hot spot account creation and update process according to an embodiment of the present application;
FIG. 5b is a schematic diagram illustrating a transaction request processing flow according to an embodiment of the present application;
FIG. 6 is a flow chart of another transaction processing method according to an embodiment of the present application;
FIG. 7 is a schematic diagram of another transaction request processing flow according to an embodiment of the present application;
FIG. 8 is a flow chart of another transaction processing method according to an embodiment of the present application;
FIG. 9 is a schematic diagram of a balance query flow of a hot spot account according to an embodiment of the present application;
fig. 10 is a schematic structural diagram of a transaction processing device according to an embodiment of the present application;
fig. 11 is a schematic structural view of an electronic device according to an exemplary embodiment of the present application.
Detailed Description
Embodiments of the present application are described in detail below, examples of which are illustrated in the accompanying drawings, wherein like or similar reference numerals refer to like or similar elements or elements having like or similar functions throughout. The embodiments described below by referring to the drawings are illustrative and intended to explain the present application and should not be construed as limiting the application.
Because an account can only be occupied by one process at the same time to update accounts, when a large number of processes request updating in a short time, the problems of lock conflict, transaction timeout and the like caused by lock waiting can occur. In some common high frequency transaction concurrency processes, account bumping is increasingly becoming a bottleneck that constrains transaction success rate and throughput. Such accounts are considered hot-spot accounts and such transactions are considered hot-spot account transactions.
In the related art, accounting processing is performed on hot-spot accounts and non-hot-spot accounts mainly through the following two transaction schemes:
first, current limiting: the limit value which can be normally processed by the accounting system is found out through pressure measurement and the like, and then the transaction requests in the normal processing category (namely, the number of the transaction requests is smaller than the limit value) are allowed to enter the accounting system, and the transaction requests exceeding the normal processing capacity are discarded.
The essence of the scheme is that a part of business experience is sacrificed to ensure the normal operation of the account system. However, the technical problem of the scheme is that each transaction request cannot be guaranteed to be accepted, so that the processing speed and success rate of the hot spot account are low.
Second, buffer: if the accounting system processes the same account at a threshold of 100/s, a 24 hour uninterrupted service can process 8640000 a day, and when the peak business hours come, the number of transaction requests for the hot spot account will reach 200/s. If the number of the transaction requests of a certain account is less than 100 times/second, the accounting system can process all the transaction requests of the account almost in real time, and when the number of the transaction requests of the certain account is more than 100 times/second, the accounting system returns a result, adds all the transaction requests into a reliable processing queue, and processes all the transaction requests in the processing queue when the concurrent number of the transaction requests is not large.
Although the scheme can ensure that each transaction request can be processed, the scheme is not suitable for a frequency-reduction account scene and is easy to risk account overdrawing.
For example, for a bond account (bond account of a dealer) for money transfer, if a buffer scheme is adopted during securities trading, a trade request (or service request) for transferring funds by a customer may not be processed in time, so that the customer cannot buy securities, and customer experience is affected.
In view of at least one of the above problems, the present application provides a transaction processing method and apparatus.
The following describes a transaction processing method and apparatus according to an embodiment of the present application with reference to the accompanying drawings.
Fig. 1 is a flow chart of a transaction processing method according to an embodiment of the present application.
The embodiment of the application is exemplified by the transaction processing method being configured in a transaction processing device, and the transaction processing device can be applied to any electronic equipment so that the electronic equipment can execute transaction processing functions.
The electronic device may be any device with computing capability, for example, may be a personal computer, a server, a mobile terminal, and the mobile terminal may be a mobile phone, a tablet computer, a personal digital assistant, a wearable device, an intelligent robot, and other hardware devices with various operating systems, touch screens, and/or display screens.
As shown in fig. 1, the transaction processing method may include the steps of:
step S101, acquiring a first transaction request; the first transaction request carries a first account identifier and first transaction information.
In the embodiment of the present application, the first account identifier is used for uniquely identifying a corresponding account (referred to as a first target account in the present application), for example, the first account identifier may be an account number of the first target account.
In the embodiment of the present application, the first transaction information may include a transaction serial number, a transaction amount, a transaction time, a transaction serial number (or referred to as a serial number, which indicates what number of transaction requests the first transaction request is for the first target account), and so on.
For example, the transaction processing method is applied to a core service system of a financial institution (such as a bank), and the first transaction request can be sent to the core service system by a client (such as a mobile phone bank, a payment bank, a panning bank and the like) through different channels, or can be sent to the core service system by a clearing platform or a settlement platform.
Step S102, judging whether the distributed shared memory is in an available state or not when the first target account corresponding to the first account identifier is a hot spot account.
In an embodiment of the present application, an account balance of at least one hotspot account is stored in a distributed shared memory (e.g., redis (Remote Dictionary Server, remote dictionary service)).
In the embodiment of the application, after the first transaction request is acquired, whether the first target account corresponding to the first account identifier is a hot spot account or not can be judged according to the first account identifier in the first transaction request, and if the first target account is the hot spot account, whether the distributed shared memory is in an available state (or an effective state) can be further judged.
Step S103, when the distributed shared memory is in an available state and the first account balance of the first target account in the distributed shared memory is greater than or equal to the first transaction amount in the first transaction information, updating the first account balance according to the first transaction amount.
In the embodiment of the application, when the distributed shared memory is in the available state, the account balance of the first target account (the first account balance in the application) can be further obtained from the distributed shared memory, and whether the first account balance is greater than or equal to the first transaction amount in the first transaction information is judged.
If the first account balance is greater than or equal to the first transaction amount, the available balance of the first target account is indicated to be sufficient, and at this time, the first account balance in the distributed shared memory may be updated according to the first transaction amount, for example, the first account balance of the first target account in the distributed shared memory may be subtracted by the first transaction amount, so as to obtain an updated first account balance corresponding to the first target account in the distributed shared memory.
And if the first account balance is less than the first transaction amount, indicating that the available balance of the first target account is insufficient, at which point a failure of the first transaction request to process (or referred to as a transaction failure) and a cause of the processing failure (or referred to as a transaction failure cause) may be determined to be insufficient. Thus, overdraft caused by insufficient balance can be avoided.
Step S104, the first transaction business related to the first transaction request is processed, and the success of the first transaction request processing is determined in response to the processing of the first transaction business.
In the embodiment of the present application, after the first account balance of the first target account in the distributed shared memory is updated, normal service processing may be performed on the first transaction request, that is, the first transaction service related to the first transaction request is processed, for example, when the transaction type of the first transaction request is debit (such as an account amount is drawn), transaction detail information (or referred to as account detail information, such as a deducted amount, a deducted time, an amount before deduction, an amount after deduction, and the like) may also be added to the database of the accounting system or the distributed shared memory.
In the embodiment of the application, when the first transaction service is processed, the success of the processing of the first transaction request can be determined.
According to the transaction processing method, a first transaction request is obtained; the first transaction request carries a first account identifier and first transaction information; when the first target account corresponding to the first account identifier is a hot spot account, judging whether the distributed shared memory is in an available state or not; wherein, the distributed shared memory stores account balance of at least one hot spot account; when the distributed shared memory is in an available state and the first account balance of the first target account in the distributed shared memory is greater than or equal to the first transaction amount in the first transaction information, updating the first account balance according to the first transaction amount; and processing the first transaction service related to the first transaction request, and determining that the first transaction request is successfully processed in response to the processing of the first transaction service. Therefore, by storing the actual account balance of each hot spot account in the distributed shared memory, the examination and update of the atomic account balance in the distributed shared memory can be realized, the performance problem caused by database line locking in a high concurrency scene can be solved by means of the high-speed reading and writing capability of the distributed shared memory, and the overdue money problem caused by deducting the account balance in a buffer scheme in the high concurrency scene can be avoided.
In order to clearly illustrate the above embodiments of the present application, the present application also proposes a transaction processing method.
Fig. 2 is a flow chart of another transaction processing method according to an embodiment of the application.
As shown in fig. 2, the transaction processing method may include the steps of:
step S201, acquiring a first transaction request; the first transaction request carries a first account identifier, a first transaction type and first transaction information.
The first transaction type is a debit (such as a payment amount), and the first transaction information includes at least a first transaction amount.
The explanation of step S201 may be referred to the related description in any embodiment of the present application, and will not be repeated here.
Step S202, the identification table is queried according to the first account identification to determine whether the first account identification is located in the identification table.
The identification table comprises account identifications of at least one hot spot account. The identification table may be stored in the database, or may be stored in a storage device independent of the database.
The database and the distributed shared memory may be two independent storage spaces on the core service system side of the financial institution.
The account identifier of each hot spot account in the identifier table may be set by a related person according to a manual experience, or may be set according to a transaction amount of each account (for example, an account with a relatively large number of sending transaction requests in a period of time may be used as a hot spot account), or may be set according to the number of locking failures of each account (for example, an account with a relatively large number of locking failures may be used as a hot spot account), or may be set according to a lock waiting duration of each account, or may be set according to the lock waiting duration of each account, which is not limited in the present application.
In the embodiment of the application, the identification table can be queried according to the first account identification to determine whether the first account identification is located in the identification table, if the first account identification is located in the identification table, the first target account is determined to be a hot spot account, and if the first account identification is not located in the identification table, the first target account is determined not to be a hot spot account.
In step S203, if the first account identifier is located in the identifier table, it is determined that the first target account is a hot account, and according to the first transaction information, a first non-accounting list is inserted into the non-accounting list in the database, and the state of the first non-accounting list is set as the in-transit state.
In an embodiment of the present application, the non-posting details table includes non-posting details of a plurality of accounts, where each state of the non-posting details may include an in-transit state (for indicating that the corresponding non-posting details are in the process of online processing, or for indicating that a transaction request (or transaction service) corresponding to the non-posting details is in process), a to-be-posted state (or called a to-be-posted state), and a posted state (or called a posted state).
In the embodiment of the present application, when the first target account is a hot account, a first non-posting details may be inserted into a non-posting details table in a database according to the first transaction information, for example, the first non-posting details (may include information such as a transaction amount and a transaction time) may be inserted into the non-posting details table according to a transaction serial number (or referred to as a serial number and a self-increment serial number) in the first transaction information. Also, the state of the first non-posting details in the non-posting details table may also be set to the in-transit state.
Step S204, judging whether the distributed shared memory is in an available state, if so, executing step S205, and if not, executing step S209.
The distributed shared memory stores account balances of at least one hot spot account.
It should be noted that, the two implementations of step S205 and step S209 are parallel, and only one implementation is needed in actual application.
Step S205, judging whether the first account balance of the first target account in the distributed shared memory is greater than or equal to the first transaction amount, if so, executing steps S206 to S207, and if not, executing step S208.
It should be noted that, the steps S206 to S207 and the step S208 are two implementation manners in parallel, and only one implementation manner is needed in actual application.
Step S206, updating the balance of the first account in the distributed shared memory according to the first transaction amount, and processing the first transaction business related to the first transaction request.
The explanation of step S206 may be referred to the related description in any embodiment of the present application, and will not be repeated here.
Step S207, in response to the processing of the first transaction service being completed, determining that the first transaction request was processed successfully, in response to the processing of the first transaction service being failed, determining that the first transaction request was processed failed, and that the processing failure is due to a non-balance deficiency.
It may be appreciated that when the balance of the first account is greater than or equal to the first transaction amount, it indicates that the available balance of the first target account is sufficient, and if the processing of the first transaction service fails, an abnormal condition such as network abnormality, failure, etc. may occur, resulting in a transaction failure, where the processing failure cause (or the transaction failure cause) may be determined to be a non-balance deficiency.
Step S208, determining that the first transaction request fails to be processed, and that the reason for the processing failure is insufficient balance.
In the embodiment of the application, when the balance of the first account is smaller than the first transaction amount, the available balance of the first target account is indicated to be insufficient, and in this case, in order to avoid the condition that the balance of the account is overdrawn, it can be determined that the processing of the first transaction request fails, and the reason of the processing failure is that the balance is insufficient.
Step S209, determining a third non-posting details from the non-posting details list, which are associated with the first target account.
In an embodiment of the present application, when the distributed shared memory is in an unavailable state (or a failure state), each of the non-posting details associated with the first target account may be determined from a non-posting list of the database (for example, each of the non-posting details may include an account identifier, each of the non-posting details matching the first account identifier may be determined from the non-posting list according to the first account identifier of the first target account), and a third non-posting detail may be determined from each of the non-posting details associated with the first target account, where the states of the third non-posting detail include an in-transit state and a to-be-reimbursed state.
Step S210, determining a second occurrence amount according to the third non-posting details, and acquiring a third account balance of the first target account from an account balance table of the database.
In the embodiment of the present application, the transaction amounts in each third outstanding statement may be summarized to obtain the second occurrence amount, and the account balance of the first target account (in the present application, the third account balance) may be obtained from the account balance table in the database.
Step S211, determining a second available balance of the first target account at the third account balance and the second occurrence.
In the embodiment of the application, the second available balance of the first target account can be determined by the third account balance and the second occurrence amount. For example, the second available balance = third account balance-second occurrence.
Step S212, judging whether the second available balance is negative, if not, executing step S213, and if so, executing step S208.
It should be noted that, the two implementations of the step S213 and the step S208 are parallel, and only one implementation is needed in practical application.
Step S213, the second transaction service related to the first transaction request is processed, the transaction success is determined in response to the processing of the second transaction service being completed, the processing failure of the first transaction request is determined in response to the processing failure of the second transaction service, and the processing failure is due to the non-balance deficiency.
In the embodiment of the present application, when the second available balance is not negative, it indicates that the available balance of the first target account is sufficient, and at this time, the second transaction service related to the first transaction request may be processed, where a processing manner of the second transaction service is similar to that of the first transaction service, and will not be described herein.
In the embodiment of the application, when the second transaction service is processed, the transaction success can be determined, and when the second transaction service is processed in a failure mode, the processing failure of the first transaction request can be determined, and the processing failure is caused by non-balance shortage.
In any embodiment of the present application, when the second available balance is not negative and the distributed shared memory is restored to the available state from the unavailable state, the account balance of the first target account in the distributed shared memory may be updated according to the second available balance.
The transaction processing method of the embodiment of the application can realize the processing of the transaction request based on two sets of mechanisms (the high-efficiency mode distributed shared memory and the database of the bottom supporting mode), can reduce the risk of a business system of a financial institution and improve the success rate of the transaction.
In order to clearly illustrate the above embodiments, the present application also proposes a transaction processing method.
Fig. 3 is a flowchart of another transaction processing method according to an embodiment of the present application.
As shown in fig. 3, the transaction processing method may include the steps of:
step S301, a first transaction request is acquired; the first transaction request carries a first account identifier, a first transaction type and first transaction information.
Wherein the first transaction type is debit.
Step S302, when a first target account corresponding to the first account identifier is a hot spot account, judging whether the distributed shared memory is in an available state.
The distributed shared memory stores account balances of at least one hot spot account.
The explanation of steps S301 to S302 may be referred to the related description in any embodiment of the present application, and will not be repeated here.
Step S303, when the distributed shared memory is in the available state, judging whether the account balance corresponding to the first target account exists in the distributed shared memory, if so, executing step S304, and if not, executing step S306.
It should be noted that, the two implementations of the step S304 and the step S306 are parallel, and only one implementation is needed in actual application.
Step S304, taking the account balance corresponding to the first target account as the first account balance, judging whether the first account balance is larger than or equal to the first transaction amount, if so, executing step S305, and if not, executing step S311.
In the embodiment of the present application, when an account balance corresponding to a first target account exists in the distributed shared memory, the account balance corresponding to the first target account in the distributed shared memory may be used as the first account balance, and whether the first account balance is greater than or equal to the first transaction amount is determined, if yes, step S305 is executed, and if not, step S311 is executed.
It should be noted that, the two implementations of the step S305 and the step S311 are parallel, and only one implementation is needed in actual application.
Step S305, updating the balance of the first account in the distributed shared memory according to the first transaction amount.
Step S306, obtaining the second account balance of the first target account from the account balance table of the database, and determining the second non-posting details from the non-posting details table and each non-posting detail associated with the first target account.
It should be noted that, although the distributed shared memory includes account balances of the hot-spot accounts, some abnormal situations may cause that only account information (such as account identifiers) of some hot-spot accounts in the distributed shared memory is lost, and at this time, a balance synchronization mechanism is needed to update the account balances of the hot-spot accounts in the distributed shared memory.
Specifically, when the account balance corresponding to the first target account does not exist in the distributed shared memory, the account balance (which is recorded as a second account balance in the application) of the first target account can be obtained from an account balance table of a database, each of the non-posting details associated with the first target account is obtained from a non-posting detail table, and the second non-posting detail is determined from each of the non-posting details associated with the first target account. Wherein the second non-posting details status includes an in-transit status and a to-be-reconciled status.
Step S307, a first occurrence is determined according to the second non-posting details, and a first available balance of the first target account is determined according to the first occurrence and the second account balance.
The transaction amounts in each second outstanding statement may then be aggregated to obtain a first occurrence, and the available balance of the first target account (in the present application, the first available balance) may be determined based on the first occurrence and the second account balance. For example, first available balance = second account balance-first occurrence.
Step S308, judging whether the first available balance is negative, if so, executing step S311, and if not, executing step S309.
It should be noted that, the two implementations of the step S309 and the step S311 are parallel, and only one implementation is needed in actual application.
Step S309, updating the account balance of the first target account in the distributed shared memory according to the first available balance.
In the embodiment of the application, when the first available balance is not a negative value, the account balance of the first target account in the distributed shared memory can be updated according to the first available balance, that is, the first available balance can be used as the updated account balance corresponding to the first target account in the distributed shared memory.
Step S310, the first transaction service related to the first transaction request is processed, the success of the processing of the first transaction request is determined in response to the processing of the first transaction service is completed, the failure of the processing of the first transaction request is determined in response to the processing failure of the first transaction service, and the processing failure is due to the non-balance deficiency.
Step S311, determining that the first transaction request fails to be processed, and that the reason for the processing failure is insufficient balance.
The explanation of steps S308 to S311 may be referred to the related description in any embodiment of the present application, and will not be repeated here.
It should be noted that, in any embodiment of the present application, when operations such as query and update are performed on an account balance table in a database, the account balance table needs to be locked or locked to avoid that other processes update the account balance table, or when the account balance in the distributed shared memory is updated according to the account balance table, the account balance table needs to be locked to avoid that other processes update the account balance table, which causes that the account balance in the distributed shared memory is not matched with the available balance of the actual account.
According to the transaction processing method, under the condition that the account balance of the first target account does not exist in the distributed shared memory, the balance synchronization mechanism is adopted to update the account balance of the hot-spot account in the distributed shared memory, so that the processing efficiency of a transaction request can be improved, and the transaction success rate can be improved.
In order to clearly illustrate the above embodiments, the present application also proposes a transaction processing method.
Fig. 4 is a flowchart of another transaction processing method according to an embodiment of the present application.
As shown in fig. 4, the transaction processing method may include the steps of:
step S401, a first transaction request is acquired; the first transaction request carries a first account identifier and first transaction information.
The first transaction information at least comprises a first transaction amount, and the first transaction request also comprises a first transaction type, wherein the first transaction type is debit.
The explanation of step S401 may be referred to the related description in any embodiment of the present application, and will not be repeated here.
Step S402, when the first target account corresponding to the first account identifier is not a hot spot account, a fourth account balance of the first target account is obtained from an account balance table of a database.
It should be noted that, for the ordinary account (i.e. the non-hot-spot account), because the number of the transaction requests of the ordinary account is not large, the account system can timely process the transaction requests of the ordinary account, the account-free list of the database will not include the account-free list in the in-transit state and the to-be-charged state associated with the ordinary account, and at this time, the actual account balance or the available account balance of the ordinary account is the account balance in the account balance list.
Therefore, in the embodiment of the present application, when the first target account corresponding to the first account identifier is not a hot spot account, the account balance of the first target account (in the present application, the fourth account balance) may be obtained from the account balance table in the database.
Step S403, judging whether the fourth account balance is greater than or equal to the first transaction amount, if yes, executing steps S404 to S406, otherwise, executing step S407.
It should be noted that, the steps S404 to S406 and the step S407 are two implementation manners in parallel, and only one implementation manner is needed in actual application.
Step S404, according to the first transaction amount, updating the fourth account balance of the first target account in the account balance table.
In the embodiment of the application, when the balance of the fourth account is greater than or equal to the first transaction amount, the available balance of the first target account is indicated to be sufficient, and at this time, the balance of the fourth account of the first target account in the account balance table can be updated according to the first transaction amount, wherein the updated balance of the fourth account=the pre-updated balance of the fourth account-the first transaction amount.
Step S405, processes a third transaction service related to the first transaction request.
It should be noted that, the processing manner of the third transaction service is similar to that of the first transaction service, and will not be described herein.
In step S406, in response to the third transaction service being processed, the first transaction request is determined to be processed successfully, in response to the third transaction service being processed failed, the first transaction request is determined to be processed failed, and the processing failure is due to a non-balance deficiency.
It may be appreciated that when the balance of the fourth account is greater than or equal to the first transaction amount, it indicates that the available balance of the first target account is sufficient, and if the third transaction service fails to be processed, network abnormality, failure, etc. may occur to cause the transaction to fail, where the processing failure cause (or the transaction failure cause) may be determined to be a non-balance deficiency.
Step S407, determining that the first transaction request fails to be processed, and that the reason for the processing failure is insufficient balance.
In the embodiment of the application, when the balance of the fourth account is smaller than the first transaction amount, the available balance of the first target account is indicated to be insufficient, and in this case, in order to avoid the condition that the balance of the account is overdrawn, it may be determined that the processing of the first transaction request fails, and the reason of the processing failure is that the balance is insufficient.
In any of the embodiments of the present application, the following operations may also be performed asynchronously: when the first transaction request is successfully processed, the state of the first non-posting details in the non-posting details table in the database can be updated from the in-transit state to the to-be-reimbursed state.
In any of the embodiments of the present application, the following operations may also be performed asynchronously: when the processing of the first transaction request fails, the first non-accounting details in the non-accounting details list in the database can be deleted, whether the processing failure cause of the first transaction request is non-balance deficiency or not can be judged, if the processing failure cause is non-balance deficiency, the first transaction amount deducted by the current transaction can be returned to the first target account in the distributed shared memory, and if the processing failure cause is balance deficiency, the first transaction amount can be not required to be returned to the first target account in the distributed shared memory because the current transaction does not deduct the first transaction amount.
In any of the embodiments of the present application, the following operations may also be performed asynchronously: when the setting condition is met, updating the account balance of the second target account in the account balance table in the database according to a fourth non-posting list of the second target account in the non-posting list in the database; the second target account is a hot spot account, and the state of the fourth non-posting details comprises a state to be charged.
Wherein the setting condition includes any one of the following:
the first item, the set period is reached. For example, the account balance of each hot account in the account balance table may be updated at the end of the day.
Second, the target time is reached, wherein the number of received transaction requests in a period (e.g., non-transaction peak period, transaction low peak period) in which the target time is located is less than a set threshold.
In summary, the above-mentioned delayed accounting mode or delayed accounting mode is to change update (updata) into insert (insert), because the update operation of the same hot spot account can only be completed by one thread or process, all transaction information of transaction types such as debit, credit or dash are inserted in the form of inserting details to be accounted, and the delayed accounting process completes the balance update of the hot spot account in quasi real time by means of a mechanism of rapidly summarizing the non-accounting details of a plurality of transaction requests of the same hot spot account. The method is suitable for the internal account or the customer account of the financial institution in the delayed accounting mode, and is convenient and controllable to manage.
Further, after updating the account balance of the second target account in the account balance table according to the fourth non-accounting details, the state of the fourth non-accounting details can be updated from the state to be charged to the charged state.
According to the transaction processing method provided by the embodiment of the application, for the common account (namely the non-hot-spot account), because the account balance of the common account does not exist in the distributed shared memory, at the moment, the transaction request of the common account can be processed based on the account balance table and the non-account statement table in the database, and the transaction success rate can be improved.
In any one embodiment of the application, with the distributed shared memory (such as Redis) as a core, a balance copy is established for the account balance of the hot spot account in the distributed shared memory, and real-time accounting checks and operates the balance copy in the distributed shared memory and registers the details which are not checked in a database. In online batch asynchronous processing, account balances in an account balance table in a database are supplemented according to the non-accounting details, and the account balances (namely balance master books) in the account balance table in the database are updated in a delayed manner, namely in a delayed manner.
The method comprises the steps of establishing balance copies of account balances in a distributed shared memory, checking and updating atomic account balances in the distributed shared memory, and solving performance problems caused by database line locking under a high concurrency scene by means of high-speed reading and writing capabilities of the distributed shared memory, and avoiding overdraft problems caused by high concurrency deduction.
Wherein the delayed accounting mode is a solution to change the new (update) to insert (insert). One basic principle is to ensure that the updating operation of the same account can only be completed by one thread, all transaction information of transaction types such as debit, credit or dash-forward is inserted in a form of inserting a non-posting list, and the delayed billing process completes the balance updating of the hot spot account in quasi-real time through mechanisms such as rapid multi-stroke summarization and the like. The method is suitable for the time delay billing mode for internal accounts or client accounts, and is convenient and controllable to manage.
As an example, as shown in fig. 5a, the creation and update flow of the hot-spot account may be that a flag field of the hot-spot account (referred to as an account identifier in the present application) is added to a table related to the account (referred to as an identifier table in the present application), and if the hot-spot account is newly added, the flag field of the newly added hot-spot account may be added to the identifier table. Therefore, in the application, whether the current account is a hot spot account can be judged through the mark field.
When a certain account is set as a hot spot account, an account balance table in a database needs to be locked, and meanwhile, fields such as a system date, an account balance, a last day balance (used for counting information and the like), a last service date and the like are updated into a distributed shared memory.
It should be noted that the purpose of locking the account balance table is: the situation that the account balance in the distributed shared memory is inconsistent with the actual account balance in the account balance table due to the fact that a process modifies the account balance table when the account balance of the hot-spot account in the distributed shared memory is updated is prevented.
When the hot-spot account is set as the common account, deleting the hot-spot account, at the moment, locking the account balance table, and modifying the account mark of the hot-spot account in the identification table into the account mark of the common account.
As an example, taking the distributed shared memory as Redis as an example, when the transaction type of the transaction request is debit, the processing flow of the transaction request may be as shown in fig. 5b, and mainly includes the following steps:
1. starting a transaction when the transaction starts, such as when a transaction request is received;
2. judging whether the debit account is a hot spot account according to the account number of the debit account in the transaction request, if the debit account is not the hot spot account, locking and inquiring an account balance table, updating the account balance of the debit account in the account balance table according to the transaction amount in the transaction request, then executing normal business processing such as adding transaction detail information (or account detail information such as deduction amount, deduction time, amount before deduction, amount after deduction and the like), and submitting the transaction after the business processing is completed.
3. And when the debit account is a hot spot account, starting hot spot account processing.
4. The self-increment sequence (i.e., transaction number (or serial number) in the transaction request is obtained and used for indicating what transaction request the transaction request is for the debit account), and in the independent transaction (different from the opened transaction), according to the self-increment sequence, the non-posting details (state is in-transit state) are inserted in the non-posting details table.
5. Judging whether Redis is available, locking the debit account in Redis if Redis is available, inquiring whether the account balance of the debit account exists in Redis, if the account balance of the debit account does not exist in Redis, summarizing the non-account details (in-transit state and account to be supplemented state) of the debit account in a non-account statement, obtaining the occurrence amount, calculating the available balance of the debit account according to the occurrence amount and the account balance of the debit account in an account balance table, if the available balance is not negative, updating the account balance of the debit account in Redis according to the available balance, if the available balance is not negative, carrying out transaction rollback, and transaction failure.
If the account balance of the debit account exists in the Redis, judging whether the account balance is larger than or equal to the transaction amount in the transaction request, if the account balance is larger than or equal to the transaction amount, calculating a new account balance (namely the inquired account balance-the transaction amount in the transaction request), and resetting the account balance in the Redis according to the new account balance. Unlocking the debit account in Redis, then, putting identification information (called hot spot account identification later) of the debit account in PUBCOM (global variable), ending the hot spot account processing, then, executing normal business processing, submitting a transaction after the business processing is completed, and completing the transaction.
If the account balance is smaller than the transaction amount, the balance is insufficient, the transaction rolls back, and the transaction fails.
6. If Redis is not available, summarizing the non-account details (in-transit state and to-be-charged state) of the debit account in the non-account details list to obtain the occurrence amount, calculating the available balance of the debit account according to the occurrence amount and the account balance of the debit account in the account balance list, judging whether the available balance of the debit account is negative, if the available balance is negative, rolling back the transaction, failing the transaction, and if the available balance is not negative, submitting the transaction after the transaction is completed, and completing the transaction.
7. After the transaction is completed, the asynchronous task updates the in-transit state of the non-posting details of the debit account in the non-posting details list to a state to be supplemented according to the hot account identification in the PUBCOM in the Redis.
8. The processing of debit account details, account movement notifications, accounting details, etc. are all skipped and handled by asynchronous delay batches.
9. If the transaction fails and is abnormal, the debit is released to stop paying: the non-posting details added to the current transaction are deleted from the non-posting details table (this operation is handled after the main transaction rollback).
After the transaction processing is completed, the non-posting details in the non-posting details list are required to be posted, and according to the mode of account + date + self-increment sequence, all the non-posting details matched with the account are inquired from the non-posting details list, and posting is ordered, namely, the account balance in the account balance list is updated according to all the searched non-posting details. Thus, the data amount of one-time accounting can be prevented from being excessively large, and the processing load can be reduced. In addition, the processes of flushing and rollback may also be performed.
In one possible implementation manner of the embodiment of the present application, the transaction request with the transaction type being credit may be processed based on two sets of mechanisms (the distributed shared memory in the high-efficiency mode and the database in the bottom-supporting mode), so as to reduce the risk of the business system of the financial institution and improve the success rate of the transaction. The above process will be described in detail with reference to fig. 5.
Fig. 6 is a flowchart of another transaction processing method according to an embodiment of the present application.
As shown in fig. 6, on the basis of any one of the above embodiments, the transaction processing method may further include the following steps:
step S601, obtaining a second transaction request; the second transaction request carries a second account identifier, second transaction information and a second transaction type, and the second transaction type is credit.
In the embodiment of the present application, the second account identifier is used for uniquely identifying a corresponding account (denoted as a third target account in the present application), for example, the second account identifier may be an account number of the third target account.
In the embodiment of the present application, the second transaction information may include a transaction serial number, a transaction amount, a transaction time, a transaction serial number (or referred to as a serial number, which indicates what transaction request the second transaction request is for the third target account), and so on.
In an embodiment of the application, the second transaction type is a credit (e.g., a deposit amount).
Step S602, according to the second account identifier, it is determined whether the third target account corresponding to the second account identifier is a hot spot account, if yes, steps S603 to S604 are performed, and if not, steps S605 to S607 are performed.
In the embodiment of the application, whether the third target account corresponding to the second account identifier is a hot spot account or not can be determined according to the second account identifier, for example, when the second account identifier is located in the identifier table, the third target account can be determined to be a hot spot account, and when the second account identifier is not located in the identifier table, the third target account can be determined not to be a hot spot account.
It should be noted that, the steps S603 to S604 and the steps S605 to S607 are two implementation manners in parallel, and only one implementation manner is needed in practical application.
Step S603, according to the second transaction amount in the second transaction information, updating the fifth account balance of the third target account in the account balance table of the database, and processing the fourth transaction service related to the second transaction request.
In the embodiment of the present application, when the third target account is not a hot account, the account balance (in the present application, the fifth account balance is recorded as the fifth account balance) of the third target account in the account balance table of the database may be updated directly according to the second transaction amount in the second transaction information, for example, the updated fifth account balance=the pre-updated fifth account balance+the second transaction amount. And, a fourth transaction service related to the second transaction request may be processed, where a processing manner of the fourth transaction service is similar to that of the first transaction service, and details thereof are omitted herein.
Step S604, in response to the fourth transaction service being processed, determines that the second transaction request is processed successfully, and in response to the fourth transaction service being processed failing, determines that the second transaction request is processed failing.
In the embodiment of the application, when the fourth transaction service is processed, the second transaction request can be determined to be processed successfully, and when the fourth transaction service is processed failed, the second transaction request can be determined to be processed failed.
Step S605 inserts a fifth non-posting details into the non-posting details table in the database according to the second transaction information, and sets the state of the fifth non-posting details as the in-transit state.
In the embodiment of the present application, when the third target account is a hot spot account, a fifth non-posting list may be inserted into the non-posting list in the database according to the second transaction information, and the state of the fifth non-posting list may be set as the in-transit state.
Step S606, the fifth transaction service related to the second transaction information is processed.
The processing manner of the fifth transaction service is similar to that of the first transaction service, and will not be described herein.
In step S607, in response to the processing of the fifth transaction service being completed, the processing of the second transaction request is determined to be successful, and in response to the processing of the fifth transaction service being failed, the processing of the second transaction request is determined to be failed.
In the embodiment of the application, when the fifth transaction service is processed, the second transaction request can be determined to be processed successfully, and when the fifth transaction service is processed failed, the second transaction request can be determined to be processed failed.
In any of the embodiments of the present application, the following operations may also be performed asynchronously: in the event that the second transaction request fails to process, the fifth outstanding details in the outstanding details table may be deleted.
In any of the embodiments of the present application, the following operations may also be performed asynchronously: and under the condition that the second transaction request is successfully processed, updating the fifth non-posting details from the in-transit state to the to-be-compensated state, determining each non-posting detail associated with the third target account from a non-posting detail table, and determining a sixth non-posting detail from each non-posting detail associated with the third target account, wherein the states of the sixth non-posting details comprise the in-transit state and the to-be-compensated state.
And then, the transaction amount in the sixth non-posting list can be summarized to obtain a fourth occurrence amount, and the account balance of the third target account in the distributed shared memory is updated according to the fourth occurrence amount, for example, the updated account balance = the pre-update account balance + the fourth occurrence amount.
According to the transaction processing method provided by the embodiment of the application, the transaction request with the transaction type of credit is processed based on two sets of mechanisms (the high-efficiency mode distributed shared memory and the database with the bottom-supporting mode), so that the risk of a business system of a financial institution can be reduced, and the transaction success rate is improved.
In any embodiment of the present application, taking the distributed shared memory as the dis as an example, when the transaction type of the transaction request is credit, the processing flow of the transaction request may be as shown in fig. 7, and mainly includes the following steps:
1. starting a transaction when the transaction starts, such as when a transaction request is received;
2. judging whether the credit account is a hot account or not according to the account number of the credit account in the transaction request, if the credit account is not the hot account, locking and inquiring an account balance table, updating the account balance of the credit account in the account balance table according to the transaction amount in the transaction request, then executing normal business processing, such as adding transaction detail information, and submitting a transaction after the business processing is completed, and ending the transaction.
3. And when the debit account is a hot spot account, starting hot spot account processing.
4. The self-increment sequence in the transaction request is acquired, and according to the self-increment sequence, in an independent transaction (different from the opened transaction), the non-posting details (the state is the in-transit state) are inserted into the non-posting details table.
5. Identification information (hereinafter referred to as hot spot account identification) of the credit account is put into the PUBCOM (global variable), and the hot spot account processing is finished, then normal business processing can be executed, and after the business processing is finished, the transaction is submitted and the transaction is finished.
6. After the transaction is completed, whether the transaction is successful or not can be judged, if the transaction is successful, the in-transit state of the non-posting details of the lender account in the non-posting detail list is updated to be in-transit state according to the hot spot account identification in the PUBCOM in the Redis by the asynchronous task.
7. Judging whether the Redis is available, if so, updating the account balance of the credit account in the Redis according to the non-credited details of the credit account in the non-credited details list.
8. If the transaction fails, deleting the to-be-credited details of the credit account added in the transaction in the non-credited details list.
In one possible implementation manner of the embodiment of the application, the balance inquiry request can be processed based on two sets of mechanisms (a distributed shared memory in a high-efficiency mode and a database in a bottom-supporting mode), so as to improve the inquiry efficiency of account balance. The above process will be described in detail with reference to fig. 8.
Fig. 8 is a flowchart of another transaction processing method according to an embodiment of the present application.
As shown in fig. 8, the transaction processing method may further include the following steps, according to any of the foregoing embodiments:
step S801, a balance inquiry request is received, wherein the balance inquiry request carries a third account identifier.
In the embodiment of the present application, the third account identifier is used for uniquely identifying a corresponding account (denoted as a fourth target account in the present application), for example, the third account identifier may be an account number of the fourth target account.
Step S802, determining, according to the third account identifier, whether the fourth target account corresponding to the third account identifier is a hot spot account, if so, executing S803, and if not, executing S806 to S807.
In the embodiment of the application, whether the fourth target account corresponding to the third account identifier is a hot spot account or not can be determined according to the third account identifier, for example, when the third account identifier is located in the identifier table, the fourth target account can be determined to be a hot spot account, and when the third account identifier is not located in the identifier table, the fourth target account can be determined not to be a hot spot account.
It should be noted that, the steps S803 and S806 to S807 are two implementation manners in parallel, and only one implementation manner is needed in actual application.
Step 803, judging whether the distributed shared memory is in an available state, if so, executing steps 804 to 805, and if not, executing steps 808 to 811.
It should be noted that, the steps S804 to S805 and the steps S808 to S811 are two implementation manners in parallel, and only one implementation manner is needed in practical application.
Step S804, a sixth account balance of the fourth target account in the distributed shared memory is obtained.
In the embodiment of the present application, when the fourth target account is a hot spot account and the distributed shared memory is in an available state, the account balance (in the present application, the sixth account balance) of the fourth target account in the distributed shared memory may be obtained.
Step S805, a first balance inquiry response is sent, wherein the first balance inquiry response carries a sixth account balance.
In the embodiment of the application, a first balance inquiry response can be sent to the client or the device sending the balance inquiry request, wherein the first balance inquiry response carries the balance of the sixth account.
Step S806, inquiring a seventh account balance corresponding to the second target account from the account balance table in the database.
In the embodiment of the application, when the fourth target account is not a hot spot account, the seventh account balance corresponding to the second target account can be directly queried from the account balance table in the database.
Step S807, a second balance inquiry response is sent, wherein the second balance inquiry response carries the seventh account balance.
In the embodiment of the application, a second balance inquiry response can be sent to the client or the device sending the balance inquiry request, wherein the second balance inquiry response carries the balance of the seventh account.
Step S808, querying a seventh non-posting details corresponding to the fourth target account from the non-posting details table of the database, wherein the seventh non-posting details are in the in-transit state and the to-be-reconciled state.
In the embodiment of the application, when the fourth target account is a hot spot account and the distributed shared memory is in an unavailable state, a seventh non-posting list corresponding to the fourth target account can be queried from a non-posting list of the database, wherein the seventh non-posting list is in an in-transit state and a to-be-supplemented state.
Step S809, inquiring the eighth account balance corresponding to the fourth target account from the account balance table in the database.
In the embodiment of the present application, the account balance corresponding to the fourth target account (referred to as the eighth account balance in the present application) may also be queried from the account balance table in the database.
Step S810, determining a fifth occurrence amount according to the seventh non-posting details, and determining a third available balance of the fourth target account according to the fifth occurrence amount and the eighth account balance.
In the embodiment of the application, the transaction amount in the seventh non-posting details can be summarized to obtain the fifth occurrence amount, and the third available balance of the fourth target account is determined according to the fifth occurrence amount and the eighth account balance. For example, the third available balance = fifth occurrence + eighth account balance.
Step S811, a third balance inquiry response is sent, wherein the third balance inquiry response carries a third available balance.
In the embodiment of the application, a third balance inquiry response can be sent to the client or the device sending the balance inquiry request, wherein the third balance inquiry response carries a third available balance.
According to the transaction processing method provided by the embodiment of the application, the balance inquiry request is processed based on two sets of mechanisms (the high-efficiency mode distributed shared memory and the database with the bottom mode), so that the inquiry efficiency of account balance is improved.
In any embodiment of the present application, the flow of inquiring the balance of the hot-spot account may be as shown in fig. 9, where a balance copy of the account balance may be established in the distributed shared memory, and real-time accounting may be used to check and operate the balance copy in the distributed shared memory, and register details to be supplemented. And (3) in the daily terminal batch, compensating account balances of all hot accounts in an account balance table in the database according to all the non-posting details in the non-posting details table, and updating balance main books in the account balance table in a delayed manner.
Specifically, taking the distributed shared memory as a Redis as an example, when inquiring the balance, whether the current account is a hot spot account or not can be judged, if the current account is not the hot spot account, a general inquiry component is called, and if the current account is the hot spot account, different components are called to calculate the balance of the account according to whether the Redis is available or not.
It should be noted that, by taking the transaction type as a debit for example, because of the large concurrence of hot-spot accounts, when Redis is not available, the queried balance is the account balance deduction minus the amount in the unsettled details.
In summary, taking transaction type as debit to carry out an example, inserting transaction information of the transaction into a non-posting list through independent transaction, and when Redis is available, greatly improving the processing performance of a hot spot account through the operation of balance atomicity in a distributed shared memory; when Redis is not available, inquiring the balance in an account balance table in a database, subtracting the debit in the non-posting list, and judging whether the transaction is overdrawn or not, wherein the method has at least the following advantages:
1. high performance processing or efficient mode of Redis memory mode. When Redis is available, a high performance processing mode of Redis is used.
2. And (3) a bottom supporting mode of the unaccounted detail. When Redis is not available, the debit in the non-debited details is subtracted by the balance in the account balance table in the database, so that account overdraft is ensured.
3. Dynamic switching of the two modes. The two processing modes are automatically switched by judging the state of Redis without manual intervention.
4. Dynamic refreshing of account balances in Redis memory. When restarting after the Redis crashes, if the Redis memory has no information of the corresponding hot spot account, automatically refreshing the balance information of the account balance table into a balance copy of the Redis memory.
5. The ability of the financial institution to handle the hot spot account is improved. The method can effectively cope with the services with higher concurrency such as hot events, emergency events, network promotion days, silver certificate transfer, fund recruitment and the like.
6. Reducing the risk of financial institution business systems. The high-efficiency mode and the bottom supporting mode coexist, so that the risk of a financial institution business system is reduced. In the case of Redis avalanche, etc., hot spot account traffic can still be effectively handled.
Corresponding to the transaction processing method provided by the embodiments of fig. 1 to 8, the present application also provides a transaction processing device, and since the transaction processing device provided by the embodiment of the present application corresponds to the transaction processing method provided by the embodiments of fig. 1 to 8, the implementation of the transaction processing method is also applicable to the transaction processing device provided by the embodiment of the present application, and will not be described in detail in the embodiment of the present application.
Fig. 10 is a schematic structural diagram of a transaction processing device according to an embodiment of the present application.
As shown in fig. 10, the transaction processing apparatus 1000 may include: the acquisition module 1010, the determination module 1020, the update module 1030, and the first processing module 1040.
Wherein, the acquiring module 1010 is configured to acquire a first transaction request; the first transaction request carries a first account identifier and first transaction information.
A judging module 1020, configured to judge whether the distributed shared memory is in an available state when the first target account corresponding to the first account identifier is a hot spot account; the distributed shared memory stores account balances of at least one hot spot account.
And the updating module 1030 is configured to update the first account balance in the distributed shared memory according to the first transaction amount when the distributed shared memory is in an available state and the first account balance of the first target account in the distributed shared memory is greater than or equal to the first transaction amount in the first transaction information.
The first processing module 1040 is configured to process a first transaction service related to the first transaction request, and determine that the first transaction request is processed successfully in response to the processing of the first transaction service being completed.
As one possible implementation manner, the first transaction request carries a first transaction type, where the first transaction type is debit, and the determining module 1020 is specifically configured to: inquiring the identification table according to the first account identification to determine whether the first account identification is located in the identification table; the identification table comprises account identifications of at least one hot spot account; when the first account identifier is located in the identifier table, determining that the first target account is a hot spot account; inserting a first non-posting list in a database according to the first transaction information, and setting the state of the first non-posting list as an in-transit state; and judging whether the distributed shared memory is in an available state or not.
As a possible implementation manner, the update module 1030 is specifically configured to: when the distributed shared memory is in an available state, judging whether an account balance corresponding to a first target account exists in the distributed shared memory; if the account balance corresponding to the first target account exists in the distributed shared memory, taking the account balance corresponding to the first target account as the first account balance; and when the first account balance is greater than or equal to the first transaction amount, updating the first account balance in the distributed shared memory according to the first transaction amount.
Update module 1030, further configured to: if the account balance corresponding to the first target account does not exist in the distributed shared memory, acquiring a second account balance of the first target account from an account balance table of a database, and determining a second non-posting detail from all non-posting details associated with the first target account in a non-posting detail table; the second non-posting details state comprises an in-transit state and a to-be-supplemented state; determining a first occurrence according to the second non-posting details, and determining a first available balance of the first target account according to the first occurrence and the second account balance; and when the first available balance is not a negative value, updating the account balance of the first target account in the distributed shared memory according to the first available balance.
As one possible implementation, the transaction processing device 1000 may further include:
the second processing module is used for determining a third non-posting list from all non-posting lists associated with the first target account in the non-posting list when the distributed shared memory is in an unavailable state; the third non-posting details state comprises an in-transit state and a to-be-supplemented state; determining a second occurrence amount according to the third non-posting details, and acquiring a third account balance of the first target account from an account balance table of the database; determining a second available balance of the first target account at the third account balance and the second occurrence; and when the second available balance is not negative, processing a second transaction service related to the first transaction request, and determining that the transaction is successful in response to the processing of the second transaction service.
As one possible implementation, the update module 1030 is further configured to: and when the second available balance is not negative, responding to the recovery of the distributed shared memory from the unavailable state to the available state, and updating the account balance of the first target account in the distributed shared memory according to the second available balance.
As one possible implementation, the transaction processing device 1000 may further include:
the third processing module is used for acquiring a fourth account balance of the first target account from an account balance table of the database when the first target account is not a hot spot account; when the balance of the fourth account is greater than or equal to the first transaction amount, updating the balance of the fourth account of the first target account in the account balance table according to the first transaction amount; processing a third transaction service related to the first transaction request; determining that the first transaction request is successfully processed in response to the completion of the processing of the third transaction service; in response to the third transaction processing failure, determining that the first transaction request processing failed, and that the processing failure is due to a non-balance deficiency.
As one possible implementation, the transaction processing device 1000 may further include:
The fourth processing module is used for determining that the first transaction request fails to be processed when the first available balance is a negative value, and the reason for the processing failure is insufficient balance; or when the second available balance is a negative value, determining that the first transaction request fails to be processed, and the reason for the processing failure is insufficient balance; or when the balance of the first account is smaller than the first transaction amount, determining that the first transaction request fails to be processed, and the reason for the processing failure is insufficient balance; or when the balance of the fourth account is smaller than the first transaction amount, determining that the first transaction request fails to be processed, and determining that the reason for the processing failure is insufficient balance.
As one possible implementation, the transaction processing device 1000 may further include:
a fifth processing module, configured to update, when the first transaction request is successfully processed, a state of a first non-accounting statement in a non-accounting statement table in the database from an in-transit state to a to-be-charged state; deleting a first unsettled detail in a unsettled detail table in the database when the first transaction request fails to be processed; judging whether the processing failure reason of the first transaction request is non-balance shortage or not; and returning the first transaction amount to the first target account in the distributed shared memory in the case that the processing failure is caused by non-balance shortage.
As one possible implementation, the update module 1030 is further configured to: when the setting condition is met, updating the account balance of the second target account in the account balance table in the database according to a fourth non-posting list of the second target account in the non-posting list in the database; the second target account is a hot spot account, and the state of the fourth non-posting details comprises a state to be charged; wherein the setting condition includes any one of the following: reaching a set period; and reaching the target time, wherein the number of received transaction requests in the time period of the target time is smaller than the set threshold value.
As one possible implementation, the transaction processing device 1000 may further include:
a sixth processing module, configured to obtain a second transaction request; the second transaction request carries a second account identifier, second transaction information and a second transaction type, wherein the second transaction type is credit; determining whether a third target account corresponding to the second account identifier is a hot spot account or not according to the second account identifier; when the third target account is not a hot spot account, updating a fifth account balance of the third target account in an account balance table of the database according to the second transaction amount in the second transaction information; processing a fourth transaction service related to the second transaction request; determining that the second transaction request is successfully processed in response to the completion of the processing of the fourth transaction service; in response to the fourth transaction service processing failing, a determination is made that the second transaction request processing failed.
As a possible implementation manner, the sixth processing module is further configured to: when the third target account is a hot spot account, inserting a fifth non-posting list in a non-posting list in the database according to the second transaction information, and setting the state of the fifth non-posting list as an in-transit state; processing a fifth transaction service related to the second transaction information; determining that the second transaction request is successfully processed in response to the completion of the processing of the fifth transaction service; in response to the fifth transaction processing failing, a determination is made that the second transaction request processing failed.
As one possible implementation, the transaction processing device 1000 may further include:
a seventh processing module, configured to delete a fifth outstanding details in the outstanding details table in case that the second transaction request fails to be processed; under the condition that the second transaction request is successfully processed, updating the fifth non-accounting details from the in-transit state to the to-be-supplemented account state; determining a sixth non-posting details from the non-posting details list associated with the third target account; the sixth non-posting details state comprises an in-transit state and a to-be-supplemented state; determining a fourth occurrence amount according to the sixth non-posting details; and updating the account balance of the third target account in the distributed shared memory according to the fourth occurrence amount.
As one possible implementation, the transaction processing device 1000 may further include:
the eighth processing module is used for receiving a balance inquiry request, wherein the balance inquiry request carries a third account identifier; determining whether a fourth target account corresponding to the third account identifier is a hot spot account or not according to the third account identifier; when the fourth target account is a hot spot account, judging whether the distributed shared memory is in an available state; when the distributed shared memory is in an available state, acquiring a sixth account balance of a fourth target account in the distributed shared memory; and sending a first balance inquiry response, wherein the first balance inquiry response carries the balance of the sixth account.
As a possible implementation manner, the eighth processing module is further configured to: inquiring a seventh account balance corresponding to the second target account from an account balance table in a database when the fourth target account is not a hot spot account; and sending a second balance inquiry response, wherein the second balance inquiry response carries the seventh account balance.
As a possible implementation manner, the eighth processing module is further configured to: when the distributed shared memory is in an unavailable state, inquiring a seventh non-posting list corresponding to a fourth target account from a non-posting list of the database, wherein the seventh non-posting list is in an in-transit state and a to-be-supplemented state; inquiring an eighth account balance corresponding to the fourth target account from an account balance table in the database; determining a fifth occurrence according to the seventh outstanding account details, and determining a third available balance of the fourth target account according to the fifth occurrence and the eighth account balance; and sending a third balance inquiry response, wherein the third balance inquiry response carries a third available balance.
The transaction processing device of the embodiment of the application obtains the first transaction request; the first transaction request carries a first account identifier and first transaction information; when the first target account corresponding to the first account identifier is a hot spot account, judging whether the distributed shared memory is in an available state or not; wherein, the distributed shared memory stores account balance of at least one hot spot account; when the distributed shared memory is in an available state and the first account balance of the first target account in the distributed shared memory is greater than or equal to the first transaction amount in the first transaction information, updating the first account balance according to the first transaction amount; and processing the first transaction service related to the first transaction request, and determining that the first transaction request is successfully processed in response to the processing of the first transaction service. Therefore, by storing the actual account balance of each hot spot account in the distributed shared memory, the examination and update of the atomic account balance in the distributed shared memory can be realized, the performance problem caused by database line locking in a high concurrency scene can be solved by means of the high-speed reading and writing capability of the distributed shared memory, and the overdue money problem caused by deducting the account balance in a buffer scheme in the high concurrency scene can be avoided.
In order to implement the above embodiment, the present application further proposes an electronic device, where the electronic device may be any device with computing capability, and the electronic device includes: a memory, a processor and a computer program stored on the memory and executable on the processor, the processor implementing a transaction processing method as set forth in any of the preceding embodiments of the application when the program is executed.
As an example, fig. 11 is a schematic structural diagram of an electronic device 1100 according to an exemplary embodiment of the present application, where, as shown in fig. 11, the electronic device 1100 may further include:
the memory 1110 and the processor 1120, the bus 1130 connecting different components (including the memory 1110 and the processor 1120), the memory 1110 stores a computer program, and the processor 1120 implements the transaction processing method according to the embodiment of the present application when executing the program.
Bus 1130 represents one or more of several types of bus structures, including a memory bus or memory controller, a peripheral bus, an accelerated graphics port, a processor, or a local bus using any of a variety of bus architectures. By way of example, and not limitation, such architectures include Industry Standard Architecture (ISA) bus, micro channel architecture (MAC) bus, enhanced ISA bus, video Electronics Standards Association (VESA) local bus, and Peripheral Component Interconnect (PCI) bus.
The electronic device 1100 typically includes a variety of electronic device readable media. Such media can be any available media that can be accessed by the electronic device 1100 and includes both volatile and nonvolatile media, removable and non-removable media.
Memory 1110 may also include computer system readable media in the form of volatile memory, such as Random Access Memory (RAM) 1140 and/or cache memory 1150. The server 1100 may further include other removable/non-removable, volatile/nonvolatile computer system storage media. By way of example only, storage system 1160 may be used to read and write non-removable, non-volatile magnetic media (not shown in FIG. 11, commonly referred to as a "hard disk drive"). Although not shown in fig. 11, a magnetic disk drive for reading from and writing to a removable non-volatile magnetic disk (e.g., a "floppy disk"), and an optical disk drive for reading from or writing to a removable non-volatile optical disk (e.g., a CD-ROM, DVD-ROM, or other optical media) may be provided. In such cases, each drive may be coupled to bus 1130 through one or more data medium interfaces. Memory 1110 may include at least one program product having a set (e.g., at least one) of program modules configured to carry out the functions of embodiments of the application.
A program/utility 1180 having a set (at least one) of program modules 1170 may be stored in, for example, memory 1110, such program modules 1170 including, but not limited to, an operating system, one or more application programs, other program modules, and program data, each or some combination of which may include an implementation of a network environment. Program modules 1170 typically carry out the functions and/or methods of the embodiments described herein.
The electronic device 1100 may also communicate with one or more external devices 1190 (e.g., keyboard, pointing device, display 1191, etc.), one or more devices that enable a user to interact with the electronic device 1100, and/or any device (e.g., network card, modem, etc.) that enables the electronic device 1100 to communicate with one or more other computing devices. Such communication may occur through an input/output (I/O) interface 1192. Also, the electronic device 1100 may communicate with one or more networks such as a Local Area Network (LAN), a Wide Area Network (WAN), and/or a public network, such as the Internet, through a network adapter 1193. As shown, the network adapter 1193 communicates with other modules of the electronic device 1100 via the bus 1130. It should be appreciated that although not shown, other hardware and/or software modules may be used in connection with electronic device 1100, including, but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, data backup storage systems, and the like.
The processor 1120 executes various functional applications and data processing by running programs stored in the memory 1110.
It should be noted that, the implementation process and the technical principle of the electronic device in this embodiment refer to the foregoing explanation of the transaction processing method in the embodiment of the present application, and are not repeated herein.
In order to implement the above-described embodiments, the present application also proposes a non-transitory computer-readable storage medium having stored thereon a computer program which, when executed by a processor, implements a transaction processing method as set forth in any of the foregoing embodiments of the application.
To achieve the above embodiments, the present application also proposes a computer program product which, when executed by a processor, performs a transaction processing method as proposed in any of the previous embodiments of the present application.
In the description of the present specification, a description referring to terms "one embodiment," "some embodiments," "examples," "specific examples," or "some examples," etc., means that a particular feature, structure, material, or characteristic described in connection with the embodiment or example is included in at least one embodiment or example of the present application. In this specification, schematic representations of the above terms are not necessarily directed to the same embodiment or example. Furthermore, the particular features, structures, materials, or characteristics described may be combined in any suitable manner in any one or more embodiments or examples. Furthermore, the different embodiments or examples described in this specification and the features of the different embodiments or examples may be combined and combined by those skilled in the art without contradiction.
Furthermore, the terms "first," "second," and the like, are used for descriptive purposes only and are not to be construed as indicating or implying a relative importance or implicitly indicating the number of technical features indicated. Thus, a feature defining "a first" or "a second" may explicitly or implicitly include at least one such feature. In the description of the present application, the meaning of "plurality" means at least two, for example, two, three, etc., unless specifically defined otherwise.
Any process or method descriptions in flow charts or otherwise described herein may be understood as representing modules, segments, or portions of code which include one or more executable instructions for implementing specific logical functions or steps of the process, and additional implementations are included within the scope of the preferred embodiment of the present application in which functions may be executed out of order from that shown or discussed, including substantially concurrently or in reverse order from that shown or discussed, depending on the functionality involved, as would be understood by those reasonably skilled in the art of the embodiments of the present application.
Logic and/or steps represented in the flowcharts or otherwise described herein, e.g., a ordered listing of executable instructions for implementing logical functions, can be embodied in any computer-readable medium for use by or in connection with an instruction execution system, apparatus, or device, such as a computer-based system, processor-containing system, or other system that can fetch the instructions from the instruction execution system, apparatus, or device and execute the instructions. For the purposes of this description, a "computer-readable medium" can be any means that can contain, store, communicate, propagate, or transport the program for use by or in connection with the instruction execution system, apparatus, or device. More specific examples (a non-exhaustive list) of the computer-readable medium would include the following: an electrical connection (electronic device) having one or more wires, a portable computer diskette (magnetic device), a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber device, and a portable compact disc read-only memory (CDROM). In addition, the computer readable medium may even be paper or other suitable medium on which the program is printed, as the program may be electronically captured, via, for instance, optical scanning of the paper or other medium, then compiled, interpreted or otherwise processed in a suitable manner, if necessary, and then stored in a computer memory.
It is to be understood that portions of the present application may be implemented in hardware, software, firmware, or a combination thereof. In the above-described embodiments, the various steps or methods may be implemented in software or firmware stored in a memory and executed by a suitable instruction execution system. As with the other embodiments, if implemented in hardware, may be implemented using any one or combination of the following techniques, as is well known in the art: discrete logic circuits having logic gates for implementing logic functions on data signals, application specific integrated circuits having suitable combinational logic gates, programmable Gate Arrays (PGAs), field Programmable Gate Arrays (FPGAs), and the like.
Those of ordinary skill in the art will appreciate that all or a portion of the steps carried out in the method of the above-described embodiments may be implemented by a program to instruct related hardware, where the program may be stored in a computer readable storage medium, and where the program, when executed, includes one or a combination of the steps of the method embodiments.
In addition, each functional unit in the embodiments of the present application may be integrated in one processing module, or each unit may exist alone physically, or two or more units may be integrated in one module. The integrated modules may be implemented in hardware or in software functional modules. The integrated modules may also be stored in a computer readable storage medium if implemented in the form of software functional modules and sold or used as a stand-alone product.
The above-mentioned storage medium may be a read-only memory, a magnetic disk or an optical disk, or the like. While embodiments of the present application have been shown and described above, it will be understood that the above embodiments are illustrative and not to be construed as limiting the application, and that variations, modifications, alternatives and variations may be made to the above embodiments by one of ordinary skill in the art within the scope of the application.

Claims (10)

1. A transaction processing method, comprising:
acquiring a first transaction request; the first transaction request carries a first account identifier and first transaction information;
when a first target account corresponding to the first account identifier is a hot spot account, judging whether the distributed shared memory is in an available state or not; wherein, the distributed shared memory stores account balance of at least one hot spot account;
updating the first account balance according to the first transaction amount when the distributed shared memory is in an available state and the first account balance of the first target account in the distributed shared memory is greater than or equal to the first transaction amount in the first transaction information;
and processing the first transaction service related to the first transaction request, and determining that the first transaction request is successfully processed in response to the processing of the first transaction service.
2. The method of claim 1, wherein the first transaction request carries a first transaction type, the first transaction type is debit, and the determining whether the distributed shared memory is in an available state when the first target account corresponding to the first account identifier is a hot spot account comprises:
inquiring an identification table according to the first account identification to determine whether the first account identification is located in the identification table; the identification table comprises account identifications of at least one hot spot account;
when the first account identifier is located in the identifier table, determining that the first target account is a hot spot account;
inserting a first non-posting list in a database according to the first transaction information, and setting the state of the first non-posting list as an in-transit state;
and judging whether the distributed shared memory is in an available state or not.
3. The method of claim 2, wherein updating the first account balance based on the first transaction amount when the distributed shared memory is in an available state and the first account balance of the first target account in the distributed shared memory is greater than or equal to the first transaction amount in the first transaction information, comprises:
Judging whether an account balance corresponding to the first target account exists in the distributed shared memory or not when the distributed shared memory is in an available state;
if the account balance corresponding to the first target account exists in the distributed shared memory, taking the account balance corresponding to the first target account as the first account balance;
updating the first account balance in the distributed shared memory according to the first transaction amount when the first account balance is greater than or equal to the first transaction amount;
the method further comprises the steps of:
if the account balance corresponding to the first target account does not exist in the distributed shared memory, acquiring a second account balance of the first target account from an account balance table of the database, and determining a second non-posting list from each non-posting list associated with the first target account in the non-posting list; wherein the second non-posting details state comprises an in-transit state and a to-be-reconciliation state;
determining a first occurrence according to the second outstanding account details, and determining a first available balance of the first target account according to the first occurrence and the second account balance;
And when the first available balance is not a negative value, updating the account balance of the first target account in the distributed shared memory according to the first available balance.
4. The method according to claim 2, wherein the method further comprises:
when the distributed shared memory is in an unavailable state, determining a third non-posting list from all non-posting lists associated with the first target account in the non-posting list; wherein the third non-posting details state comprises an in-transit state and a to-be-reconciliation state;
determining a second occurrence amount according to the third non-posting details, and acquiring a third account balance of the first target account from an account balance table of the database;
determining a second available balance of the first target account at the third account balance and the second occurrence;
and when the second available balance is not negative, processing a second transaction service related to the first transaction request, and determining that the transaction is successful in response to the processing of the second transaction service.
5. The method according to claim 1, wherein the method further comprises:
When the first target account is not a hot spot account, acquiring a fourth account balance of the first target account from an account balance table of a database;
updating the fourth account balance of the first target account in the account balance table according to the first transaction amount when the fourth account balance is greater than or equal to the first transaction amount;
processing a third transaction service related to the first transaction request;
determining that the first transaction request is successfully processed in response to the completion of the processing of the third transaction service;
in response to the third transaction processing failing, determining that the first transaction request processing failed and that processing failing is due to a non-balance deficiency.
6. The method according to any one of claims 1-5, further comprising:
when the first transaction request is successfully processed, updating the state of a first non-posting list in a database from an in-transit state to a to-be-reimbursed state;
deleting a first non-posting list in a non-posting list in the database when the first transaction request fails to be processed;
judging whether the processing failure reason of the first transaction request is non-balance deficiency or not;
And returning the first transaction amount to the first target account in the distributed shared memory in the case that the processing failure is caused by non-balance shortage.
7. The method according to any one of claims 1-5, further comprising:
when the setting condition is met, updating the account balance of the second target account in the account balance table in the database according to a fourth non-accounting list of the second target account in the non-accounting list in the database; the second target account is a hot spot account, and the state of the fourth non-posting details comprises a state to be charged;
wherein the setting condition includes any one of the following:
reaching a set period;
and reaching a target moment, wherein the number of received transaction requests in a period of time in which the target moment is positioned is smaller than a set threshold value.
8. The method according to claim 1, wherein the method further comprises:
acquiring a second transaction request; the second transaction request carries a second account identifier, second transaction information and a second transaction type, wherein the second transaction type is credit;
determining whether a third target account corresponding to the second account identifier is a hot spot account or not according to the second account identifier;
When the third target account is not the hot spot account, updating a fifth account balance of the third target account in an account balance table of the database according to a second transaction amount in the second transaction information;
processing a fourth transaction service related to the second transaction request;
determining that the second transaction request is successfully processed in response to the completion of the processing of the fourth transaction service;
determining that the second transaction request processing failed in response to the fourth transaction service processing failure;
when the third target account is a hot spot account, according to the second transaction information, inserting a fifth non-posting list in a database, and setting the state of the fifth non-posting list as an in-transit state;
processing a fifth transaction service related to the second transaction information;
determining that the second transaction request is successfully processed in response to the completion of the processing of the fifth transaction service;
and in response to the fifth transaction service processing failure, determining that the second transaction request processing failure.
9. The method according to claim 1, wherein the method further comprises:
Receiving a balance inquiry request, wherein the balance inquiry request carries a third account identifier;
determining whether a fourth target account corresponding to the third account identifier is a hot spot account or not according to the third account identifier;
when the fourth target account is a hot spot account, judging whether the distributed shared memory is in an available state;
when the distributed shared memory is in an available state, acquiring a sixth account balance of the fourth target account in the distributed shared memory;
sending a first balance inquiry response, wherein the first balance inquiry response carries the balance of the sixth account;
inquiring a seventh account balance corresponding to the second target account from an account balance table in a database when the fourth target account is not a hot spot account;
sending a second balance inquiry response, wherein the second balance inquiry response carries the seventh account balance;
when the distributed shared memory is in an unavailable state, inquiring a seventh non-posting list corresponding to the fourth target account from a non-posting list of a database, wherein the seventh non-posting list is in an in-transit state and a to-be-supplemented state;
Inquiring an eighth account balance corresponding to the fourth target account from an account balance table of the database;
determining a fifth occurrence according to the seventh outstanding account details, and determining a third available balance of the fourth target account according to the fifth occurrence and the eighth account balance;
and sending a third balance inquiry response, wherein the third balance inquiry response carries the third available balance.
10. A transaction processing device, comprising:
the acquisition module is used for acquiring the first transaction request; the first transaction request carries a first account identifier and first transaction information;
the judging module is used for judging whether the distributed shared memory is in an available state or not when the first target account corresponding to the first account identifier is a hot spot account; wherein, the distributed shared memory stores account balance of at least one hot spot account;
the updating module is used for updating the balance of the first account according to the first transaction amount when the distributed shared memory is in an available state and the balance of the first account of the first target account in the distributed shared memory is larger than or equal to the first transaction amount in the first transaction information;
The first processing module is used for processing a first transaction service related to the first transaction request and determining that the first transaction request is successfully processed in response to the processing of the first transaction service.
CN202311041343.8A 2023-08-17 2023-08-17 Transaction processing method and device Pending CN117172918A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202311041343.8A CN117172918A (en) 2023-08-17 2023-08-17 Transaction processing method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202311041343.8A CN117172918A (en) 2023-08-17 2023-08-17 Transaction processing method and device

Publications (1)

Publication Number Publication Date
CN117172918A true CN117172918A (en) 2023-12-05

Family

ID=88932818

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202311041343.8A Pending CN117172918A (en) 2023-08-17 2023-08-17 Transaction processing method and device

Country Status (1)

Country Link
CN (1) CN117172918A (en)

Citations (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106952158A (en) * 2017-03-17 2017-07-14 证通股份有限公司 Solve the problems, such as the bookkeeping methods and equipment of focus account
CN107274162A (en) * 2017-05-31 2017-10-20 深圳市长亮科技股份有限公司 A kind of processing method of high transaction concurrency
CN109087086A (en) * 2018-08-01 2018-12-25 中信百信银行股份有限公司 The method for controlling hot spot account trading
CN109615514A (en) * 2018-11-27 2019-04-12 宝付网络科技(上海)有限公司 Hot spot account trading system and method
CN110889754A (en) * 2019-11-19 2020-03-17 中信百信银行股份有限公司 Method for improving processing efficiency of unviable payment hotspot account
CN111061748A (en) * 2019-12-12 2020-04-24 吉林亿联银行股份有限公司 Hot account accounting method and device
CN112967140A (en) * 2021-03-26 2021-06-15 武汉众邦银行股份有限公司 Hot account transaction data processing method based on asynchronous posting of timed tasks
CN113592470A (en) * 2021-08-03 2021-11-02 北京百度网讯科技有限公司 Service processing method and device, electronic equipment and storage medium
CN114429340A (en) * 2020-10-29 2022-05-03 腾讯科技(深圳)有限公司 Electronic payment processing method and device, electronic equipment and storage medium
CN114647665A (en) * 2021-11-29 2022-06-21 中国银联股份有限公司 Data processing method of distributed system and data processing system thereof
CN116051117A (en) * 2023-03-07 2023-05-02 天津金城银行股份有限公司 Control method and device for balance of hot spot account and electronic equipment
CN116071175A (en) * 2022-12-28 2023-05-05 中国邮政储蓄银行股份有限公司 Hot account management method and hot account management device

Patent Citations (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106952158A (en) * 2017-03-17 2017-07-14 证通股份有限公司 Solve the problems, such as the bookkeeping methods and equipment of focus account
CN107274162A (en) * 2017-05-31 2017-10-20 深圳市长亮科技股份有限公司 A kind of processing method of high transaction concurrency
CN109087086A (en) * 2018-08-01 2018-12-25 中信百信银行股份有限公司 The method for controlling hot spot account trading
CN109615514A (en) * 2018-11-27 2019-04-12 宝付网络科技(上海)有限公司 Hot spot account trading system and method
CN110889754A (en) * 2019-11-19 2020-03-17 中信百信银行股份有限公司 Method for improving processing efficiency of unviable payment hotspot account
CN111061748A (en) * 2019-12-12 2020-04-24 吉林亿联银行股份有限公司 Hot account accounting method and device
CN114429340A (en) * 2020-10-29 2022-05-03 腾讯科技(深圳)有限公司 Electronic payment processing method and device, electronic equipment and storage medium
CN112967140A (en) * 2021-03-26 2021-06-15 武汉众邦银行股份有限公司 Hot account transaction data processing method based on asynchronous posting of timed tasks
CN113592470A (en) * 2021-08-03 2021-11-02 北京百度网讯科技有限公司 Service processing method and device, electronic equipment and storage medium
CN114647665A (en) * 2021-11-29 2022-06-21 中国银联股份有限公司 Data processing method of distributed system and data processing system thereof
CN116071175A (en) * 2022-12-28 2023-05-05 中国邮政储蓄银行股份有限公司 Hot account management method and hot account management device
CN116051117A (en) * 2023-03-07 2023-05-02 天津金城银行股份有限公司 Control method and device for balance of hot spot account and electronic equipment

Similar Documents

Publication Publication Date Title
CN110276614B (en) Updating method and device of account splitting account
US9305048B2 (en) System with multiple conditional commit databases
CN109615514A (en) Hot spot account trading system and method
CN110610411A (en) Bank system, enterprise system, fund management system and method
CN111125106B (en) Batch running task execution method, device, server and storage medium
CN111026769B (en) Working method of dual-core front-end system and related equipment thereof
CN110298644B (en) Account additional money method, account additional money device, server and readable storage medium
CN111080424A (en) Accounting management method and device
US8819183B2 (en) Concurrent execution of request processing and analytics of requests
CN112541830A (en) Processing method, processing device and processing system for transaction consistency
CN111444213B (en) Ledger clearing system and method based on credit business
CN111028074A (en) Overdue bill updating and inquiring method, system, server and storage medium
CN117172918A (en) Transaction processing method and device
CN112634011A (en) Multi-account linkage deposit method and device, electronic equipment and storage medium
US20100228707A1 (en) System for rating a service
CN110008271B (en) Micro-service transaction submitting method based on single database
CN110889687A (en) Method and device for processing account balance under distributed architecture
CN110928565A (en) Hotspot account data updating method and device, server and storage medium
US8566241B2 (en) Deposit pending check clearance
CN111949337B (en) Accounting processing method, device, terminal and storage medium
CN110969518B (en) Clearing account configuration method and device, server and storage medium
CN110033361B (en) Method and device for transferring out resources based on virtual account cover
CN110046877B (en) Account checking method and device and server
CN112163844A (en) Capital supervision method, device, equipment and storage medium
CN110827001A (en) Accounting event bookkeeping method, system, 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