CN114706872A - Asynchronous queuing processing method and system for payment transaction - Google Patents

Asynchronous queuing processing method and system for payment transaction Download PDF

Info

Publication number
CN114706872A
CN114706872A CN202210478996.1A CN202210478996A CN114706872A CN 114706872 A CN114706872 A CN 114706872A CN 202210478996 A CN202210478996 A CN 202210478996A CN 114706872 A CN114706872 A CN 114706872A
Authority
CN
China
Prior art keywords
transaction request
time
queuing
processing
approval
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
CN202210478996.1A
Other languages
Chinese (zh)
Inventor
谢金鑫
马鸿军
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
CITIC Aibank Corp Ltd
Original Assignee
CITIC Aibank Corp 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 CITIC Aibank Corp Ltd filed Critical CITIC Aibank Corp Ltd
Priority to CN202210478996.1A priority Critical patent/CN114706872A/en
Publication of CN114706872A publication Critical patent/CN114706872A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/23Updating
    • G06F16/2308Concurrency control
    • G06F16/2336Pessimistic concurrency control approaches, e.g. locking or multiple versions without time stamps
    • G06F16/2343Locking methods, e.g. distributed locking or locking implementation details
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q40/00Finance; Insurance; Tax strategies; Processing of corporate or income taxes
    • G06Q40/04Trading; Exchange, e.g. stocks, commodities, derivatives or currency exchange

Landscapes

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

Abstract

The invention relates to a payment transaction asynchronous queuing processing method and system, comprising the steps of obtaining a transaction request, and checking the transaction request; acquiring a transaction request passing the check, forming a queued transaction request, latching the queued transaction request and the REDIS into a database, and recording the warehousing time; examining and approving the queuing transaction request according to the warehousing time, acquiring an examination and approval result, and updating an examination and approval identifier corresponding to the queuing transaction request; setting a first time and a first polling task, executing the first polling task regularly, examining and approving the queued transaction request, and updating an examination and approval identifier and a processing identifier corresponding to the queued transaction request; setting a second time and a second polling task, executing the second polling task at regular time, acquiring the queuing transaction request with the processing identifier being processed, and sending the queuing transaction request to a payment system. The invention is based on the two-stage processing of the approval results, improves the processing approval efficiency and ensures the accuracy of the processing of the approval results.

Description

