DOM Tree Synchronization Using Hash Values
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
Current methods for synchronizing content between a server and a browser using DOM trees are inefficient, as they lack accurate identification of updates and confirmation of synchronization, leading to potential discrepancies and difficulties in reverting to previous versions.
Innovation Solution
The use of hash values to represent and compare DOM trees, allowing for accurate identification of updates and synchronization by computing root hash values, which confirms synchronization and enables efficient reverting to previous versions.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Measurement precision
If traditional DOM tree synchronization methods are used, then content can be exchanged between server and browser, but accurate identification of updates and confirmation of synchronization cannot be achieved
Solution Approach 1:
The patent uses hash values as unique identifiers to represent different states of DOM trees. By computing and comparing hash values, the system can accurately identify updates and confirm synchronization between server and browser, resolving the contradiction between measurement precision and reliability.
2Ease of operation
If DOM tree updates are tracked without hash values, then basic synchronization can occur, but discrepancies may arise and reverting to previous versions becomes difficult
Solution Approach 1:
The patent creates hash value copies that represent DOM tree states at different points in time. These hash copies enable easy identification and reverting to previous versions while maintaining synchronization consistency, as the hash values serve as reliable markers for version comparison and restoration.
3Reliability
If comprehensive DOM tree synchronization is implemented, then content consistency is maintained, but computational overhead increases
Solution Approach 1:
The patent extracts only the essential identifying feature of the DOM tree into a hash value, rather than synchronizing and comparing entire DOM tree structures. This extraction approach maintains high synchronization accuracy while significantly reducing computational overhead, as hash computation is much more efficient than full tree comparison.
Data Source
AI summary
A system synchronizes a server-side DOM tree and a browser-side DOM tree with one another. Server may receive from a browser, a hash value of the browser-side DOM tree, and a server-side update instruction for applying a first server-side update to the server-side DOM tree to synchronize with a first browser-side update by the browser to the browser-side DOM tree. The server may identify the server-side DOM tree based on the hash value. The server may execute upon the server-side DOM tree, the first server-side update and a second server-side update that is triggered by the first server-side update. The server may compute a browser-side update instruction for applying a second browser-side update to the browser-side DOM tree to synchronize with the server-side DOM tree. The server may transmit the browser-side update instruction to the browser, and the browser may apply the second browser-side update to the browser-side DOM tree.


