TCC-based transaction processing method and device, electronic equipment and storage medium

In TCC's transaction processing, independent transactions are enabled and amount reserved for each transaction transaction request in the Try stage, the transaction failure problem caused by insufficient account balance is solved, the processing risk is reduced and transaction independence is ensured.

CN119722312AActive Publication Date: 2025-03-28BEIJING PACTERA JINXIN TECH LTD
7 Cites 0 Cited by

Patent Information

Application Number
CN202411774412.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-04
Publication Date
2025-03-28
Estimated Expiration
2044-12-04

AI Technical Summary

Technical Problem

Under the microservice architecture, when TCC's transaction mechanism handles batch transactions, it is easy to cause transaction failure due to insufficient account balance, and then restore to the state before the transaction in the Cancel stage, resulting in processing risks.

Method used

In the Try stage of TCC, independent transactions are enabled for each transaction transaction request under the same account identification, and determine whether the account balance meets the transaction amount. If it is satisfied, the amount reserved lock will be performed, and the reserved successful transaction request is used as the target transaction transaction request, and the response is determined and the account balance is updated in the Confirm stage.

Benefits of technology

By starting independent transactions for each transaction transaction request in the Try stage and making accurate amount reservations, the state returned to the transaction before the transaction is avoided in the Cancel stage, the risk of transaction processing is reduced, and the independence of transaction transaction requests is ensured.

✦ Generated by Eureka AI based on patent content.
Patent Text Reader

Abstract

The invention provides a transaction processing method and device based on TCC, electronic equipment and a storage medium, and the method comprises the steps: obtaining at least two transaction transaction requests which are sent by a client side in parallel and are under the same account identifier; starting an independent transaction for each transaction transaction request; judging whether the account balance meets the transaction amount of the transaction transaction request of which the independent transaction is opened, and if the transaction transaction request of which the account balance meets the transaction amount exists, performing amount reservation locking of a target transaction amount on the account balance, taking the transaction transaction request of which the amount reservation locking is completed as a target transaction transaction request; according to the method and the device, the target transaction transaction request is determined to respond, and the account balance of the corresponding account is updated, so that independent transactions are respectively opened for the transaction transaction requests under the same account identifier, the condition of transaction failure triggered by insufficient account balance in the subsequent process is considered, and the transaction amount is accurately reserved for the transaction transaction requests.
Need to check novelty before this filing date? Find Prior Art