# US 2017/0286150 A1 · Transaction Processing Method and Apparatus, and Computer System

> Agents: this data is available as JSON from the patentgrep API and MCP server — see https://patentgrep.com/llms.txt

- Number: US 2017/0286150 A1
- Document ID: US20170286150A1
- Status: Published application
- Kind: A1
- Application number: 15/631,585
- Filed: 2017-06-23
- Published: 2017-10-05
- Earliest claimed: 2014-12-24
- Assignees: Huawei Technologies Co., Ltd.
- Applicants: Huawei Technologies Co., Ltd.
- Inventors: Huaqing Wang; Wenlong Huang; Jun Xu
- Web page: https://patentgrep.com/patent/US20170286150A1

## CPC

- G06F 9/466: {Transaction processing}
- G06F 11/1474: in transactions (updating of structured data in databases G06F16/23)
- G06F 9/30: Arrangements for executing machine instructions, e.g. instruction decode (for executing microinstructions G06F9/22)
- G06F 9/54: Interprogram communication
- G06F 11/14: Error detection or correction of the data by redundancy in operations (error detection or correction of the data by redundancy in hardware G06F11/16)
- G06F 11/1471: involving logging of persistent data for recovery
- G06F 11/3636: {by tracing the execution of the program}
- G06F 12/0238: {Memory management in non-volatile memory, e.g. resistive RAM or ferroelectric memory}
- G06F 16/00: Information retrieval; Database structures therefor; File system structures therefor
- G06F 17/00: Digital computing or data processing equipment or methods, specially adapted for specific functions (information retrieval, database structures or file system structures therefor G06F16/00)
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)

## Abstract

A transaction processing method, an apparatus, and a computer system are provided. According to the method, after receiving a transaction processing request, status information of the transaction is recorded in a non-volatile memory, where the transaction processing request carries transaction data of a transaction, where the status information of the transaction includes a transaction status, a transaction identifier, and an address, and where the transaction status is an uncommitted state. The transaction data is written to the non-volatile memory according to the address. Then, the transaction status of the transaction is modified to a committed state according to the transaction identifier. Further, after writing the transaction data to an external memory of the computer system from the non-volatile memory, the transaction status of the transaction is modified to a backup state according to the transaction identifier. A transaction data processing speed can be increased in the foregoing manner.

## Claims

### Claim 1

A transaction processing method, wherein the method is applied in a computer system comprising a non-volatile memory, and wherein the method comprises:
receiving a transaction processing request, wherein the transaction processing request carries transaction data of a transaction;
recording status information of the transaction in the non-volatile memory, wherein the status information of the transaction comprises a transaction status, a transaction identifier, and an address that are each allocated to the transaction according to the transaction processing request, wherein the transaction status is an uncommitted state, and wherein the uncommitted state indicates that not all the transaction data is written to the non-volatile memory;
writing the transaction data to the non-volatile memory according to the address;
modifying the transaction status of the transaction to a committed state according to the transaction identifier, wherein the committed state indicates that all the transaction data of the transaction is written to the non-volatile memory and not all the transaction data is written to an external memory of the computer system;
writing the transaction data to the external memory of the computer system from the non-volatile memory; and
modifying the transaction status of the transaction to a backup state according to the transaction identifier, wherein the backup state indicates that all the transaction data of the transaction is written to the external memory of the computer system.

### Claim 2 (depends on 1)

The method according to claim 1, wherein before modifying the transaction status of the transaction to the committed state according to the transaction identifier, the method further comprises:
determining, according to the status information of the transaction recorded in the non-volatile memory, that the transaction status of the transaction is the uncommitted state when the computer system restarts; and
deleting the transaction data and the status information of the transaction.

### Claim 3 (depends on 1)

The method according to claim 1, wherein after modifying the transaction status of the transaction to the committed state according to the transaction identifier, the method further comprises:
determining, according to the status information of the transaction recorded in the non-volatile memory, that the transaction status of the transaction is the committed state when the computer system restarts; and
writing the transaction data to the external memory of the computer system from the non-volatile memory.

### Claim 4 (depends on 1)

