Document Comment Position Migration via Node Segmentation
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
Existing document processing methods fail to accurately maintain correspondence between comments and text content when the document content changes, leading to inconsistencies in the display of comments, as changes in text content can cause comments to be misplaced or unrelated to the intended text.
Innovation Solution
A method and apparatus that receive and process changed document content, determining change information and performing position migration on comment information to ensure that comments remain correctly associated with the altered text content, using node sequence numbers and identity identifications to maintain accurate positioning.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Adaptability or versatility
If document content is changed, then document editing flexibility is improved, but comment-text correspondence accuracy deteriorates
Solution Approach 1:
The document is segmented into text nodes with unique identity identifiers and sequence numbers. Each text node is independently tracked, allowing the system to precisely locate and update only the affected nodes when document content changes, rather than recalculating all comment positions from scratch.
Solution Approach 2:
The system establishes a feedback mechanism that detects document content changes, automatically triggers position migration calculations for affected comments, and updates comment positions in real-time. This closed-loop feedback ensures comment-text correspondence is maintained dynamically as the document evolves.
2Reliability
If comment position is automatically updated, then comment-text correspondence is maintained, but system complexity increases
Solution Approach 1:
The system pre-establishes a mapping relationship between text nodes and comments during document initialization, storing each comment's association with specific text node identifiers and sequence numbers. This preliminary structuring enables efficient automatic position migration when changes occur, avoiding complex real-time calculations.
Data Source
AI summary
The present disclosure relates to document processing method and apparatus, readable medium and electronic device. The present disclosure enables: receiving changed target document content, and comment information corresponding to the target document content after position migration, the comment information including comment content and position information of the commented text after position migration; wherein, parent node of each text node in the target document content has its own identity identification, and each text node in the target document content has a node sequence number, the node sequence number characterizing the order of the text node among its sibling text nodes; and displaying the changed target document content and the comment information corresponding to the target document content after position migration.


