CN111754348B - Scenerized combined transaction method and device - Google Patents

Scenerized combined transaction method and device Download PDF

Info

Publication number
CN111754348B
CN111754348B CN202010598261.3A CN202010598261A CN111754348B CN 111754348 B CN111754348 B CN 111754348B CN 202010598261 A CN202010598261 A CN 202010598261A CN 111754348 B CN111754348 B CN 111754348B
Authority
CN
China
Prior art keywords
transaction
independent
scene
combined
combined transaction
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.)
Active
Application number
CN202010598261.3A
Other languages
Chinese (zh)
Other versions
CN111754348A (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

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-based combined transaction method and a scene-based combined transaction device, wherein the method comprises the following steps: receiving a preset standard format message of the scene combined transaction when the scene combined transaction is carried out; acquiring an execution result of the scene combined transaction according to the received standard format message and the constraint relation between the independent transactions in the preset scene 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 standard format message of the scene combined transaction and the constraint relation between independent transactions in the scene combined transaction are pre-configured, so that the execution result of the scene combined transaction is obtained during the scene combined transaction, and the scene combined transaction can be dynamically combined in a configuration mode, so that the flexibility and the efficiency of the scene combined transaction are improved.

Description

Scenerized combined transaction method and device
Technical Field
The invention relates to the technical field of financial transactions, in particular to a scene combined transaction method and a scene combined transaction 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 development and competition of banking business and diversification of customer business, complex business scenes are increasing. In order to enhance customer experience and promote business competitiveness, more and more independent transactions are being offered to customers in a combined, scenic, combined transaction manner in a core banking system.
For example, the student is left with a requirement of opening 4 accounts at a time, and part of the accounts are selected for card opening, folding or short message signing. This scenerized combined transaction has several features: 1) The business relationship is complex: the method relates to a plurality of independent transactions, the same independent transaction can be repeated, transaction entities are different, and various data dependencies exist among the independent transactions, for example, 14 independent transactions are involved in the scene, 4 independent account opening transactions exist, 4 account numbers exist as transaction entities, and the account opening, the account matching and the short message subscription transactions depend on different account opening transactions; 2) There are many situations where the number of transactions and the order of transactions that need to be performed are not fixed, e.g., although all may be open, those several accounts are open, and the open ones are not.
Currently, the combined transaction mechanism of the core banking system can provide some simple scenerised combined transactions. The combined transaction mechanism relies on the front end or the peripheral system to serially connect N (generally N > =2 and N < =10, N is a positive integer) independent transactions at a time, and packets the N independent transactions, which are combined and sent to the combined transaction gateway, but the execution sequence, the message position and the message length of the N independent transactions which are sent are fixed. The combined transaction gateway extracts the message bodies of the N independent transactions through the standard message analysis, sequentially initiates the independent transaction call one by one, and then processes the result consistency (the N independent transactions are required to be totally successful or totally failed, partial success or partial failure indicates inconsistent transaction results) of the N independent transactions, peripheral reporting, authorization, charging and other public mechanisms through the combined transaction public module so as to ensure that the external transaction results of the N independent transactions are consistent.
It can be seen that the existing scenerized combined transaction has the following disadvantages: 1) The interfaces between the front end or the peripheral systems are complex and highly coupled, and the message legibility of the provided independent transaction is extremely poor; 2) The expansibility of independent transaction is poor, and similar business scenes need to be developed separately; 3) The existing scene combined transaction has poor service description capability, requires that the sequence of N independent transactions is fixed, and cannot have data dependence between the independent transactions in many-to-many, so that complex scene combined transactions cannot be described. The above-mentioned drawbacks make the combination transaction in the scene inflexible, and at the same time, the efficiency of the combination transaction in the scene can be seriously affected.
Therefore, the existing scenerized combined transaction has the problems of poor flexibility and low efficiency.
Disclosure of Invention
The embodiment of the invention provides a scene combined transaction method, which is used for improving the flexibility and the small efficiency of scene combined transaction, and comprises the following steps:
receiving a preset standard format message of the scene combined transaction when the scene combined transaction is carried out;
obtaining an execution result of the scene combined transaction according to the received standard format message and a constraint relation between independent transactions in the preset scene combined transaction, wherein the execution result of the scene 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 combined transaction device for improving the flexibility and the small efficiency of the scene combined transaction, which comprises:
the message receiving module is used for receiving a preset standard format message of the scene combined transaction when the scene combined transaction is carried out;
The result acquisition module is used for acquiring an execution result of the scene combined transaction according to the received message in the standard format and the constraint relation between the independent transactions in the preconfigured scene combined transaction, wherein the execution result of the scene combined transaction comprises the success of the combined transaction; the method comprises the steps of carrying out a first treatment on the surface of the
And the message output module is used for carrying out public processing on the transaction results of each independent transaction in the scene combined transaction when the execution result of the scene combined transaction is that the combined transaction is successful, and outputting an output message of the scene combined transaction.
The embodiment of the invention also provides computer equipment, which comprises a memory, a processor and a computer program stored on the memory and capable of running on the processor, wherein the processor realizes the scene combined transaction method when executing the computer program.
The embodiment of the invention also provides a computer readable storage medium, which stores a computer program for executing the above-mentioned scenerized combined transaction method.
In the embodiment of the invention, when the scene combined transaction is carried out, a preset standard format message of the scene combined transaction is received; obtaining an execution result in the scene combined transaction according to the received standard format message and the constraint relation between the independent transactions in the preset scene combined transaction; and carrying out public processing on the transaction results of each independent transaction in the scene combined transaction, and outputting an output message of the scene combined transaction. According to the embodiment of the invention, the canonical format message of the scene combined transaction and the constraint relation among independent transactions in the scene combined transaction are pre-configured, so that the execution result of the scene combined transaction is obtained when the scene combined transaction is performed, and the scene combined transaction can be dynamically combined in a configuration mode, so that the flexibility and the efficiency of the scene combined transaction are improved.
Drawings
In order to more clearly illustrate the embodiments of the invention or the technical solutions in the prior art, the drawings that are required in the embodiments or the description of the prior art will be briefly described, it being obvious that the drawings in the following description are only some embodiments of the invention, and that other drawings may be obtained according to these drawings without inventive effort for a person skilled in the art. In the drawings:
FIG. 1 is a flowchart of a method for implementing a combined transaction in a scenario according to an embodiment of the present invention;
fig. 2 is a flowchart of step 102 in the method for implementing a combined transaction in a scene according to an embodiment of the present invention;
fig. 3 is a flowchart illustrating implementation of step 201 in a method for a combined transaction in a scenario provided by 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 a method for a combined transaction in a scene provided by an embodiment of the present invention;
FIG. 5 is a flowchart of another implementation of a method for a combined transaction in a scenario provided by an embodiment of the present invention;
FIG. 6 is a flow chart of a portion of a further exemplary combined transaction method according to an embodiment of the present invention;
FIG. 7 is a flow chart illustrating a portion of a further exemplary combined transaction method according to an embodiment of the present invention;
FIG. 8 is a functional block diagram of a combined transaction apparatus for scenerization according to an embodiment of the present invention;
fig. 9 is a block diagram of the result obtaining module 802 in the scenerized combined transaction apparatus according to the embodiment of the present invention;
fig. 10 is a block diagram of a current transaction obtaining unit 901 in a scenerized combined transaction apparatus according to an embodiment of the present invention;
fig. 11 is another block diagram of the current transaction obtaining unit 901 and the block diagram of the message output module 803 in the scenerized combined transaction device according to the embodiment of the present invention;
FIG. 12 is a functional block diagram of a combined transaction apparatus according to an embodiment of the present invention;
FIG. 13 is a block diagram of a portion of a further exemplary combined transaction device according to an embodiment of the present invention;
fig. 14 is a partial functional block diagram of another exemplary combined transaction method according to an embodiment of the present invention.
Detailed Description
For the purpose of making the objects, technical solutions and advantages of the embodiments of the present invention more apparent, the embodiments of the present invention will be described in further detail with reference to the accompanying drawings. The exemplary embodiments of the present invention and their descriptions herein are for the purpose of explaining the present invention, but are not to be construed as limiting the invention.
Fig. 1 shows a flow of implementing a method for implementing a combined transaction in a scene, which is provided in an embodiment of the present invention, and for convenience of description, only a portion related to the embodiment of the present invention is shown, and the details are as follows:
As shown in fig. 1, a method of scenerizing a combined transaction, comprising:
step 101, receiving a preset standard format message of the scene combined transaction when the scene combined transaction is carried out;
102, obtaining an execution result of the scene combined transaction according to the received message in the standard format and a constraint relation between independent transactions in the preconfigured scene combined transaction, wherein the execution result of the scene 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 combined transaction is made in a scene mode by a series of independent transactions which are mutually related or constrained. The execution result of the scenerized combined transaction has the following cases: (1) success of the combined transaction; (2) group and transaction failure; (3) a charge confirmation; and (4) authorization confirmation. The charging confirmation and the authorization confirmation are intermediate transition states of execution results of the scene combined transaction, and the final execution results of the scene combined transaction are either successful in the combined transaction or failed in the group and transaction.
The successful combination transaction means that all the independent transactions in the scene combination transaction have successful transaction results, and the execution result of the scene combination transaction is the successful combination transaction.
The group and transaction failure refers to that in the scene combined transaction, only the transaction result of a certain independent transaction is the transaction failure, and at the moment, the execution result of the scene combined transaction is the combined transaction failure.
The charge confirmation means that the transaction result of at least one independent transaction in the scene combined transaction is the charge confirmation, and the transaction results of other independent transactions in the scene combined transaction are either all successful or all authorized confirmation; or a part of the transaction is successful and a part of the authorization is confirmed; at this time, the execution result of the scene combined transaction is the charging confirmation.
Authorization confirmation means that at least one transaction result of the independent transaction in the scene combined transaction is authorization confirmation, and at the same time, the transaction results of other independent transactions in the scene combined transaction can only be all successful transactions, and the transaction result of the independent transaction can not be charging confirmation; at this time, the execution result of the scene combined transaction is authorization confirmation.
From the above, it can be seen that the processing priority of the transaction results of the individual transactions of the scenerized combined transaction is as follows: transaction failure, transaction charging, transaction authorization, transaction success. That is, in the scene combined transaction, as long as the transaction result of one independent transaction is the transaction failure, the execution result of the scene combined transaction is the combined transaction failure; when no independent transaction with transaction failure exists in the scene combined transaction and at least one independent transaction with charging confirmation exists, the execution result of the scene combined transaction is the charging confirmation; when no independent transaction with transaction failure exists in the scene combined transaction, no independent transaction with charging confirmation exists, and at least one independent transaction with authorization confirmation exists, the execution result of the scene combined transaction is the authorization confirmation; in the scene combined transaction, no independent transaction of transaction failure exists, no independent transaction of charging confirmation exists, and no independent transaction of authorization confirmation exists, namely, when the transaction results of the independent transactions in the scene combined transaction are all successful transactions, the execution result of the scene combined transaction is the success of the combined transaction.
If the successful results of the independent transactions in the scene combined transaction are not all successfully scheduled, namely, if the scheduling result of one independent transaction is failed, rollback operation is needed to be carried out, and the state of the scene combined transaction is recovered to the most initial state, wherein the scheduling result of the independent transaction in the scene combined transaction is failed.
When a certain transaction system sends out a scene combined transaction request, the embodiment of the invention sends a preset scene combined transaction specification format message to the scene combined transaction device (see the following scene combined transaction device part embodiment) provided by the embodiment of the invention. The standard format message of the scene 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 limited only by the maximum length of one-time communication of the scene gateway. The header refers to common information of the entire scenerified combined transaction, such as a scenerified transaction code, transaction teller information, authorized teller information, charging information, and transaction date. The newspaper body can be defined according to the scene combined transaction condition, and the format can be defined. The standardized format message of the scene combined transaction is preconfigured before the scene combined transaction according to the requirements and specific conditions of the scene combined transaction.
In addition, in order to flexibly and accurately realize the scenerized combined transaction, constraint relations among independent transactions in the scenerized combined transaction need to be preconfigured. For example, a priority relationship between two independent transactions, or an association relationship between two independent transactions, in which a certain independent transaction uses a scheduling result of another independent transaction as a trigger condition, or a transaction result of two independent transactions, etc.
So far, according to the received standard format message of the scene combined transaction and the constraint relation among the independent transactions in the preset scene combined transaction, the transaction success results of the independent transactions in the scene combined transaction can be orderly organized and obtained, and the transaction success results of the independent transactions can be obtained, so that the scheduled transaction success of the independent transactions in the scene combined transaction is illustrated.
When the successful results of all the independent transactions in the scene combined transaction can be obtained, the fact that all the independent transactions in the scene combined transaction are scheduled to be successful is indicated, and at the moment, public processing such as submission (commit) or peripheral report can be carried out on the successful results of all the independent transactions in the scene combined transaction, so that output messages of the scene combined transaction are organized and output.
In the embodiment of the invention, when the scene combined transaction is carried out, a preset standard format message of the scene combined transaction is received; acquiring an execution result of the scene combined transaction according to the received standard format message and the constraint relation between the independent transactions in the preset scene 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 embodiment of the invention, the canonical format message of the scene combined transaction and the constraint relation among independent transactions in the scene combined transaction are pre-configured, so that the execution result of the scene combined transaction is obtained when the scene combined transaction is performed, the scene combined transaction can be dynamically combined in a flexible configuration mode, and the flexibility and the efficiency of the scene combined transaction are improved.
Fig. 2 shows a flow of implementing step 102 in the method for scenerized combined transaction according to the embodiment of the present invention, and for convenience of description, only the portions relevant to the embodiment of the present invention are shown, which is described in detail below:
in an embodiment of the present invention, in order to improve accuracy of the obtained independent transaction results and further improve flexibility of the scenerized combined transaction, as shown in fig. 2, step 102, according to the received canonical format message and the constraint relationship between the independent transactions in the preconfigured scenerized combined transaction, obtains an execution result of the scenerized combined transaction, where the execution result of the scenerized combined transaction includes success of the combined transaction, and includes:
step 201, obtaining a successful transaction result of the current independent transaction to be processed according to the received message in the standard format and the constraint relation between the independent transactions in the pre-configured scene combined transaction;
step 202, if the current independent transaction to be processed is not the last independent transaction in the scene-based combined 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 preset scene-based combined transaction;
Repeatedly executing the steps 201 to 202;
step 203, obtaining the successful result of each independent transaction in the scene combined transaction and the successful execution result of the scene combined transaction until the current independent transaction to be processed is the last independent transaction in the scene combined transaction.
Specifically, when a successful execution result of the combined transaction of the scene is obtained based on the normal format message of the combined transaction of the scene and the constraint relation between the independent transactions of the combined transaction of the scene, the independent transaction to be processed at present is determined according to the received normal format message and the constraint relation between the independent transactions of the combined transaction of the scene, and then the successful result of the independent transaction to be processed at present is obtained.
After the successful result of the current independent transaction to be processed is obtained, the current independent transaction to be processed is judged to determine whether the independent transaction is the last independent transaction in the scene combined transaction, namely whether the independent transaction in the scene combined transaction is completely ended is judged.
If the current independent transaction to be processed is not the last independent transaction in the scene combined transaction, the scene combined transaction is indicated to have unprocessed independent transactions, and further processing is needed. At this time, the next independent transaction to be processed can be determined according to the constraint relation between the independent transactions in the scene combined transaction and the specification format message of the scene combined transaction, and the next independent transaction to be processed is used as the updated current independent transaction to be processed.
After determining the updated current independent transaction to be processed, repeating the steps 201 to 202 to obtain the successful transaction result of the updated current independent transaction to be processed, and further judging whether the updated current independent transaction to be processed is the last independent transaction in the scene combined transaction. And finally obtaining the successful transaction results of all the independent transactions in the scene combined transaction until the current independent transaction to be processed is the last independent transaction in the scene combined transaction.
In the embodiment of the invention, according to the received standard format message and the constraint relation between the independent transactions in the scene-based combined transaction, the successful result of the current independent transaction to be processed is obtained, if the current independent transaction to be processed is not the last independent transaction in the scene-based combined transaction, the next independent transaction to be processed is taken as the current independent transaction to be processed until the current independent transaction to be processed is the last independent transaction in the scene-based combined transaction, the successful results of all the independent transactions in the scene-based combined transaction are obtained, the accuracy of the obtained successful results of the independent transaction can be improved, and the flexibility of the scene-based combined transaction is further improved.
Fig. 3 shows a flow of implementation of step 201 in the method for scenerized combined transaction according to the embodiment of the present invention, and for convenience of description, only the relevant parts of the embodiment of the present invention are shown, which is described in detail below:
in an embodiment of the present invention, in order to improve accuracy of obtaining a successful result of an independent transaction to be processed, and further improve flexibility of a scene-based combined transaction, as shown in fig. 3, step 201, obtaining a successful result of an independent transaction to be processed according to a received canonical format message and a constraint relationship between independent transactions in a preconfigured scene-based combined transaction, includes:
step 301, determining the current independent transaction to be processed according to the received message in the standard format and the constraint relation between the independent transactions in the preconfigured scene combined transaction;
step 302, determining an independent transaction message of the independent transaction to be processed currently according to the canonical format message of the scene combined transaction and the successful transaction result of the previous independent transaction of the independent transaction to be processed currently;
step 303, obtaining the successful result of the current independent transaction to be processed according to the independent transaction message of the current independent transaction to be processed.
Specifically, when the successful transaction result of the current independent transaction to be processed is obtained, the current independent transaction to be processed can be determined based on the canonical format message of the scene combined transaction and the constraint relation between the independent transactions in the scene combined transaction. After determining the current independent transaction to be processed, based on the standardized format message of the scene combined transaction, the transaction success result of the previous independent transaction of the current independent transaction to be processed (at this time, the proceeding of the current independent transaction to be processed takes the transaction success result of the previous independent transaction as the premise or the triggering condition, etc.), the independent transaction message of the current independent transaction to be processed is organized and determined. And further, after the current independent transaction to be processed is determined, scheduling the current independent transaction to be processed based on the independent transaction message of the current independent transaction to be processed so as to obtain a transaction success result of the current independent transaction to be processed.
In the embodiment of the invention, firstly, the 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, then the independent transaction message of the independent transaction to be processed is determined according to the standard format message of the scene combined transaction and the successful transaction result of the previous independent transaction of the independent transaction to be processed, and finally, the successful transaction result of the independent transaction to be processed is obtained according to the independent transaction message of the independent transaction to be processed, so that the accuracy of the obtained successful result of the independent transaction to be processed can be improved, and meanwhile, 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 scenerized combined transaction method according to the embodiment of the present invention, and for convenience of description, only the portion relevant to the embodiment of the present invention is shown, which is described in detail below:
in an embodiment of the present invention, in order to improve accuracy of each independent transaction success result in the scenerized combined transaction and further improve flexibility of the scenerized combined transaction, as shown in fig. 4, step 201, according to the received canonical format message and the constraint relationship between the independent transactions in the preconfigured scenerized combined transaction, obtains the current transaction success result of the independent transaction to be processed, and further includes:
step 401, caching a transaction success result of the independent transaction to be processed currently;
step 103, carrying out public processing on the successful transaction results of each independent transaction in the scene combined transaction, and outputting an output message of the scene combined transaction, wherein the step comprises the following steps:
step 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 successful results of the independent transactions in the scene combined transaction are required to be consistent, either all the independent transactions are successfully scheduled, or rollback operation is required as long as one independent transaction fails to be scheduled. Therefore, after the transaction success result of the current independent transaction to be processed is obtained, the transaction success result of the current independent transaction to be processed needs to be cached so as to record the transaction success result of the independent transaction in the scene combined transaction, so that on one hand, the preparation is made for the output of the scene combined transaction, on the other hand, the preparation is made for the rollback operation, thereby improving the accuracy of the transaction success result of each independent transaction in the scene combined transaction, and simultaneously further improving the flexibility of the scene combined transaction.
Based on this, after each time a transaction success result of an independent transaction (which becomes the independent transaction currently to be processed when the independent transaction is processed) is obtained, 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 scene combined transaction, caching transaction success results of all the independent transactions is achieved, public processing is conducted on the transaction success results of all the independent transactions in the scene combined transaction after caching, and meanwhile output messages of the scene combined transaction are output.
In the embodiment of the invention, the transaction success results of the independent transactions to be processed are cached, and further the transaction success results of the independent transactions in the cached scene combined transaction are processed in a public way, so that the output message of the scene combined transaction is output, the accuracy of the transaction success results of the independent transactions in the scene combined transaction can be improved, and meanwhile, the flexibility of the scene combined transaction is further improved.
Fig. 5 shows another implementation flow of the scenerized combined transaction method according to the embodiment of the present invention, and for convenience of description, only the portions relevant to the embodiment of the present invention are shown, which are described in detail below:
In an embodiment of the present invention, in order to improve accuracy of an independent transaction scheduling result in a scenerized combined transaction and further improve flexibility of the scenerized combined transaction, an execution result of the scenerized combined transaction further includes a combined transaction failure, as shown in fig. 5, and the scenerized combined transaction method further includes:
in step 501 the step of providing a first step of,
when the transaction result of a certain independent transaction in the scene combined transaction is transaction failure, the execution result of the scene combined transaction is the combined transaction failure, the scene combined transaction is rolled back, and the initial state before the scene combined transaction is restored.
When the scenerified combined transaction is performed, if a transaction failure result of a certain independent transaction in the scenerified combined transaction is obtained, for example, if a transaction failure result of the independent transaction to be processed currently is obtained, the current independent transaction to be processed is indicated to schedule the transaction failure, and at this time, the scenerified combined transaction needs to be rolled back, that is, all independent transactions which have been executed before the current independent transaction to be processed need to be rolled back, so as to restore to an initial state before the scenerified combined transaction.
In the embodiment of the invention, if the transaction failure result of a certain independent transaction in the scene combined transaction is obtained, all the independent transactions before the certain independent transaction in the scene combined transaction are rolled back to the initial state before the scene combined transaction, so that the accuracy of the dispatching result of the independent transaction in the scene combined transaction can be improved, and meanwhile, the flexibility of the scene combined transaction is further improved.
In an embodiment of the present invention, in order to further improve flexibility and efficiency of the scenerization combined transaction, as shown in fig. 5, the scenerization combined transaction method further includes:
step 502, configuring a canonical format message of a scene combined transaction; the standard format message of the scene combined transaction comprises a message length, a public header and a message body.
Before the scene combined transaction is carried out, the standard format message of the scene combined transaction can be configured in advance so as to improve the efficiency of the scene combined transaction, and meanwhile, the flexibility of the scene combined transaction is improved in a configuration mode. For example, canonical format messages for the contextualized 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 scenerized combined transaction, reference may be made to the description in the above related embodiments, and detailed description thereof is omitted herein.
In an embodiment of the present invention, a canonical format message of a scene-based combined transaction is configured, so that flexibility and efficiency of the scene-based combined transaction can be further improved.
In an embodiment of the present invention, in order to further improve flexibility and efficiency of the scenerization combined transaction, as shown in fig. 5, the scenerization combined transaction method further includes:
In step 503, the independent transactions and the constraint relation between the independent transactions contained in the scene combined transaction are configured.
Before the combination transaction is performed, the independent transaction contained in the combination transaction and the constraint relation between the independent transactions can be configured in advance, so that the efficiency of the combination transaction is improved, and meanwhile, the flexibility of the combination transaction is improved in a configuration mode. For example, independent transactions included in the contextualized combined transaction and constraint relationships between the independent transactions may be configured based on the constraint relationship configuration request. For the constraint relation between the individual transactions included in the contextualized combined transaction in the embodiment of the present invention, please refer to the description of the related embodiment section above, and detailed description thereof is omitted.
In the embodiment of the invention, the independent transaction contained in the scene combined transaction and the constraint relation between the independent transactions are configured, so that the flexibility and the efficiency of the scene combined transaction can be further improved.
Fig. 6 shows a partial implementation flow of a further scenerized combined transaction method according to an embodiment of the present invention, and for convenience of description, only the portion relevant to the embodiment of the present invention is shown, which is described in detail below:
In an embodiment of the present invention, in order to improve accuracy of the execution result of the scenerized combined transaction, the execution result of the scenerized combined transaction further includes a combined transaction failure, as shown in fig. 6, the scenerized combined transaction method further includes:
step 601, when the transaction result of the scene combined transaction including at least one independent transaction is a charging confirmation, packing the transaction result of the at least one independent transaction charging confirmation in the scene combined transaction to form a charging confirmation packet, wherein the execution result of the scene combined transaction is the charging confirmation;
step 602, receiving a charging feedback instruction for a scenerified combined transaction charging confirmation packet;
step 603, if the charging feedback instruction is a no-charging instruction, rolling back the scenerized combined transaction, and recovering to the initial state before the scenerized combined transaction;
step 604, if the charging feedback instruction is a charging instruction, rolling back the scenerized combined transaction, and recovering to the initial state before the scenerized combined transaction;
step 605, obtaining the execution result of the scene combined transaction according to the specification format message of the scene combined transaction, the constraint relation among the independent transactions in the preconfigured scene combined transaction and the charging instruction.
When the combined transaction is in the scene, if the combined transaction is in the scene, no independent transaction with failed transaction exists, and at least one independent transaction with the transaction result being the charge confirmation exists, the transaction result (charge confirmation) of the at least one independent transaction can be packaged to form a charge confirmation package of the combined transaction in the scene, and meanwhile, the execution result of the combined transaction in the scene is set as the charge confirmation.
The business system of the scenic combined transaction then sends the charging confirmation packet to the user to confirm and send charging feedback instructions to the business system of the scenic combined transaction for the user. Wherein the charging feedback instructions include charging instructions and no charging instructions.
And assuming that the received charging feedback instruction is a no-charging instruction, indicating that the user does not agree to charge for some independent transactions in the scene combined transaction, rolling back the scene combined transaction at the moment, and recovering to the initial state before the scene combined transaction.
Assuming that the received charging feedback instruction is a charging instruction, the user agrees to charge the scenic combined transaction, at the moment, the scenic combined transaction is rolled back again, the initial state before the scenic combined transaction is restored, and then the scenic combined transaction is re-executed according to the canonical format message of the scenic combined transaction, the constraint relation among the independent transactions in the pre-configured scenic combined transaction and the charging instruction, so as to obtain the execution result of the scenic combined transaction (for example, the independent transaction with the charging confirmation as to the transaction result is based on the charging instruction, and the successful charging transaction result is obtained by executing the charging at the moment).
In the embodiment of the invention, when the transaction result of at least one independent transaction in the scene combined transaction is the charging confirmation, the transaction result of the charging confirmation of the at least one independent transaction in the scene combined transaction is packed to form a charging confirmation packet, the execution result of the scene combined transaction is set as the charging confirmation, and then a charging feedback instruction aiming at the scene combined transaction charging confirmation packet is received; if the charging feedback instruction is a non-charging instruction, only the scene combined transaction is required to be rolled back; if the charging feedback instruction is a charging instruction, after the scenic combined transaction is rolled back, further obtaining an execution result of the scenic combined transaction according to the canonical format message of the scenic combined transaction, the constraint relation among the independent transactions in the pre-configured scenic combined transaction and the charging instruction, so that the accuracy of the execution result of the scenic combined transaction can be improved.
Fig. 7 shows a partial implementation flow of a further scenerized combined transaction method according to an embodiment of the present invention, and for convenience of description, only the portion relevant to the embodiment of the present invention is shown, which is described in detail below:
in an embodiment of the present invention, in order to improve accuracy of the execution result of the scenerized combined transaction, the execution result of the scenerized combined transaction further includes a combined transaction failure, as shown in fig. 7, the scenerized combined transaction method further includes:
Step 701, when the transaction result of at least one independent transaction in the scene combined transaction is authorization confirmation, packaging the transaction result of the authorization confirmation of the at least one independent transaction in the scene combined transaction to form an authorization confirmation package, wherein the execution result of the scene combined transaction is authorization confirmation;
step 702, receiving an authorization feedback instruction for a scenerized combined transaction authorization confirmation packet;
step 703, if the authorization feedback instruction is an unauthorized instruction, rolling back the combined transaction to the initial state before the combined transaction;
step 704, if the authorization feedback instruction is an authorization instruction, rolling back the scenerized combined transaction, and recovering to the initial state before the scenerized combined transaction;
step 705, obtaining the execution result of the scene combined transaction according to the specification format message of the scene combined transaction, the constraint relation between the independent transactions in the preconfigured scene combined transaction and the authorization instruction.
When the scene combined transaction is carried out, if the scene combined transaction does not have independent transaction with transaction failure, and does not have independent transaction with transaction result being charge confirmation, and at least one independent transaction with transaction result being 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 scene combined transaction, and meanwhile, the execution result of the scene combined transaction is set to be authorization confirmation.
The business system of the scene combined transaction then sends the authorization confirmation packet to the user to confirm and send an authorization feedback instruction to the business system of the scene combined transaction for the user. The authorization feedback instruction comprises an authorization instruction and an unauthorized instruction.
And assuming that the received authorization feedback instruction is an unauthorized instruction, indicating that the user does not agree to authorize some independent transactions in the scene combined transaction, rolling back the scene combined transaction at the moment, and recovering to an initial state before the scene combined transaction.
Assuming that the received authorization feedback instruction is an authorization instruction, the user agrees to authorize the scene combined transaction, at the moment, the scene combined transaction is rolled back again, the initial state before the scene combined transaction is restored, and then the scene combined transaction is re-executed according to the standard format message of the scene combined transaction, the constraint relation among independent transactions in the preset scene combined transaction and the authorization instruction, so as to obtain the execution result of the scene combined transaction (for example, for the independent transaction with the transaction result being authorization confirmation, at the moment, the authorization is executed based on the authorization instruction, so that the successful authorization transaction result is obtained).
In the embodiment of the invention, when the transaction result of at least one independent transaction in the scene combined transaction is authorization confirmation, the transaction result of the authorization confirmation of the at least one independent transaction in the scene combined transaction is packed to form an authorization confirmation package, and the execution result of the scene combined transaction is set as authorization confirmation, so that an authorization feedback instruction aiming at the scene combined transaction authorization confirmation package is received; if the authorization feedback instruction is an unauthorized instruction, only the scene combined transaction is required to be rolled back; if the authorization feedback instruction is an authorization instruction, after the combination transaction is rolled back, further obtaining an execution result of the combination transaction according to the canonical format message of the combination transaction, the constraint relation among the independent transactions in the preset combination transaction, and the authorization instruction, so that the accuracy of the execution result of the combination transaction can be improved.
In the embodiment of the invention, the scene combined transaction method further comprises the following steps:
when the transaction result of the at least one independent transaction is a charging confirmation and the transaction result of the at least one independent transaction is an authorization confirmation in the scene combined transaction, the steps of the corresponding embodiment of fig. 6 are executed first to obtain the execution result of the scene combined transaction; and executing the steps of the corresponding embodiment of fig. 7 to obtain the execution result of the scene-based combined transaction.
When the transaction result of the at least one independent transaction is a charging confirmation and the transaction result of the at least one independent transaction is an authorization confirmation, the steps of the corresponding embodiment of fig. 6 need to be executed first to obtain the execution result of the scenic combined transaction based on the processing priorities of the charging confirmation and the authorization confirmation. At this time, under the condition that the charging feedback instruction is a charging instruction and the charging is successful, no independent transaction exists in the scene combined transaction, wherein the transaction result is transaction failure or charging confirmation, and only the independent transaction, the transaction result of which is transaction success and authorization confirmation, exists. And executing the steps of the corresponding embodiment of fig. 7 to obtain the execution result of the scene-based combined transaction. At this time, under the condition that the authorization feedback instruction is an authorization instruction and the authorization is successful, no independent transaction exists in the scene combined transaction, wherein the transaction result is transaction failure or charging confirmation or authorization confirmation, and only the independent transaction exists, wherein the transaction result is transaction success.
The embodiment of the invention also provides a scene combined transaction device, as described in the following embodiment. Because the principle of solving the problems by the devices is similar to that of the scenerization combined transaction method, the implementation of the devices can be referred to the implementation of the method, and the repetition is omitted.
Fig. 8 shows functional modules of the scenerized combined transaction apparatus according to the embodiment of the present invention, and for convenience of explanation, only the portions relevant to the embodiment of the present invention are shown in detail as follows:
referring to fig. 8, each module included in the scenerization combined transaction apparatus is configured to perform each step in the corresponding embodiment of fig. 1, and detailed descriptions of fig. 1 and the corresponding embodiment of fig. 1 are omitted herein. In the embodiment of the present invention, the scenerization combined transaction device includes a message receiving module 801, a result obtaining module 802, and a message output module 803.
The message receiving module 801 is configured to receive a preset canonical format message of the scenerized combined transaction when the scenerized combined transaction is performed.
The result obtaining module 802 is configured to obtain, according to the received canonical format message and the constraint relation between the independent transactions in the pre-configured contemplated combined transaction, an execution result of each independent transaction in the contemplated combined transaction, where the execution result of the contemplated combined transaction includes success of the combination transaction.
And the message output module 803 is configured to perform public processing on the transaction results of each independent transaction in the scenic combined transaction when the execution result of the scenic combined transaction is that the combined transaction is successful, and output an output message of the scenic combined transaction.
In the embodiment of the present invention, when the message receiving module 801 performs a scene-based combined transaction, a preset standard format message of the scene-based combined transaction is received; the result obtaining module 802 obtains the execution result of the scene combined transaction according to the received message in the standard format and the constraint relation between the independent transactions in the preconfigured scene combined transaction; and the message output module 803 performs public processing on the successful results of the independent transactions in the scene-based combined transaction when the execution result of the scene-based combined transaction is that the combined transaction is successful, and outputs an output message of the scene-based combined transaction.
According to the embodiment of the invention, the canonical format message of the scene combined transaction and the constraint relation between independent transactions in the scene combined transaction are preconfigured, so that the result acquisition module 802 acquires the execution result of the scene combined transaction when the scene combined transaction is executed, and the scene combined transaction can be dynamically combined in a flexible configuration mode, so that the flexibility and the efficiency of the scene combined transaction are improved.
Fig. 9 shows a schematic structural diagram of the result obtaining module 802 in the scenerized combined transaction apparatus according to the embodiment of the present invention, and for convenience of explanation, only the portions related to the embodiment of the present invention are shown, which is described in detail below:
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 scenerized combined transaction, referring to fig. 9, each unit included in the result obtaining module 802 is used to execute each step in the corresponding embodiment of fig. 2, and detailed descriptions in fig. 2 and the corresponding embodiment of fig. 2 are omitted 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 transaction success result of the current independent transaction to be processed according to the received canonical format message and the constraint relation between the independent transactions in the preconfigured scene combined transaction.
The current transaction updating unit 902 is configured to, if the current independent transaction to be processed is not the last independent transaction in the scenerized combined transaction, take the next independent transaction to be processed as the current independent transaction to be processed according to the constraint relationship between the independent transactions in the preconfigured scenerized combined transaction.
The transaction success result obtaining unit 903 is configured to obtain a transaction success result of each independent transaction in the scenerified combined transaction until the current independent transaction to be processed is the last independent transaction in the scenerified combined transaction.
In the embodiment of the present invention, the current transaction obtaining unit 901 obtains the transaction success result of the current independent transaction to be processed according to the received canonical format message and the constraint relation between the independent transactions in the scenic combined transaction, if the current independent transaction to be processed is not the last independent transaction in the scenic combined transaction, the current transaction updating unit 902 regards the next independent transaction to be processed as the current independent transaction to be processed until the current independent transaction to be processed is the last independent transaction in the scenic combined transaction, and the transaction success result obtaining unit 903 obtains the transaction success results of all the independent transactions in the scenic combined transaction, so that the accuracy of the obtained independent transaction success results can be improved, and the flexibility of the scenic combined transaction is further improved.
Fig. 10 shows a schematic structural diagram of a current transaction obtaining unit 901 in a scenerized combined transaction apparatus according to an embodiment of the present invention, and for convenience of explanation, only the portions related to the embodiment of the present invention are shown, which is described in detail below:
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 scenerized combined transaction, referring to fig. 10, each unit or sub-unit included in the pre-transaction obtaining unit 901 is used to execute each step in the corresponding embodiment of fig. 3, and specifically please refer to fig. 3 and the related description in the corresponding embodiment of fig. 3, which will not be repeated herein. In the 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 canonical format message and the constraint relationship between the independent transactions in the preconfigured and scenerized combined transaction, the independent transaction to be processed currently.
The message determining subunit 1002 is configured to determine an independent transaction message of the current independent transaction to be processed according to the canonical format message of the scenerized combined transaction and the successful transaction result of the previous independent transaction of the current independent transaction to be processed.
The transaction success result obtaining subunit 1003 is configured to obtain a transaction success result of the independent transaction to be processed currently according to the independent transaction message of the independent transaction to be processed currently.
In the embodiment of the present invention, firstly, the current transaction determining subunit 1001 determines the current independent transaction to be processed according to the received canonical format message and the constraint relation between the independent transactions in the preconfigured scenerized combined transaction, and then the message determining subunit 1002 determines the independent transaction message of the current independent transaction to be processed according to the canonical format message of the scenerized combined transaction and the successful transaction result of the previous independent transaction of the current independent transaction to be processed, and finally, the successful transaction result obtaining subunit 1003 obtains the successful transaction result of the current independent transaction to be processed according to the independent transaction message of the current independent transaction to be processed, so that the accuracy of the obtained successful result of the current independent transaction to be processed can be improved, and meanwhile, the flexibility of the scenerized combined transaction is further improved.
Fig. 11 shows another schematic structure of the current transaction obtaining unit 901 and the schematic structure of the message output module 803 in the scenerized combined transaction device according to the embodiment of the present invention, and for convenience of explanation, only the relevant parts of the embodiment of the present invention are shown, which is described in detail below:
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 scenerized 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 corresponding embodiment of fig. 4, and specifically please refer to fig. 4 and the related description in the corresponding embodiment of fig. 4, which are 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 buffer unit 1101.
The caching unit 1101 is configured to cache a transaction success result of the independent transaction to be currently processed.
The message output module 803 includes a message output unit 1102.
And the message output unit 1102 is configured to perform public processing on the transaction success results of each independent transaction in the cached scene-based combined transaction, and output an output message of the scene-based combined transaction.
In the embodiment of the present invention, the buffer unit 1101 buffers the transaction success results of the independent transactions to be currently processed, and the message output unit 1102 performs common processing on the transaction success results of the independent transactions in the buffered scene combined transaction, and outputs the output message of the scene combined transaction, so that the accuracy of the transaction success results of the independent transactions in the scene combined transaction can be improved, and meanwhile, the flexibility of the scene combined transaction is further improved.
Fig. 12 shows another functional module schematic of the scenerized combined transaction apparatus according to the embodiment of the present invention, and for convenience of explanation, only the portions related to the embodiment of the present invention are shown in detail as follows:
in an embodiment of the present invention, in order to improve accuracy of the independent transaction scheduling result in the scenerized combined transaction and further improve flexibility of the scenerized combined transaction, referring to fig. 12, each module or unit included in the scenerized combined transaction apparatus is used to execute each step in the corresponding embodiment of fig. 5, and specifically please refer to fig. 5 and related descriptions in the corresponding embodiment of fig. 5, which are not repeated herein. In the embodiment of the present invention, based on the above structure, the scenerization combined transaction device further includes a rollback module 1201.
And the rollback module 1201 is configured to, when the transaction result of an independent transaction in the combined transactions is a transaction failure, rollback the combined transactions, and restore to the initial state before the combined transactions.
In the embodiment of the invention, when the transaction result of an independent transaction in the scene combined transaction is a transaction failure, the rollback module 1201 rolls back the scene combined transaction to the initial state before the scene combined transaction when the execution result of the scene combined transaction is the combined transaction failure, so that the accuracy of the dispatching result of the independent transaction in the scene combined transaction can be improved, and the flexibility of the scene combined transaction is further improved.
In an embodiment of the present invention, in order to further improve flexibility and efficiency of the scenerization combined transaction, as shown in fig. 5, the scenerization combined transaction apparatus further includes a message configuration module 1202.
A message configuration module 1202, configured to configure a canonical format message of the contextualized combined transaction; the standard format message of the scene combined transaction comprises a message length, a public header and a message body.
In an embodiment of the present invention, in order to further improve flexibility and efficiency of the scenerized combined transaction, as shown in fig. 5, the scenerized combined transaction apparatus further includes a constraint relationship configuration module 1203.
The constraint relation configuration module 1203 is configured to configure independent transactions included in the scenerized combined transaction and constraint relation between the independent transactions. Fig. 13 shows a schematic view of a part of functional modules of another combined transaction apparatus for scenerization according to an embodiment of the present invention, and for convenience of explanation, only the part related to the embodiment of the present invention is shown in detail as follows:
in an embodiment of the present invention, in order to improve accuracy of the execution result of the combined transaction and flexibility of the combined transaction, referring to fig. 13, each module or unit included in the combined transaction device is used to execute each step in the corresponding embodiment of fig. 6, and detailed descriptions in fig. 6 and the corresponding embodiment of fig. 6 are omitted herein. In the embodiment of the present invention, based on the above structure, the scenerization combined transaction apparatus further includes a charging and packing module 1301, a charging instruction receiving module 1302, a no-charging rollback module 1303, a charging rollback module 1304, and a charging executing module 1305.
The charging and packaging module 1301 is configured to, when the transaction result of the at least one independent transaction included in the combined transaction is charging confirmation, package the transaction result of the charging confirmation of the at least one independent transaction in the combined transaction to form a charging confirmation package, and the execution result of the combined transaction is charging confirmation;
A charging instruction receiving module 1302 for receiving a charging feedback instruction for the scenerized combined transaction charging confirmation packet;
the non-charging rollback module 1303 is configured to rollback the scenerized combined transaction and restore to an initial state before the scenerized combined transaction if the charging feedback instruction is a non-charging instruction;
the charging rollback module 1304 is configured to rollback the scenerized combined transaction and restore the initial state before the scenerized combined transaction if the charging feedback instruction is a charging instruction;
the charging execution module 1305 is configured to obtain an execution result of the scenic combined transaction according to the canonical format message of the scenic combined transaction, the constraint relation between the independent transactions in the preconfigured scenic combined transaction, and the charging instruction.
In the embodiment of the present invention, when the transaction result of at least one independent transaction in the combined transaction is a charging confirmation, the charging and packaging module 1301 packages the transaction result of the charging confirmation of at least one independent transaction in the combined transaction to form a charging confirmation packet, the execution result of the combined transaction is set as the charging confirmation, and then the charging instruction receiving module 1302 receives a charging feedback instruction for the charging confirmation packet of the combined transaction; 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 execution module 1305 is required to further obtain the execution result of the scenic combined transaction according to the canonical format message of the scenic combined transaction, the constraint relation between the independent transactions in the preconfigured scenic combined transaction and the charging instruction after the scenic combined transaction is rolled back, so that the accuracy of the execution result of the scenic combined transaction can be improved.
Fig. 14 shows a schematic view of a part of functional modules of another combined transaction apparatus for scenerization according to an embodiment of the present invention, and for convenience of explanation, only the part related to the embodiment of the present invention is shown in detail as follows:
in an embodiment of the present invention, in order to improve accuracy of the execution result of the scenerized combined transaction and improve flexibility of the scenerized combined transaction, referring to fig. 14, each module or unit included in the scenerized combined transaction device is used to execute each step in the corresponding embodiment of fig. 7, and detailed descriptions in fig. 7 and the corresponding embodiment of fig. 7 are omitted herein. In the embodiment of the present invention, based on the above structure, the scenerization combined transaction apparatus further includes an authorization packaging module 1401, an authorization command receiving module 1402, an unauthorized rollback module 1403, an authorized rollback module 1404, and an authorized execution module 1405.
The authorization packaging module 1401 is configured to package a transaction result of authorization confirmation of at least one independent transaction in the combined transaction to form an authorization confirmation package when the transaction result of the at least one independent transaction in the combined transaction is authorization confirmation, and the execution result of the combined transaction is authorization confirmation;
An authorization instruction receiving module 1402, configured to receive an authorization feedback instruction for a contextualized combined transaction authorization confirmation package;
an unauthorized rollback module 1403, configured to rollback the scenerified combined transaction and restore to an initial state before the scenerified combined transaction if the authorized feedback instruction is an unauthorized instruction;
the authorization rollback module 1404 is configured to rollback the scenerified combined transaction and restore to an initial state before the scenerified combined transaction if the authorization feedback instruction is an authorization instruction;
the authorization execution module 1405 is configured to obtain an execution result of the scenic combined transaction according to the canonical format message of the scenic combined transaction, the constraint relation between the independent transactions in the preconfigured scenic combined transaction, and the authorization instruction.
In the embodiment of the present invention, when the transaction result of at least one independent transaction in the combined scene transaction is authorization confirmation, the authorization packaging module 1401 packages the transaction result of the authorization confirmation of at least one independent transaction in the combined scene transaction to form an authorization confirmation package, the execution result of the combined scene transaction is set as authorization confirmation, and then the authorization instruction receiving module 1402 receives an authorization feedback instruction for the authorization confirmation package of the combined scene transaction; the unauthorized rollback module 1403 only needs to rollback the scenerised combined transaction when the authorized feedback instruction is an unauthorized instruction; if the authorization feedback instruction is an authorization instruction, the authorization rollback module 1404 further needs the authorization executing module 1405 to further obtain an execution result of the scenic combined transaction according to the canonical format message of the scenic combined transaction, the constraint relation between the independent transactions in the preconfigured scenic combined transaction, and the authorization instruction after the scenic combined transaction is rolled back, so that the accuracy of the execution result of the scenic combined transaction can be improved. The workflow and principle of the scene-based combined transaction provided by the embodiment of the invention are briefly described as follows:
1. When a message configuration request is received, configuring a canonical format message of the scene combined transaction based on the message format of the canonical format message to obtain the configured canonical format message of the scene combined transaction;
2. when a constraint relation configuration request is received, configuring the constraint relation of the independent transaction in the scene combined transaction to obtain the configured constraint relation of the independent transaction in the scene combined transaction;
3. the corresponding relation between each independent transaction in the scene combined transaction and the scene transaction splitting module (the program function realized by the code) and the corresponding relation between each independent transaction in the scene combined transaction and the output processing module (the program function realized by the code) are determined through the route splitting module (the program function realized by the code).
4. A certain transaction system initiates a scene combined transaction request, and sends a standard format message of the scene combined transaction to a scene combined transaction device;
5. after receiving the standard format message sent by the transaction system, the scenerization gateway is based on the configuration of 1-3 and the real-time environment information of the scenerization combined transaction. For example, the input and output information of how many independent transactions have been executed by the combined scene transaction, the input and output information of the executed independent transactions dynamically determine whether the combined scene transaction has the next independent transaction, which is the next independent transaction, so as to determine the independent transaction to be processed currently, and the scene transaction splitting module corresponding to the independent transaction to be processed currently;
If the scene combined transaction is judged to have no next independent transaction, the whole scene combined transaction is indicated to be executed, and the process can be shifted to 9;
6. the scenerification gateway routes the standard format message sent by the transaction system to the scenerification transaction splitting module corresponding to the independent transaction to be processed currently;
7. the method comprises the steps that a scene transaction splitting module corresponding to the independent transaction to be processed at present organizes and determines independent transaction messages of the independent transaction to be processed at present according to the configuration of 1-3, real-time environment information of the scene combined transaction and a standard format message sent by a transaction system;
8. the scenerification gateway sends the independent transaction message of the 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 completes the scheduling of the independent transaction to be processed to obtain a transaction success result, and the obtained transaction success result is sent to a combined transaction mechanism module (program function realized by codes) through the scenerification gateway;
9. a combined transaction mechanism module:
1) If the whole scenerization combined transaction is not executed, namely the current independent transaction to be processed is not the last independent transaction, caching the successful result of the current independent transaction, and summarizing the input and output information of the current independent transaction;
2) If the whole scene combined transaction should be executed, the combined transaction mechanism module performs public processing such as commit and peripheral report on the successful transaction result of the current independent transaction;
3) If the current independent transaction fails to be scheduled, namely, a scheduling failure result of the current independent transaction is obtained, the successful transaction results of all the independent transactions executed before the independent transaction are rolled back, and the initial state of the scene combined transaction is restored;
4) If there is an external confirmation item, such as charging or authorizing (inputting password or fingerprint, etc.), in the combined transaction, after all the independent transactions of the whole combined transaction are executed (i.e. the scheduling results of all the independent transactions are obtained), the following operations are continuously executed:
when the transaction result of at least one independent transaction in the scene combined transaction is the charging confirmation, the transaction result of the charging confirmation of the at least one independent transaction in the scene combined transaction is packaged to form a charging confirmation package, and the execution result of the scene combined 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 an initial state before the scene combined transaction;
If the charging feedback instruction is a charging instruction, rolling back the scene combined transaction, and recovering to an initial state before the scene combined transaction;
and acquiring an execution result of the scene combined transaction according to the standard format message of the scene combined transaction, the constraint relation among the independent transactions in the preset scene combined transaction and the charging instruction. And/or performing the steps of:
when the transaction result of at least one independent transaction in the scene combined transaction is authorization confirmation, packaging the transaction result of the authorization confirmation of the at least one independent transaction in the scene combined transaction to form an authorization confirmation package, wherein the execution result of the scene combined transaction is authorization confirmation;
receiving an authorization feedback instruction aiming at a scene combined transaction authorization confirmation packet;
if the authorization feedback instruction is an unauthorized instruction, rolling back the scene combined transaction, and recovering to an initial state before the scene combined transaction;
if the authorization feedback instruction is an authorization instruction, rolling back the scene combined transaction, and recovering to an initial state before the scene combined transaction;
and acquiring an execution result of the scene combined transaction according to the standard format message of the scene combined transaction, the constraint relation among the independent transactions in the preset scene combined transaction and the authorization instruction.
10. If the whole scene combined transaction is executed, a message output module (which can comprise an output processing module corresponding to part or all of the independent transactions) organizes the output message of the scene combined transaction according to the successful transaction results of all the independent transactions, otherwise, the process goes to 5 for processing the next independent transaction.
In the following, taking a case that a certain scenerized combined transaction includes 10 independent transactions as an example, several cases of the execution result of the scenerized combined transaction will be briefly described. The charging confirmation and the authorization confirmation are intermediate transition states of execution results of the scene combined transaction, and the final execution results of the scene combined transaction are either successful in the combined transaction or failed in the group and transaction. Assume that 10 independent transactions included in the contextualized combined transaction are independent transaction 1 through independent transaction 10, respectively:
(1) Combined transaction failure
And the transaction result of a certain independent transaction in the scene combined transaction is transaction failure. For example, the independent transaction 3 is four hundred, the execution result of the scene combined transaction is that the combined transaction fails.
(2) Charging confirmation
At least one transaction result of the independent transaction in the scene combined transaction is a charging confirmation, and the transaction results of other independent transactions in the scene combined transaction are all successful transactions or all authorized confirmations; or a portion of the transaction is successful and a portion of the authorization is confirmed.
(A) For example, in the scene combined transaction, the transaction results of the independent transaction 2, the independent transaction 3 and the independent transaction 5 are charging confirmation, and the transaction results of the independent transaction 1, the independent transaction 4 and the independent transaction 6 to the independent transaction 10 are all successful.
(B) For example, in the scene combined transaction, the transaction results of the independent transaction 2, the independent transaction 3 and the independent transaction 5 are charging confirmation, and the transaction results of the independent transaction 1, the independent transaction 4 and the independent transaction 6 to the independent transaction 10 are authorization confirmation.
(C) For example, in the scene combined transaction, the transaction results of the independent transaction 2, the independent transaction 3 and the independent transaction 5 are charging confirmation, the transaction results of the independent transaction 1, the independent transaction 4 and the independent transaction 6 are successful, and the transaction results of the independent transaction 7 to the independent transaction 10 are authorization confirmation.
(3) Authorization validation
At least one transaction result of the independent transaction in the scene combined transaction is authorization confirmation, and the transaction results of other independent transactions in the scene combined transaction can only be all successful.
For example, in the scenario, the transaction results of the independent transaction 2, the independent transaction 3 and the independent transaction 5 are authorization confirmation, and the transaction results of the independent transaction 1, the independent transaction 4 and the independent transaction 7 to the independent transaction 10 are transaction success.
(4) Success of combined transaction
The transaction results of all the independent transactions in the scene combined transaction are successful, namely the transaction results of the independent transactions 1 to 10 in the scene combined transaction are successful.
The embodiment of the invention also provides computer equipment, which comprises a memory, a processor and a computer program stored on the memory and capable of running on the processor, wherein the processor realizes the scene combined transaction method when executing the computer program.
The embodiment of the invention also provides a computer readable storage medium, which stores a computer program for executing the above-mentioned scenerized combined transaction method.
In summary, when the embodiment of the invention performs the scene-based combined transaction, the preset standard format message of the scene-based combined transaction is received; acquiring an execution result of the scene combined transaction according to the received standard format message and the constraint relation between the independent transactions in the preset scene combined transaction; and carrying out public processing on the transaction results of each independent transaction in the scene combined transaction, and outputting an output message of the scene combined transaction. According to the embodiment of the invention, the canonical format message of the scene combined transaction and the constraint relation among independent transactions in the scene combined transaction are pre-configured, so that the execution result of the scene combined transaction is obtained when the scene combined transaction is performed, and the scene combined transaction can be dynamically combined in a configuration mode, so that the flexibility and the efficiency of the scene combined transaction are improved.
It will be appreciated by those skilled in the art that 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 flowchart illustrations and/or block diagrams, and combinations of flows and/or blocks in the flowchart illustrations 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 foregoing description of the embodiments has been provided for the purpose of illustrating the general principles of the invention, and is not meant to limit the scope of the invention, but to limit the invention to the particular embodiments, and any modifications, equivalents, improvements, etc. that fall within the spirit and principles of the invention are intended to be included within the scope of the invention.

