Transaction processing method and device
By using historical authorization statistical data in the transaction authorization server to determine whether authorization trial calculation is required, and obtaining authorization point information for authorization processing when necessary, the problem of low efficiency of transaction authorization processing in distributed systems is solved and the efficiency of transaction processing is improved. and success rate, achieving the optimal state of the system and reducing costs.
Patent Information
- Application Number
- CN202210556419.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-05-19
- Publication Date
- 2024-10-29
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
The authorization processing of transaction processes in distributed systems is inefficient, has a low success rate, and lacks efficient solutions.
By receiving transaction requests in the transaction authorization server, reading historical authorization statistical data, it is determined whether an authorization trial is required. If not, the transaction request is submitted directly. If necessary, the authorization point information is obtained and fed back to the initiating device for authorization processing. Then submit the transaction request to achieve efficient authorization processing of the transaction process.
It improves the efficiency and success rate of transaction processing in distributed systems, reduces transaction processing costs, and ensures centralized management of authorization information and optimal system status.
Smart Images

Figure CN114881659B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of distributed technology, and in particular to a transaction processing method and device. Background Art
[0002] This section is intended to provide a background or context to the embodiments of the invention recited in the claims. No admission is made that the description herein is prior art by inclusion in this section.
[0003] The current distributed system cannot provide an efficient solution for authorization processing during the transaction process, which results in the distributed system always being inefficient and having a low success rate for authorization processing during the transaction process. Summary of the invention
[0004] The embodiment of the present invention provides a transaction processing method for efficiently implementing authorization processing of a transaction process in a distributed system, so as to improve the efficiency and success rate of transaction processing. The method is applied to a transaction authorization server, comprising:
[0005] Receiving a transaction request initiated by a transaction initiating end device;
[0006] Read historical authorization statistics of transaction requests;
[0007] Determine whether authorization trial calculation is required for transaction requests based on historical authorization statistics;
[0008] When there is no need to conduct an authorization trial calculation for a transaction request, the transaction request is submitted to the transaction server for transaction processing; when a transaction failure notification is received from the transaction server due to unauthorized transaction, the transaction request is withdrawn;
[0009] When it is necessary to perform authorization trial calculation on the transaction request, the authorization point information obtained by the trial calculation is obtained from the transaction server; the authorization point information is fed back to the transaction initiating device, and after the transaction initiating device performs authorization processing according to the authorization point information, the authorized transaction request is submitted to the transaction server for transaction processing.
[0010] The embodiment of the present invention further provides a transaction processing device for efficiently implementing authorization processing of a transaction process in a distributed system, so as to improve the efficiency and success rate of transaction processing. The device is applied to a transaction authorization server, and includes:
[0011] A request receiving module, used to receive a transaction request initiated by a transaction initiating end device;
[0012] A historical authorization statistics data reading module is used to read historical authorization statistics data of transaction requests;
[0013] The authorization trial calculation judgment module is used to confirm whether an authorization trial calculation is required for a transaction request based on historical authorization statistics;
[0014] The transaction module is used to submit the transaction request to the transaction server for transaction processing when no authorization trial calculation is required for the transaction request; when receiving a transaction failure notification returned by the transaction server due to unauthorized transaction, the transaction request is withdrawn;
[0015] The authorization calculation module is used to obtain the authorization point information obtained by calculation from the transaction server when the transaction request needs to be authorized and calculated; the authorization point information is fed back to the transaction initiating device, and after the transaction initiating device performs authorization processing according to the authorization point information, the authorized transaction request is submitted to the transaction server for transaction processing.
[0016] An embodiment of the present invention further provides a computer device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the above-mentioned transaction processing method when executing the computer program.
[0017] An embodiment of the present invention further provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and the computer program implements the above-mentioned transaction processing method when executed by a processor.
[0018] An embodiment of the present invention further provides a computer program product, which includes a computer program. When the computer program is executed by a processor, the transaction processing method described above is implemented.
[0019] In the embodiment of the present invention, a transaction request initiated by a transaction initiating terminal device is received; historical authorization statistics of the transaction request are read; whether authorization trial calculation is required for the transaction request is confirmed based on the historical authorization statistics; when authorization trial calculation is not required for the transaction request, the transaction request is submitted to the transaction server for transaction processing; when a transaction failure notification returned by the transaction server due to unauthorized transaction is received, the transaction request is withdrawn; when authorization trial calculation is required for the transaction request, authorization point information obtained by trial calculation is obtained from the transaction server; the authorization point information is fed back to the transaction initiating terminal device, and after the transaction initiating terminal device performs authorization processing based on the authorization point information, the authorized transaction request is submitted to the transaction server for transaction processing. In this way, authorization processing of the transaction process in a distributed system can be efficiently realized, and the efficiency and success rate of transaction processing can be improved. BRIEF DESCRIPTION OF THE DRAWINGS
[0020] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the embodiments or the prior art descriptions. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work. In the drawings:
[0021] Figure 1 A flowchart of a transaction processing method according to an embodiment of the present invention;
[0022] Figure 2 A diagram showing a specific example of a transaction processing method in an embodiment of the present invention;
[0023] Figure 3 A diagram showing a specific example of a transaction processing method in an embodiment of the present invention;
[0024] Figure 4 This is a structural example diagram of a transaction processing device in an embodiment of the present invention;
[0025] Figure 5 A diagram showing a specific example of a transaction processing device in an embodiment of the present invention;
[0026] Figure 6 A schematic diagram of a computer device provided in an embodiment of the present invention. DETAILED DESCRIPTION
[0027] To make the purpose, technical solution and advantages of the embodiments of the present invention more clear, the embodiments of the present invention are further described in detail below in conjunction with the accompanying drawings. Here, the exemplary embodiments of the present invention and their descriptions are used to explain the present invention, but are not intended to limit the present invention.
[0028] After analysis, the inventor found that the current distributed system cannot provide an efficient solution for authorization processing in the transaction process, which has led to the distributed system's authorization processing in the transaction process being inefficient and having a low success rate. Based on this, the inventor provides a transaction processing method in an embodiment of the present invention to efficiently implement authorization processing in the transaction process in the distributed system and improve the efficiency and success rate of transaction processing.
[0029] Figure 1 FIG. 1 is a flow chart of a transaction processing method in an embodiment of the present invention. Figure 1 As shown, the method is applied to a transaction authorization server and includes the following steps:
[0030] Step 101: receiving a transaction request initiated by a transaction initiating end device;
[0031] Step 102: Read historical authorization statistics of transaction requests;
[0032] Step 103: confirm whether authorization trial calculation is required for the transaction request based on historical authorization statistics;
[0033] Step 104: When the transaction request does not need to be authorized, the transaction request is submitted to the transaction server for transaction processing; when a transaction failure notification is received from the transaction server due to unauthorized transaction, the transaction request is withdrawn;
[0034] Step 105: When authorization trial calculation is required for the transaction request, the authorization point information obtained by the trial calculation is obtained from the transaction server; the authorization point information is fed back to the transaction initiating device, and after the transaction initiating device performs authorization processing according to the authorization point information, the authorized transaction request is submitted to the transaction server for transaction processing.
[0035] Depend on Figure 1 It can be known from the process shown that in the embodiment of the present invention, a transaction processing method is implemented, which receives a transaction request initiated by a transaction initiating terminal device; reads historical authorization statistics of the transaction request; confirms whether it is necessary to perform authorization trial calculation on the transaction request based on the historical authorization statistics; when it is not necessary to perform authorization trial calculation on the transaction request, submits the transaction request to the transaction server for transaction processing; when receiving a transaction failure notification returned by the transaction server due to unauthorized transaction, withdraws the transaction request; when it is necessary to perform authorization trial calculation on the transaction request, obtains the authorization point information obtained by trial calculation from the transaction server; feeds back the authorization point information to the transaction initiating terminal device, and after the transaction initiating terminal device performs authorization processing based on the authorization point information, submits the authorized transaction request to the transaction server for transaction processing. In this way, the authorization processing of the transaction process in the distributed system can be efficiently realized, and the efficiency and success rate of transaction processing can be improved.
[0036] During specific implementation, a transaction authorization server is established to receive transaction requests initiated by a transaction initiating device; then historical authorization statistics of the transaction requests are read, and then it is confirmed whether authorization trial calculation is required for the transaction requests based on the historical authorization statistics.
[0037] In one embodiment, the historical authorization statistical data may include, for example, the number of historical authorizations; of course, those skilled in the art should know that the historical authorization statistical data may be specifically selected according to actual conditions, for example, the historical authorization statistical data may also be the historical authorization status, etc. When the historical authorization statistical data is the number of historical authorizations, confirming whether it is necessary to perform an authorization trial calculation on the transaction request according to the historical authorization statistical data may include: when the number of historical authorizations exceeds a threshold, confirming that it is necessary to perform an authorization trial calculation on the transaction request; when the number of historical authorizations does not exceed the threshold, confirming that it is not necessary to perform an authorization trial calculation on the transaction request.
[0038] In one embodiment, the threshold value may be determined according to a balance parameter, and the balance parameter may be: a server setting parameter for minimizing the server resources required for processing the transaction request, wherein the server includes a transaction authorization server, a transaction server, etc. In addition, those skilled in the art should know that the balance parameter may also be selected from other specific parameters according to actual conditions.
[0039] If it is confirmed that there is no need to conduct an authorization trial calculation for the transaction request, the transaction request will be submitted to the transaction server for transaction processing; thereafter, when a transaction failure notification is received from the transaction server due to unauthorized transaction, the transaction request will be withdrawn.
[0040] In one embodiment, the withdrawal process of the transaction request may include: controlling the transaction server of the submitted transactions corresponding to the transaction request to roll back one by one. Those skilled in the art should know that the withdrawal process may be specifically performed according to actual conditions.
[0041] Figure 2 FIG. 1 is a specific example diagram of the transaction processing method in an embodiment of the present invention. Figure 2 As shown, in one embodiment, after the transaction request is withdrawn, the following steps may also be included:
[0042] Step 201: Provide the authorization point information involved in the withdrawal to the transaction initiating end device. After the transaction initiating end device performs authorization processing according to the authorization point information involved in the withdrawal, the authorized transaction request is submitted to the transaction server for transaction processing.
[0043] If it is confirmed that the transaction request needs to be authorized, the authorization point information obtained from the trial calculation is obtained from the transaction server; the authorization point information is then fed back to the transaction initiating device. After the transaction initiating device performs authorization processing based on the authorization point information, the authorized transaction request is submitted to the transaction server for transaction processing.
[0044] In one embodiment, the method further includes: after the transaction server processes the transaction, the authorization statistics of the transaction request are incorporated into the historical authorization statistics. For example, the total number of authorizations for this transaction will still be included in the historical authorization statistics of the transaction.
[0045] Figure 3 FIG. 1 is a specific example diagram of a transaction processing method in an embodiment of the present invention. Figure 3 As shown, the devices performing transaction processing in this example may include: a transaction initiating device, a transaction authorization server, server A, server B and a historical authorization statistics database, wherein the historical authorization statistics data are stored in the historical authorization statistics database, and the transaction server includes server A and server B.
[0046] In this example, the transaction processing method includes:
[0047] The transaction initiator device initiates a transaction request to the transaction server, and the transaction server reads the historical authorization statistics of the transaction request, which in this case is the number of historical authorizations; then a comparison is made, and when the number of historical authorizations exceeds the threshold, it is confirmed that the transaction request needs to be authorized for trial calculation; when the number of historical authorizations does not exceed the threshold, it is confirmed that the transaction request does not need to be authorized for trial calculation. The threshold can be determined based on the balance parameter, which can be: a server setting parameter used to minimize the server resources required to process the transaction request.
[0048] When the transaction request does not need to be authorized, the transaction request is submitted to the transaction server, for example, the server A and server B involved in the transaction request in this example process the transaction; if a transaction failure notification is received from server A due to unauthorized transaction, the transaction request is withdrawn, that is, the transactions running on server A and server B are withdrawn;
[0049] When it is necessary to perform authorization trial calculation on the transaction request, for example, the authorization point information x and y obtained by trial calculation are obtained from server A and server B; the authorization point information x and y are fed back to the transaction initiating device, and after the transaction initiating device performs authorization processing according to the authorization point information x and y, the authorized transaction request is submitted to server A and server B for transaction processing.
[0050] It can be seen from the above embodiments that in the embodiments of the present invention, when the transaction initiator sends a transaction request to the transaction authorization server, it does not need to worry about the authorization issue. If the response indicates that authorization is required, the transaction request is sent after authorization.
[0051] All transaction requests are routed by the transaction authorization server. After receiving the transaction request from the transaction initiator device, the transaction authorization server confirms whether authorization trial calculation is required based on the historical authorization statistics of the transaction request. If it is required, authorization trial calculation is performed first, and normal transaction is performed after authorization is processed. If it is not required, normal transaction is performed directly. When confirming whether authorization trial calculation is required, the balance parameter can be used to determine the threshold required for judgment. The balance parameter can be: a server setting parameter used to minimize the server resources required for processing transaction requests. In this way, whether authorization trial calculation is required can be confirmed with the overall consumption minimized as the balance point.
[0052] The present invention also provides a transaction processing device in the embodiment, as described in the following embodiment. Since the principle of solving the problem by the device is similar to that of the transaction processing method, the implementation of the device can refer to the implementation of the transaction processing method, and the repeated parts will not be repeated.
[0053] Figure 4FIG. 1 is a diagram showing an example of a structure of a transaction processing device in an embodiment of the present invention. Figure 4 As shown, the device is applied to a transaction authorization server, comprising:
[0054] The request receiving module 401 is used to receive a transaction request initiated by a transaction initiating end device;
[0055] A historical authorization statistics data reading module 402 is used to read historical authorization statistics data of transaction requests;
[0056] The authorization trial calculation judgment module 403 is used to determine whether an authorization trial calculation is required for the transaction request based on historical authorization statistical data;
[0057] The transaction module 404 is used to submit the transaction request to the transaction server for transaction processing when authorization trial calculation is not required for the transaction request; when receiving a transaction failure notification returned by the transaction server due to unauthorized transaction, the transaction request is withdrawn;
[0058] The authorization trial calculation module 405 is used to obtain the authorization point information obtained by the trial calculation from the transaction server when it is necessary to perform an authorization trial calculation on the transaction request; the authorization point information is fed back to the transaction initiating end device, and after the transaction initiating end device performs authorization processing according to the authorization point information, the authorized transaction request is submitted to the transaction server for transaction processing.
[0059] In one embodiment, the historical authorization statistics data reading module may be specifically used for: historical authorization statistics data, which may include: historical authorization times;
[0060] The authorization trial calculation judgment module can be specifically used to: when the number of historical authorizations exceeds a threshold, confirm that an authorization trial calculation is required for the transaction request; when the number of historical authorizations does not exceed the threshold, confirm that an authorization trial calculation is not required for the transaction request.
[0061] In one embodiment, the threshold value may be determined according to a balance parameter, which may be a server setting parameter for minimizing the server resources required for processing the transaction request.
[0062] In one embodiment, the transaction module may be specifically configured to: upon receiving a transaction failure notification returned by a transaction server due to unauthorized transaction, control the transaction server of submitted transactions corresponding to the transaction request to roll back one by one.
[0063] In one embodiment, the transaction module may also be used to:
[0064] After the transaction request is withdrawn, the authorization point information involved in the withdrawal is provided to the transaction initiator. After the transaction initiator performs authorization processing based on the authorization point information involved in the withdrawal, the authorized transaction request is submitted to the transaction server for transaction processing.
[0065] like Figure 5 As shown, in one embodiment, Figure 4 The transaction processing apparatus shown may also include:
[0066] The historical authorization statistics data updating module 501 may be used to merge the authorization statistics data of the transaction request into the historical authorization statistics data after the transaction server processes the transaction.
[0067] Based on the above invention concept, Figure 6 As shown, the present invention also proposes a computer device 600, including a memory 610, a processor 620, and a computer program 630 stored in the memory 610 and executable on the processor 620, and the processor 620 implements the above transaction request method when executing the computer program 630.
[0068] An embodiment of the present invention further provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the above-mentioned transaction request method is implemented.
[0069] An embodiment of the present invention further provides a computer program product, which includes a computer program. When the computer program is executed by a processor, the transaction request method is implemented.
[0070] In summary, in the embodiment of the present invention, a transaction request initiated by a transaction initiating terminal device is received; historical authorization statistics of the transaction request are read; whether authorization trial calculation is required for the transaction request is confirmed based on the historical authorization statistics; when authorization trial calculation is not required for the transaction request, the transaction request is submitted to the transaction server for transaction processing; when a transaction failure notification returned by the transaction server due to unauthorized transaction is received, the transaction request is withdrawn; when authorization trial calculation is required for the transaction request, authorization point information obtained by trial calculation is obtained from the transaction server; the authorization point information is fed back to the transaction initiating terminal device, and after the transaction initiating terminal device performs authorization processing based on the authorization point information, the authorized transaction request is submitted to the transaction server for transaction processing. In this way, the transaction initiating terminal device does not need special processing, the authorization information is centrally managed, and the authorization of any transaction is performed in the optimal state of the system, which reduces the transaction processing cost and improves the transaction processing efficiency.
[0071] 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.
[0072] 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 device that provides the functions specified in a block or multiple blocks.
[0073] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.
[0074] 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 for the functions specified in one or more boxes.
[0075] The specific embodiments described above further illustrate the objectives, technical solutions and beneficial effects of the present invention in detail. It should be understood that the above description is only a specific embodiment of the present invention and is not intended to limit the scope of protection of the present invention. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present invention should be included in the scope of protection of the present invention.
Claims
1. A transaction processing method, characterized in that: Applied to a transaction authorization server, the method comprises: Receiving a transaction request initiated by a transaction initiating end device; Read historical authorization statistics of transaction requests; Determine whether authorization trial calculation is required for transaction requests based on historical authorization statistics; When there is no need to conduct an authorization trial calculation for a transaction request, the transaction request is submitted to the transaction server for transaction processing; when a transaction failure notification is received from the transaction server due to unauthorized transaction, the transaction request is withdrawn; When authorization trial calculation is required for a transaction request, the authorization point information obtained by trial calculation is obtained from the transaction server; the authorization point information is fed back to the transaction initiating terminal device, and after the transaction initiating terminal device performs authorization processing according to the authorization point information, the authorized transaction request is submitted to the transaction server for transaction processing; Among them, historical authorization statistics include: historical authorization times; Determine whether authorization calculation is required for transaction requests based on historical authorization statistics, including: When the number of historical authorizations exceeds the threshold, confirm that the transaction request needs to be authorized for trial calculation; When the number of historical authorizations does not exceed the threshold, it is confirmed that there is no need to conduct authorization trial calculation for the transaction request; The threshold is determined according to a balance parameter, where the balance parameter is a server setting parameter for minimizing the server resources required for processing the transaction request.
2. The method according to claim 1, characterized in that The transaction request is withdrawn, including: controlling the transaction servers of the submitted transactions corresponding to the transaction request to roll back one by one.
3. The method according to claim 1, characterized in that After the transaction request is withdrawn, it also includes: providing the transaction initiating end device with the authorization point information involved in the withdrawal, and after the transaction initiating end device performs authorization processing according to the authorization point information involved in the withdrawal, submitting the authorized transaction request to the transaction server for transaction processing.
4. The method according to any one of claims 1 to 3, characterized in that: Also includes: After the transaction server processes the transaction, the authorization statistics of the transaction request are incorporated into the historical authorization statistics.
5. A transaction processing device, characterized in that: Applied to a transaction authorization server, the device comprises: A request receiving module, used to receive a transaction request initiated by a transaction initiating end device; A historical authorization statistics data reading module is used to read historical authorization statistics data of transaction requests; The authorization trial calculation judgment module is used to confirm whether an authorization trial calculation is required for a transaction request based on historical authorization statistics; The transaction module is used to submit the transaction request to the transaction server for transaction processing when no authorization trial calculation is required for the transaction request; when receiving a transaction failure notification returned by the transaction server due to unauthorized transaction, the transaction request is withdrawn; The authorization trial calculation module is used to obtain the authorization point information obtained by trial calculation from the transaction server when authorization trial calculation is required for the transaction request; the authorization point information is fed back to the transaction initiating terminal device, and after the transaction initiating terminal device performs authorization processing according to the authorization point information, the authorized transaction request is submitted to the transaction server for transaction processing; Among them, historical authorization statistics include: historical authorization times; The authorization trial calculation judgment module is specifically used for: When the number of historical authorizations exceeds the threshold, confirm that the transaction request needs to be authorized for trial calculation; When the number of historical authorizations does not exceed the threshold, it is confirmed that there is no need to conduct authorization trial calculation for the transaction request; The threshold is determined according to a balance parameter, where the balance parameter is a server setting parameter for minimizing the server resources required for processing the transaction request.
6. The device according to claim 5, characterized in that The transaction module is specifically used to: upon receiving a transaction failure notification returned by the transaction server due to unauthorized transaction, control the transaction server of the submitted transactions corresponding to the transaction request to roll back one by one.
7. The device according to claim 5, characterized in that The transaction module is also used to: after withdrawing the transaction request, provide the transaction initiating device with the authorization point information involved in the withdrawal, and after the transaction initiating device performs authorization processing based on the authorization point information involved in the withdrawal, submit the authorized transaction request to the transaction server for transaction processing.
8. The device according to any one of claims 5 to 7, characterized in that: Also includes: The historical authorization statistics data updating module is used to merge the authorization statistics data of the transaction request into the historical authorization statistics data after the transaction server processes the transaction.
9. A computer device comprising a memory, a processor and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the computer program, the method according to any one of claims 1 to 4 is implemented.
10. A computer-readable storage medium, characterized in that: The computer-readable 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 4 is implemented.
11. A computer program product, characterized in that The computer program product comprises a computer program, and when the computer program is executed by a processor, the method according to any one of claims 1 to 4 is implemented.
Citation Information
Patent Citations
Predictive authorization of mobile payments
CN107209893A
Transaction method, device and system
CN111178850A
