Schema Comparison via Cross-Validation Sampling

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Existing schema comparison methods fail to accurately determine equivalence or hierarchy between XML and JSON schemas due to their structural differences and the limitations of traditional code diff tools, which often misinterpret minor changes as significant or vice versa.

Innovation Solution

A system generates sample documents based on both schemas, validating them against each other to systematically determine equivalence, superset, or unrelated status, focusing on boundary conditions and using a schema comparer tool to analyze validation results and declare the relationship between the schemas.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Measurement precision

If traditional code diff tools are used to compare schemas, then the comparison process is simple and fast, but the accuracy of determining schema equivalence or hierarchy is poor due to misinterpretation of structural differences

Engineering Contradiction:
Improveaccuracy of schema equivalence determinationVSAvoidcomplexity of comparison method
Core Design Contradiction:
Measurement precisionVSDevice complexity

Solution Approach 1:

The patent creates sample documents by copying and instantiating schema definitions, then validates these samples against both schemas to determine their relationship. This indirect comparison through shared samples resolves the accuracy issue without requiring complex direct schema analysis.

Inventive Principle:
Principle #26Copying

Solution Approach 2:

The patent introduces sample documents as an intermediary element between the two schemas being compared. By validating samples against both schemas and analyzing the validation results, the system determines schema relationships without directly comparing the schemas themselves, thereby improving accuracy.

Inventive Principle:
Principle #24Intermediary (Mediator)

2Reliability

If schemas are compared using traditional methods, then the process is quick, but false positives and negatives occur due to inability to properly handle structural differences between XML and JSON schemas

Engineering Contradiction:
Improvereliability of schema comparison resultsVSAvoidtime required for schema comparison
Core Design Contradiction:
ReliabilityVSLoss of time

Solution Approach 1:

The patent performs preliminary actions by generating sample documents before validation. By pre-instantiating samples based on schema definitions and preparing validation test cases in advance, the system ensures reliable comparison results while maintaining reasonable comparison time through systematic preparation.

Inventive Principle:
Principle #10Preliminary action

3Measurement precision

If boundary conditions are thoroughly tested to ensure accurate schema equivalence determination, then the reliability of comparison results improves, but the number of validation tests and processing time increases

Engineering Contradiction:
Improveaccuracy of schema equivalence determinationVSAvoidspeed of schema comparison
Core Design Contradiction:
Measurement precisionVSProductivity

Solution Approach 1:

The patent applies local quality by focusing validation tests on boundary conditions and critical schema elements rather than uniformly testing all possible document scenarios. This targeted approach ensures accurate equivalence determination for the most important cases while reducing overall testing time and improving productivity.

Inventive Principle:
Principle #3Local quality

Data Source

PatentUS11086829B2Comparing schema definitions using sampling
Publication Date: 2021.08.10 INTERNATIONAL BUSINESS MACHINE CORPORATION
  • US11086829B2 patent drawing
  • US11086829B2 patent drawing
  • US11086829B2 patent drawing

AI summary

An approach is provided in which the approach generates a first set of sample documents based on a first schema and generates a second set of sample documents based on a second schema. The approach determines a set of validation results by comparing the first set of sample documents against the second schema and comparing the second set of sample documents against the first schema. The approach evaluates the set of validation results and declares a type of equivalence between the first schema and the second schema accordingly.