Data storage method, electronic device, and computer non-volatile storage medium
First Claim
1. A data storage method for a key-value storage system, comprising:
- obtaining data, a size of the data, and a data structure type of the data;
allocating a memory block for the data based on the size of the data and a predetermined block size;
storing the data in the allocated memory block, the allocated memory block comprising a block attribute that includes the data and a head comprising management information corresponding to the block attribute, and the management information comprising a first block identifier for an antecedent memory block and a second block identifier for a succeeding memory block; and
linking, based on the data structure type, the allocated memory block to a plurality of memory blocks arranged in a block list structure in response to the data structure type being at least one of a list type or a string type.
1 Assignment
0 Petitions
Accused Products
Abstract
A data storage system may obtain data, a size of the data, and a data structure type of the data. The system may allocate a memory block for the data based on the size of the data and a predetermined block size. The system may store the data in the allocated memory block. The allocated memory block may include a block attribute that includes the data and a head comprising management information corresponding to the block attribute. The management information may include a first block identifier for an antecedent memory block and a second block identifier for a succeeding memory block. The system may link, based on the data structure type, the allocated memory block to a plurality of memory blocks arranged in at least one of a block list structure or a tree structure.
18 Citations
18 Claims
-
1. A data storage method for a key-value storage system, comprising:
-
obtaining data, a size of the data, and a data structure type of the data; allocating a memory block for the data based on the size of the data and a predetermined block size; storing the data in the allocated memory block, the allocated memory block comprising a block attribute that includes the data and a head comprising management information corresponding to the block attribute, and the management information comprising a first block identifier for an antecedent memory block and a second block identifier for a succeeding memory block; and linking, based on the data structure type, the allocated memory block to a plurality of memory blocks arranged in a block list structure in response to the data structure type being at least one of a list type or a string type. - View Dependent Claims (2, 3, 4, 5, 6, 7, 8, 9)
-
-
10. A data storage system, comprising a processor, the processor configured to:
-
obtain data, a size of the data, and a data structure type of the data; allocate a memory block for the data based on the size of the data and a predetermined block size; store the data in the allocated memory block, the allocated memory block comprising a block attribute that includes the data and a head comprising management information corresponding to the block attribute, and the management information comprising a first block identifier for an antecedent memory block and a second block identifier for a succeeding memory block; and link, based on the data structure type, the allocated memory block to a plurality of memory blocks arranged in a block list structure, wherein to link the allocated memory block to the block list structure, the processor is further configured to; associate the allocated memory block with the block list structure in response to the data structure type being at least one of a list type or a string type. - View Dependent Claims (11, 12, 13, 14, 15, 16, 17, 18)
-
Specification