IP Library Granted Patent US 12,038,908
Granted Patent B2
US 12,038,908 · App. 18/246,659 · Granted Jul 16, 2024

Blockchain data storage method, system, device, and readable storage medium

Inventors: Kaizhi Lin (Jiangsu, CN); Zhikai Cai (Jiangsu, CN); Po Hsueh Huang (Jiangsu, CN)
Assignee: INSPUR SUZHOU INTELLIGENT TECHNOLOGY CO., LTD.
G06F16/2365
View Patent ↗
Loading inventors, assignments & file history…
Monitor This Case
Get email alerts when status or documents change.
Order Certified Copies
Most orders are placed with the USPTO same day — all within 24 business hours.
Order via The Patent Place →
Pre-filled with this patent's details
Quick Facts
Patent No.
US 12,038,908
App. No.
18/246,659
Granted
Jul 16, 2024
Kind
B2
Abstract

Provided are a blockchain data storage method, a system, a device, and a readable storage medium. The method includes: obtaining, by a block file system, a target block serial number and target block contents of a target block, the block file system including a directory region and a data region, a size of each cluster in the data region being the same as a block size of blockchain, the directory region storing mapping relationships between block serial numbers and cluster addresses; sequentially allocating a target cluster address to the target block, and recording, in the directory region, a target mapping relationship between the target block serial number and the target cluster address; and sequentially writing the target block contents into the data region according to the target cluster address.

Claims (73)

1. A blockchain data storage method, comprising:

obtaining, by a block file system, a target block serial number and target block contents of a target block, the block file system comprising a directory region and a data region, a size of each cluster in the data region being a same as a block size of blockchain, the directory region storing mapping relationships between block serial numbers and cluster addresses;

sequentially allocating a target cluster address to the target block, and recording, in the directory region, a target mapping relationship between the target block serial number and the target cluster address; and

sequentially writing the target block contents into the data region according to the target cluster address.

2. The blockchain data storage method according to claim 1 , further comprising:

receiving a read request for reading the target block;

searching the directory region for the target cluster address corresponding to the target block serial number;

reading the target block contents from the data region according to the target cluster address; and

outputting the target block contents.

3. The blockchain data storage method according to claim 1 , further comprising:

reading a directory in the directory region, and writing the directory into a cache to obtain a cache directory, wherein

recording, in the directory region, the target mapping relationship between the target block serial number and the target cluster address comprises:

recording, in the cache directory, the target mapping relationship.

4. The blockchain data storage method according to claim 3 , further comprising:

receiving a read request for reading the target block;

searching the cache directory for the target cluster address corresponding to the target block serial number;

reading the target block contents from the data region according to the target cluster address; and

outputting the target block contents.

5. The blockchain data storage method according to claim 1 , further comprising:

reading a directory in the directory region, and copying the directory into a Content Address able Memory (CAM) to obtain a CAM directory, wherein

recording, in the directory region, the target mapping relationship between the target block serial number and the target cluster address comprises:

recording, in the CAM directory, the target mapping relationship.

6. The blockchain data storage method according to claim 5 , further comprising:

receiving a read request for reading the target block;

searching the CAM directory for the target cluster address corresponding to the target block serial number;

reading the target block contents from the data region according to the target cluster address; and

outputting the target block contents.

7. The blockchain data storage method according to claim 1 , sequentially writing the target block contents into the data region comprises:

writing the target block contents into contiguous sectors of a hard disk corresponding to the data region.

8. An electronic device, comprising:

a memory, configured to store a computer program; and

a processor, configured to execute the computer program, and upon execution of the computer program, the processor is configured to:

obtain, through a block file system, a target block serial number and target block contents of a target block, the block file system comprising a directory region and a data region, a size of each cluster in the data region being a same as a block size of blockchain, the directory region storing mapping relationships between block serial numbers and cluster addresses;

sequentially allocate a target cluster address to the target block, and record, in the directory region, a target mapping relationship between the target block serial number and the target cluster address; and

sequentially write the target block contents into the data region according to the target cluster address.

9. A non-transitory computer-readable storage medium, storing a computer program that, when executed by a processor, cause the processor to:

obtain, through a block file system, a target block serial number and target block contents of a target block, the block file system comprising a directory region and a data region, a size of each cluster in the data region being a same as a block size of blockchain, the directory region storing mapping relationships between block serial numbers and cluster addresses;

sequentially allocate a target cluster address to the target block, and record, in the directory region, a target mapping relationship between the target block serial number and the target cluster address; and

sequentially write the target block contents into the data region according to the target cluster address.

10. The electronic device according to claim 8 , the processor is further configured to:

receive a read request for reading the target block;

search the directory region for the target cluster address corresponding to the target block serial number;

read the target block contents from the data region according to the target cluster address; and

output the target block contents.

11. The electronic device according to claim 8 , the processor is further configured to:

read a directory in the directory region, and writing the directory into a cache to obtain a cache directory, wherein

record, in the directory region, the target mapping relationship between the target block serial number and the target cluster address comprises:

record, in the cache directory, the target mapping relationship.

12. The electronic device according to claim 11 , the processor is further configured to:

receive a read request for reading the target block;

search the cache directory for the target cluster address corresponding to the target block serial number;

read the target block contents from the data region according to the target cluster address; and

output the target block contents.

13. The electronic device according to claim 8 , the processor is further configured to:

read a directory in the directory region, and copying the directory into a Content Address able Memory (CAM) to obtain a CAM directory, wherein

record, in the directory region, the target mapping relationship between the target block serial number and the target cluster address comprises:

record, in the CAM directory, the target mapping relationship.

14. The electronic device according to claim 13 , the processor is further configured to:

receive a read request for reading the target block;

search the CAM directory for the target cluster address corresponding to the target block serial number;

read the target block contents from the data region according to the target cluster address; and

output the target block contents.

15. The electronic device according to claim 8 , the processor is further configured to:

write the target block contents into contiguous sectors of a hard disk corresponding to the data region.

16. The non-transitory computer-readable storage medium according to claim 9 , wherein the computer program further cause the processor to:

receive a read request for reading the target block;

search the directory region for the target cluster address corresponding to the target block serial number;

read the target block contents from the data region according to the target cluster address; and

output the target block contents.

17. The blockchain data storage method according to claim 1 , wherein the target block being any one of to-be-stored blocks.

18. The blockchain data storage method according to claim 1 , wherein each target block has a unique target block serial number.

19. The blockchain data storage method according to claim 18 , in the directory region the target block serial number is record as the target cluster index.

20. The blockchain data storage method according to claim 3 , wherein the cache comprises one of: a Content Address able Memory (CAM), a dynamic random access memory (DRAM), a static random access memory (SRAM).

Assignments (2)
LICENSE Recorded Jun 30, 2026
From: IEIT SYSTEMS CO., LTD
To: AIVRES SYSTEMS INC.
Reel/Frame 075857/0939 →
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Jun 4, 2024
From: LIN, KAIZHI; CAI, ZHIKAI; HUANG, PO HSUEH
To: INSPUR SUZHOU INTELLIGENT TECHNOLOGY CO., LTD.
Reel/Frame 067615/0018 →
Priority Claims (1)
CN 202011229981.9 · Nov 6, 2020 · national
Continuity (1)
Related Publication 20240045853A1 · Feb 8, 2024