A payment transaction asynchronous queuing processing method and system

Through the payment transaction asynchronous queuing processing method and REDIS technology, the problem of online transaction failure caused by system misjudgment has been solved, efficient and stable approval result processing has been achieved, and transaction accuracy and customer experience have been improved.

CN114706872BActive Publication Date: 2024-10-22CITIC AIBANK CORPORATION LIMITED
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202210478996.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-05-05
Publication Date
2024-10-22
Estimated Expiration
2042-05-05

AI Technical Summary

Technical Problem

Online transactions fail due to system misjudgments, resulting in poor customer experience and transaction delays. The existing technology lacks safe and efficient processing methods, and simultaneous approval results in system waiting and reduced throughput.

Method used

The payment transaction asynchronous queuing processing method is adopted, and the approval results are processed in two stages. REDIS technology is used to ensure processing accuracy and efficiency, a timeout and distributed lock mechanism are set, and polling tasks are executed regularly to process queued transaction requests.

Benefits of technology

It improves the efficiency of system connection processing and the accuracy of approval results, reduces costs, avoids transaction failures and system waiting, and improves transaction accuracy and customer experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114706872B_ABST
    Figure CN114706872B_ABST
Patent Text Reader

Abstract

The present invention relates to a payment transaction asynchronous queuing processing method and system, including obtaining a transaction request, checking the transaction request; obtaining a transaction request that has passed the check, forming a queuing transaction request, adding a REDIS lock to the queuing transaction request and storing it in a database and recording the storage time; approving the queuing transaction request according to the storage time, obtaining the approval result, and updating the approval mark corresponding to the queuing transaction request; setting a first time and a first polling task, regularly executing the first polling task, approving the queuing transaction request and updating the approval mark and processing mark corresponding to the queuing transaction request; setting a second time and a second polling task, regularly executing the second polling task, obtaining the queuing transaction request with the processing mark as processed, and sending the queuing transaction request to a payment system. The present invention is based on two-stage processing of approval results, which improves the processing efficiency of approval while ensuring the accuracy of approval result processing.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of financial data processing, and in particular to a payment transaction asynchronous queuing processing method and system. Background Art

[0002] In online transactions, when some transactions need approval due to large amounts or risk control reasons, the solution often adopts direct interception as failed transactions, which requires manual changes to risk control strategies, or the customer initiates another transaction after verifying the amount; however, these transactions should often be approved directly, lacking a safe and efficient direct processing method. Financial online transfer transactions will be directly rejected due to factors such as large amounts and other risks, and need to be initiated again after approval, which will lead to poor customer experience and transaction delays. Directly setting it to synchronous online approval will cause the system to wait for a long time, reduce throughput, and have poor concurrency capabilities.

[0003] The present invention aims at the problem that the system misjudged the need to re-initiate the transaction in online transactions, and proposes a payment transaction asynchronous queuing processing method. The queuing processing plus approval method avoids the problem of transaction failure caused by imperfect or immature strategies. While adopting the asynchronous method, it avoids the situation that the system concurrency performance is easily reduced when the transaction volume increases when simply changing to synchronous approval. Summary of the invention

[0004] In order to address the deficiencies of the prior art, the present invention proposes a payment transaction asynchronous queuing processing method and system, which processes the approval results in two stages and utilizes REDIS technology to ensure the accuracy of processing and the feasibility of the solution, thereby reducing costs and improving the efficiency of system connection processing approvals. At the same time, it efficiently and stably ensures the accuracy of approval result processing and the accuracy of transactions.

[0005] To achieve the above objectives, the technical solutions adopted by the present invention include:

[0006] A payment transaction asynchronous queuing processing method, comprising:

[0007] S1. Obtain a transaction request and check the transaction request;

[0008] S2. Obtain the transaction request that has passed the inspection, form a queued transaction request, add a REDIS lock to the queued transaction request, store it in the database, and record the storage time;

[0009] S3. Set the timeout period, approval mark, processing mark and processing result mark;

[0010] The approval marks include approved, not approved and not approved due to timeout;

[0011] The processing flags include processed, pending, and timeout;

[0012] Approve the queued transaction request according to the storage time, obtain the approval result, and update the approval mark corresponding to the queued transaction request;

