摘要 |
Method and device for data storage are provided. The data storage method includes: generating a custom data structure which includes at least a first node as a root node, herein, each node of the custom data structure includes a first module for storing type identifiers and values of data, and a second module for storing a mapping list that stores mapping relationship between identifiers of child nodes of the each node and the child nodes; when receiving data every time, determining a storage location and a type of the received data; if the received data is stored in the first node of the custom data structure, storing the type and a value of the received data in a first module of the first node; and if the received data is stored in a second node of the custom data structure, storing the type and the value of the received data in a first module of the second node. |