CN109684045B - Transaction message processing method and device and electronic equipment - Google Patents

Transaction message processing method and device and electronic equipment Download PDF

Info

Publication number
CN109684045B
CN109684045B CN201710972967.XA CN201710972967A CN109684045B CN 109684045 B CN109684045 B CN 109684045B CN 201710972967 A CN201710972967 A CN 201710972967A CN 109684045 B CN109684045 B CN 109684045B
Authority
CN
China
Prior art keywords
message
transaction
branch
global
coordinator
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
CN201710972967.XA
Other languages
Chinese (zh)
Other versions
CN109684045A (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.)
Alibaba Group Holding Ltd
Original Assignee
Alibaba Group Holding 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 Alibaba Group Holding Ltd filed Critical Alibaba Group Holding Ltd
Priority to CN201710972967.XA priority Critical patent/CN109684045B/en
Publication of CN109684045A publication Critical patent/CN109684045A/en
Application granted granted Critical
Publication of CN109684045B publication Critical patent/CN109684045B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/466Transaction processing
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/54Interprogram communication
    • G06F9/542Event management; Broadcasting; Multicasting; Notifications
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/54Interprogram communication
    • G06F9/546Message passing systems or structures, e.g. queues
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2209/00Indexing scheme relating to G06F9/00
    • G06F2209/54Indexing scheme relating to G06F9/54
    • G06F2209/547Messaging middleware

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Multimedia (AREA)
  • Financial Or Insurance-Related Operations Such As Payment And Settlement (AREA)

Abstract

The embodiment of the invention provides a transaction message processing method, a transaction message processing device and electronic equipment, wherein the method comprises the following steps: sending a request for starting a global transaction to a transaction coordinator, and acquiring a transaction ID of the global transaction and an ID of a contained message branch; sending a preparation message related to the global transaction to a message middleware, and reporting a message sending result received from the message middleware to the transaction coordinator to indicate that the message sending result is associated with a branch ID of the message branch; executing each transaction branch contained in the global transaction; and sending a request for submitting or rolling back the global transaction to the transaction coordinator so as to submit or roll back each transaction branch and each message branch contained in the global transaction according to the indication returned by the transaction coordinator. The scheme of the embodiment of the invention can eliminate the trouble caused by additionally setting the check interface in the application and can ensure the consistency of transaction and message processing.

Description

