Check patentability & draft patents in minutes with Patsnap Eureka AI!

A data storage method and device based on data storage type tvariant

A data storage device and data storage technology, which can be used in database indexing, structured data retrieval, special data processing applications, etc., and can solve problems such as increasing the amount of code

Active Publication Date: 2020-12-29
上海金大师网络科技有限公司
View PDF5 Cites 0 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

Among them, COM is a code library, _VaFiant_t is a data storage type in the code library COM, and boost is another code library, and Variant is a data storage type in the code library boost. The disadvantage is: every time How many boxes must be defined first, and when the number of boxes needs to be changed, it must be redefined, resulting in an increase in the amount of code

Method used

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
View more

Examples

Experimental program
Comparison scheme
Effect test

specific Embodiment 1

[0044] In the field of futures, securities, etc., after calling the transaction interface, the server will respond accordingly and return the response data. The types of these data are inconsistent. When storing data in TVariant, TVariant will improve the efficiency of type access. The reason is that serializable data, if it is an existing data type, will be directly used as a new member. For easy understanding, storing data as a new member can be compared to The data is put into the "box" where the data is stored. If it is not an existing data type, it is first serialized into a string and then stored; then, the different types of data are first uniformly converted into a TVariant data type for storage, and the existing data type corresponds to The variable types of are enumerated exhaustively. In this way, different types of data can be stored in one data container before entering a specific branch for processing.

[0045]After the data is stored in TVariant, how to read ou...

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to View More

PUM

No PUM Login to View More

Abstract

The invention discloses a data storage method and device based on a data storage type TVariant. The method comprises the steps that the type to which to-be-stored data belongs is judged; when the to-be-stored data belongs to a known subdata type, the to-be-stored data is stored according to the known subdata type; when the to-be-stored data belongs to a dynamic subdata type, the to-be-stored datais sequenced as sequenced data, and the sequenced data is stored; occupied space of the data storage type is dynamically adjusted according to the data storage situation, and when there is data needing to be stored, the current length of the data storage type is increased according to the length of the data; the attribute of the occupied space of the storage type is a local variable; the number ofmembers of the data storage type is adjusted, dynamic adjustment is conducted according to the data storage situation, and when there is data needing to be stored, new members are added in the data storage type; the data stored according to the data storage type is uniformly stored in a data container.

Description

technical field [0001] The present invention relates to the field of data storage, in particular to a data storage method based on the data storage type TVariant, which is applicable to the development scenario of C++-based data storage and access. Background technique [0002] When using C++11 for functional development, it is usually necessary to store different types of data in the same data container (std::vector, std::map, std::list, std::set, etc.), and In a usage scenario, under the condition of not caring about the data type, in order to achieve the purpose of "improving development efficiency, improving engineering maintainability, and improving function operation efficiency", unified management and access are carried out. [0003] In the prior art, there are data storage types, but usually only the same type of data can be stored in traditional data storage types. Cups can be placed, and regardless of whether cups are placed, the number of boxes is always 5. [0...

Claims

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to View More

Application Information

Patent Timeline
no application Login to View More
Patent Type & Authority Patents(China)
IPC IPC(8): G06F16/22
CPCG06F16/22
Inventor 吕军亮胡潜王建平
Owner 上海金大师网络科技有限公司
Features
  • R&D
  • Intellectual Property
  • Life Sciences
  • Materials
  • Tech Scout
Why Patsnap Eureka
  • Unparalleled Data Quality
  • Higher Quality Content
  • 60% Fewer Hallucinations
Social media
Patsnap Eureka Blog
Learn More