[0013] S4, setting a first time and a first polling task, regularly executing the first polling task, approving the queued transaction request and updating the approval identifier and processing identifier corresponding to the queued transaction request;

[0014] S5. Set a second time and a second polling task, execute the second polling task regularly, obtain the queued transaction request marked as processed, and send the queued transaction request to the payment system.

[0015] Further, checking the transaction request in S1 includes checking the content of the transaction request, and the content of the transaction request includes the merchant, product, global serial number, sub-transaction sequence number and transaction information;

[0016] Determining whether the content of the transaction request is missing and / or illegal;

[0017] When the content of the transaction request is missing and / or illegal, a failure is returned;

[0018] When the content of the transaction request is not missing and / or illegal, an anti-duplicate check is performed on the transaction request.

[0019] Furthermore, the method for performing anti-duplicate check on the transaction request includes taking the global serial number and the sub-transaction sequence number as query conditions, using the REDIS distributed lock to check whether the transaction request already exists, and returning failure if the transaction request already exists.

[0020] Further, in S4, the first time is 24 hours from the storage time;

[0021] The first polling task includes:

[0022] S41, obtaining queued transaction requests with approval marks of unapproved and unprocessed within the first time;

[0023] S42: add a first distributed lock to the queued transaction request whose approval mark is not approved and not processed within the first time, set an expiration time of the first distributed lock, and automatically release the first distributed lock after the expiration time;

[0024] S43, processing the queued transaction request that has been locked successfully, and checking whether the queued transaction request has been approved according to the approval identifier;

[0025] S44, if the approval mark is approved, updating the processing mark of the queued transaction request to pending;

[0026] If the approval mark is unapproved, determining whether the queued transaction request exceeds the timeout period from the time of entry into the warehouse;

[0027] S45, if the queued transaction request has exceeded the timeout period since the entry time, setting the approval flag of the queued transaction request as timeout and unapproved;

[0028] S46: Release the first distributed lock.

[0029] Further, the second time in S5 is 25 hours from the warehousing time;

[0030] The second polling task includes:

[0031] S51, obtaining queued transaction requests marked as unprocessed and unprocessed within the second time;

[0032] S52: add a second distributed lock to the queued transaction request marked as unprocessed and unprocessed within the second time, set an expiration time for the second distributed lock, and automatically release the second distributed lock after the expiration;

[0033] S53, obtaining the queued transaction request with the processing mark as processed, assembling the queued transaction request with the processing mark as processed into a message and sending it to the payment system;

[0034] S54. Determine whether the payment is sent successfully based on the response result returned by the payment system. If not, resend the payment.

[0035] S55, setting a maximum number of retransmissions, and stopping when the maximum number of retransmissions is exceeded;

[0036] S56: Release the second distributed lock.

[0037] Furthermore, the processing result identification includes release and rejection.

[0038] Furthermore, the approval timeout setting is configured in real time by the APOLLO configuration center.

[0039] The present invention also relates to a payment transaction asynchronous queuing processing system, comprising:

[0040] The queue accepting request module is used to obtain transaction requests, check the transaction requests, obtain the transaction requests that have passed the check, form a queue transaction request, add a REDIS lock to the queue transaction request and store it in the database and record the storage time, and approve the queue transaction request according to the storage time, obtain the approval result, and update the approval mark corresponding to the queue transaction request;

[0041] A polling check module, used to set a first time and a first polling task, execute the first polling task regularly, approve the queued transaction request and update the approval mark and processing mark corresponding to the queued transaction request;

[0042] The final state processing module is used to set a second time and a second polling task, execute the second polling task regularly, obtain the queued transaction request marked as processed, and send the queued transaction request to the payment system.

[0043] The present invention also relates to a computer-readable storage medium, on which a computer program is stored, and the computer program implements the above method when executed by a processor.

[0044] The present invention also relates to an electronic device, comprising a processor and a memory;

[0045] The memory is used to store transaction requests, queued transaction requests, timeouts, first times, first polling tasks, second times, and second polling tasks;

[0046] The processor is used to execute the computer program stored in the memory to perform the above method.

[0047] The beneficial effects of the present invention are:

