CN111754348A - Scene combined transaction method and device - Google Patents

Scene combined transaction method and device Download PDF

Info

Publication number
CN111754348A
CN111754348A CN202010598261.3A CN202010598261A CN111754348A CN 111754348 A CN111754348 A CN 111754348A CN 202010598261 A CN202010598261 A CN 202010598261A CN 111754348 A CN111754348 A CN 111754348A
Authority
CN
China
Prior art keywords
transaction
independent
scene
combined
scenario
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
Application number
CN202010598261.3A
Other languages
Chinese (zh)
Other versions
CN111754348B (en
Inventor
唐丽娟
李成伟
张朋
谭论
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Bank of China Ltd
Original Assignee
Bank of China Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Bank of China Ltd filed Critical Bank of China Ltd
Priority to CN202010598261.3A priority Critical patent/CN111754348B/en
Publication of CN111754348A publication Critical patent/CN111754348A/en
Application granted granted Critical
Publication of CN111754348B publication Critical patent/CN111754348B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q40/00Finance; Insurance; Tax strategies; Processing of corporate or income taxes
    • G06Q40/04Trading; Exchange, e.g. stocks, commodities, derivatives or currency exchange

Landscapes

  • Business, Economics & Management (AREA)
  • Accounting & Taxation (AREA)
  • Finance (AREA)
  • Engineering & Computer Science (AREA)
  • Development Economics (AREA)
  • Economics (AREA)
  • Marketing (AREA)
  • Strategic Management (AREA)
  • Technology Law (AREA)
  • Physics & Mathematics (AREA)
  • General Business, Economics & Management (AREA)
  • General Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Debugging And Monitoring (AREA)

Abstract

The invention discloses a scene combined transaction method and a device, wherein the method comprises the following steps: when the scene combination transaction is carried out, receiving a pre-configured standard format message of the scene combination transaction; acquiring an execution result of the scene-based combined transaction according to the received standard format message and a constraint relation between independent transactions in the pre-configured scene-based combined transaction; and when the execution result of the scene combined transaction is that the combined transaction is successful, carrying out public processing on the transaction result of each independent transaction in the scene combined transaction, and outputting an output message of the scene combined transaction. According to the invention, the execution result of the scene-based combined transaction is obtained during the scene-based combined transaction by pre-configuring the standard format message of the scene-based combined transaction and the constraint relation between the independent transactions in the scene-based combined transaction, and the scene-based combined transaction can be dynamically combined in a configuration mode, so that the flexibility and the efficiency of the scene-based combined transaction are improved.

Description

Scene combined transaction method and device
Technical Field
The invention relates to the technical field of financial transactions, in particular to a scene-based combined transaction method and device.
Background
This section is intended to provide a background or context to the embodiments of the invention that are recited in the claims. The description herein is not admitted to be prior art by inclusion in this section.
Along with the development and competition of banking business and diversification of customer business, more and more complex business scenes are generated. In order to enhance the customer experience and enhance the competitiveness of enterprises, more and more independent transactions in the core banking system are desired to be provided to customers by combining in a manner of scene-based combined transactions.
For example, a student requests to open 4 accounts at a time, and selects some of the accounts to open cards, match a discount or sign a short message. The scene-based combined transaction has the following characteristics: 1) the business relation is complex: the method relates to the situation that the number of independent transactions is large, the same independent transaction can be repeated, transaction entities are different, and multiple data dependencies exist among the independent transactions, for example, the scene relates to 14 independent transactions, 4 independent account opening transactions exist, 4 account numbers exist as transaction entities, and account opening, discount and short message signing transactions depend on different account opening transactions; 2) there are many situations in the business process where the number of transactions and the sequence of transactions that need to be performed are not fixed, for example, although all of them may be open, the opening of the accounts is not fixed.
Currently, the combined transaction mechanism of the core banking system can provide some simple and scenario combined transactions. The combined transaction mechanism relies on a front-end or peripheral system to serially connect N (generally N > is 2 and N < 10, N is a positive integer) independent transactions at a time, and combines and packages the N messages of the independent transactions and sends the N messages to the combined transaction gateway, but the execution sequence, the message positions and the message lengths of the N sent independent transactions are fixed. The combined transaction gateway extracts the message bodies of the N independent transactions through standard message analysis, initiates the calling of the independent transactions one by one in sequence, and then processes the result consistency of the N independent transactions (requiring that the N transaction results are either all successful or all failed, and partial success or partial failure indicates that the transaction results are inconsistent) through a combined transaction common module, peripheral reporting, authorization, charging and other common mechanisms so as to ensure that the external transaction results of the N independent transactions are consistent.
Therefore, the existing scene-based combined transaction has the following disadvantages: 1) the interface between the front end or the peripheral system is complex and highly coupled, and the provided message of independent transaction is extremely poor in readability; 2) the expansibility of independent transaction is poor, and similar service scenes need to be developed additionally; 3) the existing scene-based combined transaction has poor service description capability, the sequence of N independent transactions is required to be fixed, and many-to-many data dependence cannot be caused between the independent transactions, so that the complex scene-based combined transaction cannot be described. The defects cause the scene-based combined transaction to lack flexibility, and meanwhile, the efficiency of the scene-based combined transaction is seriously influenced.
Therefore, the existing scene-based combined transaction has the problems of poor flexibility and low efficiency.
Disclosure of Invention
The embodiment of the invention provides a scene combination transaction method, which is used for improving the flexibility and the small efficiency of the scene combination transaction and comprises the following steps:
when the scene combination transaction is carried out, receiving a pre-configured standard format message of the scene combination transaction;
acquiring an execution result of the scene-oriented combined transaction according to the received standard format message and a constraint relation between independent transactions in the pre-configured scene-oriented combined transaction, wherein the execution result of the scene-oriented combined transaction comprises success of the combined transaction;
and when the execution result of the scene combined transaction is that the combined transaction is successful, carrying out public processing on the transaction result of each independent transaction in the scene combined transaction, and outputting an output message of the scene combined transaction.
The embodiment of the invention also provides a scene combination transaction device, which is used for improving the flexibility and the small efficiency of the scene combination transaction and comprises the following components:
the message receiving module is used for receiving a pre-configured standard format message of the scene combined transaction when the scene combined transaction is carried out;
the result acquisition module is used for acquiring the execution result of the scene-oriented combined transaction according to the received standard format message and the constraint relation between the independent transactions in the pre-configured scene-oriented combined transaction, wherein the execution result of the scene-oriented combined transaction comprises the success of the combined transaction; (ii) a
And the message output module is used for carrying out public processing on the transaction result of each independent transaction in the scene combined transaction and outputting an output message of the scene combined transaction when the execution result of the scene combined transaction is that the combined transaction is successful.
The embodiment of the invention also provides computer equipment which comprises a memory, a processor and a computer program which is stored on the memory and can run on the processor, wherein the processor realizes the scene combination transaction method when executing the computer program.
An embodiment of the present invention further provides a computer-readable storage medium, where a computer program for executing the above scenario-based combined transaction method is stored in the computer-readable storage medium.
In the embodiment of the invention, when scene combined transaction is carried out, a pre-configured standard format message of the scene combined transaction is received; acquiring an execution result in the scene-based combined transaction according to the received standard format message and a constraint relation between independent transactions in the pre-configured scene-based combined transaction; and carrying out public processing on the transaction result of each independent transaction in the scene combined transaction, and outputting an output message of the scene combined transaction. The embodiment of the invention acquires the execution result of the scene-oriented combined transaction when the scene-oriented combined transaction is carried out by pre-configuring the standard format message of the scene-oriented combined transaction and the constraint relation between the independent transactions in the scene-oriented combined transaction, and can dynamically combine the scene-oriented combined transaction by a configuration mode, thereby improving the flexibility and efficiency of the scene-oriented combined transaction.
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, it is obvious that the drawings in the following description are only some embodiments of the present invention, and for those skilled in the art, other drawings can be obtained according to the drawings without creative efforts. In the drawings:
fig. 1 is a flowchart of an implementation of a scenario-based combined transaction method according to an embodiment of the present invention;
FIG. 2 is a flowchart illustrating an implementation of step 102 in a scenario-based combinatorial transaction method according to an embodiment of the present invention;
fig. 3 is a flowchart illustrating implementation of step 201 in a scenario-based combined transaction method according to an embodiment of the present invention;
FIG. 4 is a flowchart of another implementation of step 201 and a flowchart of implementation of step 103 in the scenario-based combined transaction method according to an embodiment of the present invention;
FIG. 5 is a flowchart of another implementation of a scenario-based combined transaction method according to an embodiment of the present invention;
FIG. 6 is a flow chart of a partial implementation of a method for a combined transaction according to another embodiment of the present invention;
FIG. 7 is a flow chart of a partial implementation of a method for a combined transaction according to another embodiment of the present invention;
FIG. 8 is a functional block diagram of a scenario-based composite transaction apparatus according to an embodiment of the present invention;
fig. 9 is a block diagram illustrating a structure of a result obtaining module 802 in the scenario-based combination transaction apparatus according to an embodiment of the present invention;
fig. 10 is a block diagram illustrating a structure of a current transaction obtaining unit 901 in a scenario-based combined transaction apparatus according to an embodiment of the present invention;
fig. 11 is another structural block diagram of a current transaction obtaining unit 901 in the scenario combination transaction apparatus according to the embodiment of the present invention, and a structural block diagram of a message output module 803;
FIG. 12 is a block diagram of another functional block diagram of a scenario-based group transaction apparatus according to an embodiment of the present invention;
FIG. 13 is a functional block diagram of a portion of a scenarized combination transaction apparatus according to an embodiment of the present invention;
fig. 14 is a functional block diagram of a part of another scenario combination transaction method according to an embodiment of the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the embodiments of the present invention more apparent, the embodiments of the present invention are further described in detail below with reference to the accompanying drawings. The exemplary embodiments and descriptions of the present invention are provided to explain the present invention, but not to limit the present invention.
Fig. 1 illustrates an implementation flow of a scenario-based combined transaction method provided by an embodiment of the present invention, and for convenience of description, only the relevant portions of the embodiment of the present invention are illustrated, and the following details are described below:
as shown in fig. 1, a scenic combined transaction method includes:
101, receiving a pre-configured standard format message of the scene combined transaction when the scene combined transaction is carried out;
102, acquiring an execution result of the scene-based combined transaction according to the received standard format message and a constraint relation between independent transactions in the pre-configured scene-based combined transaction, wherein the execution result of the scene-based combined transaction comprises success of the combined transaction;
and 103, when the execution result of the scene combined transaction is that the combined transaction is successful, carrying out public processing on the transaction result of each independent transaction in the scene combined transaction, and outputting an output message of the scene combined transaction.
The scene combined transaction is a series of independent transactions which are mutually related or mutually restricted, and the transaction is carried out in a scene mode. The following situations exist as the execution result of the scenario combination transaction: (1) the combined transaction is successful; (2) group and transaction failures; (3) confirming the charge; and (4) authorization validation. The charging confirmation and the authorization confirm an intermediate transition state of the execution result of the scenario combination transaction, and the final execution result of the scenario combination transaction is either successful in the scenario combination transaction or failed in the group and transaction.
The success of the combined transaction means that the transaction results of all independent transactions in the scenario combined transaction are successful, and the execution result of the scenario combined transaction is the success of the combined transaction.
The group and transaction failures mean that the execution result of the scene combined transaction is the combined transaction failure as long as the transaction result of a certain independent transaction is the transaction failure in the scene combined transaction.
The charging confirmation means that the transaction result of at least one independent transaction in the scene combined transaction is the charging confirmation, and the transaction results of other independent transactions in the scene combined transaction are either all successful transactions or all authorized confirmations; or a portion of the transaction is successful and a portion of the authorization is confirmed; at this time, the execution result of the scenario combination transaction is the charging confirmation.
Authorization confirmation means that the transaction result of at least one independent transaction in the scenario combination transaction is authorization confirmation, the transaction results of other independent transactions in the scenario combination transaction are only successful, and the transaction result of a certain independent transaction cannot be charging confirmation; at this time, the execution result of the scenario combination transaction is the authorization confirmation.
From the above, it can be seen that the processing priorities of the transaction results of the scenario-based combined transaction independent transactions are as follows: transaction failure, transaction charge, transaction authorization, transaction success. Namely, as long as the transaction result of one independent transaction is a transaction failure in the scenario combination transaction, the execution result of the scenario combination transaction is a combination transaction failure; when the independent transaction of transaction failure does not exist in the scenario combination transaction and at least one independent transaction of charge confirmation exists, the execution result of the scenario combination transaction is the charge confirmation; in the scenario combination transaction, no independent transaction which fails to be transacted exists, no independent transaction which is confirmed by charging does not exist, and when at least one independent transaction which is confirmed by authorization exists, the execution result of the scenario combination transaction is the authorization confirmation; in the scenario combination transaction, the independent transaction of transaction failure, the independent transaction of charging confirmation and the independent transaction of authorization confirmation do not exist, namely, when the transaction results of the independent transactions in the scenario combination transaction are successful, the execution result of the scenario combination transaction is successful.
If the transaction success results of the independent transactions in the scenario combination transaction are not all scheduling success, namely as long as the scheduling result of one independent transaction is failed, rollback operation needs to be performed to recover to the most initial state of the scenario combination transaction, and at the moment, the scheduling result of the independent transactions in the scenario combination transaction is failure.
When a scenario-based combined transaction is performed, for example, when a transaction system sends a scenario-based combined transaction request, the embodiment of the present invention sends a pre-configured message in a canonical format of scenario-based combined transaction to a scenario-based combined transaction apparatus (see the following embodiments of the scenario-based combined transaction apparatus section) provided in the embodiment of the present invention. The standard format message of the scene-based combined transaction comprises a message length, a header and a message body. The message length refers to the message length of the whole scene combined transaction, and the message length is only limited by the maximum length of one-time communication of the scene gateway. The header refers to common information of the entire scenic combined transaction, for example, public information such as a scenic transaction code, transaction teller information, authorized teller information, charging information, and transaction date. The newspaper body can be self-defined according to the situation of scene combination transaction, and the format can also be self-defined. The standard format message of the scene combination transaction is configured in advance before the scene combination transaction according to the requirements and the specific situation of the scene combination transaction.
In addition, in order to flexibly and accurately realize the scenized combined transaction, a constraint relation between independent transactions in the scenized combined transaction needs to be configured in advance. For example, a priority relationship between two independent transactions, or a relationship between a scheduling result of one independent transaction and a scheduling result of another independent transaction as a trigger condition, or a relationship between transaction results of two independent transactions, etc.
Therefore, the transaction success results of the independent transactions in the scenario combination transaction can be sequentially organized and obtained according to the received standard format message of the scenario combination transaction and the pre-configured constraint relationship between the independent transactions in the scenario combination transaction, and the transaction success results of the independent transactions can be obtained, which indicates that the independent transactions in the scenario combination transaction have been scheduled to be successful.
When the successful transaction results of all the independent transactions in the scenario combination transaction can be obtained, it is indicated that all the independent transactions in the scenario combination transaction have been scheduled to be successful, and at this time, the successful transaction results of all the independent transactions in the scenario combination transaction can be subjected to common processing such as commit or peripheral submission, so as to organize and output the output message of the scenario combination transaction.
In the embodiment of the invention, when scene combination transaction is carried out, a pre-configured message with a standard format of the scene combination transaction is received; acquiring an execution result of the scene-based combined transaction according to the received standard format message and a constraint relation between independent transactions in the pre-configured scene-based combined transaction; and when the execution result of the scene combined transaction is that the combined transaction is successful, carrying out public processing on the transaction result of each independent transaction in the scene combined transaction, and outputting an output message of the scene combined transaction. The embodiment of the invention acquires the execution result of the scene-oriented combined transaction when the scene-oriented combined transaction is carried out by pre-configuring the standard format message of the scene-oriented combined transaction and the constraint relation between the independent transactions in the scene-oriented combined transaction, and can dynamically combine the scene-oriented combined transaction through a flexible configuration mode, thereby improving the flexibility and the efficiency of the scene-oriented combined transaction.
Fig. 2 illustrates an implementation flow of step 102 in the scenario-based combined transaction method provided by the embodiment of the present invention, and for convenience of description, only the parts related to the embodiment of the present invention are illustrated, and the following details are described below:
in an embodiment of the present invention, in order to improve the accuracy of the obtained independent transaction result and further improve the flexibility of the scenario-based combined transaction, as shown in fig. 2, step 102, obtaining an execution result of the scenario-based combined transaction according to the received canonical format message and a constraint relationship between independent transactions in the pre-configured scenario-based combined transaction, where the execution result of the scenario-based combined transaction includes success of the combined transaction, and includes:
step 201, obtaining a transaction success result of the current to-be-processed independent transaction according to the received standard format message and a constraint relation between independent transactions in a pre-configured scene combined transaction;
step 202, if the current independent transaction to be processed is not the last independent transaction in the scenario combination transaction, taking the next independent transaction to be processed as the current independent transaction to be processed according to the constraint relation between the independent transactions in the scenario combination transaction configured in advance;
repeating the steps 201 to 202;
and step 203, obtaining the successful transaction result of each independent transaction in the scenario combination transaction and the successful execution result of the scenario combination transaction until the current to-be-processed independent transaction is the last independent transaction in the scenario combination transaction.
Specifically, when an execution result of a successful scenized combined transaction is obtained based on a standard format message of a scenized combined transaction and a constraint relation between independent transactions in the scenized combined transaction, firstly, a current to-be-processed independent transaction is determined according to the received standard format message and the constraint relation between the independent transactions in the scenized combined transaction, and then a successful transaction result of the current to-be-processed independent transaction is obtained.
After the successful transaction result of the current to-be-processed independent transaction is obtained, the current to-be-processed independent transaction is judged to determine whether the independent transaction is the last independent transaction in the scenario combination transaction, namely whether the independent transaction in the scenario combination transaction is completely finished is judged.
If the current independent transaction to be processed is not the last independent transaction in the scenario combined transaction, it indicates that the scenario combined transaction still has unprocessed independent transactions and needs further processing. At this time, the next to-be-processed independent transaction can be determined according to the constraint relationship between the independent transactions in the scenario-based combined transaction and the standard format message of the scenario-based combined transaction, and the next to-be-processed independent transaction is used as the updated current to-be-processed independent transaction.
And after the updated current to-be-processed independent transaction is determined, repeating the steps 201 to 202 to obtain a transaction success result of the updated current to-be-processed independent transaction, and further judging whether the updated current to-be-processed independent transaction is the last independent transaction in the scene combined transaction. And repeating the steps until the current independent transaction to be processed is the last independent transaction in the scenario combined transaction, and finally obtaining the transaction success results of all the independent transactions in the scenario combined transaction.
In the embodiment of the invention, the successful transaction result of the current to-be-processed independent transaction is obtained according to the received standard format message and the constraint relation between the independent transactions in the scenario combination transaction, if the current to-be-processed independent transaction is not the last independent transaction in the scenario combination transaction, the next to-be-processed independent transaction is taken as the current to-be-processed independent transaction, and the successful transaction results of all the independent transactions in the scenario combination transaction are obtained until the current to-be-processed independent transaction is the last independent transaction in the scenario combination transaction, so that the accuracy of the obtained successful transaction result of the independent transaction can be improved, and the flexibility of the scenario combination transaction is further improved.
Fig. 3 illustrates an implementation flow of step 201 in the scenario-based combined transaction method provided by the embodiment of the present invention, and for convenience of description, only the parts related to the embodiment of the present invention are illustrated, and the following details are described as follows:
in an embodiment of the present invention, in order to improve the accuracy of obtaining the successful result of the current to-be-processed independent transaction, and further improve the flexibility of the scenario-based combined transaction, as shown in fig. 3, step 201, obtaining the successful result of the current to-be-processed independent transaction according to the received canonical format message and the constraint relationship between the independent transactions in the pre-configured scenario-based combined transaction, includes:
step 301, determining the current independent transaction to be processed according to the received standard format message and the constraint relation between the independent transactions in the pre-configured scene combined transaction;
step 302, determining an independent transaction message of the current independent transaction to be processed according to the standard format message of the scene-based combined transaction and the transaction success result of the previous independent transaction of the current independent transaction to be processed;
step 303, obtaining a transaction success result of the current to-be-processed independent transaction according to the independent transaction message of the current to-be-processed independent transaction.
Specifically, when the successful transaction result of the current to-be-processed independent transaction is obtained, the current to-be-processed independent transaction can be determined based on the standard format message of the scene-based combined transaction and the constraint relationship between the independent transactions in the scene-based combined transaction. After the current independent transaction to be processed is determined, based on the standard format message of the scenario-based combined transaction, the transaction success result of the previous independent transaction of the current independent transaction to be processed (at this time, the transaction success result of the previous independent transaction will be the premise or trigger condition) is organized and determined, and the independent transaction message of the current independent transaction to be processed is determined. And then after the current to-be-processed independent transaction is determined, scheduling the current to-be-processed independent transaction based on the independent transaction message of the current to-be-processed independent transaction so as to obtain a transaction success result of the current to-be-processed independent transaction.
In the embodiment of the invention, the current independent transaction to be processed is determined according to the received standard format message and the constraint relation between the independent transactions in the pre-configured scene combined transaction, the independent transaction message of the current independent transaction to be processed is determined according to the standard format message of the scene combined transaction and the transaction success result of the previous independent transaction of the current independent transaction to be processed, and finally the transaction success result of the current independent transaction to be processed is obtained according to the independent transaction message of the current independent transaction to be processed, so that the accuracy of the obtained current independent transaction success result to be processed can be improved, and the flexibility of the scene combined transaction is further improved.
Fig. 4 shows another implementation flow of step 201 and an implementation flow of step 103 in the scenario-based combined transaction method provided by the embodiment of the present invention, and for convenience of description, only the parts related to the embodiment of the present invention are shown, and the details are as follows:
in an embodiment of the present invention, in order to improve the accuracy of the successful result of each independent transaction in the scenario-based combined transaction and further improve the flexibility of the scenario-based combined transaction, as shown in fig. 4, step 201, according to the received standard format message and the constraint relationship between the independent transactions in the scenario-based combined transaction configured in advance, obtains the successful result of the transaction of the current to-be-processed independent transaction, further includes:
step 401, caching the transaction success result of the current to-be-processed independent transaction;
103, carrying out public processing on the successful transaction results of each independent transaction in the scene combination transaction, and outputting an output message of the scene combination transaction, wherein the output message comprises:
and 402, carrying out public processing on the transaction success results of each independent transaction in the cached scene combined transaction, and outputting an output message of the scene combined transaction.
In view of the fact that the transaction success results of the independent transactions in the scenario-based combined transaction need to be kept consistent, either all independent transactions are successfully scheduled, or a rollback operation needs to be performed as long as one independent transaction is failed to be scheduled. Therefore, after the transaction success result of the current to-be-processed independent transaction is obtained, the transaction success result of the current to-be-processed independent transaction needs to be cached so as to record the transaction success result of the independent transaction in the scenario combination transaction, on one hand, preparation is made for outputting the scenario combination transaction, on the other hand, preparation is made for rollback operation, so that the accuracy of the transaction success result of each independent transaction in the scenario combination transaction is improved, and meanwhile, the flexibility of the scenario combination transaction is further improved.
Based on this, after obtaining the transaction success result of the independent transaction (which becomes the current independent transaction to be processed when the independent transaction is processed), the transaction success result of the independent transaction needs to be cached. When the current independent transaction to be processed is the last independent transaction in the scenario combination transaction, the transaction success results of all independent transactions are cached, then the transaction success results of all independent transactions in the cached scenario combination transaction are processed in a public mode, and meanwhile an output message of the scenario combination transaction is output.
In the embodiment of the invention, the transaction success results of the current independent transactions to be processed are cached, the cached transaction success results of the independent transactions in the scene combination transaction are processed in a public mode, the output message of the scene combination transaction is output, the accuracy of the transaction success results of the independent transactions in the scene combination transaction can be improved, and meanwhile, the flexibility of the scene combination transaction is further improved.
Fig. 5 illustrates another implementation flow of the scenario-based combined transaction method provided by the embodiment of the present invention, and for convenience of description, only the relevant portions of the embodiment of the present invention are shown, and the following details are described below:
in an embodiment of the present invention, in order to improve the accuracy of the independent transaction scheduling result in the scenario-based combined transaction and further improve the flexibility of the scenario-based combined transaction, the execution result of the scenario-based combined transaction further includes a combined transaction failure, as shown in fig. 5, the scenario-based combined transaction method further includes:
in the step 501,
and when the transaction result of an independent transaction in the scenario combination transaction is a transaction failure, the execution result of the scenario combination transaction is a combination transaction failure, and the scenario combination transaction is rolled back to be restored to the initial state before the scenario combination transaction.
When the scenario combination transaction is performed, if a transaction failure result of an independent transaction in the scenario combination transaction is obtained, for example, if the transaction failure result of the current to-be-processed independent transaction is obtained, which indicates that the current to-be-processed independent transaction is scheduled to fail, the scenario combination transaction needs to be rolled back, that is, all independent transactions executed before the current to-be-processed independent transaction are rolled back to recover to an initial state before the scenario combination transaction.
In the embodiment of the invention, if the transaction failure result of a certain independent transaction in the scene-based combined transaction is obtained, all independent transactions before the certain independent transaction in the scene-based combined transaction are rolled back and restored to the initial state before the scene-based combined transaction, so that the accuracy of the independent transaction scheduling result in the scene-based combined transaction can be improved, and the flexibility of the scene-based combined transaction is further improved.
In an embodiment of the present invention, in order to further improve flexibility and efficiency of the scenario-based combined transaction, as shown in fig. 5, the scenario-based combined transaction method further includes:
step 502, configuring a standard format message of scene combination transaction; the standard format message of the scene combination transaction comprises a message length, a common header and a message body.
Before the scene-based combined transaction is carried out, the standard format message of the scene-based combined transaction can be configured in advance so as to improve the efficiency of the scene-based combined transaction and improve the flexibility of the scene-based combined transaction in a configuration mode. For example, a canonical format message for a scenic combined transaction may be configured based on the received message configuration request. For the message length, the common header and the message body included in the canonical format message of the scenario-based combined transaction, reference may be made to the description in the above related embodiments, and details are not repeated here.
In an embodiment of the present invention, a standard format message of the scenario-based combined transaction is configured, so that the flexibility and efficiency of the scenario-based combined transaction can be further improved.
In an embodiment of the present invention, in order to further improve flexibility and efficiency of the scenario-based combined transaction, as shown in fig. 5, the scenario-based combined transaction method further includes:
step 503, configuring independent transactions and constraint relations between the independent transactions included in the scenario combination transaction.
Before the scenario combination transaction is carried out, independent transactions contained in the scenario combination transaction and constraint relations among the independent transactions can be configured in advance, so that the efficiency of the scenario combination transaction is improved, and meanwhile, the flexibility of the scenario combination transaction is improved in a configuration mode. For example, independent transactions and constraint relationships between independent transactions included in the scenario combination transaction may be configured based on the constraint relationship configuration request. For the constraint relationship between independent transactions included in the scenario-based combined transaction in the embodiment of the present invention, please refer to the description of the related embodiments above, which is not repeated herein in detail.
In the embodiment of the invention, the independent transactions included in the scene-based combined transaction and the constraint relation among the independent transactions are configured, so that the flexibility and the efficiency of the scene-based combined transaction can be further improved.
Fig. 6 shows a partial implementation flow of another scenario-based combined transaction method provided by an embodiment of the present invention, and for convenience of description, only the relevant portions of the embodiment of the present invention are shown, and the following details are described below:
in an embodiment of the present invention, in order to improve the accuracy of the execution result of the scenario-based combined transaction, the execution result of the scenario-based combined transaction further includes a combined transaction failure, as shown in fig. 6, the scenario-based combined transaction method further includes:
601, when the scene combined transaction comprises a transaction result of at least one independent transaction as a charging confirmation, packaging the transaction result of at least one independent transaction charging confirmation in the scene combined transaction to form a charging confirmation package, wherein the execution result of the scene combined transaction is the charging confirmation;
step 602, receiving a charging feedback instruction for a scene-based combined transaction charging confirmation packet;
step 603, if the charging feedback instruction is a non-charging instruction, rolling back the scenario combination transaction, and recovering to the initial state before the scenario combination transaction;
step 604, if the charging feedback instruction is a charging instruction, rolling back the scenario combination transaction, and recovering to the initial state before the scenario combination transaction;
and 605, acquiring an execution result of the scenario combination transaction according to the standard format message of the scenario combination transaction, the pre-configured constraint relation between the independent transactions in the scenario combination transaction, and the charging instruction.
When the scenario combination transaction is performed, if there is no independent transaction with transaction failure in the scenario combination transaction and there is at least one independent transaction with a transaction result of charge confirmation, the transaction result (charge confirmation) of the at least one independent transaction may be packaged to form a charge confirmation packet of the scenario combination transaction, and meanwhile, the execution result of the scenario combination transaction is charge confirmation.
Then, the business system of the scene combination transaction sends the charging confirmation packet to the user so as to confirm and send a charging feedback instruction to the business system of the scene combination transaction for the user. Wherein the charging feedback instruction comprises a charging instruction and a non-charging instruction.
And if the received charging feedback instruction is a non-charging instruction, the user does not agree to charge for some independent transactions in the scene combined transaction, and at the moment, the scene combined transaction is rolled back to be restored to the initial state before the scene combined transaction.
Assuming that the received charging feedback instruction is a charging instruction, it indicates that the user agrees to charge for the scenario combination transaction, at this time, the scenario combination transaction is also rolled back to be restored to an initial state before the scenario combination transaction, and then the scenario combination transaction is re-executed according to a standard format message of the scenario combination transaction, a pre-configured constraint relationship between independent transactions in the scenario combination transaction, and the charging instruction, so as to obtain an execution result of the scenario combination transaction (for example, for an independent transaction whose transaction result is a charging confirmation, at this time, charging is executed based on the charging instruction, so as to obtain a transaction result that the charging is successful).
In the embodiment of the invention, when the transaction result of at least one independent transaction in the scene combined transaction is charge confirmation, the transaction result of at least one independent transaction charge confirmation in the scene combined transaction is packaged to form a charge confirmation packet, the execution result of the scene combined transaction is charge confirmation, and further a charge feedback instruction aiming at the scene combined transaction charge confirmation packet is received; if the charging feedback instruction is a non-charging instruction, only the scene combination transaction needs to be rolled back; if the charging feedback instruction is a charging instruction, after the scenized combined transaction is rolled back, the execution result of the scenized combined transaction is further obtained according to the standard format message of the scenized combined transaction, the pre-configured constraint relation among the independent transactions in the scenized combined transaction and the charging instruction, so that the accuracy of the execution result of the scenized combined transaction can be improved.
Fig. 7 shows a partial implementation flow of another scenario-based combined transaction method provided by an embodiment of the present invention, and for convenience of description, only the relevant portions of the embodiment of the present invention are shown, and the following details are described below:
in an embodiment of the present invention, in order to improve the accuracy of the execution result of the scenario-based combined transaction, the execution result of the scenario-based combined transaction further includes a combined transaction failure, as shown in fig. 7, the scenario-based combined transaction method further includes:
step 701, when the scenario combination transaction includes that the transaction result of at least one independent transaction is authorization confirmation, packaging the transaction result of the authorization confirmation of the at least one independent transaction in the scenario combination transaction to form an authorization confirmation package, wherein the execution result of the scenario combination transaction is authorization confirmation;
step 702, receiving an authorization feedback instruction aiming at a scene combination transaction authorization confirmation packet;
step 703, if the authorization feedback instruction is an unauthorized instruction, rolling back the scenario combination transaction, and restoring to the initial state before the scenario combination transaction;
step 704, if the authorization feedback instruction is an authorization instruction, rolling back the scenario combination transaction, and recovering to the initial state before the scenario combination transaction;
step 705, obtaining the execution result of the scenario combination transaction according to the standard format message of the scenario combination transaction, the pre-configured constraint relationship between the independent transactions in the scenario combination transaction, and the authorization instruction.
When the scenario combination transaction is carried out, if the scenario combination transaction does not have an independent transaction with transaction failure, or does not have an independent transaction with a transaction result of charging confirmation, and at least one independent transaction with a transaction result of authorization confirmation exists, the transaction result (authorization confirmation) of the at least one independent transaction can be packaged to form an authorization confirmation package of the scenario combination transaction, and meanwhile, the execution result of the scenario combination transaction is set as authorization confirmation.
And then, the business system of the scene combination transaction sends the authorization confirmation packet to the user so as to confirm and send an authorization feedback instruction to the business system of the scene combination transaction for the user. Wherein, the authorization feedback instruction comprises an authorization instruction and an unauthorized instruction.
And if the received authorization feedback instruction is an unauthorized instruction, which indicates that the user does not agree to authorize some independent transactions in the scenario combination transaction, rolling back the scenario combination transaction to recover to the initial state before the scenario combination transaction.
Assuming that the received authorization feedback instruction is an authorization instruction, it indicates that the user agrees to authorize the scenario combination transaction, at this time, the scenario combination transaction is also rolled back to be restored to an initial state before the scenario combination transaction, and then the scenario combination transaction is re-executed according to a standard format message of the scenario combination transaction, a pre-configured constraint relationship between independent transactions in the scenario combination transaction, and the authorization instruction, so as to obtain an execution result of the scenario combination transaction (for example, for an independent transaction whose transaction result is authorization confirmation, at this time, authorization is executed based on the authorization instruction, so as to obtain a transaction result that is successful in authorization).
In the embodiment of the invention, when the transaction result of at least one independent transaction in the scene-based combined transaction is the authorization confirmation, the transaction result of the authorization confirmation of at least one independent transaction in the scene-based combined transaction is packaged to form an authorization confirmation packet, the execution result of the scene-based combined transaction is the authorization confirmation, and then an authorization feedback instruction aiming at the scene-based combined transaction authorization confirmation packet is received; if the authorization feedback instruction is an unauthorized instruction, the scene combination transaction is only rolled back; if the authorization feedback instruction is an authorization instruction, after the scenario combination transaction is rolled back, the execution result of the scenario combination transaction is further obtained according to the standard format message of the scenario combination transaction, the pre-configured constraint relationship among the independent transactions in the scenario combination transaction, and the authorization instruction, so that the accuracy of the execution result of the scenario combination transaction can be improved.
In an embodiment of the present invention, the method for making a scenario-based combined transaction further includes:
when the scenario combination transaction includes the transaction result of at least one independent transaction as the charging confirmation and the transaction result of at least one independent transaction as the authorization confirmation, the steps corresponding to the embodiment in fig. 6 are executed first to obtain the execution result of the scenario combination transaction; then, the steps of the corresponding embodiment of fig. 7 are executed to obtain the execution result of the scenario combination transaction.
When the transaction result of at least one independent transaction included in the scenario-based combined transaction is the charging confirmation and the transaction result of at least one independent transaction included in the scenario-based combined transaction is the authorization confirmation, the steps corresponding to the embodiment in fig. 6 need to be executed first based on the processing priorities of the charging confirmation and the authorization confirmation to obtain the execution result of the scenario-based combined transaction. At this time, under the condition that the charging feedback instruction is a charging instruction and the charging is successful, no independent transaction with the transaction result of transaction failure or charging confirmation exists in the scene-based combined transaction, and only independent transactions with the transaction results of transaction success and authorization confirmation exist. Then, the steps of the corresponding embodiment of fig. 7 are executed to obtain the execution result of the scenario combination transaction. At this time, under the condition that the authorization feedback instruction is the authorization instruction and the authorization is successful, the independent transaction with the transaction result of transaction failure or charge confirmation or authorization confirmation does not exist in the scene-based combined transaction, and only the independent transaction with the transaction result of transaction success exists.
Embodiments of the present invention further provide a scenario-based combined transaction apparatus, as described in the following embodiments. Because the principle of solving the problems of the devices is similar to that of the scene combination transaction method, the implementation of the devices can be referred to the implementation of the method, and repeated details are not repeated.
Fig. 8 shows functional modules of a scenario-based combined transaction apparatus provided in an embodiment of the present invention, and for convenience of description, only parts related to the embodiment of the present invention are shown, and detailed descriptions are as follows:
referring to fig. 8, each module included in the scenario combination transaction apparatus is used to execute each step in the embodiment corresponding to fig. 1, and specific reference is made to fig. 1 and the related description in the embodiment corresponding to fig. 1, which are not repeated herein. In the embodiment of the present invention, the scenario combination transaction apparatus includes a message receiving module 801, a result obtaining module 802, and a message outputting module 803.
The message receiving module 801 is configured to receive a pre-configured standard format message of the scenario combination transaction when the scenario combination transaction is performed.
The result obtaining module 802 is configured to obtain an execution result of each independent transaction in the scenario combination transaction according to the received standard format message and a constraint relationship between independent transactions in the scenario combination transaction configured in advance, where the execution result of the scenario combination transaction includes success of the combination transaction.
And a message output module 803, configured to, when the execution result of the scenario-based combined transaction is that the combined transaction is successful, perform common processing on the transaction results of the independent transactions in the scenario-based combined transaction, and output an output message of the scenario-based combined transaction.
In the embodiment of the present invention, the message receiving module 801 receives a pre-configured standard format message of the scenario combination transaction when performing the scenario combination transaction; the result obtaining module 802 obtains an execution result of the scenario combination transaction according to the received standard format message and a constraint relation between independent transactions in the scenario combination transaction configured in advance; when the execution result of the scenario combination transaction is that the combination transaction is successful, the message output module 803 performs common processing on the transaction success results of each independent transaction in the scenario combination transaction, and outputs an output message of the scenario combination transaction.
According to the embodiment of the invention, the execution result of the scene combination transaction is acquired by the result acquisition module 802 during the scene combination transaction by pre-configuring the standard format message of the scene combination transaction and the constraint relation between the independent transactions in the scene combination transaction, and the scene combination transaction can be dynamically combined through a flexible configuration mode, so that the flexibility and the efficiency of the scene combination transaction are improved.
Fig. 9 shows a structural schematic diagram of the result obtaining module 802 in the scenario combination transaction apparatus provided in the embodiment of the present invention, and for convenience of description, only the relevant parts related to the embodiment of the present invention are shown, which is detailed as follows:
in an embodiment of the present invention, in order to improve the accuracy of the obtained independent transaction scheduling result and further improve the flexibility of the scenario-based combined transaction, referring to fig. 9, each unit included in the result obtaining module 802 is configured to execute each step in the embodiment corresponding to fig. 2, and please refer to fig. 2 and the related description in the embodiment corresponding to fig. 2 specifically, which is not repeated herein. In the embodiment of the present invention, the result obtaining module 802 includes a current transaction obtaining unit 901, a current transaction updating unit 902, and a transaction success result obtaining unit 903.
The current transaction obtaining unit 901 is configured to obtain a successful transaction result of the current to-be-processed independent transaction according to the received standard format message and a constraint relationship between independent transactions in the preconfigured scene combination transaction.
And a current transaction updating unit 902, configured to, if the current to-be-processed independent transaction is not the last independent transaction in the scenario-based combined transaction, take the next to-be-processed independent transaction as the current to-be-processed independent transaction according to a constraint relationship between independent transactions in the scenario-based combined transaction configured in advance.
The transaction success result obtaining unit 903 is configured to obtain a transaction success result of each independent transaction in the scenario combination transaction until the current to-be-processed independent transaction is the last independent transaction in the scenario combination transaction.
In the embodiment of the present invention, the current transaction obtaining unit 901 obtains the transaction success result of the current to-be-processed independent transaction according to the received standard format message and the constraint relationship between the independent transactions in the scenario-based combined transaction, and if the current to-be-processed independent transaction is not the last independent transaction in the scenario-based combined transaction, the current transaction updating unit 902 takes the next to-be-processed independent transaction as the current to-be-processed independent transaction, until the current to-be-processed independent transaction is the last independent transaction in the scenario-based combined transaction, the transaction success result obtaining unit 903 obtains the transaction success results of all the independent transactions in the scenario-based combined transaction, which can improve the accuracy of the obtained independent transaction success result, and further improve the flexibility of the scenario-based combined transaction.
Fig. 10 shows a schematic structure of a current transaction obtaining unit 901 in a scenario combination transaction apparatus provided in an embodiment of the present invention, and for convenience of description, only the parts related to the embodiment of the present invention are shown, and details are as follows:
in an embodiment of the present invention, in order to improve the accuracy of the obtained current to-be-processed independent transaction scheduling result and further improve the flexibility of the scenario-based combined transaction, referring to fig. 10, each unit or sub-unit included in the previous transaction obtaining unit 901 is used to execute each step in the embodiment corresponding to fig. 3, specifically please refer to fig. 3 and the related description in the embodiment corresponding to fig. 3, which is not described herein again. In this embodiment of the present invention, the pre-transaction obtaining unit 901 includes a current transaction determining subunit 1001, a message determining subunit 1002, and a transaction success result obtaining subunit 1003.
The current transaction determining subunit 1001 is configured to determine, according to the received standard format message and a constraint relationship between independent transactions in a preconfigured scenario combination transaction, an independent transaction to be currently processed.
The message determining subunit 1002 is configured to determine an independent transaction message of an independent transaction to be processed currently according to a standard format message of a scenario-based combined transaction and a transaction success result of a previous independent transaction of the independent transaction to be processed currently.
The transaction success result obtaining subunit 1003 is configured to obtain a transaction success result of the current to-be-processed independent transaction according to the independent transaction message of the current to-be-processed independent transaction.
In the embodiment of the present invention, first, the current transaction determining subunit 1001 determines the current independent transaction to be processed according to the received standard format message and the constraint relationship between the independent transactions in the preconfigured scenario combination transaction, and then the message determining subunit 1002 determines the independent transaction message of the current independent transaction to be processed according to the standard format message of the scenario combination transaction and the transaction success result of the previous independent transaction of the current independent transaction to be processed, and finally the transaction success result obtaining subunit 1003 obtains the transaction success result of the current independent transaction to be processed according to the independent transaction message of the current independent transaction to be processed, which can improve the accuracy of the obtained current independent transaction success result to be processed, and further improve the flexibility of the scenario combination transaction.
Fig. 11 shows another structural schematic diagram of the current transaction obtaining unit 901 and a structural schematic diagram of the message output module 803 in the scenario combination transaction apparatus provided in the embodiment of the present invention, and for convenience of description, only the parts related to the embodiment of the present invention are shown, and the details are as follows:
in an embodiment of the present invention, in order to improve the accuracy of the obtained current to-be-processed independent transaction scheduling result and further improve the flexibility of the scenario-based combined transaction, referring to fig. 11, each module or unit included in the current transaction obtaining unit 901 is used to execute each step in the embodiment corresponding to fig. 4, specifically please refer to fig. 4 and the related description in the embodiment corresponding to fig. 4, which is not repeated herein. In the embodiment of the present invention, on the basis of the structure shown in fig. 10, the current transaction obtaining unit 901 further includes a cache unit 1101.
The caching unit 1101 is configured to cache a transaction success result of the current to-be-processed independent transaction.
The message output module 803 includes a message output unit 1102.
And a message output unit 1102, configured to perform common processing on the transaction success results of each independent transaction in the cached scenario combination transaction, and output an output message of the scenario combination transaction.
In the embodiment of the present invention, the caching unit 1101 caches the transaction success results of the independent transactions to be processed currently, and then the message output unit 1102 performs common processing on the cached transaction success results of each independent transaction in the scenario combination transaction, and outputs the output message of the scenario combination transaction, so that the accuracy of the transaction success results of each independent transaction in the scenario combination transaction can be improved, and meanwhile, the flexibility of the scenario combination transaction is further improved.
Fig. 12 shows another functional module schematic of the scenario combination transaction apparatus provided in the embodiment of the present invention, and for convenience of description, only the parts related to the embodiment of the present invention are shown, and the details are as follows:
in an embodiment of the present invention, in order to improve the accuracy of the independent transaction scheduling result in the scenario combination transaction and further improve the flexibility of the scenario combination transaction, referring to fig. 12, each module or unit included in the scenario combination transaction apparatus is used to execute each step in the embodiment corresponding to fig. 5, specifically please refer to fig. 5 and the related description in the embodiment corresponding to fig. 5, which is not repeated herein. In the embodiment of the present invention, on the basis of the above structure, the scenario combination transaction apparatus further includes a rollback module 1201.
The rollback module 1201 is configured to, when a transaction result of an independent transaction in the scenario combination transaction is a transaction failure, perform rollback on the scenario combination transaction to recover to an initial state before the scenario combination transaction when an execution result of the scenario combination transaction is a combination transaction failure.
In the embodiment of the present invention, when the transaction result of an independent transaction in the scenario combination transaction is a transaction failure, the rollback module 1201 returns the scenario combination transaction to the initial state before the scenario combination transaction when the execution result of the scenario combination transaction is a combination transaction failure, so as to improve the accuracy of the independent transaction scheduling result in the scenario combination transaction, and further improve the flexibility of the scenario combination transaction.
In an embodiment of the present invention, in order to further improve flexibility and efficiency of the scenario-based combined transaction, as shown in fig. 5, the scenario-based combined transaction apparatus further includes a message configuration module 1202.
A message configuration module 1202, configured to configure a standard format message of the scenario combination transaction; the standard format message of the scene combination transaction comprises a message length, a common header and a message body.
In an embodiment of the present invention, in order to further improve the flexibility and efficiency of the scenario-based combined transaction, as shown in fig. 5, the scenario-based combined transaction apparatus further includes a constraint relationship configuration module 1203.
And a constraint relationship configuration module 1203, configured to configure independent transactions included in the scenized combined transaction and constraint relationships among the independent transactions. Fig. 13 shows a schematic diagram of a part of functional modules of a further scenario-based combined transaction apparatus provided in an embodiment of the present invention, and for convenience of description, only the parts related to the embodiment of the present invention are shown, and the details are as follows:
in an embodiment of the present invention, in order to improve the accuracy of the execution result of the scenario-based combined transaction and improve the flexibility of the scenario-based combined transaction, referring to fig. 13, each module or unit included in the scenario-based combined transaction apparatus is used to execute each step in the embodiment corresponding to fig. 6, specifically please refer to fig. 6 and the related description in the embodiment corresponding to fig. 6, which is not repeated herein. In the embodiment of the present invention, based on the above structure, the scenario combination transaction apparatus further includes a charging packaging module 1301, a charging instruction receiving module 1302, a non-charging rollback module 1303, a charging rollback module 1304, and a charging execution module 1305.
The charging packaging module 1301 is configured to package a transaction result of at least one independent transaction charging confirmation in the scenario combination transaction to form a charging confirmation package when the transaction result of at least one independent transaction included in the scenario combination transaction is the charging confirmation, and an execution result of the scenario combination transaction is the charging confirmation;
a charging instruction receiving module 1302, configured to receive a charging feedback instruction for the scenario-based combined transaction charging confirmation packet;
the non-charging rollback module 1303 is used for rolling back the scenized combined transaction and restoring the scenized combined transaction to the initial state before the scenized combined transaction if the charging feedback instruction is a non-charging instruction;
a charging rollback module 1304, configured to rollback the scenario combination transaction to an initial state before the scenario combination transaction if the charging feedback instruction is a charging instruction;
the charging execution module 1305 is configured to obtain an execution result of the scenario combination transaction according to the standard format message of the scenario combination transaction, a pre-configured constraint relationship between independent transactions in the scenario combination transaction, and a charging instruction.
In this embodiment of the present invention, when the transaction result of at least one independent transaction in the scenario-based combined transaction is a charging confirmation, the charging packaging module 1301 packages the transaction result of at least one independent transaction charging confirmation in the scenario-based combined transaction to form a charging confirmation packet, the execution result of the scenario-based combined transaction is a charging confirmation, and the charging instruction receiving module 1302 receives a charging feedback instruction for the scenario-based combined transaction charging confirmation packet; the non-charging rollback module 1303 only needs to rollback the scene combined transaction when the charging feedback instruction is a non-charging instruction; if the charging feedback instruction is a charging instruction, the charging rollback module 1304 rolls back the scenario combination transaction, and then the charging execution module 1305 is further required to obtain an execution result of the scenario combination transaction according to a standard format message of the scenario combination transaction, a pre-configured constraint relationship between independent transactions in the scenario combination transaction, and the charging instruction, so that the accuracy of the execution result of the scenario combination transaction can be improved.
Fig. 14 shows a schematic diagram of a part of functional modules of a further scenario-based combined transaction apparatus provided in an embodiment of the present invention, and for convenience of description, only the parts related to the embodiment of the present invention are shown, and the detailed description is as follows:
in an embodiment of the present invention, in order to improve the accuracy of the execution result of the scenario-based combined transaction and improve the flexibility of the scenario-based combined transaction, referring to fig. 14, each module or unit included in the scenario-based combined transaction apparatus is used to execute each step in the embodiment corresponding to fig. 7, and specific reference is made to fig. 7 and the related description in the embodiment corresponding to fig. 7, which is not repeated herein. In the embodiment of the present invention, on the basis of the above structure, the scenario combination transaction apparatus further includes an authorization packaging module 1401, an authorization instruction receiving module 1402, an unauthorized rollback module 1403, an authorized rollback module 1404, and an authorization execution module 1405.
An authorization packaging module 1401, configured to package, when the scenario combination transaction includes that a transaction result of at least one independent transaction is an authorization confirmation, a transaction result of the authorization confirmation of the at least one independent transaction in the scenario combination transaction to form an authorization confirmation package, where an execution result of the scenario combination transaction is an authorization confirmation;
an authorization instruction receiving module 1402, configured to receive an authorization feedback instruction for the scenario-based combined transaction authorization confirmation package;
an unauthorized rollback module 1403, configured to rollback the scenized combined transaction to recover to an initial state before the scenized combined transaction if the authorized feedback instruction is an unauthorized instruction;
an authorization rollback module 1404, configured to rollback the scenario combination transaction to return to an initial state before the scenario combination transaction if the authorization feedback instruction is an authorization instruction;
the authorization execution module 1405 is configured to obtain an execution result of the scenario combination transaction according to the standard format message of the scenario combination transaction, a pre-configured constraint relationship between independent transactions in the scenario combination transaction, and an authorization instruction.
In the embodiment of the present invention, when the transaction result of at least one independent transaction in the scenario combination transaction is an authorization confirmation, the authorization packaging module 1301 packages the transaction result of the authorization confirmation of the at least one independent transaction in the scenario combination transaction to form an authorization confirmation packet, the execution result of the scenario combination transaction is an authorization confirmation, and the authorization instruction receiving module 1302 receives an authorization feedback instruction for the scenario combination transaction authorization confirmation packet; the unauthorized rollback module 1303 only needs to rollback the scene combination transaction when the authorized feedback instruction is the unauthorized instruction; if the authorization feedback instruction is an authorization instruction, after the scenario combination transaction is rolled back by the authorization rolling module 1304, the authorization execution module 1305 is further required to obtain an execution result of the scenario combination transaction according to a standard format message of the scenario combination transaction, a pre-configured constraint relationship between independent transactions in the scenario combination transaction, and the authorization instruction, so that the accuracy of the execution result of the scenario combination transaction can be improved. The workflow and principle of the scenario-based combined transaction provided by the embodiment of the invention are briefly described as follows:
1. when a message configuration request is received, configuring the standard format message of the scene combination transaction based on the message format of the standard format message to obtain the configured standard format message of the scene combination transaction;
2. when a constraint relation configuration request is received, configuring the constraint relation of the independent transaction in the scene combination transaction to obtain the configured constraint relation of the independent transaction in the scene combination transaction;
3. the corresponding relation between each independent transaction in the scenario combination transaction and the scenario transaction splitting module (the program function realized by the code) and the corresponding relation between each independent transaction in the scenario combination transaction and the output processing module (the program function realized by the code) are determined by the route splitting module (the program function realized by the code).
4. A certain transaction system initiates a scene combined transaction request and uploads a standard format message of the scene combined transaction to a scene combined transaction device;
5. after the scenized combined transaction device receives the message with the standard format sent by the transaction system, the scenized gateway is based on the configuration of 1-3 and the real-time environment information of the scenized combined transaction. For example, how many independent transactions have been executed in the scenario-based combined transaction, the input/output information of the executed independent transactions, and whether the scenario-based combined transaction has a next independent transaction or not and which the next independent transaction is are dynamically judged, so as to determine the current to-be-processed independent transaction and a scenario-based transaction splitting module corresponding to the current to-be-processed independent transaction;
if the scene-based combined transaction is judged to have no next independent transaction, the whole scene-based combined transaction is executed, and the process can be switched to 9;
6. the scenarized gateway routes the standard format message sent by the transaction system to a scenarized transaction splitting module corresponding to the current independent transaction to be processed;
7. a scene transaction splitting module corresponding to the current independent transaction to be processed organizes and determines the independent transaction message of the current independent transaction to be processed according to the configuration of 1-3, the real-time environment information of the scene combined transaction and the standard format message sent by the transaction system;
8. the scenario gateway sends the independent transaction message of the current independent transaction to be processed to an independent transaction scheduling module (program function realized by codes) corresponding to the independent transaction, the independent transaction scheduling module finishes scheduling the current independent transaction to be processed to obtain a successful transaction result, and sends the successful transaction result to the combined transaction mechanism module (program function realized by codes) through the scenario gateway;
9. a combined transaction mechanism module:
1) if the whole scene-based combined transaction is not completely executed, namely the current independent transaction to be processed is not the last independent transaction, caching the transaction success result of the current independent transaction, summarizing input and output information of the current independent transaction and the like;
2) if the whole scene-based combined transaction is to be executed, the combined transaction mechanism module performs public processing such as commit and peripheral submission on the transaction success result of the current independent transaction;
3) if the current independent transaction scheduling fails, namely the scheduling failure result of the current independent transaction is obtained, rolling back the transaction success results of all independent transactions executed before the independent transaction, and recovering to the initial state of the scene-based combined transaction;
4) if there is an event that needs a user to perform external confirmation in the scenario combination transaction, such as charging or authorization (inputting a password or a fingerprint, etc.), the following operations are continuously performed after all independent transactions of the entire scenario combination transaction are performed (i.e., the scheduling results of all independent transactions are obtained):
when the scenario combination transaction comprises a transaction result of at least one independent transaction as a charging confirmation, packaging the transaction result of the charging confirmation of at least one independent transaction in the scenario combination transaction to form a charging confirmation package, wherein the execution result of the scenario combination transaction is the charging confirmation;
receiving a charging feedback instruction aiming at a scene combined transaction charging confirmation packet;
if the charging feedback instruction is a non-charging instruction, rolling back the scene combined transaction and recovering to the initial state before the scene combined transaction;
if the charging feedback instruction is a charging instruction, rolling back the scene combination transaction and recovering to the initial state before the scene combination transaction;
and acquiring an execution result of the scene-based combined transaction according to the standard format message of the scene-based combined transaction, the pre-configured constraint relation among the independent transactions in the scene-based combined transaction and the charging instruction. And/or, performing the following steps:
when the scene combination transaction comprises the transaction result of at least one independent transaction as the authorization confirmation, packaging the transaction result of the authorization confirmation of at least one independent transaction in the scene combination transaction to form an authorization confirmation package, wherein the execution result of the scene combination transaction is the authorization confirmation;
receiving an authorization feedback instruction aiming at a scene-based combined transaction authorization confirmation packet;
if the authorization feedback instruction is an unauthorized instruction, rolling back the scene combination transaction and recovering to the initial state before the scene combination transaction;
if the authorization feedback instruction is an authorization instruction, rolling back the scene combination transaction and recovering to the initial state before the scene combination transaction;
and acquiring an execution result of the scene-based combined transaction according to the standard format message of the scene-based combined transaction, the pre-configured constraint relation among the independent transactions in the scene-based combined transaction and the authorization instruction.
10. If the whole scene-based combined transaction is executed, a message output module (which can comprise output processing modules corresponding to part or all independent transactions) organizes the output messages of the scene-based combined transaction according to the transaction success results of all independent transactions according to the service requirements, otherwise, the next independent transaction is processed by turning to 5.
In the following, a scenario combination transaction including 10 independent transactions is taken as an example, and several cases of the execution result of the scenario combination transaction are briefly described. The charging confirmation and the authorization confirm an intermediate transition state of the execution result of the scenario combination transaction, and the final execution result of the scenario combination transaction is either successful in the scenario combination transaction or failed in the group and transaction. Assume that 10 independent transactions included in the scenario-based combined transaction are independent transaction 1 to independent transaction 10:
(1) combined transaction failure
The transaction result of a certain independent transaction in the scenario combination transaction is transaction failure. For example, if the independent transaction 3 is four hundred transactions, the execution result of the scenario-based combined transaction is a combined transaction failure.
(2) Charge validation
The method comprises the following steps that at least one transaction result of independent transaction exists in the scenario combination transaction as charging confirmation, and meanwhile, the transaction results of other independent transactions in the scenario combination transaction are either all successful transactions or all authorization confirmation; or a portion of the transaction is successful and a portion of the authorization is confirmed.
(A) For example, the transaction results of independent transaction 2, independent transaction 3, and independent transaction 5 in the scenario combination transaction are the charging confirmation, and the transaction results of independent transaction 1, independent transaction 4, independent transaction 6 to independent transaction 10 are all successful transactions.
(B) For example, the transaction results of independent transaction 2, independent transaction 3, and independent transaction 5 in the scenario combination transaction are charging confirmation, and the transaction results of independent transaction 1, independent transaction 4, and independent transactions 6 to 10 are all authorization confirmation.
(C) For example, the transaction results of independent transaction 2, independent transaction 3 and independent transaction 5 in the scenario combination transaction are charging confirmation, the transaction results of independent transaction 1, independent transaction 4 and independent transaction 6 are successful, and the transaction results of independent transaction 7 to independent transaction 10 are authorization confirmation.
(3) Authorization validation
The transaction result of at least one independent transaction in the scenario combination transaction is an authorization confirmation, and the transaction results of other independent transactions in the scenario combination transaction can only be transaction success.
For example, the transaction results of independent transaction 2, independent transaction 3, and independent transaction 5 in the scenario combination transaction are authorization confirmation, and the transaction results of independent transaction 1, independent transaction 4, independent transaction 7 through independent transaction 10 are all successful transactions.
(4) Combined transaction success
The transaction results of all independent transactions in the scenario combination transaction are transaction success, that is, the transaction results of the independent transactions 1 to 10 in the scenario combination transaction are transaction success.
The embodiment of the invention also provides computer equipment which comprises a memory, a processor and a computer program which is stored on the memory and can run on the processor, wherein the processor realizes the scene combination transaction method when executing the computer program.
An embodiment of the present invention further provides a computer-readable storage medium, where a computer program for executing the above scenario-based combined transaction method is stored in the computer-readable storage medium.
In summary, in the embodiment of the present invention, when performing the scenario combination transaction, a pre-configured standard format message of the scenario combination transaction is received; acquiring an execution result of the scene-based combined transaction according to the received standard format message and a constraint relation between independent transactions in the pre-configured scene-based combined transaction; and carrying out public processing on the transaction result of each independent transaction in the scene combined transaction, and outputting an output message of the scene combined transaction. The embodiment of the invention acquires the execution result of the scene-oriented combined transaction when the scene-oriented combined transaction is carried out by pre-configuring the standard format message of the scene-oriented combined transaction and the constraint relation between the independent transactions in the scene-oriented combined transaction, and can dynamically combine the scene-oriented combined transaction by a configuration mode, thereby improving the flexibility and efficiency of the scene-oriented combined transaction.
As will be appreciated by one skilled in the art, embodiments of the present invention may be provided as a method, system, or computer program product. Accordingly, the present invention may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present invention may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
The present invention is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the invention. It will be understood that each flow and/or block of the flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
The above-mentioned embodiments are intended to illustrate the objects, technical solutions and advantages of the present invention in further detail, and it should be understood that the above-mentioned embodiments are only exemplary embodiments of the present invention, and are not intended to limit the scope of the present invention, and any modifications, equivalent substitutions, improvements and the like made within the spirit and principle of the present invention should be included in the scope of the present invention.

