CN113535762B - Secure account payment method and device - Google Patents

Secure account payment method and device Download PDF

Info

Publication number
CN113535762B
CN113535762B CN202110795960.1A CN202110795960A CN113535762B CN 113535762 B CN113535762 B CN 113535762B CN 202110795960 A CN202110795960 A CN 202110795960A CN 113535762 B CN113535762 B CN 113535762B
Authority
CN
China
Prior art keywords
payment
account
balance
merchant
redis
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202110795960.1A
Other languages
Chinese (zh)
Other versions
CN113535762A (en
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.)
Beijing Digital Video Payment Technology Co ltd
Original Assignee
Beijing Digital Video Payment Technology 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 Beijing Digital Video Payment Technology Co ltd filed Critical Beijing Digital Video Payment Technology Co ltd
Priority to CN202110795960.1A priority Critical patent/CN113535762B/en
Publication of CN113535762A publication Critical patent/CN113535762A/en
Application granted granted Critical
Publication of CN113535762B publication Critical patent/CN113535762B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q20/00Payment architectures, schemes or protocols
    • G06Q20/08Payment architectures
    • G06Q20/085Payment architectures involving remote charge determination or related payment systems
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/24Querying
    • G06F16/245Query processing
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q20/00Payment architectures, schemes or protocols
    • G06Q20/22Payment schemes or models
    • G06Q20/24Credit schemes, i.e. "pay after"

Abstract

The invention provides a safe account substitution method and a device, comprising the following steps: receiving payment request information sent by a client, wherein the payment request information comprises account IDs corresponding to merchants; judging whether a zookeeper configuration switch is in an on state or not; if yes, determining that the merchant adopts a zookeeper lock queuing technology to queue according to the account ID; judging whether the queuing is overtime; if not, judging whether the redis configuration switch is in an on state; if yes, redis reads the temporary account balance; judging whether the balance of the temporary account is larger than or equal to the payment amount; if so, deducting the payment amount from the redis; if the operation result is not that or that the redis configuration switch is in the closed state, counting the balance of the merchant account in real time, and determining the payment operation result; the lock acquisition and release performance is improved by adopting a zookeeper lock queuing technology, and the balance is dynamically checked by adopting redis, so that the problem of real-time balance statistics is avoided.

Description