[0048] The present invention processes the approval results in two stages and uses REDIS technology to ensure the accuracy of processing and the feasibility of the solution, which can reduce costs and improve the efficiency of system connection processing and approval. At the same time, it efficiently and stably ensures the accuracy of approval result processing and the accuracy of transactions. BRIEF DESCRIPTION OF THE DRAWINGS

[0049] Figure 1 The figure is a flow chart of the asynchronous queuing processing method for payment transactions of the present invention.

[0050] Figure 2 This is a schematic diagram of the asynchronous queuing processing structure of payment transactions according to the present invention. DETAILED DESCRIPTION

[0051] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0052] The first aspect of the present invention relates to a process of steps as follows Figure 1 The payment transaction asynchronous queuing processing method shown includes:

[0053] S1. Obtain a transaction request and check the transaction request;

[0054] Specifically, in the embodiment of the present application, the content of the transaction request is first checked. Preferably, the content of the transaction request includes the merchant, product, global serial number, sub-transaction sequence number and transaction information;

[0055] Determine whether the content of the transaction request is missing and / or illegal. When the content of the transaction request is missing and / or illegal, return failure; when the content of the transaction request is not missing and / or illegal, perform anti-duplicate check on the transaction request; use the global serial number and sub-transaction number as query conditions to determine whether the request has been processed in two steps: the first step is to use the REDIS distributed lock to check whether the data exists; the second step is to go to the database to determine whether the data is consistent; if it is consistent, return the processing result, otherwise the data is stored in the database.

[0056] S2. Obtain the transaction request that has passed the inspection, form a queued transaction request, add a REDIS lock to the queued transaction request, store it in the database, and record the storage time;

[0057] Specifically, in the embodiment of the present application, if the transaction is successfully queued after entering the warehouse, a REDIS lock is added to the transaction request to prevent subsequent multiple processing. At this time, the transaction is persisted and duplicate prevention is completed to ensure the security and accuracy of the transaction;

[0058] S3. Set the timeout period, approval mark, processing mark and processing result mark;

[0059] The approval marks include approved, not approved and not approved due to timeout;

[0060] The processing flags include processed, pending, and timeout;

[0061] Approve the queued transaction request according to the storage time, obtain the approval result, and update the approval mark corresponding to the queued transaction request;

[0062] Specifically, in the embodiment of the present application, the approval is called, and in order to ensure the security of the transaction, the approval timeout is set to be configured in real time by the APOLLO configuration center to ensure the flexibility of the system. After obtaining the approval result, the approval mark and the corresponding processing mark in the database are updated.

[0063] S4. Set a first time and a first polling task, and execute the first polling task regularly. Preferably, the execution interval is once every 5 minutes;

[0064] Approving the queued transaction request and updating the approval identifier and processing identifier corresponding to the queued transaction request;

[0065] Here, the tasks are converted into an asynchronous processing flow mode, and are uniformly marked and organized to convert the tasks into independent operations. When there are subsequent exceptions, the tasks of this step can be re-triggered for quick resolution.

[0066] Specifically, in the embodiment of the present application, the first time is 24 hours from the storage time; the first polling task includes:

[0067] S41, obtaining queued transaction requests with approval marks of unapproved and unprocessed within the first time;

[0068] Specifically, from the MYSQL database, query and obtain all unprocessed transaction data within 24 hours based on the approval mark of unapproved and the storage time;

[0069] S42: add a first distributed lock to the queued transaction request whose approval mark is not approved and not processed within the first time, set an expiration time of the first distributed lock, and automatically release the first distributed lock after the expiration time;

[0070] In order to prevent multiple machines from processing the data at the same time, the first distributed lock is added; if the lock fails, it proves that a machine is already processing and the current task is terminated; if the lock is successful, the subsequent operation continues, and in order to prevent deadlock, the lock expiration time is set, preferably set to 5 minutes, and the first distributed lock is automatically released after the expiration;

[0071] S43, processing the queued transaction request that has been locked successfully, and checking whether the queued transaction request has been approved according to the approval identifier;

[0072] S44, if the approval mark is approved, updating the processing mark of the queued transaction request to pending;

[0073] If the approval mark is unapproved, determining whether the queued transaction request exceeds the timeout period from the time of entry into the warehouse;

[0074] S45, if the queued transaction request has exceeded the timeout period since the entry time, setting the approval flag of the queued transaction request as timeout and unapproved;