Claims (10)

1. A scenarized combined transaction method is characterized by comprising the following steps:
when the scene combination transaction is carried out, receiving a pre-configured standard format message of the scene combination transaction;
acquiring an execution result of the scene-oriented combined transaction according to the received standard format message and a constraint relation between independent transactions in the pre-configured scene-oriented combined transaction, wherein the execution result of the scene-oriented combined transaction comprises success of the combined transaction;
and when the execution result of the scene combined transaction is that the combined transaction is successful, carrying out public processing on the transaction result of each independent transaction in the scene combined transaction, and outputting an output message of the scene combined transaction.
2. The scenized combined transaction method according to claim 1, wherein an execution result of the scenized combined transaction is obtained according to the received standard format message and a constraint relationship between independent transactions in the preset scenized combined transaction, and the execution result of the scenized combined transaction includes success of the combined transaction, including:
acquiring a transaction success result of the current independent transaction to be processed according to the received standard format message and a constraint relation between independent transactions in a pre-configured scene combined transaction;
if the current independent transaction to be processed is not the last independent transaction in the scenario combination transaction, taking the next independent transaction to be processed as the current independent transaction to be processed according to the constraint relation between the independent transactions in the scenario combination transaction configured in advance;
and repeatedly executing the steps until the current independent transaction to be processed is the last independent transaction in the scenario combination transaction, and obtaining a transaction success result of each independent transaction in the scenario combination transaction and an execution result of the scenario combination transaction success.
3. The scenarized combined transaction method according to claim 1, wherein obtaining a transaction success result of the current to-be-processed independent transaction according to the received canonical format message and a pre-configured constraint relationship between independent transactions in scenarized combined transactions comprises:
determining the current independent transaction to be processed according to the received standard format message and the constraint relation between the independent transactions in the pre-configured scene combination transaction;
determining an independent transaction message of the current independent transaction to be processed according to the standard format message of the scene-based combined transaction and the transaction success result of the previous independent transaction of the current independent transaction to be processed;
and obtaining a transaction success result of the current independent transaction to be processed according to the independent transaction message of the current independent transaction to be processed.
4. The scenarized combined transaction method according to claim 3, wherein a transaction success result of the current to-be-processed independent transaction is obtained according to the received canonical format message and a pre-configured constraint relationship between independent transactions in the scenarized combined transaction, further comprising:
caching the transaction success result of the current independent transaction to be processed;
when the execution result of the scenario combination transaction is that the combination transaction is successful, the transaction results of each independent transaction in the scenario combination transaction are processed in a public way, and an output message of the scenario combination transaction is output, wherein the output message comprises:
and carrying out public processing on the transaction success results of each independent transaction in the cached scene combined transaction, and outputting an output message of the scene combined transaction.
5. The scenized combined transaction method according to claim 1, wherein the execution result of the scenized combined transaction further includes a combined transaction failure, the scenized combined transaction method further including:
and when the transaction result of an independent transaction in the scenario combination transaction is a transaction failure, the execution result of the scenario combination transaction is a combination transaction failure, and the scenario combination transaction is rolled back to be restored to the initial state before the scenario combination transaction.
6. The scenized combined transaction method as claimed in claim 1, wherein the execution result of the scenized combined transaction further includes a charge confirmation, the scenized combined transaction method further including:
when the scenario combination transaction comprises a transaction result of at least one independent transaction as a charging confirmation, packaging the transaction result of the charging confirmation of at least one independent transaction in the scenario combination transaction to form a charging confirmation package, wherein the execution result of the scenario combination transaction is the charging confirmation;
receiving a charging feedback instruction aiming at a scene combined transaction charging confirmation packet;
if the charging feedback instruction is a non-charging instruction, rolling back the scene combined transaction and recovering to the initial state before the scene combined transaction;
if the charging feedback instruction is a charging instruction, rolling back the scene combination transaction and recovering to the initial state before the scene combination transaction;
and acquiring an execution result of the scene-based combined transaction according to the standard format message of the scene-based combined transaction, the pre-configured constraint relation among the independent transactions in the scene-based combined transaction and the charging instruction.
7. The scenized combined transaction method according to claim 1 or 6, wherein the execution result of the scenized combined transaction further includes an authorization confirmation, the scenized combined transaction method further including:
when the scene combination transaction comprises the transaction result of at least one independent transaction as the authorization confirmation, packaging the transaction result of the authorization confirmation of at least one independent transaction in the scene combination transaction to form an authorization confirmation package, wherein the execution result of the scene combination transaction is the authorization confirmation;
receiving an authorization feedback instruction aiming at a scene-based combined transaction authorization confirmation packet;
if the authorization feedback instruction is an unauthorized instruction, rolling back the scene combination transaction and recovering to the initial state before the scene combination transaction;
if the authorization feedback instruction is an authorization instruction, rolling back the scene combination transaction and recovering to the initial state before the scene combination transaction;
and acquiring an execution result of the scene-based combined transaction according to the standard format message of the scene-based combined transaction, the pre-configured constraint relation among the independent transactions in the scene-based combined transaction and the authorization instruction.
8. A scenized combination transaction device, comprising:
the message receiving module is used for receiving a pre-configured standard format message of the scene combined transaction when the scene combined transaction is carried out;
the result acquisition module is used for acquiring the execution result of the scene-oriented combined transaction according to the received standard format message and the constraint relation between the independent transactions in the pre-configured scene-oriented combined transaction, wherein the execution result of the scene-oriented combined transaction comprises the success of the combined transaction;
and the message output module is used for carrying out public processing on the transaction result of each independent transaction in the scene combined transaction and outputting an output message of the scene combined transaction when the execution result of the scene combined transaction is that the combined transaction is successful.
9. A computer device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, wherein the processor implements the scenic combined transaction method of any one of claims 1 to 7 when executing the computer program.
10. A computer-readable storage medium storing a computer program for executing the scenario-based combinatorial transaction method according to any one of claims 1 to 7.
CN202010598261.3A 2020-06-28 2020-06-28 Scenerized combined transaction method and device Active CN111754348B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010598261.3A CN111754348B (en) 2020-06-28 2020-06-28 Scenerized combined transaction method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010598261.3A CN111754348B (en) 2020-06-28 2020-06-28 Scenerized combined transaction method and device

