Text Version Alignment Using Hover-Based Line Matching
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
Existing text alignment methods require manual scrolling and use of placeholders, leading to inefficiency, aesthetic issues, and waste of storage resources, and do not automatically align different versions of a document.
Innovation Solution
A method and apparatus for aligning texts by displaying original and modified texts separately, highlighting corresponding lines based on cursor hovering, and aligning them upon clicking, with options for synchronous or asynchronous scrolling and intelligent navigation bar partitioning.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Ease of operation
If manual scrolling and placeholders are used for text alignment, then text versions can be displayed separately, but text viewing efficiency deteriorates and manual effort increases
Solution Approach 1:
The system pre-processes the original text and modified text to establish corresponding relationships between lines before the user needs to view them. When the user hovers over a line in one text, the system has already prepared the highlighting and alignment information, allowing instant visual connection without manual scrolling to find corresponding lines.
Solution Approach 2:
The patent introduces an intermediary mechanism (cursor hovering detection and automatic highlighting system) that mediates between the user's view and the text alignment. Instead of requiring the user to manually scroll and align texts, the intermediary system automatically identifies and highlights corresponding lines based on cursor position, eliminating the need for manual alignment operations.
2Shape
If placeholders are used for missing text lines, then text alignment can be maintained, but aesthetic quality deteriorates and storage resources are wasted
Solution Approach 1:
The patent extracts the alignment function from the text content itself and separates it into a structural layer. Instead of using placeholders within the text content to maintain alignment, the system extracts the corresponding relationship information and uses it to dynamically align lines during display. This eliminates the need for placeholder characters that consume storage space while maintaining visual alignment.
Solution Approach 2:
The patent moves the alignment problem from the vertical dimension (using placeholders to fill missing lines) to the horizontal dimension (using cursor position and highlighting to indicate correspondence). By changing how alignment is represented - from physical presence of placeholder characters to spatial relationship indicators - the system maintains structural integrity without wasting storage resources on unnecessary placeholder content.
3Productivity
If automatic alignment is implemented, then text viewing efficiency improves, but device complexity increases
Solution Approach 1:
The system uses the user's own cursor hovering action as the trigger for automatic alignment. Instead of requiring complex automated detection of text correspondence, the system serves itself by using the cursor's natural movement and positioning to automatically identify and highlight corresponding lines. The user's interaction itself provides the alignment information, eliminating the need for complex background algorithms.
Solution Approach 2:
The patent implements partial automatic alignment - specifically, automatic highlighting of corresponding lines only when the user hovers over a line in one text. This partial action (only highlighting, not full automatic alignment of entire documents) reduces the complexity requirements compared to fully automatic alignment systems, while still providing significant productivity improvement for the common use case of viewing specific lines.
Data Source
AI summary
Embodiments of the present disclosure relate to a method and apparatus for aligning texts, a device, a medium and a program product. The method comprises displaying an original text and a modified text of the original text. The method also comprises receiving hovering of a cursor over a first line in one text of the original text or the modified text. The method also includes highlighting the first line and a second line in the other text of the original text or the modified text corresponding to the first line based on hovering of the cursor over the first line. The method further includes in response to receiving an operation for clicking associated with the hovering cursor, aligning the first line with the second line to implement text alignment.