Secure account payment method and device
Technical Field
The invention relates to the technical field of electronic payment, in particular to a safe account payment replacing method and device.
Background
The payment company carries out high-frequency collection and payment replacement according to merchant instructions, in order to ensure the fund safety of payment replacement service, merchant accounts are required to be locked to be queued for payment replacement, whether the balance of the merchant accounts is sufficient or not is required to be checked before each payment replacement, the process can calculate the available balance of the merchant accounts in real time, and when the occurrence amount of the independent record generated by each collection and payment replacement is counted into the available balance of the merchant accounts.
And when the available balance of the merchant account is greater than or equal to the payment replacing amount, freezing available funds of the merchant account, and carrying out subsequent payment replacing flow.
However, the account paying queuing adopts oracle database technology, the performance of acquiring queuing lock and releasing queuing lock is poor, and the single paying queuing time of the merchant is prolonged.
In addition, the statistics of the available balance of the merchant account requires real-time statistics of the occurrence amount of all the payment and payment transactions of the merchant, and as the transaction data volume increases, the real-time statistics time is prolonged, so that the queuing time of each payment account is prolonged, the processing time of other payment requests of the merchant is influenced, and finally the concurrent processing capacity of the merchant is poor.
Disclosure of Invention
In view of the above, the present invention aims to provide a safe account payment method and device, which adopts a zookeeper lock queuing technology to improve the lock acquisition and release performance, adopts redis to dynamically check balance, avoids the problem of real-time balance statistics of a database, shortens single payment queuing time, and improves payment efficiency.
In a first aspect, an embodiment of the present invention provides a secure account proxy method, applied to a server, where the method includes:
receiving payment request information sent by a client, wherein the payment request information comprises account IDs corresponding to merchants;
judging whether a zookeeper configuration switch is in an on state or not;
if the zookeeper configures the switch to be in the open state, determining that the merchant adopts the zookeeper lock queuing technology to queue according to the account ID;
judging whether the queuing is overtime;
if the queuing is not overtime, judging whether a redis configures the switch to be in an on state;
if the redis configures the switch to be in the on state, the redis reads a temporary account balance;
judging whether the balance of the temporary account is larger than or equal to the payment amount;
deducting the payable amount from the redis if the temporary account balance is greater than or equal to the payable amount;
if the temporary account balance is smaller than the payment amount or the redis configures the switch to be in a closed state, counting the merchant account balance in real time;
and determining a payment operation result according to the real-time statistics merchant account balance.
Further, the determining the payment operation result according to the real-time statistics merchant account balance includes:
judging whether the balance of the merchant account is greater than or equal to the payment amount;
if the merchant account balance is greater than or equal to the payment amount, the redis stores the merchant account balance, takes the merchant account balance as the temporary account balance, and deducts the payment amount from the temporary account balance;
and if the merchant account balance is smaller than the payment replacing amount, the redis stores the merchant account balance, takes the merchant account balance as the temporary account balance, and sends payment replacing request failure information to the client.
Further, the determining whether the zookeeper configuration switch is in an on state includes:
and if the zookeeper configures the switch to be in a closed state, determining that the merchant adopts an oracle lock queuing technology to queue according to the account ID.
Further, the determining whether the queuing is overtime includes:
and if the queuing is overtime, sending payment request failure information to the client.
In a second aspect, an embodiment of the present invention provides a secure account proxy apparatus, applied to a server, including:
the receiving unit is used for receiving payment request information sent by the client, wherein the payment request information comprises account IDs corresponding to merchants;
the first judging unit is used for judging whether the zookeeper configuration switch is in an on state or not;
the queuing determining unit is used for determining that the merchant adopts the zookeeper lock queuing technology to queue according to the account ID under the condition that the zookeeper configures the switch to be in the opening state;
a second judging unit for judging whether the queuing is overtime;
a third judging unit, configured to judge whether the redis configures the switch to be in an on state if the queuing has not timed out;
a reading unit configured to read a temporary account balance by the redis in a case where the redis configures the switch to the on state;
a fourth judging unit for judging whether the balance of the temporary account is greater than or equal to the payment amount;
a deduction unit for deducting the payable amount from the redis in case that the temporary account balance is greater than or equal to the payable amount;
the statistics unit is used for counting the account balance of the merchant in real time under the condition that the temporary account balance is smaller than the payment amount or the redis configures the switch to be in a closed state;
and the payment replacing operation result determining unit is used for determining the payment replacing operation result according to the real-time statistics merchant account balance.
Further, the substitution operation result determining unit is specifically configured to:
judging whether the balance of the merchant account is greater than or equal to the payment amount;
if the merchant account balance is greater than or equal to the payment amount, the redis stores the merchant account balance, takes the merchant account balance as the temporary account balance, and deducts the payment amount from the temporary account balance;
and if the merchant account balance is smaller than the payment replacing amount, the redis stores the merchant account balance, takes the merchant account balance as the temporary account balance, and sends payment replacing request failure information to the client.
Further, the first judging unit is specifically configured to:
and under the condition that the zookeeper configures the switch to be in a closed state, determining that the merchant adopts an oracle lock queuing technology to queue according to the account ID.
Further, the second judging unit is specifically configured to:
and sending payment request failure information to the client under the condition that the queuing is overtime.
In a third aspect, an embodiment of the present invention provides an electronic device, including a memory, and a processor, where the memory stores a computer program executable on the processor, and where the processor implements a method as described above when executing the computer program.
In a fourth aspect, embodiments of the present invention provide a computer readable medium having non-volatile program code executable by a processor, the program code causing the processor to perform the method as described above.
The embodiment of the invention provides a secure account substitution method and a secure account substitution device, which comprise the following steps: receiving payment request information sent by a client, wherein the payment request information comprises account IDs corresponding to merchants; judging whether a zookeeper configuration switch is in an on state or not; if the zookeeper configuration switch is in an open state, determining that the merchant adopts a zookeeper lock queuing technology to queue according to the account ID; judging whether the queuing is overtime; if the queuing is not overtime, judging whether the redis configuration switch is in an on state; if the redis configures the switch to be in an on state, the redis reads the temporary account balance; judging whether the balance of the temporary account is larger than or equal to the payment amount; if the temporary account balance is greater than or equal to the payable amount, deducting the payable amount from the redis; if the temporary account balance is smaller than the payment amount or the redis configuration switch is in the closed state, counting the account balance of the merchant in real time; determining a payment operation result according to real-time statistics of the balance of the merchant account; the lock acquisition and release performance is improved by adopting a zookeeper lock queuing technology, the balance is dynamically checked by adopting redis, the problem of real-time balance statistics of a database is avoided, the single-pass paying queuing time is shortened, and the paying efficiency is improved.
Additional features and advantages of the invention will be set forth in the description which follows, and in part will be obvious from the description, or may be learned by practice of the invention. The objectives and other advantages of the invention will be realized and attained by the structure particularly pointed out in the written description and claims hereof as well as the appended drawings.
In order to make the above objects, features and advantages of the present invention more comprehensible, preferred embodiments accompanied with figures are described in detail below.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings that are needed in the description of the embodiments or the prior art will be briefly described, and it is obvious that the drawings in the description below are some embodiments of the present invention, and other drawings can be obtained according to the drawings without inventive effort for a person skilled in the art.
FIG. 1 is a flowchart of a secure account payment method according to an embodiment of the present invention;
FIG. 2 is a flowchart of step S111 in a secure account replacement payment method according to an embodiment of the present invention;
fig. 3 is a schematic diagram of a secure account payment device according to a second embodiment of the present invention.
Icon:
1-a receiving unit; 2-a first judgment unit; a 3-queuing determination unit; 4-a second judgment unit; 5-a third judgment unit; a 6-reading unit; 7-a fourth judgment unit; 8-a deduction unit; 9-a statistics unit; and a 10-substitution operation result determining unit.
Detailed Description
For the purpose of making the objects, technical solutions and advantages of the embodiments of the present invention more apparent, the technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings, and it is apparent that the described embodiments are some embodiments of the present invention, but not all embodiments. All other embodiments, which can be made by those skilled in the art based on the embodiments of the invention without making any inventive effort, are intended to be within the scope of the invention.
In order to facilitate understanding of the present embodiment, the following describes embodiments of the present invention in detail.
Embodiment one:
fig. 1 is a flowchart of a secure account payment method according to an embodiment of the present invention.
Referring to fig. 1, applied to a server, the method includes the steps of:
step S101, receiving payment request information sent by a client, wherein the payment request information comprises account IDs corresponding to merchants;
step S102, judging whether a zookeeper configuration switch is in an on state; if the zookeeper configuration switch is in an on state, executing step S103; if the zookeeper configuration switch is in the off state, executing step S104;
step S103, determining that the merchant adopts a zookeeper lock queuing technology to queue according to the account ID;
step S104, determining that the merchant adopts an oracle lock queuing technology to queue according to the account ID;
specifically, the zookeeper is a distributed small file storage system. If the zookeeper configuration switch is in an open state, queuing is carried out by adopting a zookeeper lock queuing technology according to the account ID merchant; if the zookeeper configuration switch is in a closed state, queuing is carried out by adopting an oracle lock queuing technology according to the account ID merchant; and after the merchant is successfully queued, the account fund operation is frozen, and if the queuing time is overtime, the payment request failure information is sent to the client.
Step S105, judging whether the queuing is overtime; if the queuing has not timed out, executing step S106;
here, if the queuing times out, the payment request failure information is transmitted to the client.
Step S106, judging whether the redis configuration switch is in an on state; if the redis configuration switch is in an on state, step S107 is performed;
step S107, redis reads the temporary account balance;
step S108, judging whether the balance of the temporary account is larger than or equal to the payment amount; if the temporary account balance is greater than or equal to the payment amount, then step S109 is performed; if the temporary account balance is smaller than the payable amount or the redis configuration switch is in the off state, executing step S110;
step S109, deducting the payment amount from redis;
step S110, counting the balance of the merchant account in real time;
and step S111, determining a payment operation result according to the real-time statistics of the balance of the merchant account.
Specifically, after the merchant is successfully queued, judging whether a redis configuration switch is in an on state; if the terminal is in the open state, redis reads the balance of the temporary account and judges whether the balance of the temporary account is larger than or equal to the payment amount; if the temporary account balance is greater than or equal to the substituted payment amount, the substituted payment amount is deducted from the redis, and the substituted payment operation is directly carried out; if the temporary account balance is smaller than the payment amount, the merchant account balance is counted in real time. Here, if redis does not store a temporary account balance, real-time statistics of merchant account balances are also required.
If the redis configuration switch is in the closed state, real-time statistics is carried out on the balance of the merchant account, and a payment operation result is determined according to the real-time statistics of the balance of the merchant account.
The payment replacing operation result comprises payment replacing request success information or payment replacing request failure information.
Further, referring to fig. 2, step S111 includes the steps of:
step S201, judging whether the balance of the merchant account is larger than or equal to the payment amount; if the merchant account balance is greater than or equal to the payment amount, then step S202 is performed; if the merchant account balance is less than the payment amount, executing step S203;
step S202, redis stores the balance of the merchant account, takes the balance of the merchant account as the temporary account balance, and deducts the payment amount from the temporary account balance;
step S203, redis stores the balance of the merchant account, takes the balance of the merchant account as the temporary account balance, and sends payment request failure information to the client.
Specifically, in the process of counting the balance of the merchant account in real time, if the balance of the merchant account is greater than or equal to the payment amount, redis stores the balance of the merchant account, takes the balance of the merchant account as a temporary account balance, freezes account funds, and deducts the payment amount from the temporary account balance; and if the balance of the merchant account is smaller than the payment amount, redis stores the balance of the merchant account, takes the balance of the merchant account as the temporary account balance, does not freeze account funds, and sends payment request failure information to the client.
In the prior art, an oracle lock queuing technology is used for queuing, records are required to be inserted into and deleted from a database respectively for acquiring and releasing the lock, and the performance is low; according to the method, the account balance is dynamically checked in a queuing and redis mode by adopting a zookeeper lock queuing technology, and is regularly corrected, so that the release performance is improved;
in the prior art, the available balance of an account needs to be counted for each generation, and when the data volume of a database is relatively large, serious performance problems exist; according to the method and the device, the available balance is temporarily stored in the redis, when the balance of the merchant account is sufficient, the real-time balance does not need to be counted each time, the performance problem of counting the real-time balance by the database is effectively avoided, the queuing time of single payment is shortened, and the payment capability of the merchant in unit time is improved.
The embodiment of the invention provides a safe account substitution method, which comprises the following steps: receiving payment request information sent by a client, wherein the payment request information comprises account IDs corresponding to merchants; judging whether a zookeeper configuration switch is in an on state or not; if the zookeeper configuration switch is in an open state, determining that the merchant adopts a zookeeper lock queuing technology to queue according to the account ID; judging whether the queuing is overtime; if the queuing is not overtime, judging whether the redis configuration switch is in an on state; if the redis configures the switch to be in an on state, the redis reads the temporary account balance; judging whether the balance of the temporary account is larger than or equal to the payment amount; if the temporary account balance is greater than or equal to the payable amount, deducting the payable amount from the redis; if the temporary account balance is smaller than the payment amount or the redis configuration switch is in the closed state, counting the account balance of the merchant in real time; determining a payment operation result according to real-time statistics of the balance of the merchant account; the lock acquisition and release performance is improved by adopting a zookeeper lock queuing technology, the balance is dynamically checked by adopting redis, the problem of real-time balance statistics of a database is avoided, the single-pass paying queuing time is shortened, and the paying efficiency is improved.
Embodiment two:
fig. 3 is a schematic diagram of a secure account payment device according to a second embodiment of the present invention.
Referring to fig. 3, applied to a server, the apparatus includes:
the receiving unit 1 is configured to receive payment request information sent by a client, where the payment request information includes an account ID corresponding to a merchant;
a first judging unit 2, configured to judge whether the zookeeper configuration switch is in an on state;
a queuing determining unit 3, configured to determine, according to the account ID, that the merchant uses a zookeeper lock queuing technique to queue when the zookeeper configuration switch is in an on state;
a second judging unit 4 for judging whether the queuing is overtime;
a third judging unit 5 for judging whether the redis configuration switch is in an on state or not in the case that the queuing is not overtime;
a reading unit 6 for reading the temporary account balance by the redis in case that the redis configuration switch is in an on state;
a fourth judging unit 7 for judging whether the balance of the temporary account is greater than or equal to the amount of the escrow;
a deduction unit 8 for deducting the payable amount from the redis in case that the temporary account balance is greater than or equal to the payable amount;
a statistics unit 9, configured to, when the temporary account balance is less than the payment amount or the redis configuration switch is in the closed state, perform real-time statistics on the merchant account balance;
and the payment replacing operation result determining unit 10 is used for determining the payment replacing operation result according to the real-time statistics of the balance of the merchant account.
Further, the substitution operation result determination unit 10 is specifically configured to:
judging whether the balance of the merchant account is greater than or equal to the payment amount;
if the merchant account balance is greater than or equal to the payment amount, redis stores the merchant account balance, takes the merchant account balance as a temporary account balance, and deducts the payment amount from the temporary account balance;
and if the balance of the merchant account is smaller than the payment amount, redisstoring the balance of the merchant account, taking the balance of the merchant account as the temporary account balance, and sending payment request failure information to the client.
Further, the first judging unit 2 is specifically configured to:
under the condition that the zookeeper configuration switch is in a closed state, determining that the merchant adopts an oracle lock queuing technology to queue according to the account ID.
Further, the second judging unit 4 is specifically configured to:
and sending payment request failure information to the client under the condition of queuing timeout.
The embodiment of the invention provides a safe account substitution method, which comprises the following steps: receiving payment request information sent by a client, wherein the payment request information comprises account IDs corresponding to merchants; judging whether a zookeeper configuration switch is in an on state or not; if the zookeeper configuration switch is in an open state, determining that the merchant adopts a zookeeper lock queuing technology to queue according to the account ID; judging whether the queuing is overtime; if the queuing is not overtime, judging whether the redis configuration switch is in an on state; if the redis configures the switch to be in an on state, the redis reads the temporary account balance; judging whether the balance of the temporary account is larger than or equal to the payment amount; if the temporary account balance is greater than or equal to the payable amount, deducting the payable amount from the redis; if the temporary account balance is smaller than the payment amount or the redis configuration switch is in the closed state, counting the account balance of the merchant in real time; determining a payment operation result according to real-time statistics of the balance of the merchant account; the lock acquisition and release performance is improved by adopting a zookeeper lock queuing technology, the balance is dynamically checked by adopting redis, the problem of real-time balance statistics of a database is avoided, the single-pass paying queuing time is shortened, and the paying efficiency is improved.
The embodiment of the invention also provides electronic equipment, which comprises a memory, a processor and a computer program stored on the memory and capable of running on the processor, wherein the processor realizes the steps of the safe account payment method provided by the embodiment when executing the computer program.
The present invention also provides a computer readable medium having non-volatile program code executable by a processor, the computer readable medium having a computer program stored thereon, which when executed by the processor performs the steps of the secure account proxy method of the above embodiments.
The computer program product provided by the embodiment of the present invention includes a computer readable storage medium storing a program code, where instructions included in the program code may be used to perform the method described in the foregoing method embodiment, and specific implementation may refer to the method embodiment and will not be described herein.
It will be clear to those skilled in the art that, for convenience and brevity of description, specific working procedures of the above-described system and apparatus may refer to corresponding procedures in the foregoing method embodiments, which are not described herein again.
In addition, in the description of embodiments of the present invention, unless explicitly stated and limited otherwise, the terms "mounted," "connected," and "connected" are to be construed broadly, and may be, for example, fixedly connected, detachably connected, or integrally connected; can be mechanically or electrically connected; can be directly connected or indirectly connected through an intermediate medium, and can be communication between two elements. The specific meaning of the above terms in the present invention will be understood in specific cases by those of ordinary skill in the art.
The functions, if implemented in the form of software functional units and sold or used as a stand-alone product, may be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention may be embodied essentially or in a part contributing to the prior art or in a part of the technical solution, in the form of a software product stored in a storage medium, comprising several instructions for causing a computer device (which may be a personal computer, a server, a network device, etc.) to perform all or part of the steps of the method according to the embodiments of the present invention. And the aforementioned storage medium includes: a U-disk, a removable hard disk, a Read-Only Memory (ROM), a random access Memory (RAM, random Access Memory), a magnetic disk, or an optical disk, or other various media capable of storing program codes.
In the description of the present invention, it should be noted that the directions or positional relationships indicated by the terms "center", "upper", "lower", "left", "right", "vertical", "horizontal", "inner", "outer", etc. are based on the directions or positional relationships shown in the drawings, are merely for convenience of describing the present invention and simplifying the description, and do not indicate or imply that the devices or elements referred to must have a specific orientation, be configured and operated in a specific orientation, and thus should not be construed as limiting the present invention. Furthermore, the terms "first," "second," and "third" are used for descriptive purposes only and are not to be construed as indicating or implying relative importance.
Finally, it should be noted that: the above examples are only specific embodiments of the present invention, and are not intended to limit the scope of the present invention, but it should be understood by those skilled in the art that the present invention is not limited thereto, and that the present invention is described in detail with reference to the foregoing examples: any person skilled in the art may modify or easily conceive of the technical solution described in the foregoing embodiments, or perform equivalent substitution of some of the technical features, while remaining within the technical scope of the present disclosure; such modifications, changes or substitutions do not depart from the spirit and scope of the technical solutions of the embodiments of the present invention, and are intended to be included in the scope of the present invention. Therefore, the protection scope of the present invention shall be subject to the protection scope of the claims.