The method according to claim 1, wherein after modifying the transaction status of the transaction to the backup state according to the transaction identifier, the method further comprises deleting the transaction data of the transaction.

### Claim 5

A computer system, comprising:
a non-volatile memory configured to store data; and
a processor coupled to the non-volatile memory and configured to:
receive a transaction processing request, wherein the transaction processing request carries transaction data of a transaction;
record status information of the transaction in the non-volatile memory, wherein the status information of the transaction comprises a transaction status, a transaction identifier, and an address that are each allocated to the transaction according to the transaction processing request, wherein the transaction status is an uncommitted state, and wherein the uncommitted state indicates that not all the transaction data is written to the non-volatile memory;
write the transaction data to the non-volatile memory according to the address;
modify the transaction status of the transaction to a committed state according to the transaction identifier, wherein the committed state indicates that all the transaction data of the transaction is written to the non-volatile memory, and not all the transaction data is written to an external memory of the computer system;
write the transaction data to the external memory of the computer system from the non-volatile memory; and
modify the transaction status of the transaction to a backup state according to the transaction identifier, wherein the backup state indicates that all the transaction data of the transaction is written to the external memory of the computer system.

### Claim 6 (depends on 5)

The computer system according to claim 5, wherein before modifying the transaction status of the transaction to the committed state according to the transaction identifier, the processor is further configured to:
determine, according to the status information of the transaction recorded in the non-volatile memory, that the transaction status of the transaction is the uncommitted state when the computer system restarts; and
delete the transaction data and the status information of the transaction.

### Claim 7 (depends on 5)

The computer system according to claim 5, wherein after modifying the transaction status of the transaction to the committed state according to the transaction identifier, the processor is further configured to:
determine, according to the status information of the transaction recorded in the non-volatile memory, that the transaction status of the transaction is the committed state when the computer system restarts, and write the transaction data to the external memory of the computer system from the non-volatile memory.

### Claim 8 (depends on 5)

The computer system according to claim 5, wherein after modifying the transaction status of the transaction to the backup state according to the transaction identifier, the processor is further configured to delete the transaction data of the transaction.

### Claim 9

A computer program product comprising one or more computer-executable instructions, wherein the one or more computer-executable instructions, when executed on a processor of a computer system, cause the computer system to carry out:
receiving a transaction processing request, wherein the transaction processing request carries transaction data of a transaction;
recording status information of the transaction in the non-volatile memory, wherein the status information of the transaction comprises a transaction status, a transaction identifier, and an address that are allocated to the transaction according to the transaction processing request, wherein the transaction status is an uncommitted state, and wherein the uncommitted state indicates that not all the transaction data is written to the non-volatile memory;
writing the transaction data to the non-volatile memory according to the address;
modifying the transaction status of the transaction to a committed state according to the transaction identifier, wherein the committed state indicates that all the transaction data of the transaction is written to the non-volatile memory and not all the transaction data is written to an external memory of the computer system;
writing the transaction data to the external memory of the computer system from the non-volatile memory; and
modifying the transaction status of the transaction to a backup state according to the transaction identifier, wherein the backup state indicates that all the transaction data of the transaction is written to the external memory of the computer system.

### Claim 10 (depends on 9)

The computer program product according to the claim 9, wherein the computer-executable instructions further cause the computer system to carry out:
determining, according to the status information of the transaction recorded in the non-volatile memory, that the transaction status of the transaction is the uncommitted state when the computer system restarts before the modifying the transaction status of the transaction to the committed state according to the transaction identifier; and
deleting the transaction data and the status information of the transaction.

### Claim 11 (depends on 9)

The computer program product according to the claim 9, wherein the computer-executable instructions further cause the computer system to carry out:
determining, according to the status information of the transaction recorded in the non-volatile memory, that the transaction status of the transaction is the committed state when the computer system restarts after the modifying the transaction status of the transaction to the committed state according to the transaction identifier; and
writing the transaction data to the external memory of the computer system from the non-volatile memory.

### Claim 12 (depends on 9)

The computer program product according to the claim 9, wherein the computer-executable instructions further cause the computer system to carry out deleting the transaction data of the transaction after the modifying the transaction status of the transaction to the backup state according to the transaction identifier.