Transaction message processing method and device and electronic equipment
Technical Field
The present invention relates to the field of computer technologies, and in particular, to a method and an apparatus for processing a transaction message, and an electronic device.
Background
Distributed transaction systems typically contain several roles, client, resource manager, transaction coordinator. The client and the resource manager are deployed at the application side; the transaction coordinator is independently deployed and is responsible for coordinating all relevant processing flows of a distributed transaction from start to finish, and is a system core role.
The prior art implements transactional messages, typically based on two-phase commit of message middleware like X/Open XA, placing database local transactions and message transmissions in one distributed transaction, ensuring that either the local transaction is successful and the outgoing message is successful, or both fail. The transaction message function provided by the message middleware requires a user to write back an interface in the application and adds some business logic to save the execution state of the local transaction and corresponding cleaning logic. As shown in fig. 1, is a typical flow of transaction messages. In fig. 1, the application sends a preliminary message to the message middleware, which saves the preliminary message, but the message is not currently consumable, that is, another application or system cannot receive the message; after the message is sent successfully, the application executes the local transaction; after the local transaction is successfully submitted, the preparation message which is sent just is submitted, the message can be consumed, and other receivers continue to advance the service after receiving the message.
If one of the above steps fails, the application can rollback the provisioning message, the logic is simpler and not analyzed in detail here. The troublesome step is that the application is down before submitting or rolling back the message, and after the message middleware receives a preparation message, the instruction of submitting or rolling back the message sent by the application is not received before overtime. At this time, the message middleware needs to use a review interface provided by the application, call the review interface after timeout to obtain the local transaction state of the application, submit the message to be consumed if the transaction execution is successful, and roll back the preparation message if the transaction execution fails. As shown in fig. 2, is a corresponding message flow diagram.
Summary of prior art drawbacks:
1, the transaction message is complex to realize in the prior art, and a user needs to add service logic in the application to realize a review interface. The work to be done by the review interface is that when the message middleware enters a message ID, the application can return a status message of whether the local transaction of the database corresponding to the message ID is successful. The message middleware performs message submission or rollback based thereon.
2, in order to realize such a review interface, the persistent local transaction state and the corresponding relation between the transaction and the message need to be applied, the idempotent of the interface needs to be ensured, multiple calls are allowed, and the business logic is not affected. In practice, persisted state information must not be accumulated, and it is also a problem how long to clean up, since it is necessary to determine that message middleware must not review the transaction states after that.
In the method, a plurality of transaction messages are usually arranged in one application, so that a plurality of check interfaces are needed to be realized, and a plurality of complexities are brought to application development, maintenance and upgrading.
Disclosure of Invention
The invention provides a transaction message processing method, a transaction message processing device and electronic equipment, which can eliminate the trouble caused by additionally arranging a review interface in an application and can ensure the consistency of transaction and message processing.
In order to achieve the above purpose, the embodiment of the present invention adopts the following technical scheme:
in a first aspect, a method for processing a transaction message is provided, including:
sending a request for starting a global transaction to a transaction coordinator, and acquiring a transaction ID of the global transaction and an ID of a contained message branch;
sending a preparation message related to the global transaction to a message middleware, and reporting a message sending result received from the message middleware to the transaction coordinator to indicate that the message sending result is associated with a branch ID of the message branch;
executing each transaction branch contained in the global transaction;
and sending a request for submitting or rolling back the global transaction to the transaction coordinator so as to submit or roll back each transaction branch and each message branch contained in the global transaction according to the indication returned by the transaction coordinator.
In a second aspect, another method for processing a transaction message is provided, including:
returning the transaction ID of the global transaction and the ID of the included message branch to the application according to the request sent by the application and used for starting the global transaction;
performing association operation in response to a message sending result reported by the application and an indication of associating the message sending result with a branch ID of the message branch; the message sending result is obtained after the application sends a preparation message related to the global transaction to a message middleware;
and receiving a request sent by an application for submitting or rolling back the global transaction, and taking the request as a basis for subsequently issuing an indication for carrying out corresponding submission or rolling back on each transaction branch and each message branch contained in the global transaction.
In a third aspect, another method for processing a transaction message is provided, including:
receiving a commit indication of a message branch sent by a transaction coordinator, wherein the commit indication comprises a message sending result of the message branch to be committed;
according to the message sending result of the message branch to be submitted, submitting a preparation message corresponding to the message sending result to a message middleware, and feeding back the submitted successful message to the transaction coordinator;
Receiving a commit indication of a transaction branch sent by a transaction coordinator;
and submitting each transaction branch contained in the global transaction respectively, and feeding back a successful commit message to the transaction coordinator.
In a fourth aspect, a method for processing a transaction message is provided, including:
sending a submitting indication of the message branch to an application, wherein the submitting indication comprises a message sending result of the message branch to be submitted;
responding to a message fed back by the application that the submission of the message branch is successful, and sending a submission indication of a transaction branch contained in the global transaction to the application;
and responding to the message fed back by the application and successful in submitting the transaction branch, and sending the message successful in submitting the global transaction to the application.
In a fifth aspect, another method for processing a transaction message is provided, including:
receiving a rollback instruction of a message branch sent by a transaction coordinator, wherein the rollback instruction comprises a message sending result of the message branch to be rolled back;
according to the message sending result of the message branch to be rolled back, rolling back a preparation message corresponding to the message sending result to the message middleware, and feeding back the message which is successfully rolled back to the transaction coordinator;
Receiving a rollback instruction of a transaction branch sent by a transaction coordinator;
and respectively rolling back all transaction branches contained in the global transaction, and feeding back a message of successful rolling back to the transaction coordinator.
In a sixth aspect, another method for processing a transaction message is provided, including:
a rollback instruction of a message branch is sent to an application, wherein the rollback instruction comprises a message sending result of the message branch to be rolled back;
sending a rollback indication of transaction branches contained by the global transaction to the application;
and responding to the message that the rollback of each message branch and the transaction branch contained in the global transaction fed back by the application is successful, and sending the message that the rollback of the global transaction is successful to the application.
In a seventh aspect, there is provided a transaction message processing apparatus, including:
the global transaction request module is used for sending a request for starting a global transaction to the transaction coordinator and acquiring the transaction ID of the global transaction and the ID of the included message branch;
a message branch preparation module, configured to send a preparation message related to the global transaction to a message middleware, and report a message sending result received from the message middleware to the transaction coordinator, so as to instruct that the message sending result is associated with a branch ID of the message branch;
The transaction branch execution module is used for executing each transaction branch contained in the global transaction;
and the global transaction reporting module is used for sending a request for submitting or rolling back the global transaction to the transaction coordinator so as to submit or roll back each transaction branch and each message branch contained in the global transaction according to the returned instruction of the transaction coordinator.
In an eighth aspect, there is provided another transaction message processing apparatus, comprising:
the global transaction acceptance module is used for returning the transaction ID of the global transaction and the ID of the included message branch to the application according to the request sent by the application and used for starting the global transaction;
a message branch association module, configured to perform an association operation in response to a message sending result reported by the application and an indication that associates the message sending result with a branch ID of the message branch; the message sending result is obtained after the application sends a preparation message related to the global transaction to a message middleware;
and the global transaction summarizing module is used for receiving a request sent by an application to submit or roll back a global transaction and taking the request as a basis for subsequently issuing an instruction for carrying out corresponding submission or roll-back on each transaction branch and each message branch contained in the global transaction.
In a ninth aspect, there is provided another transaction message processing apparatus, including:
the message submitting and receiving module is used for receiving a submitting instruction of a message branch sent by the transaction coordinator, wherein the submitting instruction comprises a message sending result of the message branch to be submitted;
the message submitting processing module is used for submitting the preparation message corresponding to the message sending result to the message middleware according to the message sending result of the message branch to be submitted and feeding back the submitted successful message to the transaction coordinator;
the transaction submitting and receiving module is used for receiving the submitting indication of the transaction branch sent by the transaction coordinator;
and the transaction submitting processing module is used for respectively submitting each transaction branch contained in the global transaction and feeding back a successful submitting message to the transaction coordinator.
In a tenth aspect, there is provided another transaction message processing apparatus, including:
the information submitting indication module is used for sending an indication of the submitting of the information branch to the application, wherein the indication of the submitting comprises an information sending result of the information branch to be submitted;
the transaction commit indication module is used for responding to the message fed back by the application and aiming at successful commit of the message branch, and sending a commit indication of the transaction branch contained in the global transaction to the application;
And the commit success processing module is used for responding to the message fed back by the application and aiming at successful commit of the transaction branch, and sending the message aiming at successful commit of the global transaction to the application.
In an eleventh aspect, there is provided another transaction message processing apparatus, including:
the message rollback receiving module is used for receiving rollback instructions of message branches sent by the transaction coordinator, wherein the rollback instructions comprise message sending results of the message branches to be rolled back;
the message rollback processing module is used for rollback the preparation message corresponding to the message sending result to the message middleware according to the message sending result of the message branch to be rolled back and feeding back the message which is successfully rolled back to the transaction coordinator;
the transaction rollback receiving module is used for receiving rollback instructions of transaction branches sent by the transaction coordinator;
and the transaction rollback processing module is used for respectively rollback all transaction branches contained in the global transaction and feeding back the information of successful rollback to the transaction coordinator.
In a twelfth aspect, there is provided another transaction message processing apparatus, including:
the message rollback indication module is used for sending rollback indication of the message branch to the application, wherein the rollback indication comprises a message sending result of the message branch to be rolled back;
A transaction rollback indication module, configured to send a rollback indication of a transaction branch included in the global transaction to the application;
and the rollback success processing module is used for responding to the message of rollback success of each message branch and transaction branch contained in the global transaction fed back by the application and sending the message of rollback success for the current global transaction to the application.
In a thirteenth aspect, there is provided an electronic device comprising:
a memory for storing a program;
a processor coupled to the memory for executing the program for:
sending a request for starting a global transaction to a transaction coordinator, and acquiring a transaction ID of the global transaction and an ID of a contained message branch;
sending a preparation message related to the global transaction to a message middleware, and reporting a message sending result received from the message middleware to the transaction coordinator to indicate that the message sending result is associated with a branch ID of the message branch;
executing each transaction branch contained in the global transaction;
and sending a request for submitting or rolling back the global transaction to the transaction coordinator so as to submit or roll back each transaction branch and each message branch contained in the global transaction according to the indication returned by the transaction coordinator.
In a fourteenth aspect, there is provided another electronic device, comprising:
a memory for storing a program;
a processor coupled to the memory for executing the program for:
returning the transaction ID of the global transaction and the ID of the included message branch to the application according to the request sent by the application and used for starting the global transaction;
performing association operation in response to a message sending result reported by the application and an indication of associating the message sending result with a branch ID of the message branch; the message sending result is obtained after the application sends a preparation message related to the global transaction to a message middleware;
and receiving a request sent by an application for submitting or rolling back the global transaction, and taking the request as a basis for subsequently issuing an indication for carrying out corresponding submission or rolling back on each transaction branch and each message branch contained in the global transaction.
In a fifteenth aspect, there is provided another electronic device comprising:
a memory for storing a program;
a processor coupled to the memory for executing the program for:
receiving a commit indication of a message branch sent by a transaction coordinator, wherein the commit indication comprises a message sending result of the message branch to be committed;
According to the message sending result of the message branch to be submitted, submitting a preparation message corresponding to the message sending result to a message middleware, and feeding back the submitted successful message to the transaction coordinator;
receiving a commit indication of a transaction branch sent by a transaction coordinator;
and submitting each transaction branch contained in the global transaction respectively, and feeding back a successful commit message to the transaction coordinator.
In a sixteenth aspect, there is provided another electronic device comprising:
a memory for storing a program;
a processor coupled to the memory for executing the program for:
sending a submitting indication of the message branch to an application, wherein the submitting indication comprises a message sending result of the message branch to be submitted;
responding to a message fed back by the application that the submission of the message branch is successful, and sending a submission indication of a transaction branch contained in the global transaction to the application;
and responding to the message fed back by the application and successful in submitting the transaction branch, and sending the message successful in submitting the global transaction to the application.
In a seventeenth aspect, there is provided another electronic device, comprising:
A memory for storing a program;
a processor coupled to the memory for executing the program for:
receiving a rollback instruction of a message branch sent by a transaction coordinator, wherein the rollback instruction comprises a message sending result of the message branch to be rolled back;
according to the message sending result of the message branch to be rolled back, rolling back a preparation message corresponding to the message sending result to the message middleware, and feeding back the message which is successfully rolled back to the transaction coordinator;
receiving a rollback instruction of a transaction branch sent by a transaction coordinator;
and respectively rolling back all transaction branches contained in the global transaction, and feeding back a message of successful rolling back to the transaction coordinator.
In an eighteenth aspect, there is provided another electronic device, comprising:
a memory for storing a program;
a processor coupled to the memory for executing the program for:
a rollback instruction of a message branch is sent to an application, wherein the rollback instruction comprises a message sending result of the message branch to be rolled back;
sending a rollback indication of transaction branches contained by the global transaction to the application;
and responding to the message that the rollback of each message branch and the transaction branch contained in the global transaction fed back by the application is successful, and sending the message that the rollback of the global transaction is successful to the application.
In the existing distributed transaction management system, the transaction message is also used as a resource required to be managed by an application, and a transaction management scheme meeting a 2PC mode is provided for the resource, namely, in a global transaction, the transaction message related to the global transaction is used as a message branch of the global transaction and forms a complete distributed transaction together with the original transaction branch. The act of sending the preliminary message by the application to the message middleware is taken as the content of a message branch of a stage in the 2PC mode; when each transaction branch and message branch in the global transaction are successfully executed, the application can request the transaction coordinator to submit the global transaction, and then submit the transaction branch and the message branch according to the submission indication returned by the transaction coordinator, wherein the submission of the message branch refers to a preparation message sent to the message middleware before the application submits, so that the message can be consumed; when there are branches in each transaction branch and message branch in the global transaction that are not successfully executed, the application may request to rollback the global transaction from the transaction coordinator and then rollback the transaction branches and message branches according to the rollback indication returned by the transaction coordinator. Where rollback of a message branch refers to a preliminary message sent to the message middleware before the rollback is applied, causing the message to be discarded in the message middleware. Of course, when the transaction coordinator does not receive the submitted or rolled-back global transaction sent by the application within the specified duration, the global transaction execution failure is directly judged, and an instruction for rolling back the global transaction is returned to the application. The scheme can discard the trouble caused by additionally setting the check interface in the application and can ensure the consistency of transaction and message processing.
The foregoing description is only an overview of the technical solutions of the present application, and may be implemented according to the content of the specification in order to make the technical means of the present application more clearly understood, and in order to make the above-mentioned and other objects, features and advantages of the present application more clearly understood, the following detailed description of the present application will be given.
Drawings
Various other advantages and benefits will become apparent to those of ordinary skill in the art upon reading the following detailed description of the preferred embodiments. The drawings are only for purposes of illustrating the preferred embodiments and are not to be construed as limiting the application. Also, like reference numerals are used to designate like parts throughout the figures. In the drawings:
FIG. 1 is a schematic diagram of processing logic for a transaction message in the prior art;
FIG. 2 is a schematic diagram of a transaction message processing logic II in the prior art;
FIG. 3 is a schematic diagram of processing logic for transaction messages according to an embodiment of the present invention;
FIG. 4 is a second schematic diagram of processing logic of a transaction message according to an embodiment of the present invention;
FIG. 5 is a flowchart of a method for processing a transaction message according to an embodiment of the present invention;
FIG. 6 is a flow chart of a second method for processing transaction messages according to an embodiment of the present invention;
FIG. 7 is a flowchart of a method for processing a transaction message according to an embodiment of the present invention;
FIG. 8 is a flowchart of a transaction message processing method according to an embodiment of the present invention;
FIG. 9 is a flowchart fifth exemplary embodiment of a transaction message processing method;
FIG. 10 is a flowchart of a method for processing a transaction message according to an embodiment of the present invention;
FIG. 11a is a diagram illustrating a first structure of a transaction message processing device according to an embodiment of the present invention;
FIG. 11b is a block diagram of a global transaction request module according to an embodiment of the present invention;
FIG. 12a is a diagram illustrating a second embodiment of a transaction message processing apparatus;
FIG. 12b is a block diagram of a global transaction acceptance module according to an embodiment of the invention;
FIG. 13 is a third block diagram of a transaction message processing device according to an embodiment of the present invention;
FIG. 14 is a diagram of a transaction message processing apparatus according to an embodiment of the present invention;
FIG. 15 is a diagram of a transaction message processing apparatus according to an embodiment of the present invention;
FIG. 16 is a diagram of a transaction message processing apparatus according to an embodiment of the present invention;
fig. 17 is a schematic structural diagram of an electronic device according to an embodiment of the present invention;
fig. 18 is a schematic diagram of a second structure of an electronic device according to an embodiment of the present invention;
fig. 19 is a schematic diagram of a third embodiment of an electronic device;
Fig. 20 is a schematic structural diagram of an electronic device according to an embodiment of the present invention;
fig. 21 is a schematic diagram of an electronic device according to an embodiment of the present invention;
fig. 22 is a schematic structural diagram of an electronic device according to an embodiment of the present invention.
Detailed Description
Exemplary embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. While exemplary embodiments of the present disclosure are shown in the drawings, it should be understood that the present disclosure may be embodied in various forms and should not be limited to the embodiments set forth herein. Rather, these embodiments are provided so that this disclosure will be thorough and complete, and will fully convey the scope of the disclosure to those skilled in the art.
The scheme improves the defect that in the prior art, because the distributed transaction and the transaction message sending are processed into two mutually independent step flows, a check interface is additionally arranged in the application to ensure that the operation of executing the transaction and the transaction message sending are consistent.
As shown in fig. 3, a first schematic diagram of processing logic of a transaction message according to an embodiment of the present invention corresponds to a successful commit process of the transaction message in a complete 2PC phase.
Step 1, an application requests a transaction coordinator to start a global transaction;
step 2, the transaction coordinator allocates a global transaction identifier XID to the application; the structure of the XID comprises: transaction coordinator IP, transaction coordinator port, and transaction unique ID;
step 3, the application builds the transaction context of the current global transaction according to the XID, wherein the transaction context comprises a transaction coordinator IP, a transaction coordinator port and a transaction unique ID which are responsible for processing the transaction;
and step 4, the application initiates a request for registering one transaction branch to the transaction coordinator according to the transaction context information.
Step 5, the transaction coordinator allocates a branch ID to be applied as the first branch of the global transaction, and the branch ID is used for associating the transaction message;
step 6, the application sends the preparation message to the message middleware;
step 7, the message middleware returns a message sending result;
step 8, the application converts the 'message sending result' into a json string and reports the json string to the transaction coordinator to indicate that the json string is associated with the branch ID;
Step 9, the transaction coordinator returns a message of reporting success to the application;
at step 10, the application performs a database local transaction. For the database operation of the transaction context, the database operation is processed by the resource manager, front and back mirror images of the database operation are generated and stored in the local storage table, the application interacts with the transaction coordinator according to the information of the transaction context, and the local transaction of the database becomes the second branch of the global transaction.
In step 11, the application commits the global transaction and the transaction is completed in one stage.
At step 12, the transaction coordinator initiates a two-phase commit. Firstly, a transaction coordinator initiates two-stage submission to the first branch, and a json string corresponding to the first branch is used as user data to be transmitted to a resource manager;
step 13, the application gets the message ID from the json string and submits the message to the message middleware (the application process acts as both a client and a resource manager in this example);
step 14, the information of successful branch of the submitted message returned by the message middleware is applied;
step 15, the application returns a message of successful message submission to the transaction coordinator;
step 16, the transaction coordinator then processes the two-phase commit of branch two, sending an indication to the application to commit the transaction branch;
Step 17, after the application receives the submitting instruction, the mirror image record corresponding to the branch in the storage table is cleaned;
step 18, the application returns a successful transaction branch commit message to the transaction coordinator;
at step 19, the transaction coordinator determines that all branches have completed, returning "global commit success" to the application.
As shown in fig. 4, a second schematic diagram of processing logic of a transaction message according to an embodiment of the present invention corresponds to a process of successfully rolling back the transaction message in a complete 2PC stage due to global transaction timeout.
In FIG. 4, steps 1-10 are identical to the one-phase contents of global transaction commit in FIG. 3, except that the two-phase process is different. The following description will be made starting from step 11.
In step 11, the transaction coordinator determines that the global transaction is overtime (the application does not commit the global transaction by a specified period), and initiates global rollback.
Step 12, firstly, the transaction coordinator sends a transaction rollback instruction to the application, and initiates two-stage rollback on the second branch (commit according to the forward sequence of the branches, rollback according to the reverse sequence of the branches);
step 13, after receiving the rollback instruction, the application completes rollback according to the front and back mirror image information corresponding to each transaction branch stored in the storage table;
Step 14, the application returns a message that the transaction branch rollback is successful to the transaction coordinator;
step 15, the transaction coordinator then sends a message rollback instruction to the application, initiates two-stage rollback on the branch one, and transmits json strings corresponding to the branch one as user data to the resource manager;
step 16, the application obtains the message ID according to the json string and sends a message rollback instruction to the message middleware;
step 17, the message middleware rolls back the preparation message and sends the successful information of the roll-back message to the application;
step 18, the application sends a two-stage processing rollback success message of branch one to the transaction coordinator;
in step 19, the transaction coordinator determines that all branches have rolled back to completion, and clears the global transaction information.
In addition, when the application performs operations to complete the local transaction branch and message branch, if there is a branch operation failure, the application may submit a request to the transaction coordinator to rollback the global transaction, and rollback the transaction branch and message branch according to the rollback indication returned by the transaction coordinator,
the technical solution of the present application is further described below by a plurality of embodiments.
Example 1
Based on the above-mentioned concept of processing a transaction message in a distributed transaction operation, as shown in fig. 5, it is a flowchart of a processing method of a transaction message shown in an embodiment of the present invention, and the execution of the method is mainly the application shown in fig. 3 or fig. 4, which mainly relates to the processing flow of a transaction message in a phase of 2PC phases in a distributed transaction operation mode. As shown in fig. 5, the processing method of the transaction message includes the following steps:
S510, a request for starting the global transaction is sent to the transaction coordinator, and the transaction ID of the global transaction and the ID of the included message branch are obtained.
First, the application may send a request to the transaction coordinator to open the global transaction of this time, and obtain the transaction ID corresponding to the global transaction of this time from the transaction coordinator.
Specifically, the client side will firstly declare to the transaction coordinator that the distributed transaction is opened, and then acquire the transaction ID of a global transaction from the transaction coordinator to identify the distributed transaction in the whole distributed transaction operation. The client initiates corresponding transaction requests to the resource managers of the resource databases related to the global transaction, and each transaction request carries the transaction ID of the global transaction to which each transaction belongs, so that each resource manager executes corresponding transaction operation according to the transaction request.
The global transaction in this embodiment also includes an operation for a transaction message that is the transaction message involved in this distributed transaction operation.
Then, the application can send a request for registering the message branch to the transaction coordinator according to the transaction ID, and the transaction coordinator obtains the branch ID of the message branch contained in the global transaction;
Specifically, the application constructs the context of the current global transaction according to the transaction ID, so as to define the boundary of the current global transaction.
In order to make the transaction message related to the distributed transaction act as a branch of the global transaction, in this embodiment, an application needs to additionally register the operation of the transaction message into the global transaction, so that the transaction coordinator manages the transaction message in the global transaction.
Specifically, the application may send a request for registering a message branch to the transaction coordinator for each transaction message related to the current distributed transaction, so as to register a message branch for managing the transaction message at the transaction coordinator side, and obtain, from the transaction coordinator, a branch ID of each message branch included in the current global transaction, as an identifier of each transaction message.
S520, sending a preparation message related to the global transaction to the message middleware, and reporting a message sending result received from the message middleware to the transaction coordinator to indicate that the message sending result is associated with a branch ID of a message branch;
after obtaining the branch ID of the message branch contained in the global transaction, the application needs to associate the branch ID with a specific transaction message. In particular, an application may first send a provisioning message to the message middleware that is temporarily unavailable, i.e., that is not available to other applications or systems. After receiving the preparation message, the message middleware returns a message sending result to the application as a sign of successful sending of the preparation message. The application reports the 'message sending result' as the content identifier of a message branch to the transaction coordinator and instructs the transaction coordinator to correlate the 'message sending result' with the branch ID of the message branch registered before, thereby realizing the real registration of the transaction message to the global transaction maintained and managed by the transaction coordinator.
Further, the method and the system can convert specific information of the message sending result received from the message middleware into json (JavaScript Object Notation, a lightweight data exchange format) character strings and report the json character strings to the transaction coordinator in the process of reporting the message sending result received from the message middleware to the transaction coordinator, so that the resource consumption of interaction information to a network is reduced.
S530, executing each transaction branch contained in the global transaction;
the step is basically the same as the step of executing the transaction branching operation in the prior art, namely, after receiving the service request sent by the client, the resource manager at the application side extracts the transaction ID from the service request and sends the transaction ID to the transaction coordinator so as to register the transaction coordinator, and declare the transaction as a transaction branching in the global transaction. After receiving the transaction ID, the transaction coordinator allocates a transaction branch ID to the transaction branch to identify the global transaction to which the transaction branch belongs, and returns the transaction branch ID to the resource manager. After receiving the transaction branch ID, the resource manager registers it locally as an identification of the current transaction branch.
The resource manager performs the database operations corresponding to each transaction branch locally in the context of the global transaction. Meanwhile, for each database operation, the resource manager records the front and back mirror images of the database operation and stores the mirror images in the local storage table.
S540, sending a request for submitting or rolling back the global transaction to the transaction coordinator so as to submit or roll back each transaction branch and each message branch contained in the global transaction according to the instruction returned by the transaction coordinator;
wherein the operation of submitting or rolling back the message branch is to submit or rollback the preliminary message to the message middleware.
When all message branches and transaction branches contained in the global transaction are successfully executed at the application side, the application sends a request for submitting the global transaction to the transaction coordinator; when at least one branch execution failure exists in all message branches and transaction branches contained in the global transaction, the application sends a request for rolling back the global transaction to the transaction coordinator. To this end, one-phase execution of the 2PC mode of distributed transaction operation involving message branch participation is completed. The application will enter into the process of two-phase execution of the 2PC mode, as indicated by the commit or rollback returned by the transaction coordinator.
It should be noted here that the so-called commit or rollback of a message branch is an operation in which an application can commit or rollback a preliminary message to a message middleware. Wherein submitting the provisioning message refers to letting the provisioning message become consumable, and rolling back the provisioning message refers to letting the message middleware locally clear the provisioning message.
The transaction message processing method of the embodiment of the invention takes the application as an execution main body, takes the transaction message as a message branch of the global transaction, and registers the transaction message to the transaction coordinator; and associating the message branch with a message sending result of executing a send preliminary message operation to truly register the transaction message into the global transaction maintained and managed by the transaction coordinator; after each transaction branch and message branch contained in the global transaction are executed, a commit or rollback request of the global transaction is sent to the transaction coordinator according to the successful or failed result of the execution, so that each transaction branch and message branch contained in the global transaction is committed or rolled back according to the instruction returned by the transaction coordinator. The scheme realizes the processing flow of the transaction message in one stage of the 2PC stage in the distributed transaction operation mode.
Example two
Based on the above-mentioned scheme idea of processing a transaction message in a distributed transaction operation, as shown in fig. 6, it is a second flowchart of a transaction message processing method shown in an embodiment of the present invention, and the execution of the method is mainly the transaction coordinator shown in fig. 3 or fig. 4, which mainly relates to a process flow of a transaction message in a phase of 2PC phases in a distributed transaction operation mode. As shown in fig. 6, the processing method of the transaction message includes the following steps:
s610, according to a request sent by an application and used for starting the global transaction, returning the transaction ID of the global transaction and the ID of the included message branch to the application;
firstly, a transaction coordinator can return a transaction ID of a current global transaction to an application according to a request sent by the application and used for starting the current global transaction;
specifically, when the client wants to initiate a distributed transaction, the client declares to the transaction coordinator to start the distributed transaction, and after the transaction coordinator receives a request sent by an application and used for starting the global transaction, the transaction coordinator returns the transaction ID of the global transaction to the transaction coordinator so as to identify the distributed transaction in the maintenance and management of the whole distributed transaction operation. Meanwhile, after acquiring the transaction ID of the global transaction, the client initiates corresponding transaction requests to the resource managers of the resource databases related to the global transaction, wherein each transaction request carries the transaction ID of the global transaction to which each transaction belongs, so that each resource manager executes corresponding transaction operation according to the transaction request.
The global transaction in this embodiment also includes an operation for a transaction message that is the transaction message involved in this distributed transaction operation.
Then, the transaction coordinator responds to the request of the registered message branch sent by the application according to the transaction ID, and returns the branch ID of the message branch contained in the global transaction to the application;
the application builds the context of the global transaction according to the transaction ID, and is used for defining the boundary of the global transaction.
Meanwhile, in order to make the transaction message related to the distributed transaction act as a branch of the global transaction, in this embodiment, the application will additionally register the operation of the transaction message into the global transaction, so that the transaction coordinator manages the transaction message in the global transaction.
Specifically, the application may send a request for registering a message branch to the transaction coordinator for each transaction message related to the distributed transaction, so as to register a message branch for the transaction coordinator to manage the transaction message at the transaction coordinator side. After receiving the request for registering the message branch, the transaction coordinator allocates a corresponding branch ID to each message branch contained in the global transaction, and sends the corresponding branch ID to the application as an identifier of each transaction message.
S620, responding to the message sending result reported by the application and the indication of associating the message sending result with the branch ID of the message branch, and executing association operation; the message sending result is obtained after the application sends the preparation message related to the global transaction to the message middleware;
after obtaining the branch ID of the message branch contained in the global transaction, the application associates the branch ID with a specific transaction message.
Specifically, an application first sends a provisioning message to the message middleware that is temporarily unavailable, i.e., that is not available to other applications or systems. After receiving the preparation message, the message middleware returns a message sending result to the application as a sign of successful sending of the preparation message. The application reports the "message send result" as a content identification of a message branch to the transaction coordinator and instructs the transaction coordinator to associate the "message send result" with the branch ID of the previously registered message branch. After receiving the indication, the transaction coordinator executes corresponding association operation, so that the transaction information is registered in the global transaction maintained and managed by the transaction coordinator.
Further, the method and the system can convert specific information of the message sending result received from the message middleware into json character strings and report the json character strings to the transaction coordinator in the process of reporting the message sending result received from the message middleware to the transaction coordinator, so that the resource consumption of interaction information to a network is reduced.
S630, receiving a request sent by an application for submitting or rolling back a global transaction, wherein the request is used as a basis for subsequently issuing an instruction for correspondingly submitting or rolling back each transaction branch and each message branch contained in the global transaction;
after all message branches and transaction branches contained in the global transaction are successfully executed at the application side, the transaction coordinator receives a request sent by the application to submit the global transaction; when at least one branch execution failure exists in all message branches and transaction branches contained in the global transaction, the transaction coordinator receives a request sent by an application to roll back the global transaction. To this end, one-phase execution of the 2PC mode of distributed transaction operation involving message branch participation is completed. The transaction coordinator will issue a commit or rollback indication to the application to enter into the process of two-phase execution of the 2PC mode, depending on the specific content of the request.
It should be noted here that the so-called commit or rollback of a message branch is an operation in which an application can commit or rollback a preliminary message to a message middleware. Wherein submitting the provisioning message refers to letting the provisioning message become consumable, and rolling back the provisioning message refers to letting the message middleware locally clear the provisioning message.
According to the transaction message processing method, the transaction coordinator is used as an execution main body, the transaction message is used as one message branch of the global transaction, and registration is carried out locally; and associating the message branch with a message sending result of executing a send preliminary message operation to truly register the transaction message into the global transaction; after the application executes and completes each transaction branch and message branch contained in the global transaction, receiving a commit or rollback request of the global transaction sent by the application according to the successful or failed execution result, and taking the request as the basis for issuing commit or rollback instructions to each transaction branch and message branch contained in the global transaction. The scheme realizes the processing flow of the transaction message in one stage of the 2PC stage in the distributed transaction operation mode.
Example III
Based on the above-mentioned scheme idea of processing a transaction message in a distributed transaction operation, as shown in fig. 7, it is a flowchart of a processing method of a transaction message shown in an embodiment of the present invention, and the execution of the method is mainly the application shown in fig. 3 or fig. 4, which mainly relates to the two-stage processing flow of the transaction message in the 2PC stage in the distributed transaction operation mode. As shown in fig. 7, the processing method of the transaction message includes the following steps:
S710, receiving a commit instruction of a message branch sent by a transaction coordinator, wherein the commit instruction comprises a message sending result of the message branch to be committed;
wherein the commit indication is issued by the transaction coordinator after receiving that the global transaction where the message branch is located is requested to commit; the message sending result is obtained after the application sends the preparation message related to the global transaction to the message middleware and is sent to the transaction coordinator.
For a stage of execution of a message branch in a global transaction, see the description of embodiment one or embodiment two. After receiving a request for submitting a global transaction sent by an application at one stage, a transaction coordinator firstly instructs the application to submit a message branch in the global transaction, and the issued submission instruction contains a message sending result corresponding to the message branch to be submitted. The message sending result is obtained after the application sends the preparation message related to the global transaction to the message middleware in the one-stage execution process, and the preparation message is sent to the transaction coordinator. The transaction coordinator associates the message sending result with the branch ID of the message branch previously assigned to the global transaction and stores it locally.
Further, the application can convert specific information of the message sending result received from the message middleware into json character strings at one stage and report the json character strings to the transaction coordinator, so that the resource consumption of the interaction information to the network is reduced. Accordingly, after the json string in the commit indication about the message branch is extracted, the application also needs to correspond the string to the original message sending result, and then can lock the designated prepared message content.
S720, according to the message sending result of the message branch to be submitted, submitting a preparation message corresponding to the message sending result to the message middleware, and feeding back the submitted successful message to the transaction coordinator;
after receiving the commit instruction of the message branch sent by the transaction coordinator, the application extracts the message sending result of the message branch contained in the instruction information, and searches the content of the corresponding preparation message, such as the message ID of the preparation message, locally according to the result. And then submitting a preparation message corresponding to the message sending result to the message middleware by using the message ID so that the preparation message can be consumed. When the information is submitted successfully, the submitted successful information is fed back to the transaction coordinator so as to inform the transaction coordinator that the transaction coordinator can perform subsequent operations.
S730, receiving a commit instruction of a transaction branch sent by a transaction coordinator;
wherein the commit indication is issued by the transaction coordinator after receiving that the global transaction where the transaction branch resides is requested to commit.
And after receiving the successful message of the message branch submission, the transaction coordinator continues to submit the transaction branch in the global transaction, namely sends a submission indication of the transaction branch to the application.
S740, submitting each transaction branch contained in the global transaction respectively, and feeding back a successful submitting message to the transaction coordinator;
after receiving the commit indication of the transaction branches sent by the transaction coordinator, the application sequentially commits the local transaction branches, namely, the operation mirror image generated for each transaction operation is cleared from the local storage table. After the commit is completed, the application sends a successful commit message of the transaction branch to the transaction coordinator to inform the transaction coordinator that the transaction coordinator can perform subsequent operations.
After receiving the message, the transaction coordinator can clear the locally stored relevant settings and information of the current global transaction, then inform the application that the current global transaction is submitted successfully, and the application can continue to execute other transaction operations.
The transaction message processing method of the embodiment of the invention takes the application as an execution main body, and submits the previously sent preparation message to the message middleware after receiving the instruction of submitting the message branch sent by transaction coordination; and then, according to the submitting instruction of the transaction branch issued by the transaction coordinator, the local transaction branch is submitted in turn. The scheme implements the two-phase (commit) process flow of the transaction message in the 2PC phase in the distributed transaction mode of operation.
Example IV
Based on the above-mentioned scheme idea of processing a transaction message in a distributed transaction operation, as shown in fig. 8, it is a flowchart of a transaction message processing method shown in an embodiment of the present invention, and the execution of the method is mainly the transaction coordinator shown in fig. 3 or fig. 4, which mainly relates to the two-stage processing flow of the transaction message in the 2PC stage in the distributed transaction operation mode. As shown in fig. 8, the processing method of the transaction message includes the following steps:
s810, sending a submitting indication of the message branch to the application, wherein the submitting indication comprises a message sending result of the message branch to be submitted;
the commit indication is sent by the transaction coordinator after the global transaction where the message branch is received is requested to be committed; the message sending result is obtained after the application sends the preparation message related to the global transaction to the message middleware and is sent to the transaction coordinator.
For a stage of execution of a message branch in a global transaction, see the description of embodiment one or embodiment two. After receiving a request for submitting a global transaction sent by an application at one stage, a transaction coordinator firstly instructs the application to submit a message branch in the global transaction, and the issued submission instruction contains a message sending result corresponding to the message branch to be submitted. The message sending result is obtained after the application sends the preparation message related to the global transaction to the message middleware in the one-stage execution process, and the preparation message is sent to the transaction coordinator. The transaction coordinator associates the message sending result with the branch ID of the message branch previously assigned to the global transaction and stores it locally.
S820, responding to the message fed back by the application that the submission of the message branch is successful, and sending a submission indication of the transaction branch contained in the global transaction to the application;
after receiving the commit instruction of the message branch sent by the transaction coordinator, the application extracts the message sending result of the message branch contained in the instruction information, and searches the content of the corresponding preparation message, such as the message ID of the preparation message, locally according to the result. And then submitting a preparation message corresponding to the message sending result to the message middleware by using the message ID so that the preparation message can be consumed. And after the information is submitted successfully, feeding back the information of the successful submission to the transaction coordinator, and after the transaction coordinator receives the notification, continuing to send a submission instruction of the transaction branch contained in the global transaction to the application so as to instruct the application to submit the local transaction branch.
S830, responding to the successful submitting message of the transaction branch fed back by the application, and sending the successful submitting message of the global transaction to the application;
after receiving the commit indication of the transaction branches sent by the transaction coordinator, the application sequentially commits the local transaction branches, namely, the operation mirror image generated for each transaction operation is cleared from the local storage table. After the commit is completed, the application sends a successful commit message of the transaction branch to the transaction coordinator to inform the transaction coordinator that the transaction coordinator can perform subsequent operations.
After receiving the message, the transaction coordinator can clear the locally stored relevant settings and information of the current global transaction, then inform the application that the current global transaction is submitted successfully, and the application can continue to execute other transaction operations.
According to the transaction message processing method, the transaction coordinator is used as an execution main body, after a global transaction submitting request sent by an application is received at one stage, an instruction for submitting a message branch is sent to the application, and after successful submitting information fed back by the application is received, a transaction branch submitting instruction is sent to the application, so that the consistency of the transaction message and the local database operation is ensured. The scheme implements the two-phase (commit) process flow of the transaction message in the 2PC phase in the distributed transaction mode of operation.
Example five
Based on the above-mentioned scheme idea of processing a transaction message in a distributed transaction operation, as shown in fig. 9, it is a flowchart five of a processing method of a transaction message shown in an embodiment of the present invention, and the execution of the method is mainly the application shown in fig. 3 or fig. 4, which mainly relates to the two-stage processing flow of the transaction message in the 2PC stage in the distributed transaction operation mode. As shown in fig. 9, the processing method of the transaction message includes the following steps:
s910, receiving a rollback instruction of a message branch sent by the transaction coordinator, wherein the rollback instruction comprises a message sending result of the message branch to be rolled back;
the rollback instruction is sent by the transaction coordinator after the global transaction where the message branch is received is requested to rollback, or sent by the transaction coordinator after the global transaction is judged to be overtime; the message sending result is obtained after the application sends the preparation message related to the global transaction to the message middleware and is sent to the transaction coordinator.
For a stage of execution of a message branch in a global transaction, see the description of embodiment one or embodiment two. After the transaction coordinator receives a request for rolling back the global transaction sent by the application in one stage, or after the transaction coordinator judges that the current global transaction is overtime, the transaction coordinator can instruct the application to roll back the message branches in the global transaction, and the issued rollback instruction contains the message sending result corresponding to the message branches to be submitted. The message sending result is obtained after the application sends the preparation message related to the global transaction to the message middleware in the one-stage execution process, and the preparation message is sent to the transaction coordinator. The transaction coordinator associates the message sending result with the branch ID of the message branch previously assigned to the global transaction and stores it locally.
Further, the application can convert specific information of the message sending result received from the message middleware into json character strings at one stage and report the json character strings to the transaction coordinator, so that the resource consumption of the interaction information to the network is reduced. Accordingly, after the json string in the rollback instruction about the message branch is extracted, the specified preliminary message content needs to be locked after the string is also corresponding to the original message sending result.
S920, according to the message sending result of the message branch to be rolled back, rolling back the preparation message corresponding to the message sending result to the message middleware, and feeding back the successfully rolled back message to the transaction coordinator;
after receiving the rollback instruction of the message branch sent by the transaction coordinator, the application extracts the message sending result of the message branch contained in the instruction information, and searches the content of the corresponding preparation message, such as the message ID of the preparation message, locally according to the result. The message ID is then used to rollback the preliminary message to which the message sending result corresponds, e.g. letting the preliminary message be deleted by the message middleware, so that the preliminary message is never consumable. And after the message is successfully rolled back, feeding back the message which is successfully rolled back to the transaction coordinator so as to inform the transaction coordinator that the transaction coordinator can perform subsequent operations.
S930, receiving a rollback instruction of a transaction branch sent by the transaction coordinator;
wherein the rollback indication is issued by the transaction coordinator after receiving that the global transaction where the transaction branch is located is requested to be rolled back.
And after receiving the message that the message branch rollback is successful, the transaction coordinator continues to rollback the transaction branches in the global transaction, namely sends rollback instructions of the transaction branches to the application.
S940, rolling back each transaction branch contained in the global transaction respectively, and feeding back the successful rolling back message to the transaction coordinator;
after receiving the rollback instruction of the transaction branches sent by the transaction coordinator, the application sequentially rolls back the local transaction branches, namely, sets the local database operation as invalid according to the operation mirror image generated for each transaction operation before, so that the local database operation rolls back to the data state before the operation. After the rollback is completed, the application sends a message to the transaction coordinator that the rollback of the transaction branch is successful to inform the transaction coordinator that the subsequent operations can be performed.
After the transaction coordinator receives the message, the transaction coordinator can clear the locally stored relevant settings and information of the current global transaction, then inform the application that the current global transaction rollback is successful, and the application can continue to execute other transaction operations.
The transaction message processing method of the embodiment of the invention takes the application as an execution main body, and after receiving the instruction of rolling back the message branches sent by transaction coordination, the method rolls back the pre-sent message to the message middleware; and according to the rollback instruction of the transaction branch issued by the transaction coordinator, the local transaction branch is rolled back in sequence. The scheme implements the two-phase (rollback) processing flow of the transaction message at the 2PC phase in the distributed transaction mode of operation.
Example six
Based on the above-mentioned scheme idea of processing a transaction message in a distributed transaction operation, as shown in fig. 10, which is a flowchart six of a transaction message processing method shown in an embodiment of the present invention, the execution of the method is mainly the transaction coordinator shown in fig. 3 or fig. 4, which mainly relates to the two-stage processing flow of the transaction message in the 2PC stage in the distributed transaction operation mode. As shown in fig. 10, the transaction message processing method includes the following steps:
s101, a rollback instruction of a message branch is sent to an application, wherein the rollback instruction comprises a message sending result of the message branch to be rolled back;
the rollback instruction is sent by the transaction coordinator after the global transaction where the message branch is received is requested to rollback, or sent by the transaction coordinator after the global transaction is judged to be overtime; the message sending result is obtained after the application sends the preparation message related to the global transaction to the message middleware and is sent to the transaction coordinator.
For a stage of execution of a message branch in a global transaction, see the description of embodiment one or embodiment two. After the transaction coordinator receives the request of rolling back the global transaction sent by the application in one stage, the transaction branches and the message branches are rolled back in reverse order according to the sequence of executing the transaction branches and the message branches in one stage, namely, rolling back instructions for rolling back the branches are sequentially sent to the application. And the application rolls back the message branches in the global transaction, and the issued roll-back instruction comprises a message sending result corresponding to the message branches to be rolled back. The message sending result is obtained after the application sends the preparation message related to the global transaction to the message middleware in the one-stage execution process, and the preparation message is sent to the transaction coordinator. The transaction coordinator associates the message sending result with the branch ID of the message branch previously assigned to the global transaction and stores it locally.
After receiving the rollback instruction of the message branch sent by the transaction coordinator, the application extracts the message sending result of the message branch contained in the instruction information, and searches the content of the corresponding preparation message, such as the message ID of the preparation message, locally according to the result. The message ID is then used to rollback the provisioning message corresponding to the message sending result to the message middleware, e.g., to instruct the message middleware to clear the provisioning message so that the provisioning message is never consumable. And after the message is successfully rolled back, feeding back the message which is successfully rolled back to the transaction coordinator, and after the transaction coordinator receives the notification, continuously sending rollback instructions of other transaction branches or message branches contained in the global transaction to the application so as to instruct the application to perform rollback operation on the local transaction branches or message branches.
S102, sending a rollback instruction of a transaction branch contained in a global transaction to an application;
for example, after the transaction coordinator receives a request for rolling back global transactions sent by an application in one stage, the transaction branches and message branches are rolled back in reverse order according to the sequence of executing the transaction branches and message branches in one stage, that is, rolling back indication of the branches is sequentially sent to the application. The application rolls back transaction branches in the global transaction, and sends roll-back indications of the transaction branches to the application.
After receiving the rollback instruction of the transaction branches sent by the transaction coordinator, the application sequentially rolls back the local transaction branches, namely, sets the local database operation as invalid according to the operation mirror image generated for each transaction operation before, so that the local database operation rolls back to the data state before the operation. After the rollback is completed, the application sends a message to the transaction coordinator that the rollback of the transaction branch is successful to inform the transaction coordinator that the subsequent operations can be performed.
S103, responding to the message that the rollback of each message branch and the transaction branch contained in the global transaction fed back by the application succeeds, and sending the message that the rollback of the global transaction succeeds to the application;
after the transaction coordinator receives the message that all the message branches and the transaction branches contained in the global transaction are successfully rolled back, the transaction coordinator can clear the locally stored relevant settings and information of the global transaction, then inform the application that the global transaction is successfully rolled back, and the application can continue to execute other transaction operations.
According to the transaction message processing method, the transaction coordinator is used as an execution main body, after a rollback request of a global transaction sent by an application is received at one stage, rollback instructions are sent to all transaction branches and message branches according to execution sequence of the transaction branches and the message branches in one stage, so that the application can rollback the corresponding transaction branches or message branches according to the rollback instructions. The scheme implements the two-phase (rollback) processing flow of the transaction message at the 2PC phase in the distributed transaction mode of operation.
Example seven
As shown in fig. 11a, a first structure diagram of a transaction message processing device according to an embodiment of the present invention is shown, where the transaction message processing device may be configured to perform the method steps shown in fig. 5, and includes:
a global transaction request module 111, configured to send a request for starting a global transaction to a transaction coordinator, and obtain a transaction ID of the global transaction and an ID of a contained message branch;
a message branch preparation module 112, configured to send a preparation message related to the global transaction to a message middleware, and report a message sending result received from the message middleware to a transaction coordinator, so as to indicate that the message sending result is associated with a branch ID of the message branch;
A transaction branch execution module 113, configured to execute each transaction branch included in the global transaction;
the global transaction reporting module 114 is configured to send a request for submitting or rolling back the global transaction to the transaction coordinator, so as to submit or roll back each transaction branch and message branch included in the global transaction according to the instruction returned by the transaction coordinator.
Further, as shown in fig. 11b, the global transaction request module 111 may include:
a global transaction opening unit 1111, configured to send a request for opening the current global transaction to the transaction coordinator, and obtain a transaction ID corresponding to the current global transaction from the transaction coordinator;
and the message branch registration unit 1112 is configured to send a request for registering a message branch to the transaction coordinator according to the transaction ID corresponding to the global transaction, and acquire the branch ID of the message branch included in the global transaction from the transaction coordinator.
Further, the committing or rolling back the message branch included in the global transaction includes:
the provisioning message is submitted or rolled back to the message middleware.
Further, the reporting, by the message branch preparation module 112, the message sending result received from the message middleware to the transaction coordinator may include:
And converting the information of the message sending result received from the message middleware into a json character string and reporting the json character string to the transaction coordinator.
The transaction message processing device of the embodiment of the invention takes the transaction message as a message branch of the global transaction and registers the transaction message to the transaction coordinator; and associating the message branch with a message sending result of executing a send preliminary message operation to truly register the transaction message into the global transaction maintained and managed by the transaction coordinator; after each transaction branch and message branch contained in the global transaction are executed, a commit or rollback request of the global transaction is sent to the transaction coordinator according to the successful or failed result of the execution, so that each transaction branch and message branch contained in the global transaction is committed or rolled back according to the instruction returned by the transaction coordinator. The scheme realizes the processing flow of the transaction message in one stage of the 2PC stage in the distributed transaction operation mode.
Example eight
As shown in fig. 12a, a second structure diagram of a transaction message processing device according to an embodiment of the present invention is shown, where the transaction message processing device may be configured to perform the method steps shown in fig. 6, and includes:
the global transaction acceptance module 121 is configured to return, to the application, a transaction ID of the current global transaction and an ID of the included message branch according to a request sent by the application to open the current global transaction;
A message branch association module 122, configured to perform an association operation in response to a message transmission result reported by the application and an indication that associates the message transmission result with a branch ID of the message branch; the message sending result is obtained after the application sends the preparation message related to the global transaction to the message middleware;
the global transaction summary module 123 is configured to receive a request sent by an application to commit or rollback a global transaction, so as to serve as a basis for subsequent issuing of an indication for performing corresponding commit or rollback on each transaction branch and each message branch included in the global transaction.
Further, as shown in fig. 12b, the global transaction acceptance module 121 may include:
the global transaction acceptance unit 1211 is configured to return, to the application, a transaction ID of the current global transaction according to a request sent by the application for starting the current global transaction;
and the message branch acceptance unit 1212 is configured to respond to a request of registering a message branch sent by the application according to the transaction ID, and return, to the application, a branch ID of the message branch included in the global transaction.
The transaction message processing device of the embodiment of the invention takes the transaction message as a message branch of the global transaction and registers the transaction message locally; and associating the message branch with a message sending result of executing a send preliminary message operation to truly register the transaction message into the global transaction; after the application executes and completes each transaction branch and message branch contained in the global transaction, receiving a commit or rollback request of the global transaction sent by the application according to the successful or failed execution result, and taking the request as the basis for issuing commit or rollback instructions to each transaction branch and message branch contained in the global transaction. The scheme realizes the processing flow of the transaction message in one stage of the 2PC stage in the distributed transaction operation mode.
Example nine
As shown in fig. 13, a third structure diagram of a transaction message processing device according to an embodiment of the present invention is shown, where the transaction message processing device may be configured to perform the method steps shown in fig. 7, and includes:
a message commit and receive module 131, configured to receive a commit indication of a message branch sent by the transaction coordinator, where the commit indication includes a message sending result of the message branch to be committed;
the message submitting processing module 132 is configured to submit a preliminary message corresponding to a message sending result to the message middleware according to the message sending result of the message branch to be submitted, and feed back the submitted message to the transaction coordinator;
a transaction commit receiving module 133, configured to receive a commit indication of a transaction branch sent by the transaction coordinator;
the transaction commit processing module 134 is configured to commit each transaction branch included in the global transaction, and feed back a commit success message to the transaction coordinator.
Further, the submitting instruction of the message branch is sent by the transaction coordinator after receiving that the global transaction where the message branch is located is requested to be submitted;
the commit indication for the transaction branch is issued by the transaction coordinator after receiving that the global transaction in which the transaction branch resides is requested to commit.
Further, the message sending result is obtained after the application sends the preparation message related to the global transaction to the message middleware and is sent to the transaction coordinator.
The transaction message processing device of the embodiment of the invention submits the previously sent preparation message to the message middleware after receiving the instruction of submitting the message branch sent by transaction coordination; and then, according to the submitting instruction of the transaction branch issued by the transaction coordinator, the local transaction branch is submitted in turn. The scheme implements the two-phase (commit) process flow of the transaction message in the 2PC phase in the distributed transaction mode of operation.
Examples ten
As shown in fig. 14, a fourth structure diagram of a transaction message processing device according to an embodiment of the present invention is shown, where the transaction message processing device may be configured to perform the method steps shown in fig. 8, and includes:
a message submitting indication module 141, configured to send a submitting indication of a message branch to an application, where the submitting indication includes a message sending result of the message branch to be submitted;
a transaction commit indication module 142, configured to send, to an application, a commit indication of a transaction branch included in a global transaction in response to a message fed back by the application that commit for the message branch is successful;
And the commit success processing module 143 is configured to send a message for successful commit of the current global transaction to the application in response to a message for successful commit of the transaction branch fed back by the application.
Further, the commit indication of the message branch is issued by the transaction coordinator after receiving that the global transaction in which the message branch is located is requested to commit.
Further, the message sending result is obtained after the application sends the preparation message related to the global transaction to the message middleware and is sent to the transaction coordinator.
The transaction message processing device of the embodiment of the invention firstly sends the instruction for submitting the message branch to the application after receiving the request for submitting the global transaction sent by the application at one stage, and then sends the instruction for submitting the transaction branch to the application after receiving the information of successful submission fed back by the application, thereby ensuring the consistency of the transaction message and the operation of the local database. The scheme implements the two-phase (commit) process flow of the transaction message in the 2PC phase in the distributed transaction mode of operation.
Example eleven
As shown in fig. 15, a fifth structure diagram of a transaction message processing device according to an embodiment of the present invention is shown, where the transaction message processing device is configured to perform the method steps shown in fig. 9, and includes:
A message rollback receiving module 151, configured to receive a rollback indication of a message branch sent by the transaction coordinator, where the rollback indication includes a message sending result of the message branch to be rolled back;
the message rollback processing module 152 is configured to rollback, according to a message sending result of a message branch to be rolled back, a preparation message corresponding to the message sending result to the message middleware, and feed back a message that the rollback is successful to the transaction coordinator;
a transaction rollback receiving module 153, configured to receive a rollback indication of a transaction branch sent by the transaction coordinator;
the transaction rollback processing module 154 is configured to rollback each transaction branch included in the global transaction, and feed back a message that the rollback is successful to the transaction coordinator.
Further, the rollback instruction of the message branch is sent by the transaction coordinator after the global transaction where the message branch is received is requested to rollback, or after the transaction coordinator determines that the global transaction is overtime.
Further, the message sending result is obtained after the application sends the preparation message related to the global transaction to the message middleware and is sent to the transaction coordinator.
The transaction message processing device provided by the embodiment of the invention rolls back the preparation message sent before the message middleware after receiving the instruction of rolling back the message branch sent by transaction coordination; and according to the rollback instruction of the transaction branch issued by the transaction coordinator, the local transaction branch is rolled back in sequence. The scheme implements the two-phase (rollback) processing flow of the transaction message at the 2PC phase in the distributed transaction mode of operation.
Example twelve
As shown in fig. 16, a sixth structure diagram of a transaction message processing apparatus according to an embodiment of the present invention is shown, where the transaction message processing apparatus may be configured to perform the method steps shown in fig. 10, and includes:
a message rollback indication module 161, configured to send a rollback indication of a message branch to an application, where the rollback indication includes a message sending result of the message branch to be rolled back;
a transaction rollback indication module 162, configured to send, to an application, a rollback indication of a transaction branch included in a global transaction;
the rollback success processing module 163 is configured to send a message for the rollback success of the global transaction to the application in response to a message for the rollback success of each message branch and transaction branch included in the global transaction fed back by the application.
Further, the rollback instruction of the message branch is sent by the transaction coordinator after the global transaction where the message branch is received is requested to rollback, or after the transaction coordinator determines that the global transaction is overtime.
Further, the message sending result is obtained after the application sends the preparation message related to the global transaction to the message middleware and is sent to the transaction coordinator.
After receiving a rollback request of a global transaction sent by an application in one stage, the processing device of the transaction message in the embodiment of the invention sends rollback instructions to all transaction branches and message branches in reverse order according to the execution sequence of the transaction branches and the message branches in one stage, so that the application performs rollback operation on the corresponding transaction branches or message branches according to the rollback instructions. The scheme implements the two-phase (rollback) processing flow of the transaction message at the 2PC phase in the distributed transaction mode of operation.
Example thirteen
The foregoing describes the overall architecture of a transaction message processing apparatus, where the functions of the apparatus may be implemented by an electronic device, as shown in fig. 17, which is a schematic structural diagram of the electronic device according to an embodiment of the present invention, and specifically includes: a memory 171 and a processor 172.
The memory 171 is used for storing programs.
In addition to the programs described above, the memory 171 may also be configured to store other various data to support operations on the electronic device. Examples of such data include instructions for any application or method operating on the electronic device, contact data, phonebook data, messages, pictures, videos, and the like.
The memory 171 may be implemented by any type or combination of volatile or non-volatile memory devices, such as Static Random Access Memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic or optical disk.
A processor 172 coupled to the memory 171 for executing programs in the memory 171 for:
sending a request for starting a global transaction to a transaction coordinator, and acquiring a transaction ID of the global transaction and an ID of a contained message branch;
Sending a preparation message related to the global transaction to a message middleware, and reporting a message sending result received from the message middleware to a transaction coordinator to indicate that the message sending result is associated with a branch ID of a message branch;
executing each transaction branch contained in the global transaction;
a request is sent to the transaction coordinator to commit or rollback the global transaction to commit or rollback each transaction branch and message branch contained in the global transaction according to the indication returned by the transaction coordinator.
The specific processing operations described above have been described in detail in the previous embodiments, and are not repeated here.
Further, as shown in fig. 17, the electronic device may further include: communication component 173, power component 174, audio component 175, display 176, and the like. Only some of the components are schematically shown in fig. 17, which does not mean that the electronic device only comprises the components shown in fig. 17.
The communication component 173 is configured to facilitate wired or wireless communication between the electronic device and other devices. The electronic device may access a wireless network based on a communication standard, such as WiFi,2G, or 3G, or a combination thereof. In one exemplary embodiment, the communication component 173 receives a broadcast signal or broadcast-related information from an external broadcast management system via a broadcast channel. In one exemplary embodiment, the communication component 173 also includes a Near Field Communication (NFC) module to facilitate short range communications. For example, the NFC module may be implemented based on Radio Frequency Identification (RFID) technology, infrared data association (IrDA) technology, ultra Wideband (UWB) technology, bluetooth (BT) technology, and other technologies.
A power supply assembly 174 provides power to the various components of the electronic device. Power components 174 may include a power management system, one or more power supplies, and other components associated with generating, managing, and distributing power for electronic devices.
The audio component 175 is configured to output and/or input audio signals. For example, the audio component 175 includes a Microphone (MIC) configured to receive external audio signals when the electronic device is in an operational mode, such as a call mode, a recording mode, and a voice recognition mode. The received audio signals may be further stored in the memory 171 or transmitted via the communication component 173. In some embodiments, audio component 175 further comprises a speaker for outputting audio signals.
The display 176 includes a screen, which may include a Liquid Crystal Display (LCD) and a Touch Panel (TP). If the screen includes a touch panel, the screen may be implemented as a touch screen to receive input signals from a user. The touch panel includes one or more touch sensors to sense touches, swipes, and gestures on the touch panel. The touch sensor may sense not only the boundary of a touch or sliding action, but also the duration and pressure associated with the touch or sliding operation.
Examples fourteen
The foregoing describes the overall architecture of a transaction message processing apparatus, where the functions of the apparatus may be implemented by an electronic device, as shown in fig. 18, which is a schematic structural diagram of the electronic device according to an embodiment of the present invention, and specifically includes: a memory 181 and a processor 182.
A memory 181 for storing a program.
In addition to the programs described above, the memory 181 may also be configured to store various other data to support operations on the electronic device. Examples of such data include instructions for any application or method operating on the electronic device, contact data, phonebook data, messages, pictures, videos, and the like.
The memory 181 may be implemented by any type of volatile or nonvolatile memory device or combination thereof such as Static Random Access Memory (SRAM), electrically Erasable Programmable Read Only Memory (EEPROM), erasable Programmable Read Only Memory (EPROM), programmable Read Only Memory (PROM), read Only Memory (ROM), magnetic memory, flash memory, magnetic or optical disk.
A processor 182 coupled to the memory 181 for executing programs in the memory 181 for:
according to the request sent by the application for starting the global transaction, returning the transaction ID of the global transaction and the ID of the included message branch to the application;
Responding to the information sending result reported by the application and the indication of associating the information sending result with the branch ID of the information branch, and executing association operation; the message sending result is obtained after the application sends the preparation message related to the global transaction to the message middleware;
and receiving a request sent by the application for submitting or rolling back the global transaction, and taking the request as a basis for subsequently issuing an indication for correspondingly submitting or rolling back each transaction branch and each message branch contained in the global transaction.
The specific processing operations described above have been described in detail in the previous embodiments, and are not repeated here.
Further, as shown in fig. 18, the electronic device may further include: communication component 183, power component 184, audio component 185, display 186, and other components. Only some of the components are schematically shown in fig. 18, which does not mean that the electronic device only comprises the components shown in fig. 18.
The communication component 183 is configured to facilitate communication between the electronic device and other devices, either wired or wireless. The electronic device may access a wireless network based on a communication standard, such as WiFi,2G, or 3G, or a combination thereof. In one exemplary embodiment, the communication component 183 receives broadcast signals or broadcast related information from an external broadcast management system via a broadcast channel. In one exemplary embodiment, the communication component 183 also includes a Near Field Communication (NFC) module to facilitate short range communications. For example, the NFC module may be implemented based on Radio Frequency Identification (RFID) technology, infrared data association (IrDA) technology, ultra Wideband (UWB) technology, bluetooth (BT) technology, and other technologies.
A power supply assembly 184 provides power to the various components of the electronic device. The power components 184 may include a power management system, one or more power supplies, and other components associated with generating, managing, and distributing power for electronic devices.
The audio component 185 is configured to output and/or input audio signals. For example, the audio component 185 includes a Microphone (MIC) configured to receive external audio signals when the electronic device is in an operational mode, such as a call mode, a recording mode, and a voice recognition mode. The received audio signals may be further stored in the memory 181 or transmitted via the communication component 183. In some embodiments, audio assembly 185 further includes a speaker for outputting audio signals.
The display 186 includes a screen, which may include a Liquid Crystal Display (LCD) and a Touch Panel (TP). If the screen includes a touch panel, the screen may be implemented as a touch screen to receive input signals from a user. The touch panel includes one or more touch sensors to sense touches, swipes, and gestures on the touch panel. The touch sensor may sense not only the boundary of a touch or sliding action, but also the duration and pressure associated with the touch or sliding operation.
Example fifteen
The foregoing describes the overall architecture of a transaction message processing apparatus, where the functions of the apparatus may be implemented by an electronic device, as shown in fig. 19, which is a schematic structural diagram of the electronic device according to an embodiment of the present invention, and specifically includes: a memory 191 and a processor 192.
A memory 191 for storing programs.
In addition to the programs described above, the memory 191 may also be configured to store various other data to support operations on the electronic device. Examples of such data include instructions for any application or method operating on the electronic device, contact data, phonebook data, messages, pictures, videos, and the like.
The memory 191 may be implemented by any type of volatile or non-volatile memory device or combination of volatile or non-volatile memory devices, such as Static Random Access Memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic or optical disk.
A processor 192 coupled to the memory 191 for executing the programs in the memory 191 for:
receiving a commit indication of a message branch sent by a transaction coordinator, wherein the commit indication comprises a message sending result of the message branch to be committed;
According to the message sending result of the message branch to be submitted, submitting a preparation message corresponding to the message sending result to the message middleware, and feeding back the submitted successful message to the transaction coordinator;
receiving a commit indication of a transaction branch sent by a transaction coordinator;
and submitting each transaction branch contained in the global transaction respectively, and feeding back a successful commit message to the transaction coordinator.
The specific processing operations described above have been described in detail in the previous embodiments, and are not repeated here.
Further, as shown in fig. 19, the electronic device may further include: communication component 193, power component 194, audio component 195, display 196, and other components. Only some of the components are schematically shown in fig. 19, which does not mean that the electronic device only comprises the components shown in fig. 19.
The communication component 193 is configured to facilitate communication between the electronic device and other devices, either wired or wireless. The electronic device may access a wireless network based on a communication standard, such as WiFi,2G, or 3G, or a combination thereof. In one exemplary embodiment, the communication component 193 receives broadcast signals or broadcast related information from an external broadcast management system via a broadcast channel. In one exemplary embodiment, the communications component 193 further includes a Near Field Communication (NFC) module to facilitate short range communications. For example, the NFC module may be implemented based on Radio Frequency Identification (RFID) technology, infrared data association (IrDA) technology, ultra Wideband (UWB) technology, bluetooth (BT) technology, and other technologies.
A power supply component 194 provides power to the various components of the electronic device. Power components 194 may include a power management system, one or more power sources, and other components associated with generating, managing, and distributing power for electronic devices.
The audio component 195 is configured to output and/or input audio signals. For example, the audio component 195 includes a Microphone (MIC) configured to receive external audio signals when the electronic device is in an operational mode, such as a call mode, a recording mode, and a voice recognition mode. The received audio signals may be further stored in memory 191 or transmitted via a communications component 193. In some embodiments, the audio component 195 further comprises a speaker for outputting audio signals.
The display 196 includes a screen, which may include a Liquid Crystal Display (LCD) and a Touch Panel (TP). If the screen includes a touch panel, the screen may be implemented as a touch screen to receive input signals from a user. The touch panel includes one or more touch sensors to sense touches, swipes, and gestures on the touch panel. The touch sensor may sense not only the boundary of a touch or sliding action, but also the duration and pressure associated with the touch or sliding operation.
Examples sixteen
The foregoing describes the overall architecture of a transaction message processing apparatus, where the functions of the apparatus may be implemented by an electronic device, as shown in fig. 20, which is a schematic structural diagram of the electronic device according to an embodiment of the present invention, and specifically includes: a memory 201 and a processor 202.
A memory 201 for storing a program.
In addition to the programs described above, the memory 201 may also be configured to store various other data to support operations on the electronic device. Examples of such data include instructions for any application or method operating on the electronic device, contact data, phonebook data, messages, pictures, videos, and the like.
The memory 201 may be implemented by any type or combination of volatile or nonvolatile memory devices such as Static Random Access Memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic or optical disk.
A processor 202 coupled to the memory 201 for executing programs in the memory 201 for:
transmitting a submitting indication of the message branch to the application, wherein the submitting indication comprises a message transmitting result of the message branch to be submitted;
Responsive to a message fed back by the application that commit for the message branch was successful, sending to the application a commit indication for the transaction branch contained by the global transaction;
and responding to the message fed back by the application that the commit of the transaction branch is successful, and sending the message that the commit of the global transaction is successful to the application.
The specific processing operations described above have been described in detail in the previous embodiments, and are not repeated here.
Further, as shown in fig. 20, the electronic device may further include: communication component 203, power component 204, audio component 205, display 206, and other components. Only some of the components are schematically shown in fig. 20, which does not mean that the electronic device only comprises the components shown in fig. 20.
The communication component 203 is configured to facilitate communication between the electronic device and other devices in a wired or wireless manner. The electronic device may access a wireless network based on a communication standard, such as WiFi,2G, or 3G, or a combination thereof. In one exemplary embodiment, the communication component 203 receives broadcast signals or broadcast related information from an external broadcast management system via a broadcast channel. In one exemplary embodiment, the communication component 203 further includes a Near Field Communication (NFC) module to facilitate short range communications. For example, the NFC module may be implemented based on Radio Frequency Identification (RFID) technology, infrared data association (IrDA) technology, ultra Wideband (UWB) technology, bluetooth (BT) technology, and other technologies.
A power supply assembly 204 provides power to the various components of the electronic device. The power supply components 204 can include a power management system, one or more power supplies, and other components associated with generating, managing, and distributing power for electronic devices.
The audio component 205 is configured to output and/or input audio signals. For example, the audio component 205 includes a Microphone (MIC) configured to receive external audio signals when the electronic device is in an operational mode, such as a call mode, a recording mode, and a voice recognition mode. The received audio signal may be further stored in the memory 201 or transmitted via the communication component 203. In some embodiments, the audio component 205 further comprises a speaker for outputting audio signals.
The display 206 includes a screen, which may include a Liquid Crystal Display (LCD) and a Touch Panel (TP). If the screen includes a touch panel, the screen may be implemented as a touch screen to receive input signals from a user. The touch panel includes one or more touch sensors to sense touches, swipes, and gestures on the touch panel. The touch sensor may sense not only the boundary of a touch or sliding action, but also the duration and pressure associated with the touch or sliding operation.
Example seventeen
The foregoing describes the overall architecture of a transaction message processing apparatus, where the functions of the apparatus may be implemented by an electronic device, as shown in fig. 21, which is a schematic structural diagram of the electronic device according to an embodiment of the present invention, and specifically includes: a memory 211 and a processor 212.
A memory 211 for storing a program.
In addition to the programs described above, the memory 211 may also be configured to store other various data to support operations on the electronic device. Examples of such data include instructions for any application or method operating on the electronic device, contact data, phonebook data, messages, pictures, videos, and the like.
The memory 211 may be implemented by any type or combination of volatile or non-volatile memory devices, such as Static Random Access Memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic or optical disk.
A processor 212, coupled to the memory 211, for executing the programs in the memory 211 for:
receiving a rollback instruction of a message branch sent by a transaction coordinator, wherein the rollback instruction comprises a message sending result of the message branch to be rolled back;
According to the message sending result of the message branch to be rolled back, rolling back a preparation message corresponding to the message sending result to the message middleware, and feeding back the message which is successfully rolled back to the transaction coordinator;
receiving a rollback instruction of a transaction branch sent by a transaction coordinator;
and respectively rolling back all transaction branches contained in the global transaction, and feeding back a message of successful rolling back to the transaction coordinator.
The specific processing operations described above have been described in detail in the previous embodiments, and are not repeated here.
Further, as shown in fig. 21, the electronic device may further include: communication component 213, power component 214, audio component 215, display 216, and other components. Only some of the components are schematically shown in fig. 21, which does not mean that the electronic device only comprises the components shown in fig. 21.
The communication component 213 is configured to facilitate communication between the electronic device and other devices, either wired or wireless. The electronic device may access a wireless network based on a communication standard, such as WiFi,2G, or 3G, or a combination thereof. In one exemplary embodiment, the communication component 213 receives a broadcast signal or broadcast-related information from an external broadcast management system via a broadcast channel. In one exemplary embodiment, the communication component 213 further includes a Near Field Communication (NFC) module to facilitate short range communications. For example, the NFC module may be implemented based on Radio Frequency Identification (RFID) technology, infrared data association (IrDA) technology, ultra Wideband (UWB) technology, bluetooth (BT) technology, and other technologies.
A power supply assembly 214 provides power to the various components of the electronic device. The power components 214 may include a power management system, one or more power sources, and other components associated with generating, managing, and distributing power for electronic devices.
The audio component 215 is configured to output and/or input audio signals. For example, the audio component 215 includes a Microphone (MIC) configured to receive external audio signals when the electronic device is in an operational mode, such as a call mode, a recording mode, and a voice recognition mode. The received audio signal may be further stored in the memory 211 or transmitted via the communication component 213. In some embodiments, the audio component 215 further includes a speaker for outputting audio signals.
The display 216 includes a screen, which may include a Liquid Crystal Display (LCD) and a Touch Panel (TP). If the screen includes a touch panel, the screen may be implemented as a touch screen to receive input signals from a user. The touch panel includes one or more touch sensors to sense touches, swipes, and gestures on the touch panel. The touch sensor may sense not only the boundary of a touch or sliding action, but also the duration and pressure associated with the touch or sliding operation.
Example eighteen
The foregoing describes the overall architecture of a transaction message processing apparatus, where the functions of the apparatus may be implemented by an electronic device, as shown in fig. 22, which is a schematic structural diagram of the electronic device according to an embodiment of the present invention, and specifically includes: a memory 221 and a processor 222.
A memory 221 for storing a program.
In addition to the programs described above, the memory 221 may also be configured to store other various data to support operations on the electronic device. Examples of such data include instructions for any application or method operating on the electronic device, contact data, phonebook data, messages, pictures, videos, and the like.
The memory 221 may be implemented by any type of volatile or non-volatile memory device or combination thereof, such as Static Random Access Memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic or optical disk.
A processor 222 coupled to the memory 221 for executing programs in the memory 221 for:
the rollback instruction of the message branch is sent to the application, and the rollback instruction is sent by the transaction coordinator after the global transaction where the message branch is received is requested to rollback, or is sent by the transaction coordinator after the global transaction is judged to be overtime; the rollback instruction comprises the message sending result of the message branch to be rolled back; the message sending result is obtained after the application sends the preparation message related to the global transaction to the message middleware and is sent to the transaction coordinator;
Sending a rollback indication of transaction branches contained in the global transaction to the application;
and after receiving the message that the rollback of each message branch and the transaction branch contained in the global transaction fed back by the application is successful, sending the message that the rollback of the global transaction is successful to the application.
The specific processing operations described above have been described in detail in the previous embodiments, and are not repeated here.
Further, as shown in fig. 22, the electronic device may further include: communication component 223, power supply component 224, audio component 225, display 226, and the like. Only some of the components are schematically shown in fig. 22, which does not mean that the electronic device only comprises the components shown in fig. 22.
The communication component 223 is configured to facilitate communication between the electronic device and other devices, either wired or wireless. The electronic device may access a wireless network based on a communication standard, such as WiFi,2G, or 3G, or a combination thereof. In one exemplary embodiment, the communication component 223 receives broadcast signals or broadcast related information from an external broadcast management system via a broadcast channel. In one exemplary embodiment, the communication component 223 further includes a Near Field Communication (NFC) module to facilitate short range communications. For example, the NFC module may be implemented based on Radio Frequency Identification (RFID) technology, infrared data association (IrDA) technology, ultra Wideband (UWB) technology, bluetooth (BT) technology, and other technologies.
A power supply component 224 provides power to the various components of the electronic device. The power components 224 may include a power management system, one or more power sources, and other components associated with generating, managing, and distributing power for electronic devices.
The audio component 225 is configured to output and/or input audio signals. For example, the audio component 225 includes a Microphone (MIC) configured to receive external audio signals when the electronic device is in an operational mode, such as a call mode, a recording mode, and a voice recognition mode. The received audio signals may be further stored in the memory 221 or transmitted via the communication component 223. In some embodiments, audio component 225 further includes a speaker for outputting audio signals.
The display 226 includes a screen, which may include a Liquid Crystal Display (LCD) and a Touch Panel (TP). If the screen includes a touch panel, the screen may be implemented as a touch screen to receive input signals from a user. The touch panel includes one or more touch sensors to sense touches, swipes, and gestures on the touch panel. The touch sensor may sense not only the boundary of a touch or sliding action, but also the duration and pressure associated with the touch or sliding operation.
Those of ordinary skill in the art will appreciate that: all or part of the steps for implementing the method embodiments described above may be performed by hardware associated with program instructions. The foregoing program may be stored in a computer readable storage medium. The program, when executed, performs steps including the method embodiments described above; and the aforementioned storage medium includes: various media that can store program code, such as ROM, RAM, magnetic or optical disks.
Finally, it should be noted that: the above embodiments are only for illustrating the technical solution of the present application, and not for limiting the same; although the present application has been described in detail with reference to the foregoing embodiments, it should be understood by those of ordinary skill in the art that: the technical scheme described in the foregoing embodiments can be modified or some or all of the technical features thereof can be replaced by equivalents; such modifications and substitutions do not depart from the spirit of the corresponding technical solutions from the scope of the technical solutions of the embodiments of the present application.