Claims (10)

1. A secure account proxy method for use with a server, the method comprising:
receiving payment request information sent by a client, wherein the payment request information comprises account IDs corresponding to merchants;
judging whether a zookeeper configuration switch is in an on state or not;
if the zookeeper configures the switch to be in the open state, determining that the merchant adopts the zookeeper lock queuing technology to queue according to the account ID;
judging whether the queuing is overtime;
if the queuing is not overtime, judging whether a redis configures the switch to be in an on state;
if the redis configures the switch to be in the on state, the redis reads a temporary account balance;
judging whether the balance of the temporary account is larger than or equal to the payment amount;
deducting the payable amount from the redis if the temporary account balance is greater than or equal to the payable amount;
if the temporary account balance is smaller than the payment amount or the redis configures the switch to be in a closed state, counting the merchant account balance in real time;
and determining a payment operation result according to the real-time statistics merchant account balance.
2. The method for secure account replacement payment according to claim 1, wherein determining the result of the replacement payment operation based on the real-time statistical merchant account balance comprises:
judging whether the balance of the merchant account is greater than or equal to the payment amount;
if the merchant account balance is greater than or equal to the payment amount, the redis stores the merchant account balance, takes the merchant account balance as the temporary account balance, and deducts the payment amount from the temporary account balance;
and if the merchant account balance is smaller than the payment replacing amount, the redis stores the merchant account balance, takes the merchant account balance as the temporary account balance, and sends payment replacing request failure information to the client.
3. The secure account replacement method of claim 1, wherein the determining whether the zookeeper configuration switch is on comprises:
and if the zookeeper configures the switch to be in a closed state, determining that the merchant adopts an oracle lock queuing technology to queue according to the account ID.
4. The secure account proxy method of claim 1 wherein said determining if queuing has timed out comprises:
and if the queuing is overtime, sending payment request failure information to the client.
5. A secure account proxy apparatus for use with a server, the apparatus comprising:
the receiving unit is used for receiving payment request information sent by the client, wherein the payment request information comprises account IDs corresponding to merchants;
the first judging unit is used for judging whether the zookeeper configuration switch is in an on state or not;
the queuing determining unit is used for determining that the merchant adopts the zookeeper lock queuing technology to queue according to the account ID under the condition that the zookeeper configures the switch to be in the opening state;
a second judging unit for judging whether the queuing is overtime;
a third judging unit, configured to judge whether the redis configures the switch to be in an on state if the queuing has not timed out;
a reading unit configured to read a temporary account balance by the redis in a case where the redis configures the switch to the on state;
a fourth judging unit for judging whether the balance of the temporary account is greater than or equal to the payment amount;
a deduction unit for deducting the payable amount from the redis in case that the temporary account balance is greater than or equal to the payable amount;
the statistics unit is used for counting the account balance of the merchant in real time under the condition that the temporary account balance is smaller than the payment amount or the redis configures the switch to be in a closed state;
and the payment replacing operation result determining unit is used for determining the payment replacing operation result according to the real-time statistics merchant account balance.
6. The secure account payment device of claim 5, wherein the payment operation result determination unit is specifically configured to:
judging whether the balance of the merchant account is greater than or equal to the payment amount;
if the merchant account balance is greater than or equal to the payment amount, the redis stores the merchant account balance, takes the merchant account balance as the temporary account balance, and deducts the payment amount from the temporary account balance;
and if the merchant account balance is smaller than the payment replacing amount, the redis stores the merchant account balance, takes the merchant account balance as the temporary account balance, and sends payment replacing request failure information to the client.
7. The secure account proxy apparatus according to claim 5, wherein said first judging unit is specifically configured to:
and under the condition that the zookeeper configures the switch to be in a closed state, determining that the merchant adopts an oracle lock queuing technology to queue according to the account ID.
8. The secure account replacement device of claim 5, wherein the second determining unit is specifically configured to:
and sending payment request failure information to the client under the condition that the queuing is overtime.
9. An electronic device comprising a memory, a processor, the memory having stored thereon a computer program executable on the processor, characterized in that the processor implements the method of any of the preceding claims 1 to 4 when the computer program is executed.
10. A computer readable medium having non-volatile program code executable by a processor, the program code causing the processor to perform the method of any one of claims 1 to 4.
CN202110795960.1A 2021-07-14 2021-07-14 Secure account payment method and device Active CN113535762B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110795960.1A CN113535762B (en) 2021-07-14 2021-07-14 Secure account payment method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110795960.1A CN113535762B (en) 2021-07-14 2021-07-14 Secure account payment method and device