[0075] S46. Release the first distributed lock to prevent deadlock.

[0076] S5. Set a second time and a second polling task, and execute the second polling task regularly. Preferably, the execution interval is once every 5 minutes.

[0077] The queued transaction request with the processing mark as processed is obtained, and the queued transaction request is sent to the payment system.

[0078] Specifically, in the embodiment of the present application, the second time is 25 hours from the storage time; the second polling task includes:

[0079] S51, obtaining queued transaction requests marked as unprocessed and unprocessed within the second time;

[0080] Specifically, from the MYSQL database, all unprocessed transaction data within 25 hours are queried based on the processing mark "to be processed" and the storage time;

[0081] S52: add a second distributed lock to the queued transaction request marked as unprocessed and unprocessed within the second time, set an expiration time for the second distributed lock, and automatically release the second distributed lock after the expiration;

[0082] In order to prevent multiple machines from processing this data at the same time, add a second distributed lock; set the lock expiration time, preferably set the lock expiration time to 5 minutes, and automatically release the second distributed lock after the expiration;

[0083] S53, obtaining the queued transaction request with the processing mark as processed, assembling the queued transaction request with the processing mark as processed into a message and sending it to the payment system;

[0084] S54. Determine whether the payment is sent successfully based on the response result returned by the payment system. If not, resend the payment.

[0085] S55, setting a maximum number of retransmissions, and stopping when the maximum number of retransmissions is exceeded. Preferably, the maximum number of retry attempts is set to 3 times, and no retransmission is performed when the maximum number of retransmissions is exceeded;

[0086] S56: After the processing is completed, release the second distributed lock.

[0087] Another aspect of the present invention also relates to a payment transaction asynchronous queuing processing system, the structure of which is as follows: Figure 2 As shown, including:

[0088] The queue accepting request module is used to obtain transaction requests, check the transaction requests, obtain the transaction requests that have passed the check, form a queue transaction request, add a REDIS lock to the queue transaction request and store it in the database and record the storage time, and approve the queue transaction request according to the storage time, obtain the approval result, and update the approval mark corresponding to the queue transaction request;

[0089] A polling check module, used to set a first time and a first polling task, execute the first polling task regularly, approve the queued transaction request and update the approval mark and processing mark corresponding to the queued transaction request;

[0090] The final state processing module is used to set a second time and a second polling task, execute the second polling task regularly, obtain the queued transaction request marked as processed, and send the queued transaction request to the payment system.

[0091] By using this system, the above-mentioned operation processing method can be executed and the corresponding technical effects can be achieved.

[0092] An embodiment of the present invention also provides a computer-readable storage medium capable of implementing all the steps of the asynchronous queuing processing method for payment transactions in the above embodiment. A computer program is stored on the computer-readable storage medium, and when the computer program is executed by a processor, all the steps of the asynchronous queuing processing method for payment transactions in the above embodiment are implemented.

[0093] An embodiment of the present invention also provides an electronic device for executing the above method. As an implementation device of the method, the electronic device at least has a processor and a memory, and in particular, the memory stores data and related computer programs required for executing the method, such as transaction requests, queued transaction requests, timeouts, first times, first polling tasks, second times and second polling tasks, etc., and all steps of the implementation method are executed by the processor calling the data and programs in the memory to obtain the corresponding technical effects.

[0094] Preferably, the electronic device may include a bus architecture, the bus may include any number of interconnected buses and bridges, and the bus will include various circuits linked together by one or more processors and memories. The bus may also link together various other circuits such as peripherals, voltage regulators, and power management circuits, which are all well known in the art and are therefore not further described herein. The bus interface provides an interface between the bus and the receiver and transmitter. The receiver and transmitter may be the same component, i.e., a transceiver, providing a unit 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 to store data used by the processor when performing operations.