Claims (30)

1. A method of processing a transaction message, comprising:
sending a request for starting a global transaction to a transaction coordinator, and acquiring a transaction ID of the global transaction and an ID of a contained message branch;
Sending a preparation message related to the global transaction to a message middleware, and reporting a message sending result received from the message middleware to the transaction coordinator to indicate that the message sending result is associated with a branch ID of the message branch;
executing each transaction branch contained in the global transaction;
sending a request to commit or rollback the global transaction to the transaction coordinator to commit or rollback each transaction branch and message branch contained in the global transaction according to the indication returned by the transaction coordinator,
the method is characterized in that the step of sending a request for starting the global transaction to the transaction coordinator and the step of obtaining the transaction ID of the global transaction and the ID of the included message branch comprises the following steps:
a request for starting a current global transaction is sent to a transaction coordinator, and a transaction ID corresponding to the current global transaction is obtained from the transaction coordinator;
and sending a request for registering the message branch to the transaction coordinator according to the transaction ID corresponding to the global transaction, and acquiring the branch ID of the message branch contained in the global transaction from the transaction coordinator.
2. The method of claim 1, wherein said committing or rolling back a message branch contained by the global transaction comprises:
Submitting or rolling back the provisioning message to the message middleware.
3. The method of claim 1, wherein reporting the message transmission results received from the message middleware to the transaction coordinator comprises:
and converting the information of the message sending result received from the message middleware into a json character string and reporting the json character string to the transaction coordinator.
4. A method of processing a transaction message, comprising:
returning the transaction ID of the global transaction and the ID of the included message branch to the application according to the request sent by the application and used for starting the global transaction;
performing association operation in response to a message sending result reported by the application and an indication of associating the message sending result with a branch ID of the message branch; the message sending result is obtained after the application sends a preparation message related to the global transaction to a message middleware;
receiving a request sent by an application for submitting or rolling back a global transaction, taking the request as a basis for subsequently issuing an indication for carrying out corresponding submission or rolling back on each transaction branch and each message branch contained in the global transaction,
the method is characterized in that the step of returning the transaction ID of the global transaction and the ID of the contained information branch to the application according to the request sent by the application and used for starting the global transaction comprises the following steps:
Returning a transaction ID of the current global transaction to an application according to a request sent by the application and used for starting the current global transaction;
responding to the request of the registered message branch sent by the application according to the transaction ID, and returning the branch ID of the message branch contained in the global transaction to the application.
5. A method for processing a transaction message, comprising:
receiving a commit indication of a message branch sent by a transaction coordinator, wherein the commit indication comprises a message sending result of the message branch to be committed, the commit indication of the message branch is sent by the transaction coordinator after receiving that a global transaction where the message branch is located is requested to be committed, and the message sending result is associated with a branch ID of the message branch of the global transaction by the transaction coordinator;
according to the message sending result of the message branch to be submitted, submitting a preparation message corresponding to the message sending result to a message middleware, and feeding back the submitted successful message to the transaction coordinator;
receiving a commit indication of a transaction branch sent by a transaction coordinator, wherein the commit indication of the transaction branch is sent by the transaction coordinator after receiving that a global transaction where the transaction branch is located is requested to be committed;
And submitting each transaction branch contained in the global transaction respectively, and feeding back a successful commit message to the transaction coordinator.
6. The method according to claim 5, wherein the message sending result is obtained after the application sends a preliminary message related to the global transaction to the message middleware, and the preliminary message is sent to the transaction coordinator.
7. A method of processing a transaction message, comprising:
sending a commit indication of a message branch to an application, wherein the commit indication comprises a message sending result of the message branch to be committed, the commit indication of the message branch is sent by the transaction coordinator after receiving that a global transaction where the message branch is located is requested to be committed, and the message sending result is associated with a branch ID of the message branch of the global transaction by the transaction coordinator;
responding to a message fed back by the application that the submission of the message branch is successful, and sending a submission indication of a transaction branch contained in the global transaction to the application;
and responding to the message fed back by the application and successful in submitting the transaction branch, and sending the message successful in submitting the global transaction to the application.
8. The method according to claim 7, wherein the message sending result is obtained after the application sends a preliminary message related to the global transaction to the message middleware, and the preliminary message is sent to the transaction coordinator.
9. A method of processing a transaction message, comprising:
receiving a rollback instruction of a message branch sent by a transaction coordinator, wherein the rollback instruction comprises a message sending result of the message branch to be rolled back, the rollback instruction of the message branch is sent by the transaction coordinator after a global transaction where the message branch is received is requested to be rolled back, or after the transaction coordinator judges that the global transaction is overtime, the message sending result is associated with a branch ID of the message branch of the global transaction by the transaction coordinator;
according to the message sending result of the message branch to be rolled back, rolling back a preparation message corresponding to the message sending result to the message middleware, and feeding back the message which is successfully rolled back to the transaction coordinator;
receiving a rollback instruction of a transaction branch sent by a transaction coordinator;
and respectively rolling back all transaction branches contained in the global transaction, and feeding back a message of successful rolling back to the transaction coordinator.
10. The method according to claim 9, wherein the message sending result is obtained after the application sends a preliminary message related to the global transaction to the message middleware, and the preliminary message is sent to the transaction coordinator.
11. A method for processing a transaction message, comprising:
a rollback instruction of a message branch is sent to an application, wherein the rollback instruction comprises a message sending result of the message branch to be rolled back, the rollback instruction of the message branch is sent by the transaction coordinator after receiving that a global transaction where the message branch is located is requested to be rolled back, or is sent by the transaction coordinator after judging that the global transaction is overtime, and the message sending result is associated with a branch ID of the message branch of the global transaction by the transaction coordinator;
sending a rollback indication of transaction branches contained by the global transaction to the application;
and responding to the message that the rollback of each message branch and the transaction branch contained in the global transaction fed back by the application is successful, and sending the message that the rollback of the global transaction is successful to the application.
12. The method according to claim 11, wherein the message sending result is obtained after the application sends a preliminary message related to the global transaction to the message middleware, and the preliminary message is sent to the transaction coordinator.
13. A transaction message processing apparatus, comprising:
the global transaction request module is used for sending a request for starting a global transaction to the transaction coordinator and acquiring the transaction ID of the global transaction and the ID of the included message branch;
a message branch preparation module, configured to send a preparation message related to the global transaction to a message middleware, and report a message sending result received from the message middleware to the transaction coordinator, so as to instruct that the message sending result is associated with a branch ID of the message branch;
the transaction branch execution module is used for executing each transaction branch contained in the global transaction;
a global transaction reporting module, configured to send a request for submitting or rolling back a global transaction to the transaction coordinator, so as to submit or roll back each transaction branch and each message branch included in the global transaction according to an instruction returned by the transaction coordinator,
wherein the global transaction request module comprises:
the global transaction starting unit is used for sending a request for starting the global transaction to the transaction coordinator and acquiring a transaction ID corresponding to the global transaction from the transaction coordinator;
And the message branch registration unit is used for sending a request for registering the message branch to the transaction coordinator according to the transaction ID corresponding to the global transaction and acquiring the branch ID of the message branch contained in the global transaction from the transaction coordinator.
14. The apparatus of claim 13, wherein said committing or rolling back a message branch contained by the global transaction comprises:
submitting or rolling back the provisioning message to the message middleware.
15. The apparatus of claim 13, wherein the message branch provision module reporting a message transmission result received from the message middleware to the transaction coordinator comprises:
and converting the information of the message sending result received from the message middleware into a json character string and reporting the json character string to the transaction coordinator.
16. A transaction message processing apparatus, comprising:
the global transaction acceptance module is used for returning the transaction ID of the global transaction and the ID of the included message branch to the application according to the request sent by the application and used for starting the global transaction;
a message branch association module, configured to perform an association operation in response to a message sending result reported by the application and an indication that associates the message sending result with a branch ID of the message branch; the message sending result is obtained after the application sends a preparation message related to the global transaction to a message middleware;
A global transaction summarizing module for receiving a request sent by an application for submitting or rolling back a global transaction as a basis for subsequently issuing an instruction for carrying out corresponding submission or rolling back on each transaction branch and each message branch contained in the global transaction,
the global transaction acceptance module is characterized by comprising:
the global transaction acceptance unit is used for returning the transaction ID of the current global transaction to the application according to the request for starting the current global transaction sent by the application;
and the message branch acceptance unit is used for responding to the request of registering the message branch sent by the application according to the transaction ID and returning the branch ID of the message branch contained in the global transaction to the application.
17. A transaction message processing apparatus, comprising:
the system comprises a message submitting and receiving module, a transaction coordinator and a transaction processing module, wherein the message submitting and receiving module is used for receiving a submitting instruction of a message branch sent by the transaction coordinator, the submitting instruction of the message branch comprises a message sending result of the message branch to be submitted, the submitting instruction of the message branch is sent by the transaction coordinator after receiving that a global transaction where the message branch is located is requested to be submitted, and the message sending result is associated with a branch ID of the message branch of the global transaction by the transaction coordinator;
The message submitting processing module is used for submitting the preparation message corresponding to the message sending result to the message middleware according to the message sending result of the message branch to be submitted and feeding back the submitted successful message to the transaction coordinator;
the transaction submitting and receiving module is used for receiving the submitting indication of the transaction branch sent by the transaction coordinator;
a transaction submitting processing module, configured to submit each transaction branch included in the global transaction, and feed back a successful commit message to the transaction coordinator,
the commit indication for the transaction branch is issued by the transaction coordinator upon receipt of a request to commit the global transaction in which the transaction branch resides.
18. The apparatus of claim 17, wherein the message sending result is obtained after an application sends a preliminary message related to the current global transaction to the message middleware and sent to the transaction coordinator.
19. A transaction message processing apparatus, comprising:
the system comprises a message submitting indication module, a transaction coordinator and a message sending module, wherein the message submitting indication module is used for sending a submitting indication of a message branch to an application, the submitting indication of the message branch comprises a message sending result of the message branch to be submitted, the submitting indication of the message branch is sent by the transaction coordinator after receiving that a global transaction where the message branch is located is requested to be submitted, and the message sending result is associated with a branch ID of the message branch of the global transaction by the transaction coordinator;
The transaction commit indication module is used for responding to the message fed back by the application and aiming at successful commit of the message branch, and sending a commit indication of the transaction branch contained in the global transaction to the application;
and the commit success processing module is used for responding to the message fed back by the application and aiming at successful commit of the transaction branch, and sending the message aiming at successful commit of the global transaction to the application.
20. The apparatus of claim 19, wherein the message transmission result is obtained after the application transmits a preliminary message related to the current global transaction to a message middleware and transmitted to the transaction coordinator.
21. A transaction message processing apparatus, comprising:
a message rollback receiving module, configured to receive a rollback indication of a message branch sent by a transaction coordinator, where the rollback indication includes a message sending result of the message branch to be rolled back, where the rollback indication of the message branch is sent by the transaction coordinator after receiving that a global transaction where the message branch is located is requested to be rolled back, or sent by the transaction coordinator after determining that the global transaction is overtime, and the message sending result is associated with a branch ID of the message branch of the global transaction by the transaction coordinator;
The message rollback processing module is used for rollback the preparation message corresponding to the message sending result to the message middleware according to the message sending result of the message branch to be rolled back and feeding back the message which is successfully rolled back to the transaction coordinator;
the transaction rollback receiving module is used for receiving rollback instructions of transaction branches sent by the transaction coordinator;
and the transaction rollback processing module is used for respectively rollback all transaction branches contained in the global transaction and feeding back the information of successful rollback to the transaction coordinator.
22. The apparatus of claim 21, wherein the message sending result is obtained after an application sends a preliminary message related to the current global transaction to the message middleware and sent to the transaction coordinator.
23. A transaction message processing apparatus, comprising:
a message rollback indication module, configured to send a rollback indication of a message branch to an application, where the rollback indication includes a message sending result of the message branch to be rolled back, where the rollback indication of the message branch is sent by a transaction coordinator after receiving that a global transaction where the message branch is located is requested to be rolled back, or sent by the transaction coordinator after determining that the global transaction is overtime, and the message sending result is associated with a branch ID of the message branch of the global transaction by the transaction coordinator;
A transaction rollback indication module, configured to send a rollback indication of a transaction branch included in the global transaction to the application;
and the rollback success processing module is used for responding to the message of rollback success of each message branch and transaction branch contained in the global transaction fed back by the application and sending the message of rollback success for the current global transaction to the application.
24. The apparatus of claim 23, wherein the message sending result is obtained after an application sends a preliminary message related to the current global transaction to the message middleware and sent to the transaction coordinator.
25. An electronic device, comprising:
a memory for storing a program;
a processor coupled to the memory for executing the program for:
sending a request for starting a global transaction to a transaction coordinator, and acquiring a transaction ID of the global transaction and an ID of a contained message branch;
sending a preparation message related to the global transaction to a message middleware, and reporting a message sending result received from the message middleware to the transaction coordinator to indicate that the message sending result is associated with a branch ID of the message branch;
Executing each transaction branch contained in the global transaction;
sending a request to commit or rollback the global transaction to the transaction coordinator to commit or rollback each transaction branch and message branch contained in the global transaction according to the indication returned by the transaction coordinator,
the method is characterized in that the step of sending a request for starting the global transaction to the transaction coordinator and the step of obtaining the transaction ID of the global transaction and the ID of the included message branch comprises the following steps:
a request for starting a current global transaction is sent to a transaction coordinator, and a transaction ID corresponding to the current global transaction is obtained from the transaction coordinator;
and sending a request for registering the message branch to the transaction coordinator according to the transaction ID corresponding to the global transaction, and acquiring the branch ID of the message branch contained in the global transaction from the transaction coordinator.
26. An electronic device, comprising:
a memory for storing a program;
a processor coupled to the memory for executing the program for:
returning the transaction ID of the global transaction and the ID of the included message branch to the application according to the request sent by the application and used for starting the global transaction;
Performing association operation in response to a message sending result reported by the application and an indication of associating the message sending result with a branch ID of the message branch; the message sending result is obtained after the application sends a preparation message related to the global transaction to a message middleware;
receiving a request sent by an application for submitting or rolling back a global transaction, taking the request as a basis for subsequently issuing an indication for carrying out corresponding submission or rolling back on each transaction branch and each message branch contained in the global transaction,
the method is characterized in that the step of returning the transaction ID of the global transaction and the ID of the contained information branch to the application according to the request sent by the application and used for starting the global transaction comprises the following steps:
returning a transaction ID of the current global transaction to an application according to a request sent by the application and used for starting the current global transaction;
responding to the request of the registered message branch sent by the application according to the transaction ID, and returning the branch ID of the message branch contained in the global transaction to the application.
27. An electronic device, comprising:
a memory for storing a program;
A processor coupled to the memory for executing the program for:
receiving a commit indication of a message branch sent by a transaction coordinator, wherein the commit indication comprises a message sending result of the message branch to be committed, the commit indication of the message branch is sent by the transaction coordinator after receiving that a global transaction where the message branch is located is requested to be committed, and the message sending result is associated with a branch ID of the message branch of the global transaction by the transaction coordinator;
according to the message sending result of the message branch to be submitted, submitting a preparation message corresponding to the message sending result to a message middleware, and feeding back the submitted successful message to the transaction coordinator;
receiving a commit indication of a transaction branch sent by a transaction coordinator, wherein the commit indication of the transaction branch is sent by the transaction coordinator after receiving that a global transaction where the transaction branch is located is requested to be committed;
and submitting each transaction branch contained in the global transaction respectively, and feeding back a successful commit message to the transaction coordinator.
28. An electronic device, comprising:
a memory for storing a program;
A processor coupled to the memory for executing the program for:
sending a commit indication of a message branch to an application, wherein the commit indication comprises a message sending result of the message branch to be committed, the commit indication of the message branch is sent by a transaction coordinator after receiving that a global transaction where the message branch is located is requested to be committed, and the message sending result is associated with a branch ID of the message branch of the global transaction by the transaction coordinator;
responding to a message fed back by the application that the submission of the message branch is successful, and sending a submission indication of a transaction branch contained in the global transaction to the application;
and responding to the message fed back by the application and successful in submitting the transaction branch, and sending the message successful in submitting the global transaction to the application.
29. An electronic device, comprising:
a memory for storing a program;
a processor coupled to the memory for executing the program for:
receiving a rollback instruction of a message branch sent by a transaction coordinator, wherein the rollback instruction comprises a message sending result of the message branch to be rolled back, the rollback instruction of the message branch is sent by the transaction coordinator after a global transaction where the message branch is received is requested to be rolled back, or after the transaction coordinator judges that the global transaction is overtime, the message sending result is associated with a branch ID of the message branch of the global transaction by the transaction coordinator;
According to the message sending result of the message branch to be rolled back, rolling back a preparation message corresponding to the message sending result to the message middleware, and feeding back the message which is successfully rolled back to the transaction coordinator;
receiving a rollback instruction of a transaction branch sent by a transaction coordinator;
and respectively rolling back all transaction branches contained in the global transaction, and feeding back a message of successful rolling back to the transaction coordinator.
30. An electronic device, comprising:
a memory for storing a program;
a processor coupled to the memory for executing the program for:
a rollback instruction of a message branch is sent to an application, wherein the rollback instruction comprises a message sending result of the message branch to be rolled back, the rollback instruction of the message branch is sent by a transaction coordinator after receiving that a global transaction where the message branch is located is requested to be rolled back, or is sent by the transaction coordinator after judging that the global transaction is overtime, and the message sending result is associated with a branch ID of the message branch of the global transaction by the transaction coordinator;
sending a rollback indication of transaction branches contained by the global transaction to the application;
And responding to the message that the rollback of each message branch and the transaction branch contained in the global transaction fed back by the application is successful, and sending the message that the rollback of the global transaction is successful to the application.
CN201710972967.XA 2017-10-18 2017-10-18 Transaction message processing method and device and electronic equipment Active CN109684045B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201710972967.XA CN109684045B (en) 2017-10-18 2017-10-18 Transaction message processing method and device and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710972967.XA CN109684045B (en) 2017-10-18 2017-10-18 Transaction message processing method and device and electronic equipment