Publications (2)

Publication Number Publication Date
CN113535762A CN113535762A (en) 2021-10-22
CN113535762B true CN113535762B (en) 2024-01-26

Family

ID=78127977

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110795960.1A Active CN113535762B (en) 2021-07-14 2021-07-14 Secure account payment method and device

Country Status (1)

Country Link
CN (1) CN113535762B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115456612B (en) * 2022-10-28 2023-03-24 深圳市小赢信息技术有限责任公司 Accounting method, system, terminal and storage medium for balance base table

Citations (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2011016957A1 (en) * 2009-08-07 2011-02-10 Alibaba Group Holding Limited Method and system for account parallel processing
CN106204007A (en) * 2015-04-30 2016-12-07 深圳市银信网银科技有限公司 Payment system based on same fund server and method of payment, device and server
CN107451853A (en) * 2017-07-06 2017-12-08 广州唯品会网络技术有限公司 Method, apparatus, system and the storage medium that a kind of red packet distributes in real time
CN109255701A (en) * 2018-08-27 2019-01-22 宜人恒业科技发展(北京)有限公司 A kind of net loan business data processing method
CN109284089A (en) * 2018-08-30 2019-01-29 上海艾融软件股份有限公司 A kind of realization system and method for the electric business platform based on micro services technology
CN109559106A (en) * 2018-11-29 2019-04-02 银联商务股份有限公司 Fund, which is drawn, pays method, apparatus and realization device
CN109636369A (en) * 2018-11-02 2019-04-16 深圳市快付通金融网络科技服务有限公司 Fund account accounting processing method, apparatus, computer equipment and storage medium
CN111210270A (en) * 2020-01-02 2020-05-29 广州虎牙科技有限公司 Business processing method and device, service cluster, computer equipment and storage medium
CN111258976A (en) * 2018-12-03 2020-06-09 北京京东尚科信息技术有限公司 Distributed lock implementation method, system, device and storage medium
CN111475516A (en) * 2020-03-05 2020-07-31 深圳壹账通智能科技有限公司 Method and device for calling distributed lock, computer equipment and storage medium
CN111640006A (en) * 2020-05-29 2020-09-08 深圳壹账通智能科技有限公司 Bank payment and receipt method, device, terminal and storage medium
CN111784316A (en) * 2020-05-10 2020-10-16 浙江智科炬新科技有限公司 Novel segmented charging system and method based on positioning system

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109725840B (en) * 2017-10-30 2022-04-05 伊姆西Ip控股有限责任公司 Throttling writes with asynchronous flushing
US11204967B2 (en) * 2018-09-25 2021-12-21 Gunnar Lovelace Computer system transaction processing

Patent Citations (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2011016957A1 (en) * 2009-08-07 2011-02-10 Alibaba Group Holding Limited Method and system for account parallel processing
CN106204007A (en) * 2015-04-30 2016-12-07 深圳市银信网银科技有限公司 Payment system based on same fund server and method of payment, device and server
CN107451853A (en) * 2017-07-06 2017-12-08 广州唯品会网络技术有限公司 Method, apparatus, system and the storage medium that a kind of red packet distributes in real time
CN109255701A (en) * 2018-08-27 2019-01-22 宜人恒业科技发展(北京)有限公司 A kind of net loan business data processing method
CN109284089A (en) * 2018-08-30 2019-01-29 上海艾融软件股份有限公司 A kind of realization system and method for the electric business platform based on micro services technology
CN109636369A (en) * 2018-11-02 2019-04-16 深圳市快付通金融网络科技服务有限公司 Fund account accounting processing method, apparatus, computer equipment and storage medium
CN109559106A (en) * 2018-11-29 2019-04-02 银联商务股份有限公司 Fund, which is drawn, pays method, apparatus and realization device
CN111258976A (en) * 2018-12-03 2020-06-09 北京京东尚科信息技术有限公司 Distributed lock implementation method, system, device and storage medium
CN111210270A (en) * 2020-01-02 2020-05-29 广州虎牙科技有限公司 Business processing method and device, service cluster, computer equipment and storage medium
CN111475516A (en) * 2020-03-05 2020-07-31 深圳壹账通智能科技有限公司 Method and device for calling distributed lock, computer equipment and storage medium
CN111784316A (en) * 2020-05-10 2020-10-16 浙江智科炬新科技有限公司 Novel segmented charging system and method based on positioning system
CN111640006A (en) * 2020-05-29 2020-09-08 深圳壹账通智能科技有限公司 Bank payment and receipt method, device, terminal and storage medium

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
基于Kafka消息的云化计费系统研究与实现;崔益彪等;《 江苏通信》;第58-62页 *

Also Published As

Publication number Publication date
CN113535762A (en) 2021-10-22

Similar Documents

Publication Publication Date Title
AU2012275097B2 (en) Processing monitor system and method
US9355397B2 (en) Electronic money system, amount-of-money change information transmitter, server, and amount-of-money change information transmitting method
CN101588577A (en) Safe system and method for bank transaction system
CN114363070A (en) Reliable time stamp credential
CN113535762B (en) Secure account payment method and device
US20200167777A1 (en) Transaction system cache reconciliation
CN110298644B (en) Account additional money method, account additional money device, server and readable storage medium
CA2689992A1 (en) Portability of financial tokens
CN106023050A (en) Traffic data management system
CN117291596A (en) Offline payment information processing method, device, equipment and readable storage medium
CN115278563A (en) Method and system for intelligently selecting short message channel based on influence factor
Godbole et al. Secure and efficient protocol for mobile payments
KR102332564B1 (en) Open banking and firm banking optimization cross relay method, device and system
US9710832B1 (en) System and method for card-funded bill payment concierge service
CN111768293B (en) Transaction information processing method, device, equipment and storage medium
CN111260472B (en) Virtual currency fund management method, device and system
CN108038783A (en) Position management method, system and computer-readable recording medium
JP5588487B2 (en) Information processing apparatus, information processing apparatus control method, and information processing apparatus control program
CN117522413A (en) Payment monitoring method, payment monitoring device and storage medium
CN117035992A (en) Distributed loan system resource loss prevention and control method and device based on time sequence, electronic equipment and storage medium
TWM603572U (en) Counterfeit Detection System
CN115689538A (en) Virtual account transfer processing method and device
CN112241881A (en) Off-line transaction method and system based on electronic cash
CN114548996A (en) Card payment method and related device
CN117835216A (en) Method, terminal and system for processing card withdrawal of empty card

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
GR01 Patent grant
GR01 Patent grant