DOM Tree Comparison for Minimal Content Updates
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
Conventional digital content editing techniques for document object models (DOMs) result in inefficient use of computational and network resources, diminished user experience due to flicker, and functional anomalies caused by large content replacements and unintended loss of event handlers.
Innovation Solution
The system creates a second DOM from the first DOM based on user edits, compares tree structures to identify minimal content editing operations, and applies these operations to update the digital document instead of replacing the entire content, optimizing network and computational efficiency and user experience.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Productivity
If conventional techniques replace the entire digital content within a container when an edit is made, then the edit is applied completely, but network resources and computational resources are wasted due to transmitting and processing large amounts of unchanged content
Solution Approach 1:
The system extracts only the specific digital content that needs to be updated based on comparing DOM tree structures, rather than replacing entire containers. The identification module compares the first DOM tree structure with the second DOM tree structure to identify only the specific content that differs, thereby extracting minimal necessary updates for transmission and application.
Solution Approach 2:
The system segments the digital content update process into identification of specific changed elements, extraction of only those elements, and targeted replacement. This segmentation allows the system to handle updates at the granular level of individual content elements rather than treating entire containers as atomic units.
2Object-affected harmful factors
If conventional techniques pre-hide default digital content using CSS rules to avoid flicker, then user interface flicker is reduced, but user experience deteriorates because large subsections remain hidden for noticeable periods
Solution Approach 1:
The system extracts and transmits only the specific digital content that needs to be updated, rather than pre-loading or hiding large subsections. By identifying the minimal set of changed content elements through DOM tree comparison, the system avoids the need to pre-hide large areas of content, thereby eliminating flicker while maintaining user experience.
3Productivity
If conventional techniques replace digital content entirely, then the updated content is applied, but functional side effects occur due to unintended loss of event handlers
Solution Approach 1:
The system extracts and identifies only the specific digital content elements that have actually changed by comparing DOM tree structures. This precise extraction ensures that only the necessary content is replaced, while all other content including its associated event handlers remains intact, thereby preventing functional side effects.
Solution Approach 2:
The system segments the content replacement process to operate at the level of individual changed elements rather than entire containers. This granular segmentation allows event handlers on unchanged elements to be preserved while still applying necessary updates to specific changed content.
Data Source
AI summary
Digital content editing techniques are described that support edits to a document object model (DOM) of a digital document. In one example, a user input is received by a system to edit a first document object model (DOM) and thereby create a second DOM, e.g., to change a name of a tag, a name of an attribute, a value of an attribute, and/or digital content specified by the DOM. The system then compares tree structures of the first and second DOMs to each other in order to identify content editing operations that, when applied to the first DOM, cause the first DOM to match the second DOM, e.g., have matching tree structures and attributes. The identified content editing operations are then used to update the digital document by including these operations as stored along with the first DOM.


