Immutable Data Structure Deduplication via Bottom-Up Reference Analysis

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Immutable data structures lead to redundant copies and increased memory usage due to the need for cloning and serialization, especially in multi-threaded environments and event processing systems where data duplication is common.

Innovation Solution

A bottom-up deduplication approach is implemented, where hierarchically lower data objects are first identified for duplication, and pointers to duplicate objects are replaced with references, using value and reference equality analysis to eliminate redundant copies across the data structure.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Reliability

If immutable data structures are used for safe multi-threaded access, then data safety and thread-concurrency are improved, but memory usage increases due to redundant copies

Engineering Contradiction:
Improvedata safetyVSAvoidmemory usage
Core Design Contradiction:
ReliabilityVSQuantity of substance

Solution Approach 1:

The patent merges multiple redundant copies of identical immutable data objects into a single shared instance. By implementing a deduplication mechanism that identifies and consolidates duplicate objects across the data structure, the system maintains data safety through immutability while significantly reducing memory consumption by eliminating redundant copies.

Inventive Principle:
Principle #5Merging (Combining)

Solution Approach 2:

The patent selectively avoids unnecessary copying of immutable data objects. Instead of creating clones when mutations are applied, the system uses a bottom-up deduplication approach to identify identical objects and replace references to duplicate copies with references to the single shared instance, thereby preventing redundant memory allocation while maintaining the benefits of immutability.

Inventive Principle:
Principle #26Copying

2Adaptability or versatility

If cloning is performed to change immutable data structures, then data mutability is achieved, but memory usage and computing resources increase

Engineering Contradiction:
Improvedata mutabilityVSAvoidmemory usage
Core Design Contradiction:
Adaptability or versatilityVSQuantity of substance

Solution Approach 1:

The patent segments the data structure into mutable and immutable portions. When a mutation is needed, only the specific portion requiring change is cloned, while the rest of the structure continues to share the original immutable data. This selective cloning approach, combined with bottom-up deduplication, minimizes memory usage by avoiding full structure duplication.

Inventive Principle:
Principle #1Segmentation

Solution Approach 2:

The patent applies local quality by making only the necessary parts of the data structure mutable through targeted cloning. Instead of cloning the entire structure, the system identifies specific objects that need modification and creates clones only for those portions, while maintaining shared references to unchanged immutable portions, thereby reducing overall memory consumption.

Inventive Principle:
Principle #3Local quality

3Adaptability or versatility

If serialization and deserialization are applied to data structures, then data sharing is enabled, but reference equality is discarded leading to duplication

Engineering Contradiction:
Improvedata sharingVSAvoiddata duplication
Core Design Contradiction:
Adaptability or versatilityVSQuantity of substance

Solution Approach 1:

The patent implements feedback through the bottom-up deduplication process that continuously identifies and eliminates duplicate objects after serialization and deserialization operations. The system monitors the data structure for redundant copies created during serialization cycles and automatically consolidates them, ensuring that reference equality is restored and duplication is minimized while maintaining data sharing capabilities.

Inventive Principle:
Principle #23Feedback

4Adaptability or versatility

If the same mutation is applied to the same data structure many times, then data transformation is achieved, but many identical copies are created

Engineering Contradiction:
Improvedata transformationVSAvoidcopy creation
Core Design Contradiction:
Adaptability or versatilityVSQuantity of substance

Solution Approach 1:

The patent applies preliminary action by performing bottom-up deduplication before and after mutation operations. This proactive approach identifies and consolidates duplicate objects before they can propagate through multiple transformation cycles, preventing the accumulation of redundant copies even when the same mutation is applied repeatedly to the data structure.

Inventive Principle:
Principle #10Preliminary action

Data Source

PatentUS10649676B1Memory compression for immutable data structures
Publication Date: 2020.05.12 MICROSOFT TECHNOLOGY LICENSING LLC
  • US10649676B1 patent drawing
  • US10649676B1 patent drawing
  • US10649676B1 patent drawing

AI summary

Duplicates of immutable data objects are identified and deduplicated. This is performed by performing a bottom up deduplication, such that objects in hierarchically lower levels of a data structure are deduplicated first. Deduplication identifies duplicates of a particular object through value equality analysis and replaces pointers to duplicate objects and the duplicate objects themselves, with a reference to the particular object. This process is repeated for hierarchically higher data objects, but where the value equality analysis includes, among other things, evaluating the equality of references to hierarchically lower data objects.