Smart Pointer Data Sharing Across Threads

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Existing methods for sharing data between CPU threads in real-time applications like augmented reality and robotics are either computationally expensive due to data duplication or inefficient as they restrict data access to single threads, failing to balance computational capacity and data integrity.

Innovation Solution

Implementing smart pointers that create a reference to original data, allowing duplication and sharing across threads while maintaining data integrity through a counter field that tracks copies, enabling safe deletion and efficient memory management.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Reliability

If data is duplicated to share between threads, then data integrity is improved, but computational cost increases

Engineering Contradiction:
Improvedata integrityVSAvoidcomputational cost
Core Design Contradiction:
ReliabilityVSLoss of energy

Solution Approach 1:

The patent applies copying by creating shallow copies of pointers rather than deep copies of data. When data needs to be shared between threads, the system creates pointer copies that reference the same underlying data object, enabling multiple threads to access the data without duplicating the actual data content in memory.

Inventive Principle:
Principle #26Copying

Solution Approach 2:

The patent introduces a smart pointer class as an intermediary between threads and the actual data. This smart pointer manages data ownership and references, acting as a mediator that allows safe sharing of data across threads while maintaining a single copy of the actual data in memory, thus reducing computational overhead.

Inventive Principle:
Principle #24Intermediary (Mediator)

2Productivity

If data is shared between threads using traditional methods, then computational efficiency is improved, but data integrity deteriorates

Engineering Contradiction:
Improvecomputational efficiencyVSAvoiddata integrity
Core Design Contradiction:
ProductivityVSReliability

Solution Approach 1:

The patent implements feedback through a reference counting mechanism in the smart pointer. Each time a pointer is copied or data is accessed, the reference count is updated. This feedback system allows the system to track how many threads are accessing the data and manage memory allocation accordingly, ensuring data integrity while maintaining efficient sharing.

Inventive Principle:
Principle #23Feedback

Solution Approach 2:

The smart pointer system provides self-service by automatically managing data lifecycle through reference counting. When the reference count reaches zero (indicating no threads are using the data), the system automatically deallocates the memory. This eliminates the need for manual memory management and reduces the risk of data integrity issues.

Inventive Principle:
Principle #25Self-service

3Reliability

If data is duplicated for each thread, then data access safety is improved, but memory usage increases

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

Solution Approach 1:

The patent applies copying at the pointer level rather than the data level. Instead of creating separate data copies for each thread, the system creates multiple pointer instances that reference the same data object in memory. This approach maintains data access safety through controlled reference management while keeping memory usage minimal.

Inventive Principle:
Principle #26Copying

Solution Approach 2:

The patent merges multiple thread-specific data references into a single shared data object. By using smart pointers that manage references to the same underlying data, the system combines what would traditionally be separate data copies into one unified data structure that can be safely accessed by multiple threads.

Inventive Principle:
Principle #5Merging (Combining)

Data Source

PatentUS10761741B1Method and system for managing and sharing data using smart pointers
Publication Date: 2020.09.01 BEIJING BAIDU NETCOM SCI & TECH CO LTD
  • US10761741B1 patent drawing
  • US10761741B1 patent drawing
  • US10761741B1 patent drawing

AI summary

A computer-implemented method and system for managing and sharing data using smart pointers. The computer-implemented method includes obtaining original data and storing the original data in memory. Further, the computer-implemented method includes creating a smart pointer for the original data in a first thread. Furthermore, the computer-implemented method includes duplicating the smart pointer from the first thread to a second thread. Moreover, the computer-implemented method includes share the original data across the first thread and the second thread.