A data processing method, performed by a blockchain node, wherein the blockchain node stores a first block file, the first block file stores blocks on a blockchain, each of the blocks stores one or more transaction records, and the method comprises: creating, on the blockchain node, a second block file that is different from the first block file, wherein the second block file stores block heads of all the blocks adjacent to each other according to a sequence of the blocks in the first block file, by maintaining the characteristic of head-to-tail connection on the blockchain by means of hash values for each block in the first block file, detecting a to-be-maintained transaction record in the block according to states of the transaction records in the block or according to a set of transaction records that are not successfully processed; selecting, from a hash tree of the block generated according to the transaction records in the block, nodes used for proving that the to-be-maintained transaction record belongs to the block; constructing a node maintenance tree according to the selected nodes; storing the to-be-maintained transaction record at a corresponding leaf node of the node maintenance tree; and updating the second block file by storing, in an associated manner, a block head of the block and the node maintenance tree storing the to-be-maintained transaction record; and deleting the first block file after the update processing for the each block in the first block file is completed. creating, on the blockchain node, a second block file that is different from the first block file, wherein the second block file stores block heads of all the blocks adjacent to each other according to a sequence of the blocks in the first block file, by maintaining the characteristic of head-to-tail connection on the blockchain by means of hash values for each block in the first block file, detecting a to-be-maintained transaction record in the block according to states of the transaction records in the block or according to a set of transaction records that are not successfully processed; selecting, from a hash tree of the block generated according to the transaction records in the block, nodes used for proving that the to-be-maintained transaction record belongs to the block; constructing a node maintenance tree according to the selected nodes; storing the to-be-maintained transaction record at a corresponding leaf node of the node maintenance tree; and updating the second block file by storing, in an associated manner, a block head of the block and the node maintenance tree storing the to-be-maintained transaction record; and detecting a to-be-maintained transaction record in the block according to states of the transaction records in the block or according to a set of transaction records that are not successfully processed; selecting, from a hash tree of the block generated according to the transaction records in the block, nodes used for proving that the to-be-maintained transaction record belongs to the block; constructing a node maintenance tree according to the selected nodes; storing the to-be-maintained transaction record at a corresponding leaf node of the node maintenance tree; and updating the second block file by storing, in an associated manner, a block head of the block and the node maintenance tree storing the to-be-maintained transaction record; and deleting the first block file after the update processing for the each block in the first block file is completed.