[0095] In addition, the electronic device may further include components such as a communication module, an input unit, an audio processor, a display, and a power supply. The processor (or controller, operation control) used may include a microprocessor or other processor device and / or a logic device, which receives input and controls the operation of various components of the electronic device; the memory may be one or more of a cache, a flash memory, a hard drive, a removable medium, a volatile memory, a non-volatile memory, or other suitable devices, which may store the above-mentioned related data information, and may also store a program for executing 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 to provide input to the processor, for example, it may be a key or a touch input device; the power supply is used to provide power to the electronic device; the display is used to display display objects such as images and text, for example, it may be an LCD display. The communication module is a transmitter / receiver that sends and receives signals via an antenna. The communication module (transmitter / receiver) is coupled to the processor to provide input signals and receive output signals, which may be the same as the case of a conventional mobile communication terminal. Based on different communication technologies, multiple communication modules may be provided in the same electronic device, such as a cellular network module, a Bluetooth module and / or a wireless local area network module, etc. The communication module (transmitter / receiver) is also coupled to a speaker and a microphone via an audio processor to provide an audio output via the speaker and receive an audio input from the microphone, thereby realizing a common telecommunication function. The audio processor may include any suitable buffer, decoder, amplifier, etc. In addition, the audio processor is also coupled to a central processor, so that recording can be performed on the machine through the microphone, and the sound stored on the machine can be played through the speaker.

[0096] Those skilled in the art will appreciate that embodiments of the present invention may be provided as methods, systems, or computer program products. Therefore, the present invention may take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Moreover, the present invention may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0097] The present invention is described with reference to flowcharts and / or block diagrams of methods, devices (systems), and computer program products according to embodiments of the present invention. It should be understood that each process and / or block in the flowchart and / or block diagram, as well as the combination of processes and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A system that specifies the functions of a box or multiple boxes.

[0098] These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing device to work in a specific manner, so that the instructions stored in the computer-readable memory produce a product including an instruction system, which is implemented in the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.

[0099] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps of the functions specified in a box or multiple boxes. Although the preferred embodiments of the present invention have been described, those skilled in the art may make additional changes and modifications to these embodiments once they know the basic creative concept. Therefore, the attached claims are intended to be interpreted as including the preferred embodiments and all changes and modifications that fall within the scope of the present invention.

[0100] The above is only a preferred specific embodiment of the present invention, but the protection scope of the present invention is not limited thereto. Any changes or substitutions that can be easily thought of by a person skilled in the art within the technical scope disclosed by the present invention should be included in the protection scope of the present invention. Therefore, the protection scope of the present invention should be based on the protection scope of the claims.

Claims

1. A payment transaction asynchronous queuing processing method, characterized in that: include: S1. Obtain a transaction request and check the transaction request; S2. Obtain the transaction request that has passed the inspection, form a queued transaction request, add a REDIS lock to the queued transaction request, store it in the database, and record the storage time; S3. Set the timeout period, approval mark, processing mark and processing result mark; The approval marks include approved, not approved and not approved due to timeout; The processing flags include processed, pending, and timeout; Approve the queued transaction request according to the storage time, obtain the approval result, and update the approval mark corresponding to the queued transaction request; S4, setting a first time and a first polling task, regularly executing the first polling task, approving the queued transaction request and updating the approval identifier and processing identifier corresponding to the queued transaction request; S5, setting a second time and a second polling task, regularly executing the second polling task, obtaining the queued transaction request marked as processed, and sending the queued transaction request to the payment system, Wherein, the checking of the transaction request in S1 includes: checking the content of the transaction request, wherein the content of the transaction request includes the merchant, product, global serial number and sub-transaction sequence number; 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; performing anti-duplicate check on the transaction request when the content of the transaction request is not missing and / or illegal; the anti-duplicate check on the transaction request includes: using the global serial number and the sub-transaction sequence number as query conditions to determine whether the request has been processed in two steps: first using the REDIS distributed lock to check whether there is data, and then going to the database to determine whether the data is consistent; if it is consistent, returning the processing result, otherwise storing the data; The first time in S4 is 24 hours from the storage time; the first polling task includes: S41, obtaining queued transaction requests with approval marks of unapproved and unprocessed within the first time; S42: add a first distributed lock to the queued transaction request whose approval mark is not approved and not processed within the first time, set an expiration time of the first distributed lock, and automatically release the first distributed lock after the expiration time; S43, processing the queued transaction request that has been locked successfully, and checking whether the queued transaction request has been approved according to the approval identifier; S44, if the approval mark is approved, updating the processing mark of the queued transaction request to pending; If the approval mark is unapproved, determining whether the queued transaction request exceeds the timeout period from the time of entry into the warehouse; S45, if the queued transaction request has exceeded the timeout period since the entry time, setting the approval flag of the queued transaction request as timeout and unapproved; S46, releasing the first distributed lock; The second time in S5 is 25 hours from the storage time; the second polling task includes: S51, obtaining queued transaction requests marked as unprocessed and unprocessed within the second time; S52: add a second distributed lock to the queued transaction request marked as unprocessed and unprocessed within the second time, set an expiration time for the second distributed lock, and automatically release the second distributed lock after the expiration; S53, obtaining the queued transaction request with the processing mark as processed, assembling the queued transaction request with the processing mark as processed into a message and sending it to the payment system; S54. Determine whether the payment is sent successfully based on the response result returned by the payment system. If not, resend the payment. S55, setting a maximum number of retransmissions, and stopping when the maximum number of retransmissions is exceeded; S56: Release the second distributed lock.

