A multi-version trace and intelligent rollback method and system for referencing content blocks
Patent Information
- Application Number
- CN202611029602.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-07-10
- Publication Date
- 2026-10-13
AI Technical Summary
[0007]本发明的目的在于提供一种引用内容块的多版本追溯与智能回滚方法及系统,来解决现有技术在跨文档引用场景下存在版本管理粒度粗糙、跨文档引用导致版本链断裂、回滚操作缺乏智能决策支持、版本链呈线性无法支持分支并行管理、跨版本差异对比缺乏语义层面理解、以及引用链与版本链分离无法形成完整追溯闭环的技术问题
1.将版本追溯精度从文档级提升到内容块级,版本管理的最小单元从整个文档精确到被引用的内容块,版本链覆盖引用内容块的全生命周期,使追溯精度较现有文档级版本管理提升了一个数量级;
Smart Images

Figure CN122903385A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of document processing and version management technology, and in particular to a method and system for multi-version tracing and intelligent rollback of referenced content blocks. Background Technology
[0002] In cross-document collaboration scenarios, when content blocks from the source document are referenced in the target document, how to effectively manage the version of the referenced content blocks, trace their evolution history, and perform intelligent rollback has become a pressing technical problem in the field of document processing.
[0003] Existing document version management solutions mainly include the following types of technologies. The first type is document-level version management solutions, typically represented by technologies such as CN103793429A, SVN, and Git. These solutions perform version control on the entire document; each save operation by the user generates a new document version, and the system records the complete version history. The second type is fine-grained edit tracking and version management solutions, such as the method for reviewing and fine-grained rollback of specific document editing history in collaborative work systems disclosed in US20220222153, and the method for tracking edit information changes based on a rich text editor disclosed in CN119903819A. These solutions attempt to refine version tracing granularity to specific parts or editing nodes. The third type is collaborative editing version rollback solutions, such as the collaborative document version rollback method disclosed in CN202311488962. These solutions combine snapshot mechanisms and history managers to solve version rollback conflicts in multi-user collaborative editing scenarios. The fourth category comprises three-way document comparison and merging schemes, such as the structured document syntax and semantic comparison and merging method disclosed in US20100088676. This type of scheme provides relatively advanced technical means for document difference comparison. The fifth category comprises document evolution relationship tracing schemes, such as the document link construction and evolution relationship tracing method based on fragment-level semantic alignment disclosed in CN120493935A. This type of scheme provides useful ideas for tracing semantic relationships between documents.
[0004] However, a comprehensive analysis of the existing technical solutions reveals that none of them have established a complete version chain specifically for the independent semantic unit of content blocks referenced across documents, resulting in a fundamental flaw of insufficient granularity in version management. Summary of the Invention
[0005] The inventors discovered through research that when a content block is referenced from a source document to a target document, subsequent version changes of that content block in the source document are completely decoupled from the referenced version in the target document. Users cannot trace the complete evolution history of the content in the source document from the reference position in the target document, nor can they accurately answer tracking questions such as which version of the source document the referenced content in the target document comes from, how many times the target document was synchronized after the source document was updated, and what was synchronized each time.
[0006] This issue of version chain breakage caused by cross-document references means that multiple key nodes experienced by the referenced content block in its lifecycle, such as initial reference, source document update synchronization, local modification, and manual rollback, cannot be systematically linked into a complete and traceable version chain, which seriously restricts the effectiveness and traceability of version management in cross-document collaboration scenarios.
[0007] The purpose of this invention is to provide a multi-version tracing and intelligent rollback method and system for referenced content blocks, in order to solve the technical problems of existing technologies in cross-document reference scenarios, such as coarse granularity of version management, version chain breakage caused by cross-document references, lack of intelligent decision support for rollback operations, linear version chains that cannot support parallel branch management, lack of semantic understanding in cross-version difference comparison, and separation of reference chains and version chains that cannot form a complete tracing loop.
[0008] One aspect of the present invention provides a method for multi-version tracing and intelligent rollback of referenced content blocks, comprising: Throughout the entire lifecycle of the referenced content block, version snapshots are automatically created at preset version creation times to build a version chain independent of the document in which it resides; It provides a version history panel to display the version evolution of referenced content blocks in the form of a timeline view or a tree diagram view, supports users to compare differences between any two versions, and provides four granularity difference comparison views: character level, word level, sentence level, and semantic level. For comparison scenarios spanning multiple intermediate versions, a semantic change summary in natural language is automatically generated; In response to a user's rollback request for the referenced content block, the system intelligently recommends the optimal rollback version from the version chain based on the rollback reason and version chain characteristics specified by the user, and performs the rollback operation after the user confirms the preview. Supports branch version management for referenced content blocks, including branch creation, branch switching, and branch merging functions; Deeply integrate the citation graph with the version chain to provide a complete traceable audit loop.
[0009] In some embodiments, the data structure of the version snapshot includes a version identifier, a content block identifier, a version number, content data, a content hash value, a creation timestamp, a creation reason, an operator identifier, a source version association identifier, a parent version identifier, a target document identifier, and a branch identifier; the data structure of the version chain is organized using a directed acyclic graph structure, and parent-child relationships between versions are established through the parent version identifier field; each referenced content block maintains an independent version chain.
[0010] In some embodiments, the timeline view of the version history panel displays the linear evolution of versions on a vertical timeline. Each node displays the version number, creation time, creation reason icon, operator identifier, and content preview summary. Version nodes with different creation reasons are identified by different colors. The tree diagram view displays the directed acyclic graph structure of versions in a tree diagram. The trunk represents the version sequence of the main branches, and the branch lines are drawn from the branch points and extend independently.
[0011] In some embodiments, among the four granularity difference comparison views, character-level difference comparison uses an improved Myers difference algorithm to calculate character-level differences, word-level difference comparison calculates differences using words as the smallest unit, sentence-level difference comparison calculates differences using sentences as units, and semantic-level difference comparison performs semantic vectorization processing on the content of the two versions respectively, and identifies substantial changes at the semantic level by calculating the differences between semantic vectors.
[0012] In some embodiments, for comparison scenarios spanning multiple intermediate versions, automatically generating semantic change summaries using natural language descriptions includes: parsing the content of the two versions into structured paragraph sequences and identifying elements such as titles, body paragraphs, tables, and lists to establish paragraph-level content mapping relationships; performing difference analysis paragraph by paragraph and classifying changes into types such as numerical correction, content addition, content deletion, wording optimization, structural reorganization, and format adjustment; and sorting the change items according to preset importance ranking rules to generate structured change summary text.
[0013] In some embodiments, the step of intelligently recommending the optimal rollback version from the version chain based on the user-specified rollback reason and version chain characteristics specifically involves: When the rollback is due to a data error, analyze the version chain to locate the version that last involved the modification of numerical data and recommend its parent version or the most recent source synchronization version. When the rollback is due to a format issue, analyze the version chain to locate the starting point of the dense format changes and recommend stable versions before that starting point. When the rollback reason is compliance requirements, search the version chain for versions with the "finalized" tag or those from the official source. When the rollback reason is source document rollback, match the source version associated with the source rollback version in the version chain; When the rollback is due to content conflict, analyze the change range of the hash value of each version in the version chain and recommend the versions with the largest change range as candidate versions.
[0014] In some embodiments, after the user confirms the recommended version, a rollback impact preview is generated before formal execution. This includes displaying a side-by-side comparison of the content of the current version and the rollback target version, generating a reverse semantic change summary from the rollback target version to the current version, and if the user selects cascading rollback, retrieving all target documents that reference the source content block based on the reference relationship graph and generating a list of affected target documents. If the rollback operation may conflict with local modifications to the target documents, a conflict warning is triggered and handling suggestions are provided. During rollback execution, a new version record is created in the version chain instead of overwriting the existing version. The reason for creating the new version is marked as manual rollback, and the parent version identifier points to the current version to maintain the directed acyclic graph structure of the version chain. The extended fields of the new version record the rollback source version identifier, the rollback target version identifier, the rollback reason, and the operation timestamp.
[0015] In some embodiments, the triggering conditions for branch creation include: automatically creating a version branch when a divergent modification of the same source content block is detected in different target documents; creating a user-defined branch when the user manually selects any version node to create a branch; automatically creating a finalized branch when the source content block is updated after the target document has been finalized or archived; storing and managing branch information as part of the version chain metadata; and automatically analyzing the differences between the source update and the current header version of the target branch and detecting potential conflicts after the source content block is updated, providing execution options of automatic merging, manual merging, or temporary non-merging based on the conflict type.
[0016] In some embodiments, the deep integration of the reference graph with the version chain to provide a complete traceable audit loop includes two directions: tracing from source to target and tracing from target to source. In the source-to-target tracing function, after an administrator selects any content block in the source document, the system displays the version chain of that content block and marks which target documents cite each version. Users can click on the target document node to jump to the citation location in that target document and view the independent version chain of the content block corresponding to that citation location. In the target-to-source tracing function, users can open the version history panel of the cited content block at any citation location in the target document with one click. The panel displays the version chain of the cited content block and marks the source version of each version. Users can click on the source version link to trace back to the corresponding version of that content block in the source document.
[0017] Another aspect of the present invention provides a multi-version tracing and intelligent rollback system for referenced content blocks, comprising at least a version chain construction and maintenance module for data interconnection, a version chain visualization and multi-granularity difference comparison module, a cross-version semantic change summary generation module, an intelligent rollback decision and execution module, a branch version management module, and a reference chain and version chain linkage tracing module; wherein: The version chain building and maintenance module automatically creates version snapshots at preset version creation times during the complete lifecycle of the referenced content block to build a version chain independent of the document it belongs to. The version chain visualization and multi-granularity difference comparison module provides a version history panel to display the version evolution of the referenced content block in the form of a timeline view or a tree diagram view. It supports users to compare differences between any two versions and provides four granularity difference comparison views: character level, word level, sentence level, and semantic level. The cross-version semantic change summary generation module automatically generates a semantic change summary in natural language for comparison scenarios spanning multiple intermediate versions. The intelligent rollback decision and execution module responds to the user's rollback request for the referenced content block, intelligently recommends the optimal rollback version from the version chain based on the rollback reason and version chain characteristics specified by the user, and executes the rollback operation after the user confirms the preview. The branch version management module supports branch version management of referenced content blocks, including branch creation, branch switching and branch merging functions; The reference chain and version chain linkage traceability module deeply integrates the reference relationship graph with the version chain to provide a complete traceable audit loop.
[0018] Compared with the prior art, the present invention has the following beneficial effects: 1. Improve the accuracy of version tracking from the document level to the content block level. The smallest unit of version management is reduced from the entire document to the referenced content block. The version chain covers the entire lifecycle of the referenced content block, which improves the tracking accuracy by an order of magnitude compared to the existing document-level version management. 2. The rollback decision-making process is transformed from blind searching to intelligent recommendation. The intelligent rollback recommendation algorithm automatically analyzes the version chain characteristics based on the rollback reason specified by the user and recommends the optimal version, significantly reducing the time users spend finding the correct rollback version. The rollback impact preview function helps users fully assess the rollback consequences before confirmation, thus avoiding accidental operations. 3. Upgrade version comparison from character level to semantic level. Semantic level comparison can filter out non-substantive changes such as wording optimization and focus on core changes at the semantic level. Cross-version semantic change summary outputs the core content of version changes in natural language form to help users quickly understand version evolution. 4. Solve the challenge of parallel collaboration in multiple scenarios through branch version management, and support the maintenance of independent branch version chains for the same source content block in different target documents to meet the customized needs of different customers; 5. By deeply integrating the reference relationship graph and the version chain, a closed loop of full-link traceability from source to target is formed, enabling administrators to have a clear understanding of the complete trajectory of content dissemination and evolution. 6. The version chain records the precise time, operator, and reason for each version change to meet the compliance requirements of laws such as the Data Security Law and the Personal Information Protection Law for traceability and auditability of data processing activities. Attached Figure Description
[0019] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0020] Figure 1 This is a flowchart of the multi-version tracing and intelligent rollback method for referenced content blocks of the present invention; Figure 2 This is a diagram of the multi-version tracing and intelligent rollback system architecture for referenced content blocks in this invention. Detailed Implementation
[0021] The following will be based on embodiments of the present invention. Figures 1-2 The technical solutions in the embodiments of the present invention will be clearly and completely described together. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments.
[0022] Example The multi-version tracing and intelligent rollback system architecture of the referenced content block in this invention includes: a version chain construction and maintenance module, a version chain visualization and multi-granularity difference comparison module, a cross-version semantic change summary generation module, an intelligent rollback decision and execution module, a branch version management module, and a reference chain and version chain linkage tracing module.
[0023] The technical solution of this invention is mainly applied to cross-document collaboration scenarios. When a content block in the source document is referenced in the target document, the system establishes a fine-grained version chain for the referenced content block that is independent of the document in which it is located.
[0024] Taking a specific application scenario as an example, a product manual document exists in a company's knowledge base system. The product specifications within this document are referenced in both the sales department's tender documents and the marketing department's promotional materials. When the product manager updates the specifications in the source document, the referenced content in the sales department's tender documents and promotional materials needs to be updated synchronously. Furthermore, each target document may localize the referenced content for its specific application scenario. Through the technical solution of this invention, the system can accurately track the complete evolution history of this content block in the source document and all target documents, and provides intelligent version management and rollback functionality.
[0025] In the version chain construction and maintenance module, the system automatically creates version snapshots at preset version creation times throughout the complete lifecycle of referenced content blocks to build a version chain independent of the document in which it resides. The data structure of the version snapshot includes a version identifier field, a content block identifier field, a version number field, a content data field, a content hash value field, a creation timestamp field, a creation reason field, an operator identifier field, a source version association identifier field, a parent version identifier field, a target document identifier field, and a branch identifier field. The version identifier field uses UUID format to ensure global uniqueness, the content block identifier field records the GCBID of the content block it belongs to, and the content data field uses LONGTEXT or BLOB type to store the version content, including complete information such as text, formatting tags, and embedded objects.
[0026] There are six preset scenarios for version creation.
[0027] The first scenario occurs when a citation operation takes place. When a user performs a content block citation operation in the target document, the system automatically creates an initial version snapshot for the cited content block, marked with version number V1.0 and creation reason field marked as INITIAL_REF. This snapshot records the complete content and format of the source content block at the time of citation. Taking the citation of product specifications in a tender document as an example, when the salesperson inserts the product specifications content block from the product manual into the tender document, the system immediately creates version V1.0 as the initial citation version. At this time, the target document identifier field in the version snapshot records the document identifier of the tender document.
[0028] The second scenario is that after the source content is synchronized and updated, when the source content block in the source document is updated, and the system completes the synchronization operation to the reference location in the target document, the system automatically creates a new version snapshot, the creation reason is marked as SOURCE_SYNC, the version number is incremented according to the preset rules, and the version number of the source content block on which the synchronization is based is recorded in the source version association identifier field.
[0029] The third scenario is when a user manually modifies and saves the cited content in the target document. When the user directly edits and modifies the cited content block in the target document instead of modifying and saving it through source synchronization, the system automatically creates a new version snapshot, and the creation reason is marked as LOCAL_EDIT.
[0030] The fourth scenario is when the source content block in the source document is updated. Regardless of whether the update has been synchronized to the target document, the system creates a version snapshot of the source content block on the source document side. The creation reason is marked as SOURCE_UPDATE. This snapshot does not directly affect the referenced version of the target document, but it is recorded in the version chain of the source content block, providing a basis for subsequent source version tracing and synchronization determination.
[0031] The fifth scenario is when the user manually triggers a rollback operation. After the user executes the rollback operation and confirms it, the system saves the rolled-back content as a new version, and the creation reason is marked as MANUAL_ROLLBACK.
[0032] The sixth scenario is when a version branch is created. When the system detects that the same referenced content block has been modified in different target documents, the system automatically creates a version snapshot of the branch point, and the creation reason is marked as BRANCH_CREATE.
[0033] The version chain's data structure is organized using a directed acyclic graph (DAG), with each referenced content block maintaining an independent version chain. The version chain's metadata structure includes content block identifiers, reference association identifiers, source document identifiers, source content block identifiers, total number of versions, current header version identifier, currently active branch name, branch list, version graph structure, and synchronization record list. The version chain's metadata represents the derivation relationships between versions in the form of an adjacency list. Parent-child relationships between versions are established through the parent version identifier field, thus forming a directed acyclic graph structure. Specifically, the system creates a `block_version_chain` table. The `version_graph` field in the table stores the adjacency list representation of the version DAG in JSON format, and the `branch_list` field stores the branch list and its header version information in JSON format.
[0034] To address the issue of version chain breaks caused by cross-document references, the system maintains a source version association identifier field in the version snapshot, establishing an association link from the version of the referenced content block to the version of the source content block.
[0035] When the version creation reason is initial reference, the source version association identifier field records the source content block version identifier at the time of reference.
[0036] When the reason for version creation is source synchronization, the source version association identifier field records the latest version identifier of the source content block on which this synchronization is based.
[0037] When the reason for version creation is local modification, the source version association identifier field 1019 inherits the source version association identifier of its parent version.
[0038] This mechanism supports two tracing directions. The forward tracing function starts from any version of the source content block and queries which target documents' cited content blocks are based on that version or its derivatives. Specifically, the system establishes a complete version propagation path diagram by tracing the association links between the source content block version and the cited versions of each target document in the citation relationship graph. The reverse tracing function starts from the current version of the cited content block in the target document, traces along the source version association identifier chain to the corresponding version of the source content block, and further examines the complete version evolution history of the source content block.
[0039] The version chain visualization and multi-granularity difference comparison module provides a version history panel that displays the version evolution of referenced content blocks in either a timeline view or a tree diagram view. The timeline view displays the linear evolution of versions along a vertical timeline, with each node showing the version number, creation time, creation reason icon, operator identifier, and a content preview summary.
[0040] Version nodes created for different reasons are identified by different colors: source synchronization version is blue, locally modified version is green, manually rolled-back version is orange, and branch point version is purple.
[0041] Different symbols are used to distinguish different types of operations when creating a reason for the operation. For example, an initial reference uses a paperclip icon, source synchronization uses a circular arrow icon, local modifications use a pencil icon, rollback uses a back arrow icon, and branches use a fork icon. The timeline view allows users to quickly browse the version evolution process by dragging the timeline slider. When hovering over any node, a detailed information pop-up window is displayed, including the operation time, operator, source version association information, etc.
[0042] The tree diagram view displays the version directed acyclic graph structure with multiple branches. The trunk represents the version sequence of the main branch, and branches extend independently from their respective nodes. Users can click on any node to view the complete content of that version. In the tree diagram view, different branches are distinguished by different colors, and users can click on branch labels to switch the currently viewed branch. The tree diagram view also supports zooming and panning operations, making it easy for users to view complex version chain structures containing a large number of versions.
[0043] After a user selects any two versions in the version history panel, the system provides a difference comparison view at four different granularities.
[0044] Granularity 1 provides a character-level difference comparison view. The system uses an improved Myers difference algorithm to calculate character-level differences between two versions. The difference results are displayed in a two-column layout: the left column shows the old version's content, and the right column shows the new version's content. Newly added characters are highlighted in green, deleted characters are marked with a red strikethrough, and modified characters are highlighted in yellow. Character-level difference comparison is suitable for detecting minor changes such as punctuation corrections and spelling errors. The system also provides a difference navigation function, allowing users to quickly jump between different difference points by clicking the "Previous Difference" or "Next Difference" buttons.
[0045] Granularity 2 is a word-level difference comparison view. The system calculates differences using words as the smallest unit and performs word segmentation based on spaces and punctuation marks. Word-level difference comparison can more intuitively display word replacements and additions / deletions, filtering out interfering information such as space changes that do not change the meaning.
[0046] Granularity 3 is a sentence-level difference comparison view. The system divides the content into sentence sequences using periods as delimiters and performs difference calculations on a sentence-by-sentence basis. Sentence-level difference comparison is suitable for quickly locating which paragraphs have undergone overall changes and is ideal for grasping macro-level differences in long documents.
[0047] Granularity four is a semantic-level difference comparison view, which is one of the core innovations of this invention. The system performs semantic vectorization processing on the content of the two versions separately, and uses pre-trained language models such as RoBERTa or Sentence-BERT to extract the semantic embedding vectors of the content.
[0048] By calculating the differences between the two versions of semantic vectors, the system identifies substantial changes at the semantic level. Semantic-level difference comparison has two core capabilities: The first capability is to filter out modifications that only change the wording but have the same meaning. For example, changing the expression from 5% to five percent will not be marked as a difference, so as to avoid invalid difference labels from interfering with the user's judgment. The second capability is to annotate paragraphs where the semantics have undergone substantial changes and output a description of the direction of the semantic changes, such as labels for numerical correction, conclusion reversal, and new explanations.
[0049] When a user clicks on any point of difference in the comparison view, the system automatically jumps to the corresponding referenced content block in the document and highlights the differences. The right sidebar of the document view displays a version information summary of the referenced content block, allowing users to seamlessly switch between the comparison view and the editing view. The version information summary includes key elements such as the current version number, creation time, reason for creation, source version association information, and a content preview.
[0050] For comparison scenarios spanning multiple intermediate versions, such as transitioning from version V1.0 to version V2.3 across V1.1, V1.2, V2.0, V2.1, and V2.2, the cross-version semantic change summary generation module automatically generates a natural language description of the semantic change summary, helping users quickly understand the core changes between versions. The semantic change summary generation process includes four steps: Step 1 involves version content segmentation and structure parsing. The system parses the content of both versions into structured paragraph sequences, identifying elements such as headings, body paragraphs, tables, and lists, and establishing paragraph-level content mapping relationships. Specifically, the system uses DOM parsing technology to extract the document's hierarchical structure. For heading elements, a heading recognition algorithm is used to determine their hierarchical relationship; for table elements, a table parsing algorithm is used to extract cell content; and for list elements, a list parsing algorithm is used to extract list items.
[0051] Step 2 involves paragraph-by-paragraph difference analysis and classification. For each pair of mapped paragraphs, the system performs difference analysis and classifies the changes into six types. The first type is numerical correction, used to identify changes in numerical data, such as correcting the prediction accuracy from 85% to 92%. After recognizing this change, the system generates a description of the correction. The second type is content addition, used to identify newly added paragraphs or content units, such as adding a limitation explanation paragraph. After recognizing this, the system generates a description of the newly added limitation explanation paragraph. The third type is content deletion, used to identify deleted paragraphs or content units, such as deleting the example table in Appendix A. After recognizing this, the system generates a description of the deletion of the example table in Appendix A. The fourth type is wording optimization, used to identify modifications with the same semantics but improved expression, such as optimizing the wording of the second paragraph. After recognizing this, the system generates a description of the optimized wording of the second paragraph. The fifth type is structural reorganization, used to identify changes in paragraph order or hierarchical structure, such as reorganizing the method section into three subsections. After recognizing this, the system generates a description of the reorganization of the method section into three subsections. The sixth type is the format adjustment type, which is used to identify changes in font, color, and other formatting. For example, if the title format is uniformly set to boldface size 3, the system will generate a description with the title format uniformly set to boldface size 3 after recognition.
[0052] Step 3 involves summary generation and sorting. The system sorts the changed items according to a preset importance ranking rule and then generates a structured change summary text. The ranking rule prioritizes numerical correction, followed by content addition and deletion, then structural reorganization, then wording optimization, and finally format adjustment.
[0053] Step 4 presents the summary. The generated change summary is displayed as a card in the top area of the version comparison interface. Users can click on any item in the summary to automatically jump to the corresponding difference. Users can also choose the level of detail in the summary, including a brief mode and a full mode. The brief mode displays only the three to five most important changes, while the full mode displays all change items. Users can also copy the summary as a change description or export it as a PDF change report.
[0054] In the intelligent rollback decision and execution module, users can trigger rollback operations through three scenarios: The first scenario is to select the target version in the version history panel and click the rollback button; The second scenario is clicking the "Rollback to this version" button in the difference comparison view; The third scenario is that the system detects a problem caused by a synchronization operation and proactively pushes a rollback notification, allowing the user to directly enter the rollback process by clicking the link in the notification.
[0055] After a rollback is triggered, the system automatically captures the rollback context information, which includes at least the rollback reason field selected by the user.
[0056] The system supports six types of rollback reasons.
[0057] The first type is DATA_ERROR, which indicates that there are errors in the data in the target document and it needs to be rolled back when the user selects this reason.
[0058] The second type is FORMAT_ISSUE, which indicates that there is a formatting problem in the target document and it needs to be rolled back when the user selects this reason.
[0059] The third type is compliance requirement COMPLIANCE_REQUIREMENT. When a user selects this reason, it indicates that a rollback to a specific version is required due to compliance requirements.
[0060] The fourth type is Source Document Rollback (SOURCE_ROLLBACK). When the user selects this reason, it indicates that the source document has been rolled back and needs to be rolled back synchronously.
[0061] The fifth type is CONTENT_CONFLICT. When a user selects this reason, it indicates that there is a content conflict that needs to be resolved by rolling back.
[0062] The sixth type is Other, which is used for user-defined rollback reasons.
[0063] The system employs different intelligent recommendation strategies for different rollback reasons. When the rollback reason is data error, the system analyzes the version chain to locate the version that most recently involved numerical data modification and recommends its parent version as the rollback target version. If there is no explicit numerical modification record in the version chain, the system recommends the most recent source synchronization version of type SOURCE_SYNC, because source synchronization usually introduces authoritative data updates.
[0064] When the rollback is due to a format issue, the system analyzes the version chain to locate the starting point of the dense format changes and recommends the last stable version before that starting point as the rollback target version. The criterion for determining a stable version is that the number of format changes within a certain period of time after that version is less than a preset threshold.
[0065] When the rollback reason is compliance requirements, the system searches the version chain for versions with the "finalized" tag or versions with "create_reason" set to "SOURCE_SYNC" and whose source version is an officially released version as recommended targets.
[0066] When the rollback reason is source document rollback, the system detects the rollback operation on the source document side and automatically matches the version of source_version_ref in the version chain of the referenced content block that corresponds to the source rollback version as the recommended target.
[0067] When the rollback is due to content conflict, the system analyzes the change range of content_hash in each version in the version chain and selects the two or three versions with the largest change range as candidate versions for users to manually select in the comparison view.
[0068] When the rollback reason is not specified or is selected as other, the system uses a multi-factor scoring model to comprehensively evaluate and output a recommended version. The three factors considered by the scoring model are version stability score, version data credibility score, and user historical adoption rate.
[0069] When recommending a version, the system simultaneously generates an explainable reason for the recommendation. This reason is presented in structured text to help users understand the basis for the recommendation and make a decision. The reason for the recommendation includes the following information: the type of rollback reason selected by the user, a description of the key differences between the target version and the current version, content stability information of the target version, and statistical data on the choices of other users in similar scenarios.
[0070] The system also provides comparison information for other candidate versions, including candidate version, candidate version number, creation time, key differences, etc. Users can select the alternative target version from the candidate version list.
[0071] After the user confirms the recommended version, the system generates a rollback impact preview before the actual execution. The rollback impact preview includes four parts.
[0072] The first part is a content comparison view, which displays the content comparison between the current version and the target version to be rolled back side by side, with the differences highlighted.
[0073] The second part is the change summary view, which calls the cross-version semantic change summary generation module to generate a reverse change summary from the rollback target version to the current version, that is, which changes will be lost after the rollback.
[0074] The third part is the cascading impact list 235. If the user selects the cascading rollback option, the system will search all target documents that reference the source content block based on the reference relationship graph and generate a list of affected target documents, including the current status, responsible person, and most recent editing time of each target document.
[0075] The fourth part is the conflict warning view. If the rollback operation may conflict with the local modifications of the target document, such as when the user has edited the referenced content locally, the system will trigger a conflict warning and provide processing suggestions. The processing suggestions include three options: keep the local modifications, abandon the local modifications, or manually merge.
[0076] After the user confirms the preview, the system performs a rollback operation. The rollback operation creates a new version record in the version chain instead of overwriting the existing version, thus maintaining the integrity of the version chain structure. The reason for the creation of the new version is marked as MANUAL_ROLLBACK, and the parent version identifier points to the current version instead of the rollback target version to maintain the directed acyclic graph structure of the version chain.
[0077] The new version generated by the rollback operation is assigned an incrementing version number. For example, if the current version is V2.3, the rollback will generate V2.4. The extended fields of the new version record the rollback source version identifier, the rollback target version identifier, the rollback reason, and the operation timestamp. If the user selects the cascading rollback option, the system traverses the reference relationship graph to generate rollback tasks for each affected target document. The user can confirm each task individually or execute them in batches in the task panel.
[0078] The system also records complete rollback operation logs to meet audit traceability requirements. The rollback operation logs include information such as the operator, operation time, rollback reason, version IDs before and after the rollback, and scope of impact.
[0079] The branch version management module supports branch version management for referenced content blocks. There are three scenarios that trigger branch creation.
[0080] The first scenario is that the divergent modifications of different target documents trigger the automatic creation of branches. When the system detects that the referenced version Vx of target document A has been locally modified to Va, and the referenced version Vx of target document B has been synchronously updated to Vb by the source or has been locally modified to Vb with Va and Vb having different contents, the system automatically creates a version branch for the referenced content block. The branch point version is Vx. Branch A extends from Vx to Va, and branch B extends from Vx to Vb.
[0081] The second scenario involves users manually creating branches. Users can select any version node in the version history panel, click the "Create Branch" button, enter the branch name and description, and then manually create the version branch. This function is suitable for management scenarios that require maintaining different content versions for different customers and different project stages.
[0082] The third scenario is a target document status lock triggering a branch. When the source content block is updated after the target document has been finalized or archived, the system automatically creates a finalized branch, retains the version before finalization as the branch, and continues to receive source synchronization updates on the main branch.
[0083] Branch information is stored and managed as part of the version chain metadata. The branch data structure includes a branch identifier, branch name, header version identifier, source version identifier, creation time, creator, activity level, and a list of associated target documents. The branch list is stored in JSON format in the `branch_list` field of the `block_version_chain` table. The version history panel provides a branch management view, including a branch tree diagram displaying all branches and their evolution relationships in a tree structure, a branch information panel displaying detailed information for each branch, a branch switching function that allows users to switch the currently viewed branch, and a cross-branch comparison function that allows users to select two versions from different branches for difference comparison.
[0084] In the branch tree diagram, the trunk represents the version sequence of the main branch. Branches originate from branch points and extend independently, with the terminal node of each branch being the current header version. The branch information panel displays detailed information for each branch, including branch name, creation time, creator, header version number, number of associated target documents, and last modified time.
[0085] The branch switching feature allows users to switch the currently viewed branch in the version history panel. After switching, both the timeline view and the difference comparison view are displayed based on the version sequence of the selected branch. The cross-branch comparison feature allows users to select two versions from different branches for difference comparison, facilitating the analysis of differences between different customized versions.
[0086] When a source content block is updated, users can selectively merge the source update into various branches. The system automatically analyzes the differences between the source update and the current header version of the target branch and detects potential conflicts. There are three conflict types: no conflict (the source update and branch modification occur in different parts of the content block, which can be automatically merged); overlapping conflict (the source update and branch modification occur in the same part, requiring manual decision-making); and semantic conflict (the modifications do not overlap but have semantic contradictions, for example, the source changes the deadline to March 15th while the branch changes the same date to March 10th, in which case the system triggers a semantic conflict warning). There are three merge execution options: automatic merge for no-conflict situations, where the system automatically applies the source update to the branch and generates a new version; manual merge for conflict situations, where users make decisions point by point in the comparison interface, choosing to use the source version, retain the branch version, or manually edit the merge result; and temporary non-merge for scenarios where users want to retain the current state of the branch, where the system marks the existence of a source update to be merged for later processing. The merge operation generates a new version, the reason for creating the new version is marked as BRANCH_MERGE, and the merge source and merge method are recorded in the metadata.
[0087] The citation chain and version chain linkage tracing module deeply integrates the citation relationship graph with the version chain to provide a complete traceable audit loop. The end-to-end tracing function includes three tracing methods: source-to-target tracing, target-to-source tracing, and timeline-aligned tracing. In the source-to-target tracing function, after the administrator selects any content block in the source document, the system displays the version chain of that content block and indicates which target documents cite each version. Users can click on a target document node to jump to the citation location in that target document and view the independent version chain of the content block corresponding to that citation location. In the target-to-source tracing function, users can open the version history panel of any citation location in the target document with one click. The panel displays the version chain of the citation content block and indicates the source version of each version. Users can click on the source version link to trace back to the corresponding version of that content block in the source document.
[0088] The system provides a timeline alignment view for tracing functionality. This view displays the version evolution timeline of the source content block and the version evolution timeline of the referenced content block in the target document side-by-side, using lines to mark synchronization events to clearly show the correspondence between versions. In the timeline alignment view, the source version chain timeline and the referenced version chain timeline are linked by synchronization event lines, with each end of the synchronization event line connecting the source version node and the corresponding referenced version node. Users can click on a synchronization event line to view detailed information about that synchronization, including synchronization time, synchronization method, and the version correspondence before and after synchronization.
[0089] The system supports exporting end-to-end traceability data as audit reports to meet the needs of various scenarios such as enterprise compliance audits, intellectual property protection, and legal evidence collection. The exported audit report includes the following: basic information of the source content block, including document name, content block ID, and creation time; the complete version chain of the source content block, including version number, creation time, operator, and creation reason; a list of target documents cited by each version, including document name, citation location, citation time, and responsible person; branch version chains of the cited content blocks in each target document, including complete branch information if branches exist; and synchronization operation history, including synchronization time, synchronization method, and version correspondence before and after synchronization. The report supports both PDF and JSON formats, allowing users to choose the export format according to their needs.
[0090] To better understand this invention, we will take the contract management system of a large enterprise group as an example. This system manages the procurement contract templates issued by the group headquarters, and each subsidiary creates its own specific procurement contracts based on the templates.
[0091] When the group headquarters updates a clause in the procurement contract template, the version chain of that clause changes as follows: First, a source updated version is created in the group headquarters' template document. Then, the system automatically synchronizes this update to the specific procurement contracts of each subsidiary, creating synchronized version snapshots for each referencing location. If a subsidiary makes customized modifications to the referenced clause locally to meet its specific business needs, the system creates a local modified version for this modification. At this point, the system detects a discrepancy between the versions of this subsidiary and those of other subsidiaries and automatically creates a branch version.
[0092] When a subsidiary discovers a data error in the synchronized contract terms and requires a rollback, the user selects the referenced contract terms in the version history panel of the contract management system, clicks the rollback button, and selects "data error" as the rollback reason. The system analyzes the version chain characteristics using an intelligent recommendation algorithm, identifies that the data error originates from the most recent source synchronization operation, recommends rolling back to the version before source synchronization, and generates a recommendation reason for user confirmation. After the user confirms the recommended version, the system generates a preview of the rollback impact, allowing the user to preview the contract terms that will be affected and confirm execution. After the rollback operation is complete, the system creates a new rollback version record in the version chain. Furthermore, if the user selects the cascading rollback option, the system automatically processes other subsidiary contracts referencing the same source contract terms.
[0093] Through the description of the specific embodiments above, those skilled in the art will understand that the technical solution of the present invention achieves precise management and intelligent processing of the version evolution process of content blocks in cross-document referencing scenarios by constructing a version chain independent of the document in which the referenced content block resides, combined with multi-granularity difference comparison, semantic-level change summary generation, intelligent rollback recommendation, branch version management, and full-link tracing techniques. The technical solution of the present invention improves the accuracy of version tracing from the document level to the content block level, changes rollback decisions from blind searching to intelligent recommendation, and elevates version comparison from the character level to the semantic level. It solves the problem of parallel collaboration in multiple scenarios through branch version management and forms a closed-loop full-link tracing system from source to target.
[0094] The foregoing has shown and described the basic principles, main features, and advantages of the present invention. It will be apparent to those skilled in the art that the invention is not limited to the details of the exemplary embodiments described above, and that the invention can be implemented in other specific forms without departing from its spirit or essential characteristics. Therefore, the embodiments should be considered illustrative and non-limiting in all respects, and the scope of the invention is defined by the appended claims rather than the foregoing description. Thus, all variations falling within the meaning and scope of equivalents of the claims are intended to be included within the scope of the invention. No reference numerals in the claims should be construed as limiting the scope of the claims.
[0095] Furthermore, it should be understood that although this specification describes embodiments, not every embodiment includes only one independent technical solution. This narrative style is merely for clarity. Those skilled in the art should consider the specification as a whole, and the technical solutions in each embodiment can also be appropriately combined to form other embodiments that can be understood by those skilled in the art.
Claims
1. A method for multi-version tracing and intelligent rollback of referenced content blocks, characterized in that, include: Throughout the entire lifecycle of the referenced content block, version snapshots are automatically created at preset version creation times to build a version chain independent of the document in which it resides; It provides a version history panel to display the version evolution of referenced content blocks in the form of a timeline view or a tree diagram view, supports users to compare differences between any two versions, and provides four granularity difference comparison views: character level, word level, sentence level, and semantic level. For comparison scenarios spanning multiple intermediate versions, a semantic change summary in natural language is automatically generated; In response to a user's rollback request for the referenced content block, the system intelligently recommends the optimal rollback version from the version chain based on the rollback reason and version chain characteristics specified by the user, and performs the rollback operation after the user confirms the preview. Supports branch version management for referenced content blocks, including branch creation, branch switching, and branch merging functions; Deeply integrate the citation graph with the version chain to provide a complete traceable audit loop.
2. The method according to claim 1, characterized in that, The data structure of the version snapshot includes a version identifier, a content block identifier, a version number, content data, a content hash value, a creation timestamp, a creation reason, an operator identifier, a source version association identifier, a parent version identifier, a target document identifier, and a branch identifier; the data structure of the version chain is organized using a directed acyclic graph structure, and parent-child relationships between versions are established through the parent version identifier field; each referenced content block maintains an independent version chain.
3. The method according to claim 1, characterized in that, The version history panel's timeline view displays the linear evolution of versions along a vertical timeline. Each node displays the version number, creation time, creation reason icon, operator identifier, and a content preview summary. Version nodes with different creation reasons are identified by different colors. The tree diagram view displays the version's directed acyclic graph structure in a tree diagram. The trunk represents the version sequence of the main branches, and the branch lines extend independently from the branch points.
4. The method according to claim 1, characterized in that, In the four granularity difference comparison views, character-level difference comparison uses an improved Myers difference algorithm to calculate character-level differences, word-level difference comparison calculates differences using words as the smallest unit, sentence-level difference comparison calculates differences using sentences as units, and semantic-level difference comparison performs semantic vectorization processing on the content of the two versions respectively, and identifies substantial changes at the semantic level by calculating the differences between semantic vectors.
5. The method according to claim 1, characterized in that, For comparison scenarios spanning multiple intermediate versions, the automatic generation of semantic change summaries using natural language descriptions includes: parsing the content of the two versions into structured paragraph sequences and identifying elements such as titles, body paragraphs, tables, and lists to establish paragraph-level content mapping relationships; performing difference analysis on a paragraph-by-paragraph basis and classifying changes into types such as numerical correction, content addition, content deletion, wording optimization, structural reorganization, and format adjustment; and sorting the change items according to preset importance ranking rules to generate structured change summary text.
6. The method according to claim 1, characterized in that, The process of intelligently recommending the optimal rollback version from the version chain based on the user-specified rollback reason and version chain characteristics is as follows: When the rollback is due to a data error, analyze the version chain to locate the version that last involved the modification of numerical data and recommend its parent version or the most recent source synchronization version. When the rollback is due to a format issue, analyze the version chain to locate the starting point of the dense format changes and recommend stable versions before that starting point. When the rollback reason is compliance requirements, search the version chain for versions with the "finalized" tag or those from the official source. When the rollback reason is source document rollback, match the source version associated with the source rollback version in the version chain; When the rollback is due to content conflict, analyze the change range of the hash value of each version in the version chain and recommend the versions with the largest change range as candidate versions.
7. The method according to claim 6, characterized in that, After the user confirms the recommended version, a rollback impact preview is generated before the actual execution. This includes a side-by-side comparison of the content of the current version and the rollback target version, a reverse semantic change summary from the rollback target version to the current version, a list of affected target documents generated by searching all target documents that reference the source content block based on the citation relationship graph if the user chooses cascading rollback, and a conflict warning and handling suggestions if the rollback operation may conflict with local modifications to the target documents. During rollback execution, a new version record is created in the version chain instead of overwriting the existing version. The reason for creating the new version is marked as manual rollback, and the parent version identifier points to the current version to maintain the directed acyclic graph structure of the version chain. The extended fields of the new version record the rollback source version identifier, the rollback target version identifier, the rollback reason, and the operation timestamp.
8. The method according to claim 1, characterized in that, The triggering conditions for branch creation include: automatically creating a version branch when a divergent modification of the same source content block is detected in different target documents; creating a user-defined branch when the user manually selects any version node to create a branch; automatically creating a finalized branch when the source content block is updated after the target document has been finalized or archived; branch information is stored and managed as part of the version chain metadata; when the source content block is updated, the system automatically analyzes the differences between the source update and the current header version of the target branch and detects potential conflicts, providing execution options of automatic merging, manual merging, or temporary non-merging based on the conflict type.
9. The method according to claim 1, characterized in that, The deep integration of the reference relationship graph with the version chain to provide a complete traceable audit loop includes two directions: tracing from source to target and tracing from target to source. In the source-to-target tracing function, after an administrator selects any content block in the source document, the system displays the version chain of that content block and marks which target documents cite each version. Users can click on the target document node to jump to the citation location in that target document and view the independent version chain of the content block corresponding to that citation location. In the target-to-source tracing function, users can open the version history panel of the cited content block at any citation location in the target document with one click. The panel displays the version chain of the cited content block and marks the source version of each version. Users can click on the source version link to trace back to the corresponding version of that content block in the source document.
10. A multi-version tracking and intelligent rollback system for referenced content blocks, characterized in that, It should include at least the following modules: a version chain construction and maintenance module for data interconnection; a version chain visualization and multi-granularity difference comparison module; a cross-version semantic change summary generation module; an intelligent rollback decision and execution module; a branch version management module; and a reference chain and version chain linkage tracing module; among which: The version chain building and maintenance module automatically creates version snapshots at preset version creation times during the complete lifecycle of the referenced content block to build a version chain independent of the document it belongs to. The version chain visualization and multi-granularity difference comparison module provides a version history panel to display the version evolution of the referenced content block in the form of a timeline view or a tree diagram view. It supports users to compare differences between any two versions and provides four granularity difference comparison views: character level, word level, sentence level, and semantic level. The cross-version semantic change summary generation module automatically generates a semantic change summary in natural language for comparison scenarios spanning multiple intermediate versions. The intelligent rollback decision and execution module responds to the user's rollback request for the referenced content block, intelligently recommends the optimal rollback version from the version chain based on the rollback reason and version chain characteristics specified by the user, and executes the rollback operation after the user confirms the preview. The branch version management module supports branch version management of referenced content blocks, including branch creation, branch switching and branch merging functions; The reference chain and version chain linkage traceability module deeply integrates the reference relationship graph with the version chain to provide a complete traceable audit loop.
Citation Information
Patent Citations
Method for managing document versions
CN103793429A
Collaborative document version rollback method and device, electronic equipment and medium
CN117407359A
Editing information change tracking method and system based on rich text editor
CN119903819A
Document link construction and evolution relation tracking method based on fragment-level semantic alignment
CN120493935A
Comparing and merging structured documents syntactically and semantically
US20100088676A1