Uniform Random Sample Maintenance Under Arbitrary Insertions and Deletions

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Existing methods for maintaining a uniform random sample in databases struggle with arbitrary insertions and deletions, often requiring expensive base-data accesses and failing to maintain a stable sample size, especially in growing datasets.

Innovation Solution

A computer-implemented method that determines uncompensated deletions and compensates by including items only if the deleted item was in the sample, using a combination of initial Bernoulli sampling and resizing to maintain a bounded sample size without accessing the base dataset, ensuring uniformity and efficiency.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Reliability

If reservoir sampling is used to maintain a random sample in the presence of insertions, then uniform sampling is achieved, but the method cannot handle deletions and the sample size systematically shrinks to zero

Engineering Contradiction:
Improveuniform samplingVSAvoidhandling deletions
Core Design Contradiction:
ReliabilityVSAdaptability or versatility

Solution Approach 1:

The patent applies dynamics by making the sampling fraction dynamic rather than fixed. The sampling fraction adjusts automatically based on the current state of the dataset and sample, allowing the system to adapt to both insertions and deletions while maintaining uniformity. This resolves the contradiction by enabling the system to handle deletions (improving adaptability) while preserving uniform sampling (maintaining reliability).

Inventive Principle:
Principle #15Dynamics

Solution Approach 2:

The patent implements feedback mechanisms where the system continuously monitors the relationship between dataset size and sample size, and adjusts the sampling fraction accordingly. This feedback loop ensures that the sample remains uniform (reliability) while adapting to deletions (versatility), as the sampling fraction is recalibrated based on current conditions rather than following a fixed reservoir sampling protocol.

Inventive Principle:
Principle #23Feedback

2Stability of the object's composition

If the sample size is kept bounded for stable datasets, then memory allocation is predictable, but the sample size should be kept close to the upper bound to maximize statistical precision

Engineering Contradiction:
Improvesample size stabilityVSAvoidstatistical precision
Core Design Contradiction:
Stability of the object's compositionVSMeasurement precision

Solution Approach 1:

The patent applies parameter changes by dynamically adjusting the sampling fraction based on the current dataset size and desired sample bound. This allows the system to maintain sample size stability (keeping it bounded) while maximizing statistical precision (keeping it close to the upper bound) through continuous parameter optimization rather than fixed sampling rates.

Inventive Principle:
Principle #35Parameter changes

3Reliability

If Bernoulli sampling with sampling rate q is used, then uniform sampling is achieved, but the sample size can be as large as the dataset size with no effective upper bound

Engineering Contradiction:
Improveuniform samplingVSAvoidsample size bound
Core Design Contradiction:
ReliabilityVSQuantity of substance

Solution Approach 1:

The patent resolves this contradiction by making the sampling fraction dynamic, adjusting it based on the current dataset size and desired sample bound. This dynamic approach maintains uniform sampling (reliability) while preventing the sample size from growing unbounded (controlling quantity), unlike fixed-rate Bernoulli sampling.

Inventive Principle:
Principle #15Dynamics

4Productivity

If incremental maintenance of synopsis is performed, then cost advantages are achieved by amortizing maintenance costs, but expensive accesses to base data are required

Engineering Contradiction:
Improvemaintenance cost efficiencyVSAvoidbase data access cost
Core Design Contradiction:
ProductivityVSUse of energy by moving object

Solution Approach 1:

The patent extracts the expensive base data access operations from the incremental maintenance process. By using a dynamic sampling fraction that can be computed from metadata rather than requiring direct access to base data, the system achieves cost-efficient incremental maintenance (productivity) while eliminating expensive base data accesses (energy reduction).

Inventive Principle:
Principle #2Taking out (Extraction)

Solution Approach 2:

The patent creates a simplified model of the sampling process that operates on metadata and counters rather than requiring copies or accesses to actual base data. This copying approach maintains the benefits of incremental maintenance while avoiding the cost of base data access.

Inventive Principle:
Principle #26Copying

5Quantity of substance

If a bounded sample is maintained for growing datasets, then memory usage is controlled, but the sample represents an increasingly small fraction of the dataset over time

Engineering Contradiction:
Improvememory usageVSAvoidsampling fraction
Core Design Contradiction:
Quantity of substanceVSLoss of information

Solution Approach 1:

The patent resolves this contradiction by making the sampling fraction dynamic and adaptive. As the dataset grows, the system adjusts the sampling fraction to maintain an appropriate sample-to-dataset ratio, preventing information loss (sampling fraction maintenance) while keeping memory usage controlled through the sample bound parameter.

Inventive Principle:
Principle #15Dynamics

Data Source

PatentUS7827211B2Method for maintaining a sample synopsis under arbitrary insertions and deletions
Publication Date: 2010.11.02 SAP SE
  • US7827211B2 patent drawing
  • US7827211B2 patent drawing
  • US7827211B2 patent drawing

AI summary

A method of incrementally maintaining a stable, bounded, uniform random sample S from a dataset R, in the presence of arbitrary insertions and deletions to the dataset R, and without accesses to the dataset R, comprises a random pairing method in which deletions are uncompensated until compensated by a subsequent insertion (randomly paired to the deletion) by including the insertion's item into S if and only if the uncompensated deletion's item was removed from S (i.e., was in S so that it could be removed). A method for resizing a sample to a new uniform sample of increased size while maintaining a bound on the sample size and balancing cost between dataset accesses and transactions to the dataset is also disclosed. A method for maintaining uniform, bounded samples for a dataset in the presence of growth in size of the dataset is additionally disclosed.