CN112101955A - Concurrent payment method, system and device - Google Patents
Concurrent payment method, system and device Download PDFInfo
- Publication number
- CN112101955A CN112101955A CN202011281700.4A CN202011281700A CN112101955A CN 112101955 A CN112101955 A CN 112101955A CN 202011281700 A CN202011281700 A CN 202011281700A CN 112101955 A CN112101955 A CN 112101955A
- Authority
- CN
- China
- Prior art keywords
- payment
- order
- verification
- processing logic
- transaction record
- 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.)
- Granted
Links
- 238000000034 method Methods 0.000 title claims abstract description 43
- 238000012545 processing Methods 0.000 claims abstract description 92
- 238000012795 verification Methods 0.000 claims abstract description 48
- 230000002159 abnormal effect Effects 0.000 claims description 9
- 238000004590 computer program Methods 0.000 claims description 6
- 239000000470 constituent Substances 0.000 claims description 6
- 238000012546 transfer Methods 0.000 claims description 2
- 230000008569 process Effects 0.000 description 10
- 238000010586 diagram Methods 0.000 description 7
- 230000007246 mechanism Effects 0.000 description 3
- 230000005540 biological transmission Effects 0.000 description 2
- 230000007704 transition Effects 0.000 description 2
- 230000003111 delayed effect Effects 0.000 description 1
- 230000001419 dependent effect Effects 0.000 description 1
- 238000011161 development Methods 0.000 description 1
- 230000008014 freezing Effects 0.000 description 1
- 238000007710 freezing Methods 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 230000003287 optical effect Effects 0.000 description 1
- 238000013102 re-test Methods 0.000 description 1
- 238000006467 substitution reaction Methods 0.000 description 1
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06Q—INFORMATION 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/00—Payment architectures, schemes or protocols
- G06Q20/38—Payment protocols; Details thereof
- G06Q20/40—Authorisation, e.g. identification of payer or payee, verification of customer or shop credentials; Review and approval of payers, e.g. check credit lines or negative lists
- G06Q20/401—Transaction verification
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/20—Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
- G06F16/22—Indexing; Data structures therefor; Storage structures
- G06F16/2282—Tablespace storage structures; Management thereof
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
- G06F9/46—Multiprogramming arrangements
- G06F9/54—Interprogram communication
- G06F9/546—Message passing systems or structures, e.g. queues
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06Q—INFORMATION 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/00—Payment architectures, schemes or protocols
- G06Q20/08—Payment architectures
- G06Q20/085—Payment architectures involving remote charge determination or related payment systems
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F2209/00—Indexing scheme relating to G06F9/00
- G06F2209/54—Indexing scheme relating to G06F9/54
- G06F2209/548—Queue
Landscapes
- Engineering & Computer Science (AREA)
- Business, Economics & Management (AREA)
- Theoretical Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Physics & Mathematics (AREA)
- Accounting & Taxation (AREA)
- Software Systems (AREA)
- General Engineering & Computer Science (AREA)
- Finance (AREA)
- Strategic Management (AREA)
- General Business, Economics & Management (AREA)
- Databases & Information Systems (AREA)
- Data Mining & Analysis (AREA)
- Computer Security & Cryptography (AREA)
- Financial Or Insurance-Related Operations Such As Payment And Settlement (AREA)
Abstract
The invention discloses a concurrent payment method, a concurrent payment system and a concurrent payment device, wherein the method comprises the following steps: receiving an order payment request sent by a user through a background application system, carrying out legal verification on order payment information carried in the order payment request, storing the order payment information in a database, setting a first distribution lock for a currently paid order, and calling a payment system; the payment verification is carried out on order payment information through a payment system, a second distribution lock is arranged on a currently paid order, platform transaction details of the order are respectively recorded into one or more preset transaction record tables after the payment verification is passed, a unique index is set for the transaction record tables by using an order number, and a payment result is fed back to a user through a background application system according to a verification result; and calling one or more preset message queues according to the processing logic required for completing the current payment recorded in the transaction record table, executing corresponding processing logic through the message queues and calling a bank system to complete payment processing.
Description
Technical Field
The invention relates to the technical field of computers, in particular to a concurrent payment method, a concurrent payment system and a concurrent payment device.
Background
Currently, with the rapid development of the internet, network payment also becomes the mainstream. Network payment brings convenience to people and also brings challenges to service providers. In the prior art, ensuring safe and highly concurrent payments becomes a necessary task for service providers for various complex business scenarios.
At present, a traditional payment mode is generally processed by combining a platform system and a bank system, the mode is very dependent on banks, conditions such as network overtime and bank service upgrading can occur in an actual environment, and the payment experience of a user is influenced.
In summary, the conventional payment method has the following problems:
1. the payment link is long, and payment overtime can be caused by direct connection of related bank and enterprise;
2. the re-test machine is manufactured into the same order for repeated payment in the cluster environment;
3. the bank system returns an uncertain result and needs manual checking, so that the labor cost is occupied;
4. the platform system and the bank are easy to make mistakes in the same transaction, and the rollback probability is high;
5. and when the payment is in a peak, the user experience is poor due to the over-pressure of the background of the system.
Based on the problems existing in the conventional payment method, a secure and highly concurrent payment system is urgently needed to solve the problems so as to promote external services.
Disclosure of Invention
The invention aims to provide a concurrent payment method, a concurrent payment system and a concurrent payment device, and aims to solve the problems in the prior art.
The invention provides a concurrent payment method, which comprises the following steps:
receiving an order payment request sent by a user through a background application system, carrying out legal verification on order payment information carried in the order payment request, recording the order after the verification is successful, storing the order in a database, setting a first distribution lock for the current payment order, rejecting other payment requests of the current order through the first distribution lock, and calling a payment system;
the payment verification is carried out on order payment information through a payment system, a second distribution lock is arranged on a currently paid order, other payment requests of the current order are rejected through the second distribution lock, after the payment verification is passed, platform transaction details of the order are respectively recorded into one or more preset transaction record tables, a unique index is set for the transaction record tables through an order number, and a payment result is fed back to a user through a background application system according to a verification result;
and calling one or more preset message queues according to the processing logic required for completing the current payment recorded in the transaction record table, executing corresponding processing logic through the message queues and calling a bank system to complete payment processing.
The invention provides a concurrent payment system, comprising:
the background application system is used for receiving an order payment request sent by a user, legally verifying order payment information carried in the order payment request, recording the order after the order is successfully verified, storing the order in a database, setting a first distribution lock for the current payment order, rejecting other payment requests of the current order through the first distribution lock, and calling the payment system;
the payment system is used for carrying out payment verification on order payment information, setting a second distribution lock for a currently paid order, rejecting other payment requests of the current order through the second distribution lock, respectively recording platform transaction details of the order into one or more preset transaction record tables after the payment verification is passed, setting a unique index for the transaction record tables by using an order number, and feeding back a payment result to a user through a background application system according to a verification result;
and the message queue module is used for calling one or more preset message queues according to the processing logic required for completing the current payment recorded in the transaction record table, executing corresponding processing logic through the message queues and calling a bank system to complete payment processing.
An embodiment of the present invention further provides a concurrent payment apparatus, including: a memory, a processor and a computer program stored on the memory and executable on the processor, the computer program, when executed by the processor, implementing the steps of the concurrent payment method described above.
The embodiment of the invention also provides a computer readable storage medium, wherein an implementation program for information transmission is stored on the computer readable storage medium, and the program is executed by a processor to implement the steps of the concurrent payment method.
By adopting the embodiment of the invention, the payment pressure in high concurrency can be relieved, the efficiency of the payment system is improved, and the error rate of payment is reduced.
The foregoing description is only an overview of the technical solutions of the present invention, and the embodiments of the present invention are described below in order to make the technical means of the present invention more clearly understood and to make the above and other objects, features, and advantages of the present invention more clearly understandable.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, and it is obvious that the drawings in the following description are some embodiments of the present invention, and other drawings can be obtained by those skilled in the art without creative efforts.
FIG. 1 is a flow diagram of a concurrent payment method of an embodiment of the present invention;
FIG. 2 is a diagram illustrating state flow during an order payment process according to an embodiment of the present invention;
FIG. 3 is a schematic diagram of a transaction record table of an embodiment of the present invention;
FIG. 4 is a flow chart of a detailed process of a concurrent payment method of an embodiment of the present invention;
FIG. 5 is a schematic diagram of a concurrent payment system of an embodiment of the present invention;
fig. 6 is a schematic diagram of a concurrent payment device of an embodiment of the present invention.
Detailed Description
The technical solutions of the present invention will be described clearly and completely with reference to the following embodiments, and it should be understood that the described embodiments are some, but not all, embodiments of the present invention. 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.
In the description of the present invention, it is to be understood that the terms "center", "longitudinal", "lateral", "length", "width", "thickness", "upper", "lower", "front", "rear", "left", "right", "vertical", "horizontal", "top", "bottom", "inner", "outer", "clockwise", "counterclockwise", and the like, indicate orientations and positional relationships based on those shown in the drawings, and are used only for convenience of description and simplicity of description, and do not indicate or imply that the device or element being referred to must have a particular orientation, be constructed and operated in a particular orientation, and thus, should not be considered as limiting the present invention.
Furthermore, the terms "first", "second" and "first" are used for descriptive purposes only and are not to be construed as indicating or implying relative importance or implicitly indicating the number of technical features indicated. Thus, features defined as "first", "second", may explicitly or implicitly include one or more of the described features. In the description of the present invention, "a plurality" means two or more unless specifically defined otherwise. Furthermore, the terms "mounted," "connected," and "connected" are to be construed broadly and may, for example, be fixedly connected, detachably connected, or integrally connected; can be mechanically or electrically connected; they may be connected directly or indirectly through intervening media, or they may be interconnected between two elements. The specific meanings of the above terms in the present invention can be understood in specific cases to those skilled in the art.
Method embodiment
According to an embodiment of the present invention, a concurrent payment method is provided, fig. 1 is a flowchart of the concurrent payment method according to the embodiment of the present invention, and as shown in fig. 1, the concurrent payment method according to the embodiment of the present invention specifically includes:
step 101, receiving an order payment request sent by a user through a background application system, legally checking order payment information carried in the order payment request, recording the order after the order payment request is successfully checked, storing the order in a database, setting a first distribution lock for the current payment order, rejecting other payment requests of the current order through the first distribution lock, and calling a payment system;
in step 101, the order payment request comprises: single order payment requests and batch order payment requests;
therefore, in step 101, the payment amount and the order unique identifier of the single order payment request are saved in the database after the verification is successful; or after the verification is successful, saving the batch number and the payment sum of the batch order payment request to a database, wherein the batch number is as follows: the order of each order in the batch of orders uniquely identifies the constituent string.
102, performing payment verification on order payment information through a payment system, setting a second distribution lock for a currently paid order, rejecting other payment requests of the current order through the second distribution lock, respectively recording platform transaction details of the order into one or more preset transaction record tables after the payment verification is passed, setting a unique index for the transaction record tables by using an order number, and feeding back a payment result to a user through a background application system according to a verification result; wherein, the transaction record table specifically includes: a batch record table batch _ pay _ info, a order record table batch _ pay _ order _ info, and the like.
Step 103, according to the processing logic required for completing the current payment recorded in the transaction record table, one or more preset message queues are called, the corresponding processing logic is executed through the message queues, and the bank system is called to complete the payment processing. In embodiments of the present invention, each of the one or more message queues handles only one logic. The payment processing includes processing for paying gasoline and gas, refunding guarantee fund, collecting payment, and freezing credit for borrowing, besides the freight fee.
Step 103 specifically includes the following processing:
the method comprises the steps of sequentially calling corresponding message queues according to each processing logic required for completing current payment recorded in a transaction record table, executing the corresponding logic through the message queues, calling a bank system to pay, receiving payment result information fed back by the bank system, feeding the current payment result information back to the payment system, updating execution results of the corresponding processing logic in the transaction record table through the payment system according to the payment result information, and determining a final result according to the execution results of each processing logic after all processing logics are executed.
In addition, when a certain message queue execution processing logic calls the payment system to cause payment failure, the message queue is put again for processing, and if the number of times or time of processing exceeds a preset threshold value, an abnormal state notification is sent out.
Fig. 2 is a schematic diagram of state transition in an order payment process according to an embodiment of the present invention, and as shown in fig. 2, the state transition in the order payment process mainly includes: owner of goods-Ticket Source company-driver. The dashed lines in fig. 2 only identify logical relationships.
As shown in fig. 2, the following takes a batch payment 30 sheet as an example to describe the abnormal situation handling of the embodiment of the present invention:
1. and the service system calls a platform payment interface of the payment system 30 times to complete order payment one time. If the 15 th order payment fails, skipping, continuing to pay the subsequent orders, and finally writing the data of the batch payment 29 list into the batch record table batch _ pay _ info; the specific parameters of batch _ pay _ info are shown in fig. 3, where batch _ no: req _ no as a fund to a branch; sum _ amount: paying the sum in batches; shipper _ id: company _ id in the order record.
2. The platform payment is successful, but the order status update fails. At this point the order is in error, but subsequent orders will continue to pay. When the sum is paid to the branch company, the problem is found, and the subsequent payment process is not carried out;
3. the generated 29 single batch payment data fails to be written into the batch _ pay _ info, and the 29 single batch payment data which is paid by the completed platform is not rolled back and is still completed. At this time, there are 29 records in the order record batch _ path _ order _ info whose status is 40. An exception handling queue can be added to complete the subsequent payment process; specific parameters of batch _ patch _ order _ info are shown in fig. 3, where final _ carrier _ id: if the order is set to collect, the order is a collector, otherwise, the order is a driver; pay _ amount: final _ pay in the order; batch _ seq _ no: the client number, namely the sequence number, in the batch payment file is consistent with the query result return sequence number and is updated when the file is generated; postscript: freight + "+ order _ no; all _ time: calling the bank instruction money-drawing time; write the batch _ pay _ info succeeds, but fails to transfer money to the ticketing company.
And respectively processing according to failure reasons:
(1) the main balance of the goods is insufficient, the marked recorded corresponding to the batch _ pay _ info writes that the main balance of the goods is insufficient, and the payment is finished;
(2) the transaction state is unknown, and the query state of the transaction state query interface is called in a delayed mode. If the result is unknown, remark records the error reason and finishes payment; if the state returns to success, continuing the subsequent payment process;
(3) the processing mode is the same as that of (2) when the 'no information is returned' or the 'network overtime' is caused by the network reason;
(4) other errors are processed in the same manner as (1).
The above technical solutions of the embodiments of the present invention are exemplified by taking payment of a logistics system as an example.
Fig. 4 is a flowchart of detailed processing of a concurrent payment method according to an embodiment of the present invention, and as shown in fig. 4, the concurrent payment method according to the embodiment of the present invention specifically includes:
1. the payment operator checks the order to be paid, and after confirming the information, the data is transmitted to the application background system;
2. and the application background system checks the data validity (for example, whether the password is correct or not, whether the submitted data is real or not and the like), and stores the batch order summary record with the unique batch number into the database, wherein the batch order summary record comprises a character string formed by combining the total amount and the order unique identification id. After the successful storage is ensured, a payment request is sent to a payment system;
3. the payment system receives an order payment request from an external interface, checks data, performs idempotent verification, needs to add a distributed lock after the verification is passed, and starts to record platform transaction details of the order to form a transaction record table, wherein the transaction record table sets a unique index for the order number, so that the platform can ensure that only one order is successfully put in storage in the recording process, and repeated payment is prevented at the level of a database;
4. the first stage of the payment system is platform data processing, and external services such as a bank system and the like are not called, so that the processing speed is high, large batch of order payment can be completed in a short time, the peak payment pressure is relieved, and if the order payment is abnormal, abnormal prompt is carried out;
5. and after the platform data is processed, the payment system returns a payment result which is used as a final processing result. Meanwhile, the subsequent adjustment processing of the bank system is carried out by the message queue and the compensation mechanism together;
6. setting a plurality of message queues, wherein each queue only processes one logic as much as possible, for example, the message queue A is only responsible for transferring accounts from owners to receivers, the message queue B is only responsible for transferring accounts from receivers to other owners, the queues are dynamically increased according to actual conditions, and priorities are set;
7. and the message queue processes the bank system processing state for updating order payment, ensures the final consistency of data, and if the record with uncertain payment result caused by bank service abnormity or other unknown abnormity is encountered, the record needs to be continuously queued or processed by a compensation mechanism.
As can be seen from the above description, the following measures are taken in the embodiments of the present invention to solve the problems in the conventional payment service scenario:
1. the data processing of the payment system platform is separated from the processing of the bank system, and the platform processing result is taken as the standard.
2. The transaction record table in the database sets a unique index for the payment order field to prevent the order from being paid repeatedly.
3. By using batch payment and reasonably setting the upper limit of the quantity, the failed payment order can not influence the payment of other orders in the same batch.
4. Multiple message queues are used, each queue takes its own role, the priority is set according to the actual situation, and the logic sequence processing is ensured.
5. And the compensation mechanism uses a timing task to scan the order which needs to be processed continuously at a timing so as to ensure that the order is processed successfully.
In summary, by means of the technical scheme of the embodiment of the invention, the payment pressure in high concurrency can be relieved, the efficiency of the payment system is improved, and the error rate of payment is reduced.
System embodiment
According to an embodiment of the present invention, a concurrent payment system is provided, fig. 5 is a schematic diagram of the concurrent payment system according to the embodiment of the present invention, and as shown in fig. 5, the concurrent payment system according to the embodiment of the present invention specifically includes:
the background application system 50 is used for receiving an order payment request sent by a user, legally verifying order payment information carried in the order payment request, recording and storing the order in a database after the order payment request is successfully verified, setting a first distribution lock for the currently paid order, rejecting other payment requests of the current order through the first distribution lock, and calling a payment system; the order payment request comprises: single order payment requests and batch order payment requests;
the background application system 50 stores the payment amount of the single order payment request and the order unique identifier into the database after the verification is successful; or after the verification is successful, saving the batch number and the payment sum of the batch order payment request to a database, wherein the batch number is as follows: the order of each order in the batch of orders uniquely identifies the constituent string.
The payment system 52 is configured to perform payment verification on the order payment information, set a second distribution lock for a currently paid order, reject other payment requests of the current order through the second distribution lock, record platform transaction details of the order into one or more preset transaction record tables respectively after the payment verification is passed, set a unique index for the transaction record tables by using an order number, and feed back a payment result to a user through the background application system according to a verification result;
and the message queue module 54 is configured to invoke one or more preset message queues according to the processing logic required for completing the current payment recorded in the transaction record table, execute corresponding processing logic through the message queues, and invoke a bank system to complete payment processing. Each of the one or more message queues handles only one logic;
the message queue module 54 is specifically configured to:
according to each processing logic required for completing current payment recorded in the transaction record table, calling corresponding message queues in sequence, executing corresponding logic through the message queues, calling a bank system to pay, receiving payment result information fed back by the bank system, feeding back current payment result information to the payment system, updating execution results of the corresponding processing logic in the transaction record table according to the payment result information through the payment system, and after all processing logic are executed, determining a final result according to the execution results of each processing logic;
and under the condition that a certain message queue execution processing logic calls a payment system to cause payment failure, the message queue is put into the payment system again for processing, and if the processing times or time exceed a preset threshold value, an abnormal state notification is sent out.
The embodiment of the present invention is a system embodiment corresponding to the above method embodiment, and specific operations of each module may be understood with reference to the description of the method embodiment, which is not described herein again.
Apparatus embodiment one
An embodiment of the present invention provides a concurrent payment apparatus, as shown in fig. 6, including: a memory 60, a processor 62 and a computer program stored on the memory 60 and executable on the processor 62, which computer program, when executed by the processor 62, carries out the following method steps:
step 101, receiving an order payment request sent by a user through a background application system, legally checking order payment information carried in the order payment request, recording the order after the order payment request is successfully checked, storing the order in a database, setting a first distribution lock for the current payment order, rejecting other payment requests of the current order through the first distribution lock, and calling a payment system;
in step 101, the order payment request comprises: single order payment requests and batch order payment requests;
therefore, in step 101, the payment amount and the order unique identifier of the single order payment request are saved in the database after the verification is successful; or after the verification is successful, saving the batch number and the payment sum of the batch order payment request to a database, wherein the batch number is as follows: the order of each order in the batch of orders uniquely identifies the constituent string.
102, performing payment verification on order payment information through a payment system, setting a second distribution lock for a currently paid order, rejecting other payment requests of the current order through the second distribution lock, respectively recording platform transaction details of the order into one or more preset transaction record tables after the payment verification is passed, setting a unique index for the transaction record tables by using an order number, and feeding back a payment result to a user through a background application system according to a verification result;
step 103, according to the processing logic required for completing the current payment recorded in the transaction record table, one or more preset message queues are called, the corresponding processing logic is executed through the message queues, and the bank system is called to complete the payment processing. In embodiments of the present invention, each of the one or more message queues handles only one logic.
Step 103 specifically includes the following processing:
the method comprises the steps of sequentially calling corresponding message queues according to each processing logic required for completing current payment recorded in a transaction record table, executing the corresponding logic through the message queues, calling a bank system to pay, receiving payment result information fed back by the bank system, feeding the current payment result information back to the payment system, updating execution results of the corresponding processing logic in the transaction record table through the payment system according to the payment result information, and determining a final result according to the execution results of each processing logic after all processing logics are executed.
In addition, when a certain message queue execution processing logic calls the payment system to cause payment failure, the message queue is put again for processing, and if the number of times or time of processing exceeds a preset threshold value, an abnormal state notification is sent out.
Device embodiment II
The embodiment of the present invention provides a computer-readable storage medium, on which an implementation program for information transmission is stored, and when being executed by a processor 62, the implementation program implements the following method steps:
step 101, receiving an order payment request sent by a user through a background application system, legally checking order payment information carried in the order payment request, recording the order after the order payment request is successfully checked, storing the order in a database, setting a first distribution lock for the current payment order, rejecting other payment requests of the current order through the first distribution lock, and calling a payment system;
in step 101, the order payment request comprises: single order payment requests and batch order payment requests;
therefore, in step 101, the payment amount and the order unique identifier of the single order payment request are saved in the database after the verification is successful; or after the verification is successful, saving the batch number and the payment sum of the batch order payment request to a database, wherein the batch number is as follows: the order of each order in the batch of orders uniquely identifies the constituent string.
102, performing payment verification on order payment information through a payment system, setting a second distribution lock for a currently paid order, rejecting other payment requests of the current order through the second distribution lock, respectively recording platform transaction details of the order into one or more preset transaction record tables after the payment verification is passed, setting a unique index for the transaction record tables by using an order number, and feeding back a payment result to a user through a background application system according to a verification result;
step 103, according to the processing logic required for completing the current payment recorded in the transaction record table, one or more preset message queues are called, the corresponding processing logic is executed through the message queues, and the bank system is called to complete the payment processing. In embodiments of the present invention, each of the one or more message queues handles only one logic.
Step 103 specifically includes the following processing:
the method comprises the steps of sequentially calling corresponding message queues according to each processing logic required for completing current payment recorded in a transaction record table, executing the corresponding logic through the message queues, calling a bank system to pay, receiving payment result information fed back by the bank system, feeding the current payment result information back to the payment system, updating execution results of the corresponding processing logic in the transaction record table through the payment system according to the payment result information, and determining a final result according to the execution results of each processing logic after all processing logics are executed.
In addition, when a certain message queue execution processing logic calls the payment system to cause payment failure, the message queue is put again for processing, and if the number of times or time of processing exceeds a preset threshold value, an abnormal state notification is sent out.
The computer-readable storage medium of this embodiment includes, but is not limited to: ROM, RAM, magnetic or optical disks, and the like.
It will be apparent to those skilled in the art that the modules or steps of the present invention described above may be implemented by a general purpose computing device, they may be centralized on a single computing device or distributed across a network of multiple computing devices, and alternatively, they may be implemented by program code executable by a computing device, such that they may be stored in a storage device and executed by a computing device, and in some cases, the steps shown or described may be performed in an order different than that described herein, or they may be separately fabricated into individual integrated circuit modules, or multiple ones of them may be fabricated into a single integrated circuit module. Thus, the present invention is not limited to any specific combination of hardware and software.
Finally, it should be noted that: the above embodiments are only used to illustrate the technical solution of the present invention, and not to limit the same; while the invention has been described in detail and with reference to the foregoing embodiments, it will be understood by those skilled in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some or all of the technical features may be equivalently replaced; and the modifications or the substitutions do not make the essence of the corresponding technical solutions depart from the scope of the technical solutions of the embodiments of the present invention.
Claims (10)
1. A concurrent payment method, comprising:
receiving an order payment request sent by a user through a background application system, carrying out legal verification on order payment information carried in the order payment request, recording the order after the verification is successful, storing the order in a database, setting a first distribution lock for the current payment order, rejecting other payment requests of the current order through the first distribution lock, and calling a payment system;
the payment system carries out payment verification on the order payment information, a second distribution lock is arranged on the currently paid order, other payment requests of the current order are rejected through the second distribution lock, after the payment verification is passed, platform transaction details of the order are respectively recorded into one or more preset transaction record tables, a unique index is arranged on the transaction record tables by using order numbers, and a payment result is fed back to a user through the background application system according to a verification result;
and calling one or more preset message queues according to the processing logic required for completing the current payment recorded in the transaction record table, executing corresponding processing logic through the message queues and calling a bank system to complete payment processing.
2. The method of claim 1, wherein the order payment request comprises: single order payment requests and batch order payment requests;
the step of recording the order after the verification is successful and storing the order in a database specifically comprises the following steps:
after the verification is successful, the payment amount of the single order payment request and the order unique identification are stored in a database; or,
after the verification is successful, the batch number and the payment sum of the batch order payment request are stored in a database, wherein the batch number is as follows: the order of each order in the batch of orders uniquely identifies the constituent string.
3. The method of claim 1, wherein each of the one or more message queues handles only one logic.
4. The method according to claim 1 or 3, wherein invoking one or more preset message queues according to the processing logic required for completing the current payment recorded in the transaction record table, and executing the corresponding processing logic through the message queues and invoking a banking system to complete the payment processing specifically comprises:
and according to each processing logic required for completing the current payment recorded in the transaction record table, sequentially calling the corresponding message queue, executing the corresponding logic through the message queue, calling a bank system to pay, receiving payment result information fed back by the bank system, feeding back the current payment result information to the payment system, updating the execution result of the corresponding processing logic in the transaction record table according to the payment result information through the payment system, and after the execution of all the processing logics is completed, determining a final result according to the execution result of each processing logic.
5. The method according to claim 4, wherein invoking one or more preset message queues according to the processing logic required for completing the current payment recorded in the transaction record table, and executing the corresponding processing logic through the message queues and invoking a banking system to complete the payment processing specifically comprises:
and under the condition that a certain message queue execution processing logic calls a payment system to cause payment failure, the message queue is put into the payment system again for processing, and if the processing times or time exceed a preset threshold value, an abnormal state notification is sent out.
6. A concurrent payment system, comprising:
the background application system is used for receiving an order payment request sent by a user, legally verifying order payment information carried in the order payment request, recording and storing the order in a database after the order payment request is successfully verified, setting a first distribution lock for the current payment order, rejecting other payment requests of the current order through the first distribution lock, and calling the payment system;
the payment system is used for carrying out payment verification on the order payment information, setting a second distribution lock for the currently paid order, rejecting other payment requests of the current order through the second distribution lock, respectively recording platform transaction details of the order into one or more preset transaction record tables after the payment verification is passed, setting a unique index for the transaction record tables by using the order number, and feeding back a payment result to a user through the background application system according to the verification result;
and the message queue module is used for calling one or more preset message queues according to the processing logic required for completing the current payment recorded in the transaction record table, executing corresponding processing logic through the message queues and calling a bank system to complete payment processing.
7. The system of claim 6, wherein the order payment request comprises: single order payment requests and batch order payment requests;
the step of recording the order after the verification is successful and storing the order in a database specifically comprises the following steps:
after the verification is successful, the payment amount of the single order payment request and the order unique identification are stored in a database; or,
after the verification is successful, the batch number and the payment sum of the batch order payment request are stored in a database, wherein the batch number is as follows: the order of each order in the batch of orders uniquely identifies the constituent string.
8. The system of claim 6, wherein each of the one or more message queues handles only one logic;
the message queue module is specifically configured to:
according to each processing logic required for completing current payment recorded in the transaction record table, calling corresponding message queues in sequence, executing corresponding logic through the message queues, calling a bank system to pay, receiving payment result information fed back by the bank system, feeding back current payment result information to the payment system, updating execution results of the corresponding processing logic in the transaction record table according to the payment result information through the payment system, and after all processing logic are executed, determining a final result according to the execution results of each processing logic;
and under the condition that a certain message queue execution processing logic calls a payment system to cause payment failure, the message queue is put into the payment system again for processing, and if the processing times or time exceed a preset threshold value, an abnormal state notification is sent out.
9. A concurrent payment device, comprising: memory, a processor and a computer program stored on the memory and executable on the processor, the computer program, when executed by the processor, implementing the steps of the concurrent payment method according to any one of claims 1 to 5.
10. A computer-readable storage medium, having stored thereon a program for implementing information transfer, which program, when executed by a processor, implements the steps of the concurrent payment method according to any one of claims 1 to 5.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202011281700.4A CN112101955B (en) | 2020-11-16 | 2020-11-16 | Concurrent payment method, system and device |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202011281700.4A CN112101955B (en) | 2020-11-16 | 2020-11-16 | Concurrent payment method, system and device |
Publications (2)
Publication Number | Publication Date |
---|---|
CN112101955A true CN112101955A (en) | 2020-12-18 |
CN112101955B CN112101955B (en) | 2021-02-02 |
Family
ID=73785709
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202011281700.4A Active CN112101955B (en) | 2020-11-16 | 2020-11-16 | Concurrent payment method, system and device |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN112101955B (en) |
Cited By (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN112766956A (en) * | 2021-03-19 | 2021-05-07 | 中国工商银行股份有限公司 | Order payment and weight control method and device based on distributed order system |
CN113570435A (en) * | 2021-07-29 | 2021-10-29 | 深圳数鑫科技有限公司 | Method and terminal for deducting remaining use times of data service API (application program interface) commodities |
CN113590036A (en) * | 2021-07-26 | 2021-11-02 | 浪潮云信息技术股份公司 | Optimization method for writing in batch group serialization logic |
CN114862509A (en) * | 2022-04-24 | 2022-08-05 | 东华大学 | Three-stage order creating method based on Internet order center system |
CN115423521A (en) * | 2022-09-05 | 2022-12-02 | 深圳市一页科技有限公司 | Large-batch concurrent payment optimization system and method thereof |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN104751326A (en) * | 2013-12-30 | 2015-07-01 | 腾讯科技(深圳)有限公司 | Data processing method and related equipment and system |
US20180068290A1 (en) * | 2015-05-25 | 2018-03-08 | Alibaba Group Holding Limited | Transaction scheme for offline payment |
CN110706070A (en) * | 2019-09-25 | 2020-01-17 | 口碑(上海)信息技术有限公司 | Multi-user order ordering method, server, client and system |
CN110751530A (en) * | 2018-08-20 | 2020-02-04 | 北京嘀嘀无限科技发展有限公司 | Identity information security verification method, server, passenger end and driver end |
-
2020
- 2020-11-16 CN CN202011281700.4A patent/CN112101955B/en active Active
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN104751326A (en) * | 2013-12-30 | 2015-07-01 | 腾讯科技(深圳)有限公司 | Data processing method and related equipment and system |
US20180068290A1 (en) * | 2015-05-25 | 2018-03-08 | Alibaba Group Holding Limited | Transaction scheme for offline payment |
CN110751530A (en) * | 2018-08-20 | 2020-02-04 | 北京嘀嘀无限科技发展有限公司 | Identity information security verification method, server, passenger end and driver end |
CN110706070A (en) * | 2019-09-25 | 2020-01-17 | 口碑(上海)信息技术有限公司 | Multi-user order ordering method, server, client and system |
Cited By (8)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN112766956A (en) * | 2021-03-19 | 2021-05-07 | 中国工商银行股份有限公司 | Order payment and weight control method and device based on distributed order system |
CN113590036A (en) * | 2021-07-26 | 2021-11-02 | 浪潮云信息技术股份公司 | Optimization method for writing in batch group serialization logic |
CN113590036B (en) * | 2021-07-26 | 2024-03-29 | 上海沄熹科技有限公司 | Optimization method for writing batch group serialization logic |
CN113570435A (en) * | 2021-07-29 | 2021-10-29 | 深圳数鑫科技有限公司 | Method and terminal for deducting remaining use times of data service API (application program interface) commodities |
CN113570435B (en) * | 2021-07-29 | 2024-06-07 | 深圳数鑫科技有限公司 | Method and terminal for deducting remaining use times of data service API commodity |
CN114862509A (en) * | 2022-04-24 | 2022-08-05 | 东华大学 | Three-stage order creating method based on Internet order center system |
CN115423521A (en) * | 2022-09-05 | 2022-12-02 | 深圳市一页科技有限公司 | Large-batch concurrent payment optimization system and method thereof |
CN115423521B (en) * | 2022-09-05 | 2023-08-04 | 深圳市一页科技有限公司 | Large-batch concurrent payment optimizing system and method thereof |
Also Published As
Publication number | Publication date |
---|---|
CN112101955B (en) | 2021-02-02 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN112101955B (en) | Concurrent payment method, system and device | |
CN110782240B (en) | Business data processing method and device, computer equipment and storage medium | |
CN111833034B (en) | Batch deduction method, payment server, computer equipment and storage medium | |
WO2020233402A1 (en) | Accounts payable order validation method, apparatus and device, and storage medium | |
CN110675247B (en) | Unknown transaction processing method and system, peripheral system and core bank system | |
CN111383089B (en) | Account adjusting method and device, terminal equipment and storage medium | |
CN112907344A (en) | Accounting data processing method and device, electronic equipment and storage medium | |
CN111444213B (en) | Ledger clearing system and method based on credit business | |
CN111415146A (en) | Resource data processing method, device and equipment | |
US20160300203A1 (en) | Settlement system, server device, terminal device, recording medium, method and program | |
CN111369253A (en) | Foreign exchange service declaration method, device, equipment and storage medium | |
CN112965986B (en) | Service consistency processing method, device, equipment and storage medium | |
CN114170023A (en) | Method and device for testing fund transaction operation platform system | |
CN113256276A (en) | Payment state maintenance method and system based on order call-back | |
CN111768293B (en) | Transaction information processing method, device, equipment and storage medium | |
CN110853216B (en) | Information storage method, information storage device, information storage medium and computer equipment | |
CN116383052A (en) | Automatic testing method, device and equipment for batch processing task and storage medium | |
CN111737262B (en) | Data processing method and device | |
CN111626872B (en) | Data verification method, device, equipment and storage medium | |
CN113988844A (en) | Service subscription method, device and system | |
CN112990922A (en) | Batch payment method, device, equipment and storage medium | |
CN113806617A (en) | Query arrangement method and device based on service request data analysis | |
CN113689279A (en) | Logistics financing application and approval method, system and medium | |
CN111626867A (en) | Payment failure automatic processing method, device, equipment and storage medium | |
CN107341727B (en) | Digital currency recycling method and system |
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 | ||
CP01 | Change in the name or title of a patent holder | ||
CP01 | Change in the name or title of a patent holder |
Address after: 100089 room 1408, 14 / F, No.9, North Fourth Ring Road West, Haidian District, Beijing Patentee after: Beijing kuaicheng Technology Co.,Ltd. Address before: 100089 room 1408, 14 / F, No.9, North Fourth Ring Road West, Haidian District, Beijing Patentee before: Beijing kuaisheng Technology Co.,Ltd. |