Hierarchical Data Storage Method Using Type-Based Memory Allocation
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
Conventional data storage methods based on key values lead to low data storage efficiency due to the need for numerous key values to distinguish different data, resulting in data scattering.
Innovation Solution
A data storage method that involves acquiring to-be-serialized data and a description file, allocating memory space to data items based on their type, finding a matched data item, and storing the data value within the allocated memory space, while optionally encrypting and transmitting the data, thereby improving storage efficiency.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Productivity
If conventional key-value based data storage method is used, then data can be stored with simple structure, but data storage efficiency is low due to data scattering
Solution Approach 1:
The patent segments data into hierarchical levels (data elements, data items, fields) and assigns each segment a unique identifier. This segmentation allows data to be organized in a structured manner without requiring numerous key-values, thereby improving storage efficiency while maintaining manageable complexity through systematic segmentation.
Solution Approach 2:
The patent introduces a hierarchical dimension to data storage by organizing data into multiple levels (elements → items, items → fields). This dimensional transformation eliminates the need for flat key-value pairs, reducing data scattering and improving storage efficiency through multi-level organization.
2Manufacturing precision
If memory space is allocated according to data type with type checking, then data storage precision is improved, but storage process complexity increases
Solution Approach 1:
The patent performs preliminary actions by pre-defining data types and allocating memory spaces according to data types before actual data storage. Type checking and memory allocation are performed in advance, ensuring data storage precision while reducing the complexity of the actual storage process through preparatory organization.
Solution Approach 2:
The patent changes the parameter of memory allocation from dynamic key-value based allocation to fixed type-based allocation. By changing the allocation parameter to data type categories, the system achieves precise memory management and data storage precision while simplifying the overall process through standardized parameter-based allocation.
Data Source
AI summary
The present application discloses a data storage method and apparatus. A specific implementation of the method includes: acquiring to-be-serialized data and a description file related to the to-be-serialized data, wherein the to-be-serialized data includes a data name and a data value, and the description file includes a file identifier and at least one data element, the data element includes at least one data item, and the data item includes a data item name and a data type; allocating a memory space to the data item according to the data type; finding, according to a preset matching relationship between the to-be-serialized data and the data item, a data item matched with the to-be-serialized data; and storing the data value into the memory space of the found data item as a data item value of the found data item. This implementation improves the data storage efficiency.