Asynchronous queuing processing method and system for payment transaction
Technical Field
The invention relates to the field of financial data processing, in particular to a payment transaction asynchronous queuing processing method and system.
Background
In online transaction, when some transactions need to be approved due to too large amount of money or wind control reasons, the solution often adopts direct interception as failed transaction, and a wind control strategy needs to be manually changed, or a client initiates a new transaction after checking the amount of money; however, these transactions should be directly passed through, and a safe and efficient direct processing method is lacking. The online transfer transaction of finance type can be directly rejected due to the factors such as risk and the like of too large amount of money, needs to be initiated for the second time after approval, and can cause the problems of poor customer experience, transaction delay and the like; online approval, which is directly set to synchronization, can cause the system to wait for a long time, reduce throughput, and have poor concurrency.
The invention provides an asynchronous queuing processing method for payment transaction, aiming at the problem that the transaction needs to be reinitiated due to system misjudgment in online transaction. The adoption of the queuing processing and approval mode avoids the problem of transaction failure caused by imperfect strategy or immaturity. The asynchronous mode is adopted, and the condition that when the transaction quantity is increased and the system concurrency performance is easily reduced when the examination and approval is carried out by simply changing the mode into the synchronous mode is avoided.
Disclosure of Invention
In order to solve the defects of the prior art, the invention provides the asynchronous queuing processing method and the asynchronous queuing processing system for the payment transaction, which can reduce the cost, improve the efficiency of system connection processing examination and approval, efficiently and stably ensure the accuracy of examination and approval result processing and ensure the accuracy of the transaction by processing the examination and approval result in two stages and utilizing the REDIS technology to ensure the accuracy of processing and the feasibility of a scheme.
In order to achieve the above purpose, the technical scheme adopted by the invention comprises the following steps:
a payment transaction asynchronous queuing processing method, comprising:
s1, acquiring a transaction request, and checking the transaction request;
s2, obtaining the transaction request passing the check, forming a queue transaction request, and locking the queue transaction request and the REDIS into a database and recording the warehousing time;
s3, setting overtime time, an approval mark, a processing mark and a processing result mark;
the approval mark comprises approved, unapproved and overtime unapproved;
the processing identification comprises processed, to-be-processed and overtime unprocessed;
examining and approving the queuing transaction request according to the warehousing time, acquiring an examination and approval result, and updating an examination and approval identifier corresponding to the queuing transaction request;
s4, setting a first time and a first polling task, executing the first polling task regularly, approving the queued transaction request and updating an approval identifier and a processing identifier corresponding to the queued transaction request;
s5, setting a second time and a second polling task, executing the second polling task at regular time, acquiring the queuing transaction request with the processing identifier being processed, and sending the queuing transaction request to a payment system.
Further, checking the transaction request in S1 includes checking the content of the transaction request, which includes the merchant, the product, the global serial number, the sub-transaction serial number, and the transaction information;
determining whether the content of the transaction request is missing and/or illegal;
returning a failure when the contents of the transaction request are missing and/or illegal;
and when the content of the transaction request is not missing and/or illegal, performing anti-recheck on the transaction request.
Further, the method for performing anti-rechecking on the transaction request comprises the steps of using the global serial number and the sub-transaction serial number as query conditions, checking whether the transaction request already exists by using a REDIS distributed lock, and if the transaction request already exists, returning to fail.
Further, the first time in S4 is 24 hours from the warehousing time;
the first polling task includes:
s41, acquiring a queuing transaction request with an approval mark of being not approved and unprocessed in the first time;
s42, adding a first distributed lock to the queuing transaction request with the approval mark being not approved and not processed in the first time, setting the expiration time of the first distributed lock, and automatically releasing the first distributed lock after expiration;
s43, processing the successfully locked queuing transaction request, and checking whether the queuing transaction request is approved or not according to the approval identification;
s44, if the approval mark is approved, updating the processing mark of the queuing transaction request as pending;
if the approval mark is not approved, judging whether the queuing transaction request exceeds the overtime time from the warehousing time;
s45, if the time-out time is exceeded from the warehousing time of the queued transaction request, setting the approval mark of the queued transaction request as overtime and unapproved;
and S46, releasing the first distributed lock.
Further, the second time in S5 is 25 hours from the warehousing time;
the second polling task includes:
s51, acquiring a processing mark as unprocessed and the unprocessed queued transaction request in the second time;
s52, setting the expiration time of the second distributed lock for the queuing transaction request with the processing identifier as unprocessed and the queuing transaction request with the unprocessed second time and automatically releasing the second distributed lock after expiration;
s53, acquiring the queuing transaction request with the processing identifier processed, and assembling the queuing transaction request with the processing identifier processed into a message to be sent to a payment system;
s54, judging whether the transmission is successful or not according to the response result returned by the payment system, and if the transmission is not successful, retransmitting the transmission;
s55, setting the maximum retransmission times, and stopping when the maximum retransmission times is exceeded;
and S56, releasing the second distributed lock.
Further, the processing result identification includes release and rejection.
Further, the approval timeout setting is configured in real time by an APOLLO configuration center.
The invention also relates to a payment transaction asynchronous queuing processing system, comprising:
the queuing and accepting request module is used for acquiring a transaction request, checking the transaction request, acquiring the transaction request passing the checking, forming a queuing transaction request, latching the queuing transaction request into a database by adding REDIS and recording the warehousing time, examining and approving the queuing transaction request according to the warehousing time, acquiring an examination and approval result and updating an examination and approval identifier corresponding to the queuing transaction request;
the polling check module is used for setting a first time and a first polling task, executing the first polling task regularly, approving the queuing transaction request and updating an approval identifier and a processing identifier corresponding to the queuing transaction request;
and the final state processing module is used for setting a second time and a second polling task, executing the second polling task at regular time, acquiring the queuing transaction request with the processing identifier being processed, and sending the queuing transaction request to a payment system.
The invention also relates to a computer-readable storage medium, on which a computer program is stored which, when being executed by a processor, carries out the above-mentioned method.
The invention also relates to an electronic device comprising a processor and a memory;
the memory is used for storing transaction requests, queued transaction requests, timeout time, first polling tasks, second time and second polling tasks;
the processor is configured to execute the computer program stored in the memory and execute the method described above.
The invention has the beneficial effects that:
according to the invention, the approval result is processed in two stages, the accuracy of processing and the feasibility of a scheme are guaranteed by utilizing the REDIS technology, the cost can be reduced, the efficiency of system connection processing approval is improved, the accuracy of approval result processing is efficiently and stably guaranteed, and the accuracy of transaction is guaranteed.
Drawings
FIG. 1 is a flow chart of an asynchronous queuing method for payment transaction according to the present invention.
FIG. 2 is a schematic diagram of an asynchronous queuing process for payment transactions according to the present invention.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
The invention relates to a payment transaction asynchronous queuing processing method with the step flow shown in figure 1, which comprises the following steps:
s1, acquiring a transaction request, and checking the transaction request;
specifically, in the embodiment of the application, firstly, the content of the transaction request is checked, and preferably, the content of the transaction request comprises a merchant, a product, a global serial number, a sub-transaction serial number and transaction information;
judging whether the content of the transaction request is missing and/or illegal, and returning failure when the content of the transaction request is missing and/or illegal; when the content of the transaction request is not missing and/or illegal, performing anti-recheck on the transaction request; the global serial number and the sub-transaction serial number are used as query conditions to judge whether the request is processed or not in two steps: the first step is to check whether data exists by utilizing REDIS distributed lock; the second part judges whether the data are consistent in the database; and if the data are consistent, returning the processing result, otherwise, warehousing the data.
S2, obtaining the transaction request passing the check, forming a queue transaction request, and locking the queue transaction request and the REDIS into a database and recording the warehousing time;
specifically, in the embodiment of the application, if queuing is performed after successful warehousing, the REDIS lock is added to the transaction request at this time, so that subsequent processing is prevented from being performed for many times. At the moment, the persistence and anti-reprocessing of the transaction are completed, and the safety and accuracy of the transaction are ensured;
s3, setting overtime time, an approval mark, a processing mark and a processing result mark;
the approval mark comprises approved, unapproved and overtime unapproved;
the processing identification comprises processed, to-be-processed and overtime unprocessed;
examining and approving the queuing transaction request according to the warehousing time, acquiring an examination and approval result, and updating an examination and approval identifier corresponding to the queuing transaction request;
specifically, in the embodiment of the application, the approval is called, and in order to ensure the security of the transaction, the approval timeout time is set to be configured by an APOLLO configuration center in real time, so that the flexibility of the system is ensured. And after the approval result is obtained, updating the approval identification and the corresponding processing identification in the database.
S4, setting a first time and a first polling task, and executing the first polling task at regular time, preferably, the execution interval is once in 5 minutes;
approving the queuing transaction request and updating an approval identifier and a processing identifier corresponding to the queuing transaction request;
the task is converted into an asynchronous processing flow mode, unified marking and sorting are carried out, the task is converted into independent operation, and the task in the step can be triggered again to be rapidly solved when abnormality exists in the follow-up process.
Specifically, in the embodiment of the present application, the first time is 24 hours from the warehousing time; the first polling task includes:
s41, acquiring a queuing transaction request with an approval mark of being not approved and unprocessed in the first time;
specifically, all unprocessed transaction data within 24 hours are inquired and obtained from the MYSQL database according to the time of the examination and approval identification as the time of the examination and approval and the time of the warehousing;
s42, adding a first distributed lock to the queuing transaction request with the approval mark being not approved and not processed in the first time, setting the expiration time of the first distributed lock, and automatically releasing the first distributed lock after expiration;
to prevent multiple machines from processing these data at the same time, a first distributed lock is added; if the locking fails, the existing machine is proved to be processing, and the current task is ended; if the locking is successful, continuing the subsequent operation, and setting the expiration time of the lock in order to prevent deadlock, wherein the preferred expiration time of the lock is set to be 5 minutes, and automatically releasing the first distributed lock after expiration;
s43, processing the successfully locked queuing transaction request, and checking whether the queuing transaction request is approved or not according to the approval identification;
s44, if the approval mark is approved, updating the processing mark of the queuing transaction request as pending;
if the approval mark is not approved, judging whether the queuing transaction request exceeds the overtime time from the warehousing time;
s45, if the time-out time is exceeded from the warehousing time of the queued transaction request, setting the approval mark of the queued transaction request as overtime and unapproved;
and S46, removing the first distributed lock to prevent deadlock.
S5, setting a second time and a second polling task, and executing the second polling task at regular time, preferably, the execution interval is once in 5 minutes;
and acquiring the queuing transaction request with the processing identifier being processed, and sending the queuing transaction request to a payment system.
Specifically, in the embodiment of the present application, the second time is 25 hours from the warehousing time; the second polling task includes:
s51, acquiring a processing mark as unprocessed and the unprocessed queued transaction request in the second time;
specifically, all unprocessed transaction data within 25 hours are inquired and obtained from the MYSQL database according to the processing identifier as the time to be processed and put in storage;
s52, setting the expiration time of the second distributed lock for the queuing transaction request with the processing identifier as unprocessed and the queuing transaction request with the unprocessed second time and automatically releasing the second distributed lock after expiration;
to prevent multiple machines from processing these data at the same time, a second distributed lock is added; setting the expiration time of the lock, preferably setting the expiration time of the lock to be 5 minutes, and automatically releasing the second distributed lock after expiration;
s53, acquiring the queuing transaction request with the processing identifier processed, and assembling the queuing transaction request with the processing identifier processed into a message to be sent to a payment system;
s54, judging whether the transmission is successful or not according to the response result returned by the payment system, and if the transmission is not successful, retransmitting the transmission;
s55, setting the maximum retransmission number, stopping if the maximum retransmission number is exceeded, preferably setting the maximum retry number to 3, and not performing retransmission if the maximum retry number is exceeded;
and S56, releasing the second distributed lock after the processing is finished.
Another aspect of the present invention also relates to a payment transaction asynchronous queuing processing system, whose structure is shown in fig. 2, including:
the queuing and accepting request module is used for acquiring the transaction request, checking the transaction request, acquiring the transaction request passing the checking, forming a queuing transaction request, locking the queuing transaction request and the REDIS into a database, recording the warehousing time, examining and approving the queuing transaction request according to the warehousing time, acquiring an examination and approval result, and updating an examination and approval identifier corresponding to the queuing transaction request;
the polling check module is used for setting a first time and a first polling task, executing the first polling task regularly, approving the queuing transaction request and updating an approval identifier and a processing identifier corresponding to the queuing transaction request;
and the final state processing module is used for setting a second time and a second polling task, executing the second polling task at regular time, acquiring the queuing transaction request with the processing identifier being processed, and sending the queuing transaction request to a payment system.
By using this system, the above-described arithmetic processing method can be executed and a corresponding technical effect can be achieved.
Embodiments of the present invention further provide a computer readable storage medium capable of implementing all the steps of the payment transaction asynchronous queuing processing method in the above embodiments, where the computer readable storage medium has stored thereon a computer program, which when executed by a processor implements all the steps of the payment transaction asynchronous queuing processing method in the above embodiments.
Embodiments of the present invention also provide an electronic device for executing the method, as an implementation apparatus of the method, the electronic device at least has a processor and a memory, and particularly, the memory stores data and related computer programs required for executing the method, such as a transaction request, a queued transaction request, a timeout time, a first polling task, a second time, a second polling task, and the like, and all steps of implementing the method are executed by invoking the data in the memory and the program by the processor, and a corresponding technical effect is obtained.
Preferably, the electronic device may comprise a bus architecture, which may include any number of interconnected buses and bridges that link together various circuits, including one or more processors and memory. The bus may also link together various other circuits such as peripherals, voltage regulators, power management circuits, and the like, which are well known in the art, and therefore, will not be described any further herein. A bus interface provides an interface between the bus and the receiver and transmitter. The receiver and transmitter may be the same element, i.e., a transceiver, providing a means for communicating with various other systems over a transmission medium. The processor is responsible for managing the bus and general processing, while the memory may be used for storing data used by the processor in performing operations.
Additionally, the electronic device may further include a communication module, an input unit, an audio processor, a display, a power source, and the like. The processor (or controller, operational controls) employed may include a microprocessor or other processor device and/or logic device that receives input and controls the operation of various components of the electronic device; the memory may be one or more of a buffer, a flash memory, a hard drive, a removable medium, a volatile memory, a non-volatile memory or other suitable devices, and may store the above related data information, and may further store a program for executing the related information, and the processor may execute the program stored in the memory to realize information storage or processing, etc.; the input unit is used for providing input to the processor, and can be a key or a touch input device; the power supply is used for supplying power to the electronic equipment; the display is used for displaying display objects such as images and characters, and may be an LCD display, for example. The communication module is a transmitter/receiver that transmits and receives signals via an antenna. The communication module (transmitter/receiver) is coupled to the processor to provide an input signal and receive an output signal, which may be the same as in the case of a conventional mobile communication terminal. Based on different communication technologies, a plurality of communication modules, such as a cellular network module, a bluetooth module, and/or a wireless local area network module, may be disposed in the same electronic device. The communication module (transmitter/receiver) is also coupled to a speaker and a microphone via an audio processor to provide audio output via the speaker and receive audio input from the microphone to implement the usual telecommunication functions. The audio processor may include any suitable buffers, decoders, amplifiers and so forth. In addition, the audio processor is also coupled to the central processor, so that recording on the local machine can be realized through the microphone, and sound stored on the local machine can be played through the loudspeaker.
As will be appreciated by one skilled in the art, embodiments of the present invention may be provided as a method, system, or computer program product. Accordingly, the present invention may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present invention may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
The present invention is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the invention. It will be understood that each flow and/or block of the flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create a system for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including an instruction system which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks. While preferred embodiments of the present invention have been described, additional variations and modifications in those embodiments may occur to those skilled in the art once they learn of the basic inventive concepts. Therefore, it is intended that the appended claims be interpreted as including the preferred embodiment and all changes and modifications that fall within the scope of the invention.
The above description is only for the preferred embodiment of the present invention, but the scope of the present invention is not limited thereto, and any changes or substitutions that can be easily conceived by those skilled in the art within the technical scope of the present invention are included in the scope of the present invention. Therefore, the protection scope of the present invention should be subject to the protection scope of the claims.