Claims (9)

1. A method of scenerized compound transaction, comprising:
receiving a preset standard format message of the scene combined transaction when the scene combined transaction is carried out;
obtaining an execution result of the scene combined transaction according to the received standard format message and a constraint relation between independent transactions in the preset scene combined transaction, wherein the execution result of the scene combined transaction comprises success of the combined transaction;
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 received standard format message and the constraint relation between independent transactions in the pre-configured scene combined transaction, the execution result of the scene combined transaction is obtained, wherein the execution result of the scene combined transaction comprises the success of the combined transaction and comprises the following steps:
obtaining a successful transaction result of the current independent transaction to be processed according to the received message in the standard format and the constraint relation between the independent transactions in the pre-configured scene combined transaction;
if the current independent transaction to be processed is not the last independent transaction in the scene combined 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 preset scene combined transaction;
And repeatedly executing the steps until the current independent transaction to be processed is the last independent transaction in the scene combined transaction, so as to obtain the successful transaction result of each independent transaction in the scene combined transaction and the successful execution result of the scene combined transaction.
2. The method of claim 1, wherein obtaining the transaction success results of the current pending independent transaction according to the received canonical format message and the constraint relationship between the independent transactions in the preconfigured scenined combined transaction comprises:
determining the current independent transaction to be processed according to the received message in the standard format and the constraint relation between the independent transactions in the preconfigured scene combined transaction;
determining an independent transaction message of the independent transaction to be processed currently according to the canonical format message of the scene combined transaction and the successful transaction result of the previous independent transaction of the independent transaction to be processed currently;
and obtaining the successful transaction result of the independent transaction to be processed currently according to the independent transaction message of the independent transaction to be processed currently.
3. The method of claim 2, wherein obtaining the transaction success result of the current independent transaction to be processed according to the received canonical format message and the constraint relation between the independent transactions in the preconfigured scenerized combined transaction, further comprises:
Caching the successful transaction result of the independent transaction to be processed currently;
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, wherein the method comprises the following steps:
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.
4. The method of scenerizing a combined transaction as recited in claim 1, wherein the result of execution of the scenerizing the combined transaction further includes a combined transaction failure, the method of scenerizing the combined transaction further comprising:
when the transaction result of a certain independent transaction in the scene combined transaction is transaction failure, the execution result of the scene combined transaction is the combined transaction failure, the scene combined transaction is rolled back, and the initial state before the scene combined transaction is restored.
5. The method of scenic spot trading according to claim 1, wherein the result of execution of the scenic spot trading further includes a charge confirmation, the method of scenic spot trading further comprising:
when the transaction result of at least one independent transaction in the scene combined transaction is the charging confirmation, the transaction result of the charging confirmation of the at least one independent transaction in the scene combined transaction is packaged to form a charging confirmation package, and the execution result of the scene combined 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 an initial state before the scene combined transaction;
if the charging feedback instruction is a charging instruction, rolling back the scene combined transaction, and recovering to an initial state before the scene combined transaction;
and acquiring an execution result of the scene combined transaction according to the standard format message of the scene combined transaction, the constraint relation among the independent transactions in the preset scene combined transaction and the charging instruction.
6. The method of scenic spot trading according to claim 1 or 5, wherein the result of the execution of the scenic spot trading further comprises an authorization confirmation, the method of scenic spot trading further comprising:
when the transaction result of at least one independent transaction in the scene combined transaction is authorization confirmation, packaging the transaction result of the authorization confirmation of the at least one independent transaction in the scene combined transaction to form an authorization confirmation package, wherein the execution result of the scene combined transaction is authorization confirmation;
receiving an authorization feedback instruction aiming at a scene combined transaction authorization confirmation packet;
If the authorization feedback instruction is an unauthorized instruction, rolling back the scene combined transaction, and recovering to an initial state before the scene combined transaction;
if the authorization feedback instruction is an authorization instruction, rolling back the scene combined transaction, and recovering to an initial state before the scene combined transaction;
and acquiring an execution result of the scene combined transaction according to the standard format message of the scene combined transaction, the constraint relation among the independent transactions in the preset scene combined transaction and the authorization instruction.
7. A scenerized combination transaction device, comprising:
the message receiving module is used for receiving a preset standard format message of the scene combined transaction when the scene combined transaction is carried out;
the result acquisition module is used for acquiring an execution result of the scene combined transaction according to the received message in the standard format and the constraint relation between the independent transactions in the preconfigured scene combined transaction, wherein the execution result of the scene combined transaction comprises the success of the combined transaction;
the message output module is used for carrying out public processing on the transaction results of each independent transaction in the scene combined transaction when the execution result of the scene combined transaction is that the combined transaction is successful, and outputting an output message of the scene combined transaction;
The result acquisition module is specifically configured to:
obtaining a successful transaction result of the current independent transaction to be processed according to the received message in the standard format and the constraint relation between the independent transactions in the pre-configured scene combined transaction;
if the current independent transaction to be processed is not the last independent transaction in the scene combined 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 preset scene combined transaction;
and repeatedly executing the steps until the current independent transaction to be processed is the last independent transaction in the scene combined transaction, so as to obtain the successful transaction result of each independent transaction in the scene combined transaction and the successful execution result of the scene combined transaction.
8. A computer device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, characterized in that the processor implements the scenic combined transaction method of any of claims 1 to 6 when the computer program is executed.
9. A computer readable storage medium, characterized in that the computer readable storage medium stores a computer program executable by a computer to implement the method of any one of claims 1 to 6.
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 CN111754348A (en) 2020-10-09
CN111754348B true 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)

