HTML Diff via Tag Extraction and Reapplication

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Existing tools for comparing versions of HTML documents struggle to accurately track changes efficiently, as they often require understanding the HTML document object model, making them cumbersome and prone to needing updates with changes in the model.

Innovation Solution

A method that preprocesses HTML files by removing tags to convert them into pure text, allowing for efficient comparison of differences, which are then post-processed with formatting and re-applied tags to illustrate changes inline.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Measurement precision

If existing tools process HTML files with full understanding of the document object model, then they can accurately track changes, but they become cumbersome and require updates when the model changes

Engineering Contradiction:
Improveaccuracy of change trackingVSAvoidcomplexity of processing system
Core Design Contradiction:
Measurement precisionVSDevice complexity

Solution Approach 1:

The patent extracts and removes HTML tags from the markup language files during pre-processing, leaving only the pure text content for comparison. This extraction eliminates the need for the comparison system to understand or process the HTML document object model, while still enabling accurate tracking of textual changes between document versions.

Inventive Principle:
Principle #2Taking out (Extraction)

2Reliability

If existing tools attempt to process HTML files with full model understanding, then they can detect changes, but they operate inefficiently and need frequent updates

Engineering Contradiction:
Improvereliability of change detectionVSAvoidefficiency of comparison operation
Core Design Contradiction:
ReliabilityVSProductivity

Solution Approach 1:

By removing HTML tags and processing only pure text content, the system achieves both high reliability in detecting actual textual changes and high productivity through simpler, faster comparison operations that don't require parsing or understanding of HTML structure.

Inventive Principle:
Principle #2Taking out (Extraction)

Solution Approach 2:

The patent segments the HTML processing into distinct phases: pre-processing (tag removal), comparison (pure text diff), and post-processing (tag reapplication). This segmentation allows each phase to operate independently and efficiently, improving overall productivity while maintaining reliable change detection.

Inventive Principle:
Principle #1Segmentation

3Loss of information

If markup language tags are preserved during comparison, then formatting information is maintained, but the comparison becomes more complex and slower

Engineering Contradiction:
Improvepreservation of formatting informationVSAvoidtime required for comparison
Core Design Contradiction:
Loss of informationVSLoss of time

Solution Approach 1:

The patent separates formatting information (HTML tags) from content comparison by removing tags during pre-processing, performing fast pure text comparison, then reapplying tags during post-processing. This segmentation preserves all formatting information while minimizing comparison time.

Inventive Principle:
Principle #1Segmentation

Solution Approach 2:

The pre-processing step preliminarily removes HTML tags before comparison, preparing pure text for efficient diff operations. This preliminary action eliminates the time cost of parsing and processing tags during the comparison phase, while the tags are preserved and reapplied in the post-processing phase.

Inventive Principle:
Principle #10Preliminary action

Data Source

PatentUS10108591B2Comparing markup language files
Publication Date: 2018.10.23 INTERNATIONAL BUSINESS MACHINE CORPORATION
  • US10108591B2 patent drawing
  • US10108591B2 patent drawing
  • US10108591B2 patent drawing

AI summary

Processing markup language files can include pre-processing an original file and a new file, wherein the original file and the new file are markup language files. Pre-processing includes removing tags from the original file and the new file resulting in a pure text version of the original file and a pure text version of the new file. Using a processor, the pure text version of the original file is compared with the pure text version of the new file to determine differences. The differences are specified in a comparison result. The comparison result is post-processed by applying formatting to the differences and tags from the new file.