Patent ID: 11947524
Assignee: TENCENT TECHNOLOGY (SHENZHEN) COMPANY LIMITED
Field: Computer technology (Electrical engineering)
Classification: CPC G | IPC G

Claim 14:
15. A transaction processing method comprising:
obtaining, when read and write operations of a target transaction are executed, at least one concurrent transaction of the target transaction, the at least one concurrent transaction and the target transaction performing read and write operations on a same data item during transaction execution;
determining whether a data anomaly exists between the at least one concurrent transaction and the target transaction based on read-write sets of the at least one concurrent transaction and the target transaction by:
obtaining, for an Lth concurrent transaction in the at least one concurrent transaction, a target detection result of the Lth concurrent transaction and the target transaction based on read-write sets of the Lth concurrent transaction and the target transaction by:
obtaining a first set, a second set, a third set, and a fourth set;
wherein when the third set is not an empty set, the target detection result of the target transaction and the Lth concurrent transaction is based on the first set and the third set, and wherein when the third set is an empty set and the first set, the second set, or the third set is not an empty set, the target detection result of the transaction and the Lth concurrent transaction is obtained based on the first set, the second set, and the fourth set by:
obtaining a Boolean type of the Lth concurrent transaction and a Boolean type of the target transaction based on the first set, the second set, and the fourth set, wherein the Boolean types represent a vertical position relationship of dynamic edges of corresponding transactions in a data state matrix, and wherein initial values of the Boolean types are false;
determining, when the Boolean type of the Lth concurrent transaction and the Boolean type of the target transaction are both true, that the target detection result indicates that the data anomaly exists; and
determining, when the Boolean type of the target transaction or the Boolean type of the Lth concurrent transaction is false, that the target detection result indicates that the data anomaly does not exist;

obtaining, when the target detection result indicates that the data anomaly does not exist, the target detection result of an (L+1)th concurrent transaction of the at least one concurrent transaction, until the target detection results of the at least one concurrent transaction all indicate that the data anomaly does not exist, indicating that the data anomaly does not exist between the at least one concurrent transaction and the target transaction; and

merging, when the data anomaly does not exist, the read-write sets of the at least one concurrent transaction and the target transaction to commit the target transaction.