Claims (10)

1. A payment transaction asynchronous queuing processing method, comprising:
s1, acquiring a transaction request, and checking the transaction request;
s2, acquiring the transaction requests passing the check, forming a queue transaction request, locking the queue transaction request and the REDIS into a database and recording the warehousing time;
s3, setting overtime time, an approval mark, a processing mark and a processing result mark;
the approval mark comprises approved, unapproved and overtime unapproved;
the processing identification comprises processed, to-be-processed and overtime unprocessed;
examining and approving the queuing transaction request according to the warehousing time, acquiring an examination and approval result, and updating an examination and approval identifier corresponding to the queuing transaction request;
s4, setting a first time and a first polling task, executing the first polling task regularly, approving the queued transaction request and updating an approval identifier and a processing identifier corresponding to the queued transaction request;
s5, setting a second time and a second polling task, executing the second polling task at regular time, acquiring the queuing transaction request with the processing identifier being processed, and sending the queuing transaction request to a payment system.
2. The method of claim 1, wherein checking the transaction request in S1 includes checking the contents of a transaction request including a merchant, a product, a global serial number, a sub-transaction serial number, and transaction information;
determining whether the content of the transaction request is missing and/or illegal;
returning a failure when the contents of the transaction request are missing and/or illegal;
and when the content of the transaction request is not missing and/or illegal, performing anti-recheck on the transaction request.
3. The method of claim 2, wherein the method for performing a re-check on the transaction request comprises checking whether the transaction request already exists by using a REDIS distributed lock using the global serial number and the sub-transaction serial number as query conditions, and returning a failure if the transaction request already exists.
4. The method of claim 1, wherein the first time in S4 is 24 hours from the warehousing time;
the first polling task comprises:
s41, acquiring a queuing transaction request with an approval mark of being not approved and unprocessed in the first time;
s42, adding a first distributed lock to the queuing transaction request with the approval mark being not approved and not processed in the first time, setting the expiration time of the first distributed lock, and automatically releasing the first distributed lock after expiration;
s43, processing the successfully locked queuing transaction request, and checking whether the queuing transaction request is approved or not according to the approval identification;
s44, if the approval mark is approved, updating the processing mark of the queuing transaction request as pending;
if the approval mark is not approved, judging whether the queuing transaction request exceeds the overtime time from the warehousing time;
s45, if the time-out time is exceeded from the warehousing time of the queued transaction request, setting the approval mark of the queued transaction request as overtime and unapproved;
and S46, releasing the first distributed lock.
5. The method of claim 1, wherein the second time in S5 is 25 hours from the warehousing time;
the second polling task includes:
s51, acquiring a processing mark as unprocessed and the unprocessed queued transaction request in the second time;
s52, setting the expiration time of the second distributed lock for the queuing transaction request with the processing identifier as unprocessed and the queuing transaction request with the unprocessed second time and automatically releasing the second distributed lock after expiration;
s53, acquiring the queuing transaction request with the processing identifier processed, and assembling the queuing transaction request with the processing identifier processed into a message to be sent to a payment system;
s54, judging whether the transmission is successful or not according to the response result returned by the payment system, and if the transmission is not successful, retransmitting the transmission;
s55, setting the maximum retransmission times, and stopping when the maximum retransmission times is exceeded;
and S56, releasing the second distributed lock.
6. The method of claim 1, wherein the processing result identification comprises a pass and a reject.
7. The method of claim 1, wherein the approval timeout time setting is configured in real time by an APOLLO configuration center.
8. A payment transaction asynchronous queuing processing system, comprising:
the queuing and accepting request module is used for acquiring a transaction request, checking the transaction request, acquiring the transaction request passing the checking, forming a queuing transaction request, latching the queuing transaction request into a database by adding REDIS and recording the warehousing time, examining and approving the queuing transaction request according to the warehousing time, acquiring an examination and approval result and updating an examination and approval identifier corresponding to the queuing transaction request;
the polling check module is used for setting a first time and a first polling task, executing the first polling task regularly, approving the queuing transaction request and updating an approval identifier and a processing identifier corresponding to the queuing transaction request;
and the final state processing module is used for setting a second time and a second polling task, executing the second polling task at regular time, acquiring the queuing transaction request with the processing identifier being processed, and sending the queuing transaction request to a payment system.
9. A computer-readable storage medium, characterized in that the storage medium has stored thereon a computer program which, when being executed by a processor, carries out the method of any one of claims 1 to 7.
10. An electronic device comprising a processor and a memory;
the memory is used for storing transaction requests, queued transaction requests, timeout time, first polling tasks, second time and second polling tasks;
the processor, for executing a computer program stored in a memory, performs the method of any of claims 1 to 7.
CN202210478996.1A 2022-05-05 2022-05-05 Asynchronous queuing processing method and system for payment transaction Pending CN114706872A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210478996.1A CN114706872A (en) 2022-05-05 2022-05-05 Asynchronous queuing processing method and system for payment transaction

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210478996.1A CN114706872A (en) 2022-05-05 2022-05-05 Asynchronous queuing processing method and system for payment transaction