Publications (2)

Publication Number Publication Date
CN111754348A true CN111754348A (en) 2020-10-09
CN111754348B CN111754348B (en) 2023-09-19

Family

ID=72677646

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010598261.3A Active CN111754348B (en) 2020-06-28 2020-06-28 Scenerized combined transaction method and device

Country Status (1)

Country Link
CN (1) CN111754348B (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112396522A (en) * 2020-11-19 2021-02-23 中国建设银行股份有限公司 Transaction processing method and device

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110599341A (en) * 2019-09-20 2019-12-20 中国银行股份有限公司 Transaction calling method and system

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110599341A (en) * 2019-09-20 2019-12-20 中国银行股份有限公司 Transaction calling method and system

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112396522A (en) * 2020-11-19 2021-02-23 中国建设银行股份有限公司 Transaction processing method and device

Also Published As

Publication number Publication date
CN111754348B (en) 2023-09-19

Similar Documents

Publication Publication Date Title
CN109087101B (en) Transaction verification method and device, storage medium and electronic equipment
US11315109B2 (en) Transaction processing method and apparatus
CN109951547B (en) Transaction request parallel processing method, device, equipment and medium
CN113438219B (en) Playback transaction identification method and device based on blockchain all-in-one machine
CN110020846B (en) Transfer service processing method and system
CN110111095B (en) Payment transaction weight judging method and payment system
CN110363663B (en) Block chain-based data batch processing method, device, equipment and storage medium
CN111598650A (en) Resource request transaction method based on block chain network and related device
CN110443690A (en) A kind of method, apparatus, server and the storage medium of variance data reconciliation
CN112446786A (en) Abnormal transaction processing method and device, electronic equipment and readable storage medium
CN108415757A (en) distributed transaction processing method and device
CN110321219A (en) A kind of parallel execution method, apparatus, equipment and the medium of transactions requests
CN111008206A (en) Method and device for storing state data of cross-chain transaction and storage medium
CN107577700B (en) Database disaster tolerance processing method and device
CN107038025B (en) SOA architecture-based system calling method and device
CN111754348B (en) Scenerized combined transaction method and device
CN106034148B (en) Rapid information interaction method, local server, remote server and system
JP2011510414A (en) Method and system for improving replica server performance
CN112596801A (en) Transaction processing method, device, equipment, storage medium and database
CN111738853A (en) Transaction optimization method and device based on block chain distributed system
CN115543837A (en) Software testing method and device, electronic equipment and storage medium
CN114612204A (en) Account checking method and device
JP2024506093A (en) Cross-chain transaction processing methods and devices, electronic equipment and computer programs
CN112925663A (en) Service data calculation method and device
CN112950183A (en) Cross-link data interchange method, system, device and electronic equipment

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