Database Data Type Conversion for Higher Lossless Compression

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Current data storage solutions fail to effectively increase the data compression ratio without compromising data validity, particularly in Internet of Things applications where large amounts of data are generated rapidly, leading to inefficient use of storage space.

Innovation Solution

A method and apparatus that convert data from an initial data type to a target data type with a shorter length, allowing for reduced storage space usage before applying lossless compression, thereby enhancing the compression effect and saving storage resources.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Reliability

If lossless compression is used to compress data, then data validity is preserved, but compression ratio is lower compared to lossy compression

Engineering Contradiction:
Improvedata validityVSAvoidcompression ratio
Core Design Contradiction:
ReliabilityVSQuantity of substance

Solution Approach 1:

The patent applies preliminary action by performing data type conversion before compression. The system converts data from initial data types (e.g., float64, object) to target data types (e.g., float32, integer, string) before applying compression algorithms. This pre-processing step reduces the data size and improves compressibility, allowing lossless compression to achieve better compression ratios while preserving data validity.

Inventive Principle:
Principle #10Preliminary action

Solution Approach 2:

The patent applies parameter changes by modifying data type parameters (precision, format) before compression. Specifically, it changes floating-point precision from 64-bit to 32-bit, converts numeric types to string representations, and adjusts data formats to be more compression-friendly. These parameter changes enable improved compression ratios while maintaining data integrity through lossless compression.

Inventive Principle:
Principle #35Parameter changes

2Reliability

If data is stored in initial data type format, then data validity is maintained, but storage space is larger

Engineering Contradiction:
Improvedata validityVSAvoidstorage space
Core Design Contradiction:
ReliabilityVSVolume of stationary object

Solution Approach 1:

The patent applies parameter changes by converting data type parameters to optimize storage space. It transforms high-precision floating-point numbers (float64) to lower-precision formats (float32), converts numeric types to compact string representations, and adjusts data formats based on value ranges. These parameter changes significantly reduce storage space requirements while preserving data validity through lossless compression.

Inventive Principle:
Principle #35Parameter changes

Solution Approach 2:

The patent applies preliminary action by performing data type conversion before storage. The system pre-processes data by converting it from initial data types to optimized target data types before applying compression and storing in the database. This preliminary conversion reduces the storage footprint while maintaining data integrity.

Inventive Principle:
Principle #10Preliminary action

3Volume of stationary object

If floating-point data is converted to integer data, then storage space is reduced, but data precision may be affected

Engineering Contradiction:
Improvestorage spaceVSAvoiddata precision
Core Design Contradiction:
Volume of stationary objectVSMeasurement precision

Solution Approach 1:

The patent applies parameter changes by intelligently selecting target data types based on the characteristics of the source data. When converting from float64 to float32, it maintains sufficient precision for most applications while halving the storage requirements. For integer conversions, it selects appropriate integer types (int8, int16, int32) based on the value range, thereby reducing storage space while preserving necessary precision.

Inventive Principle:
Principle #35Parameter changes

Solution Approach 2:

The patent applies local quality by applying different conversion strategies to different data fields based on their specific characteristics. Instead of uniformly converting all floating-point data to integers, it evaluates each field's precision requirements and applies the most appropriate target data type locally, optimizing the balance between storage space and precision for each specific case.

Inventive Principle:
Principle #3Local quality

Data Source

PatentUS11705923B2Method and apparatus for storing data, and computer device and storage medium thereof
Publication Date: 2023.07.18 UNIVERS PTE LTD
  • US11705923B2 patent drawing
  • US11705923B2 patent drawing
  • US11705923B2 patent drawing

AI summary

Disclosed are a method and apparatus for storing data. The method includes: acquiring data to be stored; converting the data to be stored from an initial data type to a target data type, a data length corresponding to the target data type being less than that corresponding to the initial data type; and storing the data to be stored of the target data type to a database. In the method according to the present disclosure, a storage space occupied by the data to be stored in the database is greatly reduced. In addition, the method according to the present disclosure is performed prior to lossy or lossless data compression storage of the data to be stored in the related art. That is, on the basis of a compression ratio when the data to be stored is stored in the related art, the present disclosure further improves a compression effect of the data to be stored by reducing the data length when the data to be stored is stored, and further saves storage resources of the database.