Families Citing this family (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

Also Published As

Publication number Publication date
CN111754348A (en) 2020-10-09

Similar Documents

Publication Publication Date Title
CN109087101B (en) Transaction verification method and device, storage medium and electronic equipment
US20210035102A1 (en) Remittance processing method and system, and computer-readable storage medium
CN107491948B (en) Transfer payment method based on block chain technology
CN109213900B (en) Data modification method, device, equipment and medium for block chain
CN107480978B (en) Payment method based on block chain technology
EP3885956A1 (en) Transaction processing method and device
CN112163946A (en) Accounting processing method and device based on distributed transaction system
CN111222869B (en) Transaction data processing method, device, computer equipment and medium
CN109951546A (en) Transactions requests processing method, device, equipment and medium based on intelligent contract
CN103310557A (en) Over-the-air electronic cash loading method, system and device for NFC (near field communication) mobile phone
CN110443690A (en) A kind of method, apparatus, server and the storage medium of variance data reconciliation
CN108647950A (en) A kind of transfer request processing method, device and equipment
CN108415757A (en) distributed transaction processing method and device
CN110363663A (en) Batch data processing method, device, equipment and storage medium based on block chain
CN111754348B (en) Scenerized combined transaction method and device
CN110033280A (en) Pay anti-fluttering method and device
CN107038025B (en) SOA architecture-based system calling 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
CN115543837A (en) Software testing method and device, electronic equipment and storage medium
CN112950183A (en) Cross-link data interchange method, system, device and electronic equipment
CN110879787A (en) Client test method and system
CN110430256B (en) Method, device and computer system for pushing transaction message
CN115713330B (en) Multi-payment-item split payment method, system, equipment and storage medium
CN111563816B (en) System and method for separating accounts and messages under bank cross-bank payment service

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