Publications (1)

Publication Number Publication Date
CN114706872A true CN114706872A (en) 2022-07-05

Family

ID=82176943

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210478996.1A Pending CN114706872A (en) 2022-05-05 2022-05-05 Asynchronous queuing processing method and system for payment transaction

Country Status (1)

Country Link
CN (1) CN114706872A (en)

Similar Documents

Publication Publication Date Title
CN111325501B (en) Logistics state management method, device, equipment and storage medium
CN110888718A (en) Method and device for realizing distributed transaction
CN112101955B (en) Concurrent payment method, system and device
CN111352753B (en) Accounting processing method and device
CN111008082A (en) Service request processing method and device
CN110675247B (en) Unknown transaction processing method and system, peripheral system and core bank system
CN114090297A (en) Service message processing method and related device
CN115220876A (en) Virtual resource creating method, device, program product, medium and electronic equipment
CN112799943B (en) Service system automatic test method and device
CN113420090A (en) Cross-chain processing method and device, electronic equipment and readable storage medium
CN111352719B (en) Transaction bookkeeping service data processing method, device and system
CN114706872A (en) Asynchronous queuing processing method and system for payment transaction
CN111367934A (en) Data consistency checking method, device, server and medium
US8285775B2 (en) Expedited transaction failure handling by leveraging a reliable message transport protocol to assist detection of discarded processing
CN114237833A (en) High-performance real-time consistent micro-service execution method and system
CN110751560B (en) Transaction processing method and device, electronic equipment and readable storage medium
CN112333262A (en) Data updating prompting method and device, computer equipment and readable storage medium
CN111754348A (en) Scene combined transaction method and device
CN113592645A (en) Data verification method and device
CN111666132A (en) Distributed transaction implementation method, device, computer system and readable storage medium
CN107679843B (en) Method, device, server and storage medium for improving ticket drawing rate
CN111242753A (en) Cross-platform operation control method and system
CN113313594B (en) Order processing method, order processing device, electronic equipment, storage medium and program product
CN111679930B (en) Single-point rollback method and system for CICS online transaction
CN112150126A (en) Information processing method, information processing apparatus, electronic device, and 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