Publications (2)

Publication Number Publication Date
CN109684045A CN109684045A (en) 2019-04-26
CN109684045B true CN109684045B (en) 2023-04-28

Family

ID=66182959

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710972967.XA Active CN109684045B (en) 2017-10-18 2017-10-18 Transaction message processing method and device and electronic equipment

Country Status (1)

Country Link
CN (1) CN109684045B (en)

Families Citing this family (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110471746B (en) * 2019-08-22 2022-04-19 中国工商银行股份有限公司 Distributed transaction callback method, device and system
CN112995262B (en) * 2019-12-18 2022-06-10 中国移动通信集团浙江有限公司 Distributed transaction submission method, system and computing equipment
CN111259083A (en) * 2020-02-13 2020-06-09 神州数码融信软件有限公司 Distributed transaction processing method and device
CN111679930B (en) * 2020-06-08 2023-06-20 中国银行股份有限公司 Single-point rollback method and system for CICS online transaction
CN113872781A (en) * 2020-06-30 2021-12-31 阿里巴巴集团控股有限公司 Transaction processing method, device, equipment and storage medium
CN113377557B (en) * 2021-07-01 2024-07-02 挂号网(杭州)科技有限公司 Service processing method, system and electronic equipment
CN117112149B (en) * 2023-10-24 2024-02-06 苔花科迈(西安)信息技术有限公司 Mining area mine business process communication method, device, medium and equipment

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106201666A (en) * 2016-06-24 2016-12-07 浪潮软件股份有限公司 Distributed transaction implementation method
CN106255956A (en) * 2014-04-28 2016-12-21 甲骨文国际公司 Public affair identifier is supported to optimize and the system and method for affairs cohesion based on the resource manager instance perception in transaction environment
CN107045454A (en) * 2016-02-06 2017-08-15 华为技术有限公司 Striding course distributed transaction control method and related system

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20040078326A1 (en) * 2000-11-06 2004-04-22 Strydom Johan Lamprecht Theron Data processing system
GB0516399D0 (en) * 2005-08-10 2005-09-14 Ibm Inherited transactions in asynchronous messaging

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106255956A (en) * 2014-04-28 2016-12-21 甲骨文国际公司 Public affair identifier is supported to optimize and the system and method for affairs cohesion based on the resource manager instance perception in transaction environment
CN107045454A (en) * 2016-02-06 2017-08-15 华为技术有限公司 Striding course distributed transaction control method and related system
CN106201666A (en) * 2016-06-24 2016-12-07 浪潮软件股份有限公司 Distributed transaction implementation method

Also Published As

Publication number Publication date
CN109684045A (en) 2019-04-26

Similar Documents

Publication Publication Date Title
CN109684045B (en) Transaction message processing method and device and electronic equipment
CN110019443B (en) Non-relational database transaction processing method and device and electronic equipment
KR101936839B1 (en) Method and apparatus for providing screenshot service on terminal device and storage medium and device
CN101924917B (en) Video on demand system and method based on mobile user terminal
CN109412821B (en) Message processing method and device and electronic equipment
CN107797849B (en) Method, device and system for distributed transaction processing
CN108737536B (en) Method, device, equipment and storage medium for realizing block chain system
CN110932873A (en) Group communication method, terminal equipment, server and communication system
CN115114044B (en) Message pushing method, device, equipment and medium
WO2023246638A1 (en) Information processing method and apparatus, wearable device and electronic device
WO2019047737A1 (en) Transaction processing method, apparatus, and system, and electronic device
US9741003B2 (en) Method and system for providing centralized notifications to an administrator
US20180182022A1 (en) Information input method, account information input method and terminal
JP2002169822A (en) Input support device and recording medium with recorded input support program
US10728323B2 (en) Method and apparatus for operating infrastructure layer in cloud computing architecture
US8739166B2 (en) Progress-driven progress information in a service-oriented architecture
KR101144926B1 (en) Financial Service Providing System and Operating Method thereof
EP2469457A1 (en) System and method for improved service oriented architecture
US8495040B2 (en) Systems and methods for providing an automated validity check of transactional data postings
CN112016883A (en) Data approval method, approval data display method and device and electronic equipment
CN111626834A (en) Intelligent tax processing method, device, terminal and medium
CN112181937B (en) Method and device for transferring data
KR102400067B1 (en) Chating server, terminal unit and application server
CN112565473B (en) Access control system and method, electronic device, and computer-readable storage medium
US20230418751A1 (en) Systems and methods for dynamic management of stored cache data based on predictive usage information

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