Webpage Element Position Detection via DOM Tree Traversal
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
Existing methods are inefficient in automatically detecting the positions of webpage elements, such as payment links, within a webpage, as they rely on manual rendering and checking, which is time-consuming and prone to errors due to layout rules and formatting issues.
Innovation Solution
A position detection system that analyzes the programming code of a webpage to identify and determine the relative positions of webpage elements by parsing HTML tags, grouping related elements, and applying CSS rules to simulate the rendering process, allowing for automated detection and comparison against predetermined positions.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Measurement precision
If manual rendering and checking methods are used to detect webpage element positions, then detection accuracy can be maintained, but the process becomes time-consuming and inefficient
Solution Approach 1:
The patent creates a virtual copy of the webpage rendering environment through a simulated browser that reproduces the visual layout and positioning of webpage elements. This virtual copy allows automated analysis of element positions without requiring manual rendering and checking, thereby maintaining detection accuracy while significantly reducing the time required for position detection.
Solution Approach 2:
The patent replaces the manual mechanical process of rendering and checking webpage elements with an automated computational system. The simulated browser and code analysis tools automatically extract and analyze element positions from the webpage's DOM structure and CSS styles, substituting human manual operations with automated algorithms that are both faster and equally accurate.
2Productivity
If automated code analysis is implemented to detect webpage element positions, then detection efficiency is improved, but the system complexity increases
Solution Approach 1:
The patent divides the automated detection system into distinct functional modules: a simulated browser for rendering, a code analysis tool for parsing HTML and CSS, and a position determination module for calculating element locations. This segmentation allows each component to be independently developed, tested, and maintained, reducing overall system complexity while maintaining high detection efficiency.
Solution Approach 2:
The patent introduces a DOM tree structure as an intermediary representation between the webpage source code and the final position analysis. The code analysis tool first converts HTML into a DOM tree, which then serves as a structured intermediate format that simplifies subsequent position calculations. This intermediary layer abstracts the complexity of raw code parsing from the position determination logic.
3Device complexity
If layout rules and formatting issues are not considered in automated detection, then the detection process becomes simpler, but detection accuracy deteriorates
Solution Approach 1:
The patent performs preliminary analysis of layout rules and formatting specifications before determining element positions. The code analysis tool first parses and interprets CSS stylesheets to understand positioning rules, then applies these rules when calculating element locations from the DOM structure. This preliminary action ensures that formatting issues are accounted for in advance, maintaining high detection accuracy without requiring overly complex real-time processing.
Data Source
AI summary
Methods and systems are presented for automatically detecting positions of various webpage elements within a webpage when the webpage is rendered, based on analyzing the programming code of the webpage. A position detection system obtains and parses the programming code of the webpage to identify webpage elements within the webpage. A group of related webpage elements is identified based on a shared programming structure. The position detection system generates a DOM tree based on the programming code, and determines relative positions of the webpage elements within the group by traversing the DOM tree using a breadth-first search algorithm.