2. The method according to claim 1, characterized in that The processing result identification includes release and rejection.

3. The method according to claim 1, characterized in that The approval timeout setting is configured in real time by the APOLLO configuration center.

4. A payment transaction asynchronous queuing processing system, characterized in that: include: The queue accepting request module is used to obtain transaction requests, check the transaction requests, obtain the transaction requests that have passed the check, form a queue transaction request, add a REDIS lock to the queue transaction request and store it in the database and record the storage time, and approve the queue transaction request according to the storage time, obtain the approval result, and update the approval mark corresponding to the queue transaction request; wherein, the checking of the transaction request includes: checking the content of the transaction request, wherein the content of the transaction request includes the merchant, product, global serial number and sub-transaction sequence number; 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 an anti-duplicate check on the transaction request; the anti-duplicate check on the transaction request includes: using the global serial number and the sub-transaction sequence number as query conditions to judge whether the request has been processed in two steps: first using the REDIS distributed lock to check whether the data exists, and then going to the database to judge whether the data is consistent; if it is consistent, returning the processing result, otherwise storing the data; The polling and checking module is used to set a first time and a first polling task, execute the first polling task regularly, approve the queued transaction request and update the approval mark and processing mark corresponding to the queued transaction request, wherein the first time is 24 hours from the storage time; the first polling task includes: obtaining the queued transaction request whose approval mark is not approved and not processed within the first time; adding a first distributed lock to the queued transaction request whose approval mark is not approved and not processed within the first time, setting an expiration time of the first distributed lock, and automatically releasing the first distributed lock after the expiration; processing the queued transaction request that is locked successfully, checking whether the queued transaction request has been approved according to the approval mark; if the approval mark is approved, updating the processing mark of the queued transaction request to be processed; if the approval mark is not approved, determining whether the queued transaction request exceeds the timeout time from the storage time; if the queued transaction request exceeds the timeout time from the storage time, setting the approval mark of the queued transaction request to timeout and not approved; releasing the first distributed lock; The final state processing module is used to set a second time and a second polling task, execute the second polling task regularly, obtain the queued transaction request with the processing mark as processed, and send the queued transaction request to the payment system, wherein the second time is 25 hours from the warehousing time; the second polling task includes: obtaining the queued transaction request with the processing mark as unprocessed and unprocessed within the second time; adding a second distributed lock to the queued transaction request with the processing mark as unprocessed and unprocessed within the second time, setting an expiration time of the second distributed lock, and automatically releasing the second distributed lock after the expiration; obtaining the queued transaction request with the processing mark as processed, assembling the queued transaction request with the processing mark as processed into a message and sending it to the payment system; judging whether the sending is successful according to the response result returned by the payment system, and resending if the sending is not successful; setting a maximum number of retransmissions, and stopping when the maximum number of retransmissions is exceeded; releasing the second distributed lock.

5. A computer-readable storage medium, characterized in that: The storage medium stores a computer program, and when the computer program is executed by a processor, the method according to any one of claims 1 to 3 is implemented.

6. An electronic device, characterized in that: including a processor and a memory; The memory is used to store transaction requests, queued transaction requests, timeouts, first times, first polling tasks, second times, and second polling tasks; The processor is configured to execute a computer program stored in a memory to perform the method according to any one of claims 1 to 3.