Document versioning method, electronic device, storage medium, and computer program product
Patent Information
- Application Number
- CN202611087897.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-07-21
- Publication Date
- 2026-10-27
AI Technical Summary
[0002]目前的云计算协同编辑技术,例如在线表格,在进行版本回溯时,存在版本对比不直观、版本间差异展示不直观、操作追溯碎片化、异常处理效率低下等问题
[0014]本申请实施例提供的文档版本回溯方法、电子设备、存储介质及计算机程序产品中,响应于针对第一文档的第一用户操作,在所述第一文档的显示界面上显示进度条;所述第一用户操作用于启动所述第一文档的修订模式;所述进度条用于追溯所述第一文档的一个或多个历史版本和所述一个或多个历史版本中每个历史版本的修订操作;所述进度条上存在一个或多个版本节点,所述版本节点用于跳转至所述第一文档的对应版本页面;响应于对所述一个或多个版本节点中任一版本节点的选择操作,在所述显示界面上显示该版本节点对应的版本页面。上述方案,通过进度条以操作指令级回溯第一文档的历史修订操作,通过进度条上的版本节点回溯第一文档的历史版本,使得第一文档的不同版本之间的对比更加便利直观,用户使用时能够更加快速准确地处理第一文档中的异常操作;且通过进度条还能够按照修订时间线进行修订操作和历史版本的回溯,对修改过程进行连续追踪,解决了操作追溯碎片化的问题。
Smart Images

Figure CN122985015A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of computer technology, and in particular to a document version backtracking method, electronic device, storage medium, and computer program product. Background Technology
[0002] Current cloud-based collaborative editing technologies, such as online spreadsheets, suffer from problems when performing version rollback, including unintuitive version comparisons, unclear differences between versions, fragmented operation tracing, and inefficient exception handling. Summary of the Invention
[0003] To address the related technical issues, embodiments of this application provide a document version backtracking method, an electronic device, a storage medium, and a computer program product.
[0004] The technical solution of this application embodiment is implemented as follows: This application provides a document version backtracking method, the method comprising: In response to a first user action on a first document, a progress bar is displayed on the display interface of the first document; the first user action is used to initiate the revision mode of the first document; the progress bar is used to trace one or more historical versions of the first document and the revision operation of each of the one or more historical versions; there are one or more version nodes on the progress bar, and the version nodes are used to jump to the corresponding version page of the first document. In response to the selection operation of any one of the one or more version nodes, the version page corresponding to that version node is displayed on the display interface.
[0005] In the above scheme, displaying the version page corresponding to the version node on the display interface includes: Obtain the first operation sequence corresponding to the version node; the first operation sequence contains one or more revision operations in the historical versions corresponding to the version node; The version page corresponding to the version node is rendered based on the first operation sequence, and each revision operation in one or more revision operations in the first operation sequence is displayed sequentially on the display interface.
[0006] In the above scheme, rendering the version page corresponding to the version node based on the first operation sequence includes: Based on the first operation sequence and the Virtual Document Object Model (DOM) technology, the area revised by each revision operation in the first operation sequence in the version page corresponding to the version node is updated, and the cell targeted by each revision operation in the first operation sequence is highlighted.
[0007] In the above solution, displaying a progress bar on the display interface of the first document includes: Obtain the second operation sequence of the first document within a certain period of time, and generate the progress bar based on the time range corresponding to the second operation sequence; Based on the timestamp of each historical version in one or more historical versions of the first document, add the corresponding version node to the progress bar; The progress bar with added version nodes is displayed on the display interface of the first document, and the corresponding version number and / or timestamp is marked at the one or more version nodes.
[0008] The method in the above scheme further includes: In response to a second user action, the revision operation corresponding to the current progress bar is rendered and displayed; the second user action represents a drag operation on the progress bar.
[0009] The method in the above scheme further includes: In response to a third user action, a first operation sequence and / or a second operation sequence are filtered; the third user action represents filtering of attributes of the revision operation, the attributes including one or more of operator, time range, and operation type.
[0010] The method in the above scheme further includes: In response to a fourth user action, the first document is edited in real time; the editing action includes applying the content within the selected area to the current latest version of the first document.
[0011] This application also provides an electronic device, including a processor and a memory for storing a computer program that can run on the processor, wherein the processor, when running the computer program, performs the steps of any of the methods described above.
[0012] This application also provides a storage medium storing a computer program thereon, which, when executed by a processor, implements the steps of any of the above methods.
[0013] This application also provides a computer program product, including a computer program that, when executed by a processor, implements the steps of any of the above methods.
[0014] In the document version backtracking method, electronic device, storage medium, and computer program product provided in this application embodiment, in response to a first user operation on a first document, a progress bar is displayed on the display interface of the first document; the first user operation is used to initiate the revision mode of the first document; the progress bar is used to trace one or more historical versions of the first document and the revision operation of each of the one or more historical versions; the progress bar has one or more version nodes, and the version nodes are used to jump to the corresponding version page of the first document; in response to a selection operation of any version node among the one or more version nodes, the version page corresponding to that version node is displayed on the display interface. The above solution, by using a progress bar to backtrack the historical revision operations of the first document at the operation instruction level, and by using the version nodes on the progress bar to backtrack the historical versions of the first document, makes the comparison between different versions of the first document more convenient and intuitive, allowing users to handle abnormal operations in the first document more quickly and accurately; furthermore, the progress bar can also be used to backtrack revision operations and historical versions according to the revision timeline, continuously tracking the modification process and solving the problem of fragmented operation tracing. Attached Figure Description
[0015] Figure 1 A flowchart illustrating a document version backtracking method provided in an embodiment of this application; Figure 2 An example diagram of a display interface provided in an embodiment of this application; Figure 3 A schematic diagram of a document version backtracking device provided in an embodiment of this application; Figure 4 This is a schematic diagram of the electronic device structure provided in the embodiments of this application. Detailed Implementation
[0016] In current online spreadsheet tools, version control is typically implemented by saving a snapshot of the entire version. Users can switch to historical versions using the saved snapshot. However, this version control functionality has the following drawbacks: Version comparison is not intuitive: traditional solutions rely on static version lists, requiring manual switching for comparison; The differences are not displayed intuitively: the differences between versions are only marked by color fill. When the cells themselves have color fill or multiple people make multiple rounds of modifications, the difference marks are easily covered or confused. Fragmented operation traceability: Traditional version lists only show snapshots at discrete points in time, which cannot continuously track the modification process. Users need to manually switch versions to compare details. Inefficient handling of anomalies: When anomalies occur during multiple edits, it is necessary to repeatedly switch versions and manually compare differences, which increases communication costs and operational complexity. In the event of editing conflicts or accidental overwriting, it is difficult to restore the correct content.
[0017] Based on this, in various embodiments of this application, in response to a first user operation on the first document, a progress bar is displayed on the display interface of the first document; the first user operation is used to initiate the revision mode of the first document; the progress bar is used to trace one or more historical versions of the first document and the revision operation of each of the one or more historical versions; the progress bar has one or more version nodes, and the version nodes are used to jump to the corresponding version page of the first document; in response to a selection operation of any version node among the one or more version nodes, the version page corresponding to that version node is displayed on the display interface. By using the progress bar to trace back the historical revision operations of the first document at the operation instruction level, and by using the version nodes on the progress bar to trace back the historical versions of the first document, the comparison between different versions of the first document becomes more convenient and intuitive, and users can handle abnormal operations in the first document more quickly and accurately; moreover, the progress bar can also be used to trace back revision operations and historical versions according to the revision timeline, continuously tracking the modification process and solving the problem of fragmented operation tracing.
[0018] The present application will now be described in further detail with reference to the accompanying drawings and embodiments.
[0019] This application provides a document version backtracking method, applied to electronic devices. The electronic device can refer to a terminal device or an electronic device that directly interacts with the user. For example... Figure 1 As shown, the method includes: Step 101: In response to a first user action on the first document, display a progress bar on the display interface of the first document.
[0020] Wherein, the first user operation is used to initiate the revision mode of the first document; the progress bar is used to trace one or more historical versions of the first document and the revision operation of each of the one or more historical versions; there are one or more version nodes on the progress bar, and the version nodes are used to jump to the corresponding version page of the first document.
[0021] Here, the first user action, such as clicking the "Revise" button in the "Review" option of the function area, initiates the revision mode of the first document. In revision mode, each user's revision actions on the first document can be recorded. Responding to the first user action on the first document can be understood as responding to the initiation of the revision mode. The revision mode can be a revision history mode, and the first document can be a cloud document, an online document, or a document that supports multi-user editing, such as a cloud spreadsheet, an online spreadsheet, or a spreadsheet that supports multi-user editing. One or more historical versions of the first document can be key versions of the first document. Version nodes correspond one-to-one with historical versions or key versions of the first document, and corresponding version information, including version number and timestamp, can be displayed near the version nodes. The area displaying the progress bar can be understood as the revision history interactive control area. The revision action can be initiated by the server in response to the first user action or a corresponding request from the first user action, sending the revision action to the electronic device.
[0022] In revision mode, user revision operations, such as cell modification, formatting adjustments, and formula entry, can be captured. This captures revision operation information, which may include one or more of the following: operation type, operator ID, operator avatar, affected cell coordinates, previous value, new value, document unique code, and timestamp. For example, if the captured user revision operation is modifying a cell value, the collected revision operation information would include: operation type "modify cell," operator ID "U123," affected cell coordinates "row 5, column B," previous value "200," new value "300," and timestamp "1716230400000." The captured or collected revision operations can be formatted using JavaScript Object Notation (JSON) and then sent to the server. This allows the server to retrieve all user revision operations, maintaining data consistency. When sending the collected revision operations to the server, the revision operations can first be compressed using the JZ4 compression algorithm, and then the compressed revision operations can be transmitted to the server through a Transport Layer Security (TLS) encrypted channel, such as TLS 1.3, to ensure the lightweight and secure data transmission.
[0023] Step 102: In response to the selection operation of any version node among the one or more version nodes, display the version page corresponding to that version node on the display interface.
[0024] Here, selecting any version node from one or more version nodes can include clicking any version node from one or more version nodes. In response to the selection of any version node from one or more version nodes, the user is redirected to the version page corresponding to the selected version node, allowing the user to jump to the corresponding version page by clicking any version node on the progress bar, making version switching faster and more convenient.
[0025] To enable rapid version switching and dynamic version tracking, in one embodiment, displaying the version page corresponding to the version node on the display interface includes: Obtain the first operation sequence corresponding to the version node; the first operation sequence contains one or more revision operations in the historical versions corresponding to the version node; The version page corresponding to the version node is rendered based on the first operation sequence, and each revision operation in one or more revision operations in the first operation sequence is displayed sequentially on the display interface.
[0026] Here, in response to a selection operation on any version node among one or more version nodes, a first operation sequence corresponding to the selected version node can be obtained. For example, the first operation sequence corresponding to the selected version node can be obtained from the server based on the timestamp of the version node. This can be done by obtaining the first operation sequence from the server all at once, or by having the server push each revision operation in the first operation sequence one by one. The first operation sequence can include all revision operations after the timestamp corresponding to the version node, or it can include all revision operations before the timestamp corresponding to the next version node after the timestamp corresponding to the version node. The first operation sequence can be obtained from the server or from a cached second operation sequence.
[0027] The version page corresponding to the version node is rendered based on the first operation sequence, and each revision operation in one or more revision operations in the first operation sequence is displayed on the display interface in sequence. This includes: for each revision operation in the first operation sequence, the version page corresponding to the version node is rendered based on the revision operation, and the revision process of the revision operation is displayed on the display interface, thereby realizing dynamic backtracking of all revision operations in the first operation sequence.
[0028] It should be noted that, in response to a fifth user action, the version page corresponding to that version node can be rendered based on the first action sequence. Specifically, each revision action in the first action sequence will be automatically displayed in the order of the revision actions. The fifth user action is represented by clicking the play button on the progress bar. Alternatively, playback can start by default after navigating to the corresponding version page.
[0029] It should be noted that when displaying each revision operation in one or more revision operations in the first operation sequence on the display interface, one or more of the operator's identifier, timestamp, and operator's avatar for each revision operation can also be displayed simultaneously.
[0030] To improve rendering performance and reduce computational overhead, in one embodiment, rendering the version page corresponding to the version node based on the first operation sequence includes: Based on the first operation sequence and virtual DOM technology, the area revised by each revision operation in the first operation sequence in the version page corresponding to the version node is updated, and the cell targeted by each revision operation in the first operation sequence is highlighted.
[0031] Here, for each revision operation in the first operation sequence, virtual DOM technology can be used to update only the cell area within the version page corresponding to that version node that is affected by the revision operation. Compared to updating the entire page, this can reduce the computational cost during rendering and improve rendering performance. At the same time, the cells affected by the revision operation can be highlighted, for example, with a light blue highlight gradient, or by combining Cascading Style Sheets (CSS) animations to achieve a highlight flashing effect, in order to avoid conflicts with user-defined colors.
[0032] To effectively trace back through document history versions, in one embodiment, displaying a progress bar on the display interface of the first document includes: Obtain the second operation sequence of the first document within a certain period of time, and generate the progress bar based on the time range corresponding to the second operation sequence; Based on the timestamp of each historical version in one or more historical versions of the first document, add the corresponding version node to the progress bar; The progress bar with added version nodes is displayed on the display interface of the first document, and the corresponding version number and / or timestamp is marked at the one or more version nodes.
[0033] Here, in response to a first user action on a first document, a second sequence of operations on the first document over a given period is obtained. Each revision operation in the second sequence may also include corresponding version information, which may include one or more of the document's unique code, unique version identifier, and version generation time. The period is the most recent time, such as the last two hours, and its length can be calculated based on the modification frequency of the first document. Once the second sequence of operations is obtained, each revision operation can be cached in a sorted set of a remote dictionary server (Redis) or stored in a local cache, using timestamps as scores for fast range lookups. Then, a progress bar is generated based on the time range corresponding to all revision operations in the second sequence. The timestamps of historical versions represent version generation times, and the version sequence numbers of historical versions are unique version identifiers.
[0034] It should be noted that, in the second operation sequence, if the information of each revision operation does not include the corresponding version information, in response to the first user operation on the first document, the document version record table of the first document can also be obtained. The document version record table of the first document includes version information of each historical version of the first document, including one or more of the document's unique code, unique version identifier, and version generation time.
[0035] Based on the timestamp of each historical version in one or more historical versions of the first document, determine the relative position of each historical version on the progress bar; based on the relative position of each historical version on the progress bar, add the corresponding version node on the progress bar, or based on the number of historical versions included in the second operation sequence, add the same number of version nodes on the progress bar evenly as the number of historical versions; one version node corresponds to one historical version, and mark the corresponding version number and / or timestamp at each version node.
[0036] For example, such as Figure 2As shown, the revision history interactive control area includes a progress bar and playback control buttons. The progress bar is 1 minute and 25 seconds long and includes 4 version nodes, corresponding to the 1st, 2nd, 3rd, and 4th versions of the first document. The playback control buttons can include one or more of the following: play / pause button, fast forward button, rewind button, speed adjustment button, and playback mode. The play / pause button can pause or play the current revision operation at any time. When paused, the current rendering state can be cached, and when playback resumes, it can continue to display the subsequent revision process from the current rendering state. The fast forward and / or rewind buttons are similar to drag operations. The speed adjustment button supports multiple speed adjustments, such as 0.5x, 1x, and 2x speed adjustment. The speed can be adjusted by adjusting the revision operation rendering interval or adjusting the server push interval for revision operations.
[0037] To make the revision operation more accurate, rapid, and convenient, in one embodiment, the method further includes: In response to a second user action, the revision operation corresponding to the current progress bar is rendered and displayed; the second user action represents a drag operation on the progress bar.
[0038] Here, in response to the second user action—dragging the progress bar—the revision actions corresponding to the current progress bar's progress are rendered and displayed. For example, after dragging the progress bar, the current progress is between two version nodes, i.e., within the revision process of the previous historical version. The time range of the revision actions corresponding to the current progress can be calculated based on the current progress percentage, thereby determining the corresponding revision actions and subsequent revision actions. Starting from the revision action corresponding to the current progress, the revision action process is displayed sequentially on the interface. The second user action can include selecting and dragging the progress bar with the mouse, clicking the fast forward button, or clicking the rewind button. The revision actions corresponding to the current progress bar's progress and subsequent revision actions can be obtained from the server, or from the cached second action sequence or the first action sequence of the corresponding historical version.
[0039] It should be noted that while the progress bar is being dragged, a thumbnail of the revision operation corresponding to the current progress can also be displayed. The thumbnail is clickable, and in response to the click operation on the thumbnail, the corresponding revision operation can be displayed on the display interface, further increasing the convenience of locating the revision operation.
[0040] To improve the efficiency and data consistency of multi-user collaboration in the first document and to achieve dynamic orchestration at the operation instruction level, in one embodiment, the method further includes: In response to a third user action, a first operation sequence and / or a second operation sequence are filtered; the third user action represents filtering of attributes of the revision operation, the attributes including one or more of operator, time range, and operation type.
[0041] Here, upon obtaining the first operation sequence and / or the second operation sequence, in response to the third user operation, i.e., the attribute filtering operation in response to the revision operation, each revision operation in the first and / or second operation sequences is filtered according to one or more of the following: operator, timestamp, and operation type. Attributes can also be understood as revision operation information; the operator can be understood as the user.
[0042] When the attribute includes the operator, the system filters out revision operations from one or more operators selected by the third user, or filters out revision operations from operators other than those selected by the third user. This means loading revision operations from a specific operator, thus rendering and displaying only the revisions from that specific operator, improving multi-user collaboration efficiency. For example, filtering out operator A's revision operations and rendering and displaying those operations yields... Figure 2 The displayed revision actions are those of operator A. By switching the selected operator in the third user operation, the revision actions of different operators can be displayed, achieving a stronger traceability effect.
[0043] When the attribute includes a time range, revision operations within the time range selected by the third user operation are filtered from the first and / or second operation sequences, so that the current operator can view the operation revision records within a specific time period. The current operator can be either the creator or the editor of the first document.
[0044] When the attribute includes operation type, the revision operations with the operation type selected by the third user operation are filtered from the first operation sequence and / or the second operation sequence, such as cell modification revision operations, format adjustment revision operations, formula input revision operations, etc., so that the current operator can focus on specific types of operations.
[0045] The filtered revision operations are recombined into a first operation sequence and / or a second operation sequence in chronological order, resulting in a filtered first operation sequence and / or a filtered second operation sequence. The filtered first operation sequence and / or the filtered second operation sequence are rendered and displayed in real time, allowing users to view revision records for specific users, specific time periods, or specific operation types as needed. Furthermore, users can still use the playback control buttons and progress bar to locate and play specific revision operations within the filtered operation sequence.
[0046] It should be noted that the third user operation can be performed before obtaining the first operation sequence and / or the second operation sequence. Once the first operation sequence and / or the second operation sequence are obtained, the revision operation filtering can be performed in response to the third user operation. If the second operation sequence is obtained in response to the first user operation on the first document, the second operation sequence can be filtered in response to the third user operation; similarly, if the first operation sequence is obtained in response to a selection operation on any version node among one or more version nodes, the first operation sequence can be filtered in response to the third user operation.
[0047] In this embodiment, by flexibly filtering and reorganizing operation instructions, the current operator can quickly locate specific revision operations or key modification steps, reducing the cognitive load of collaboration.
[0048] To quickly resolve issues in multi-user collaboration, improve editing efficiency, and achieve dynamic updates at the command level, in one embodiment, the method further includes: In response to a fourth user action, the first document is edited in real time; the editing action includes applying the content within the selected area to the current latest version of the first document.
[0049] In a multi-user editing process, it's possible that operator A might accidentally modify an area belonging to operator B. This can be resolved by responding to a fourth user's action and performing real-time editing on the first document. Specifically, the third user's action can be triggered first, filtering out operator A's revisions, and then applying the correct content from operator B's edited area to the latest version. Alternatively, during operator B's editing period, an area containing the correct content can be selected, and the content within that selected area can be applied to the latest version. The fourth user's action can be selecting the revisions to be retained and applying them to the latest version. For example, selecting the revisions to be retained, right-clicking, and choosing the option to apply the selected content to the latest document eliminates the need to switch versions and manually copy and paste, improving editing efficiency.
[0050] In this embodiment, the revised operations can be filtered and reorganized and then applied to the latest version in real time, making the solution to abnormal problems more convenient and efficient, and improving editing efficiency.
[0051] The following section provides a more detailed description of this application with reference to application examples.
[0052] The document revisiting system can adopt a three-tier architecture, consisting of a data acquisition layer, a processing engine layer, and a presentation layer. The data acquisition layer uses WebSocket to capture operation commands in real time. The processing engine layer includes functions such as compression and decompression of revision operation commands, dynamic arrangement, filtering, slicing, and selective application. The presentation layer visualizes the revision operation timeline through a progress bar and dynamically renders the page. The document revisiting method can specifically include the following steps: Step 1: The electronic device captures the revision operation in real time.
[0053] Here, before the electronic device captures the revision operation in real time, the client on the electronic device can establish a connection with the server on the server, for example, by establishing a WebSocket connection. The collected revision operation information is then compressed and encrypted before being sent to the server via WebSocket. The electronic device is a terminal device.
[0054] Step 2: Server management revision operation.
[0055] The server decompresses and decrypts the compressed and encrypted revision operation information, and stores the decompressed and decrypted revision operations in the revision operation set in the sharded cluster (such as MongoDB). The data is then hash-sharded according to the unique document code to support concurrent writing of massive amounts of documents.
[0056] The server can also generate different versions of the first document based on revision operations according to version generation rules. For example, it can scan the set of revision operations at set intervals. When a new revision operation is detected, a version of the first document is generated based on one or more new revision operations, and the corresponding version information is inserted into the version revision record table of the first document or into the revision operation information of the set of revision operations. The set interval can be determined according to the actual application, such as 5 minutes. The version information includes the document's unique code, unique version identifier, version generation time, and other data. The generated historical versions can support dynamic positioning of a visual playback progress bar, enabling precise backtracking of operation history. Moreover, this version generation mechanism can be implemented through a lightweight scheduling framework, ensuring both system lightweightness and the completeness and practicality of version tracking.
[0057] Step 3: In response to the first user action on the first document, the electronic device displays a progress bar on the display interface of the first document.
[0058] Here, in response to a first user operation on a first document, the electronic device can obtain a second sequence of operations on the first document over a period of time. Based on the time range corresponding to the second sequence of operations, a progress bar is generated. Based on the timestamps of each historical version in one or more historical versions of the first document, corresponding version nodes are added to the progress bar. The progress bar with added version nodes is displayed on the first document's display interface, and the corresponding version number and / or timestamp is marked at one or more version nodes. This means displaying the default first document interface and progress bar, which can be the page corresponding to the first revision operation in the second sequence. While displaying the default first document interface and progress bar, the revision process for each revision operation in the second sequence can also be started by default. The version number is a unique version identifier. The version timestamp is the version generation time.
[0059] For example, an electronic device can query the revision operations of the first document within the last 2 hours from the revision operation set of the server, and store the revision operations in a Redis sorted set in chronological order. It can then perform a fast range query using timestamps as scores, or store the data in a cache to obtain the second operation sequence. Based on the time range of the revision operations in the second operation sequence, a progress bar is generated. According to the version information in the version revision record table of the first document, corresponding version nodes are added to the progress bar, and each version node is marked with a version number and / or timestamp.
[0060] Step 4: In response to the selection operation of any version node among one or more version nodes, the electronic device displays the version page corresponding to that version node on the display interface.
[0061] Here, in response to a selection operation on any one of one or more version nodes, the electronic device can obtain the first operation sequence corresponding to that version node; based on the first operation sequence, the version page corresponding to that version node is rendered, and each revision operation in one or more revision operations in the first operation sequence is displayed sequentially on the display interface.
[0062] For example, after a user selects a version node, the electronic device retrieves the revision operations after the timestamp of that version node from the server's set of revision operations or its cache, i.e., it obtains the first operation sequence. Then, for each revision operation in the first operation sequence, virtual DOM technology is used to update only the cell area affected by that revision operation and highlight that cell area. The server can also push the revision operations in the second operation sequence to the electronic device one by one via WebSocket, and the electronic device renders them one by one.
[0063] Step 5: The electronic device responds to the second user's operation by rendering and displaying the revision operation corresponding to the current progress bar.
[0064] The specific implementation process of steps 5-7 is described above and will not be repeated here.
[0065] Step 6: The electronic device responds to the third user's operation by filtering the first operation sequence and / or the second operation sequence.
[0066] Step 7: The electronic device responds to the fourth user's operation and performs real-time editing operations on the first document.
[0067] It should be noted that steps 5-7 can be triggered at any time during the execution of steps 3-4. That is, during the execution of steps 3-4, users can perform revision operations at any time by dragging the progress bar and playing the control button, or filter specific users, specific times, and specific types of practice operations, or edit the first document in real time.
[0068] In this application embodiment, a visual progress bar at the operation instruction level can be created based on the revision record at the operation instruction level. That is, the revision process is displayed at the granularity of the revision operation, without the need to generate a video, thus improving rendering efficiency. Users can jump to the corresponding version by clicking on the progress bar node or drag the progress bar to browse the corresponding revision operation, realizing continuous tracking, dynamic playback, and difference visualization of the modification process. During playback, users can also pause, resume playback, advance, and rewind at any time to accurately locate the modification step, realize dynamic traceability, and reduce the cognitive load of collaboration. Dynamic orchestration and dynamic updates improve the efficiency of multi-person collaboration, data consistency, and anomaly resolution.
[0069] To implement the method of the embodiments of this application, the embodiments of this application also provide a document version backtracking device, such as... Figure 3 As shown, the device includes: The first display unit 301 is configured to display a progress bar on the display interface of the first document in response to a first user operation on the first document; the first user operation is configured to start the revision mode of the first document; the progress bar is configured to trace one or more historical versions of the first document and the revision operation of each of the one or more historical versions; the progress bar has one or more version nodes, and the version nodes are configured to jump to the corresponding version page of the first document. The second display unit 302 is used to display the version page corresponding to the version node on the display interface in response to the selection operation of any version node among the one or more version nodes.
[0070] In one embodiment, the second display unit 302 is specifically used to obtain a first operation sequence corresponding to the version node; the first operation sequence includes one or more revision operations in the historical version corresponding to the version node; The version page corresponding to the version node is rendered based on the first operation sequence, and each revision operation in one or more revision operations in the first operation sequence is displayed sequentially on the display interface.
[0071] In one embodiment, the second display unit 302 is specifically used to update the area revised by each revision operation in the first operation sequence in the version page corresponding to the version node based on the first operation sequence and the Virtual Document Object Model (DOM) technology, and to highlight the cell targeted by each revision operation in the first operation sequence.
[0072] In one embodiment, the first display unit 301 is specifically used to acquire a second operation sequence of the first document over a period of time, and generate the progress bar based on the time range corresponding to the second operation sequence; Based on the timestamp of each historical version in one or more historical versions of the first document, add the corresponding version node to the progress bar; The progress bar with added version nodes is displayed on the display interface of the first document, and the corresponding version number and / or timestamp is marked at the one or more version nodes.
[0073] In one embodiment, the device further includes: The rendering unit is used to render and display the revision operation corresponding to the current progress bar in response to the second user operation; the second user operation represents the drag operation of the progress bar.
[0074] In one embodiment, the device further includes: A filtering unit is configured to filter a first operation sequence and / or a second operation sequence in response to a third user operation; the third user operation represents filtering attributes of a revision operation, the attributes including one or more of operator, time range, and operation type.
[0075] In one embodiment, the device further includes: An editing unit is configured to perform real-time editing operations on the first document in response to a fourth user operation; the editing operation includes applying the content within the selected area to the current latest version of the first document.
[0076] In practical applications, the first display unit 301, the second display unit 302, the rendering unit, the filtering unit, and the editing unit can be implemented by the processor in the document version backtracking device in conjunction with the communication interface.
[0077] It should be noted that the document version backtracking device provided in the above embodiments is only illustrated by the division of the above program modules. In practical applications, the above processing can be assigned to different program modules as needed, that is, the internal structure of the device can be divided into different program modules to complete all or part of the processing described above. In addition, the document version backtracking device and the document version backtracking method embodiments provided in the above embodiments belong to the same concept, and their specific implementation process can be found in the method embodiments, which will not be repeated here.
[0078] Based on the hardware implementation of the above program modules, embodiments of this application also provide an electronic device, such as... Figure 4 As shown, the electronic device 400 includes: Communication interface 401 allows for information exchange with other devices or network nodes.
[0079] The processor 402 is connected to the communication interface 401 to enable information interaction with other devices or network nodes, and to execute the methods provided by one or more technical solutions in the above embodiments when running computer programs.
[0080] Memory 403 is used to store computer programs that can run on processor 402.
[0081] Specifically, the processor 402 is configured to display a progress bar on the display interface of the first document in response to a first user operation on the first document; the first user operation is configured to initiate a revision mode of the first document; the progress bar is configured to trace one or more historical versions of the first document and the revision operation of each of the one or more historical versions; the progress bar has one or more version nodes, and the version nodes are configured to jump to the corresponding version page of the first document. In response to the selection operation of any one of the one or more version nodes, the version page corresponding to that version node is displayed on the display interface.
[0082] In one embodiment, the processor 402 is specifically configured to obtain a first operation sequence corresponding to the version node; the first operation sequence includes one or more revision operations in the historical versions corresponding to the version node; The version page corresponding to the version node is rendered based on the first operation sequence, and each revision operation in one or more revision operations in the first operation sequence is displayed sequentially on the display interface.
[0083] In one embodiment, the processor 402 is specifically used to update the area revised by each revision operation in the first operation sequence in the version page corresponding to the version node, based on the first operation sequence and the Virtual Document Object Model (DOM) technology, and to highlight the cell targeted by each revision operation in the first operation sequence.
[0084] In one embodiment, the processor 402 is specifically configured to obtain a second operation sequence of the first document over a period of time, and generate the progress bar based on the time range corresponding to the second operation sequence; Based on the timestamp of each historical version in one or more historical versions of the first document, add the corresponding version node to the progress bar; The progress bar with added version nodes is displayed on the display interface of the first document, and the corresponding version number and / or timestamp is marked at the one or more version nodes.
[0085] In one embodiment, the processor 402 is further configured to render and display a revision operation corresponding to the current progress of the progress bar in response to a second user operation; the second user operation represents a drag operation on the progress bar.
[0086] In one embodiment, the processor 402 is further configured to filter a first operation sequence and / or a second operation sequence in response to a third user operation; the third user operation represents filtering attributes of a revision operation, the attributes including one or more of operator, time range, and operation type.
[0087] In one embodiment, the processor 402 is further configured to perform a real-time editing operation on the first document in response to a fourth user operation; the editing operation includes applying content within a selected area to the current latest version of the first document.
[0088] It should be noted that the specific processing procedure of processor 402 can be understood by referring to the above method. Of course, in practical applications, the various components in electronic device 400 are coupled together through bus system 404. It can be understood that bus system 404 is used to realize the connection and communication between these components. In addition to the data bus, bus system 404 also includes a power bus, a control bus, and a status signal bus. However, for the sake of clarity, in... Figure 4 The general designated all buses as Bus System 404.
[0089] The memory 403 in this embodiment is used to store various types of data to support the operation of the electronic device 400. Examples of such data include any computer program used to operate on the electronic device 400.
[0090] The methods disclosed in the embodiments of this application can be applied to the processor 402, or implemented by the processor 402. The processor 402 may be an integrated circuit chip with signal processing capabilities. In the implementation process, each step of the above method can be completed by the integrated logic circuit of the hardware in the processor 402 or by instructions in the form of software. The processor 402 may be a general-purpose processor, a digital signal processor (DSP), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The processor 402 can implement or execute the methods, steps, and logic block diagrams disclosed in the embodiments of this application. The general-purpose processor may be a microprocessor or any conventional processor, etc. The steps of the methods disclosed in the embodiments of this application can be directly reflected as being executed by a hardware decoding processor, or being executed by a combination of hardware and software modules in the decoding processor. The software modules may be located in a storage medium, which is located in the memory 403. The processor 402 reads the information in the memory 403 and completes the steps of the aforementioned method in combination with its hardware.
[0091] In an exemplary embodiment, the electronic device 400 may be implemented by one or more application-specific integrated circuits (ASICs), DSPs, programmable logic devices (PLDs), field-programmable gate arrays (FPGAs), general-purpose processors, controllers, microcontrollers (MCUs), microprocessors, or other electronic components to perform the aforementioned method.
[0092] It is understood that the memory (memory 403) in this embodiment of the application can be volatile memory or non-volatile memory, or it can include both volatile memory and non-volatile memory. The non-volatile memory can be read-only memory (ROM), programmable read-only memory (PROM), erasable programmable read-only memory (EPROM), electrically erasable programmable read-only memory (EEPROM), magnetic random access memory (FRAM), flash memory, magnetic surface memory, optical disc, or compact disc read-only memory (CD-ROM); the magnetic surface memory can be disk storage or magnetic tape storage. The volatile memory can be random access memory (RAM), which is used as an external cache. By way of example, but not limitation, many forms of RAM are available, such as Static Random Access Memory (SRAM), Synchronous Static Random Access Memory (SSRAM), Dynamic Random Access Memory (DRAM), Synchronous Dynamic Random Access Memory (SDRAM), Double Data Rate Synchronous Dynamic Random Access Memory (DDRSDRAM), Enhanced Synchronous Dynamic Random Access Memory (ESDRAM), SyncLink Dynamic Random Access Memory (SLDRAM), and Direct Rambus Random Access Memory (DRRAM).The memories described in the embodiments of this application are intended to include, but are not limited to, these and any other suitable types of memories.
[0093] In an exemplary embodiment, this application also provides a storage medium, namely a computer storage medium, specifically a computer-readable storage medium, such as a memory 403 storing a computer program, which can be executed by the processor 402 of the electronic device 400 to complete the steps described in any of the aforementioned methods. The computer-readable storage medium may be a memory such as FRAM, ROM, PROM, EPROM, EEPROM, Flash Memory, magnetic surface memory, optical disc, or CD-ROM.
[0094] For example, embodiments of this application also provide a computer program product, including a computer program that can be executed by a processor 402 of an electronic device 400 to perform the steps described in any of the foregoing methods.
[0095] It should be noted that terms such as "first" and "second" are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. The term "and / or" in this document merely describes the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent: A alone, A and B simultaneously, or B alone. The terms "one or more" and "one or more" in this document are exemplary expressions and can be replaced with any possible expressions, such as one or more, at least one, or at least one. Furthermore, the technical solutions described in the embodiments of this application can be arbitrarily combined without conflict. The above descriptions are merely preferred embodiments of this application and are not intended to limit the scope of protection of this application.
Claims
1. A document version backtracking method, characterized in that, The method includes: In response to a first user action on a first document, a progress bar is displayed on the display interface of the first document; the first user action is used to initiate the revision mode of the first document; the progress bar is used to trace one or more historical versions of the first document and the revision operation of each of the one or more historical versions; there are one or more version nodes on the progress bar, and the version nodes are used to jump to the corresponding version page of the first document. In response to the selection operation of any one of the one or more version nodes, the version page corresponding to that version node is displayed on the display interface.
2. The method according to claim 1, characterized in that, Displaying the version page corresponding to the version node on the display interface includes: Obtain the first operation sequence corresponding to the version node; the first operation sequence contains one or more revision operations in the historical versions corresponding to the version node; The version page corresponding to the version node is rendered based on the first operation sequence, and each revision operation in one or more revision operations in the first operation sequence is displayed sequentially on the display interface.
3. The method according to claim 2, characterized in that, The step of rendering the version page corresponding to the version node based on the first operation sequence includes: Based on the first operation sequence and the Virtual Document Object Model (DOM) technology, the area revised by each revision operation in the first operation sequence in the version page corresponding to the version node is updated, and the cell targeted by each revision operation in the first operation sequence is highlighted.
4. The method according to claim 1, characterized in that, Displaying a progress bar on the display interface of the first document includes: Obtain the second operation sequence of the first document within a certain period of time, and generate the progress bar based on the time range corresponding to the second operation sequence; Based on the timestamp of each historical version in one or more historical versions of the first document, add the corresponding version node to the progress bar; The progress bar with added version nodes is displayed on the display interface of the first document, and the corresponding version number and / or timestamp is marked at the one or more version nodes.
5. The method according to claim 1, characterized in that, The method further includes: In response to a second user action, the revision operation corresponding to the current progress bar is rendered and displayed; the second user action represents a drag operation on the progress bar.
6. The method according to claim 2 or 4, characterized in that, The method further includes: In response to a third user action, a first operation sequence and / or a second operation sequence are filtered; the third user action represents filtering of attributes of the revision operation, the attributes including one or more of operator, time range, and operation type.
7. The method according to claim 1, characterized in that, The method further includes: In response to a fourth user action, the first document is edited in real time; the editing action includes applying the content within the selected area to the current latest version of the first document.
8. An electronic device, characterized in that, The method includes a processor and a memory for storing a computer program capable of running on the processor, wherein, when the processor is used to run the computer program, it performs the steps of the method according to any one of claims 1 to 7.
9. A storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the steps of the method according to any one of claims 1 to 7.
10. A computer program product, comprising a computer program, characterized in that, When the computer program is executed by a processor, it implements the steps of the method according to any one of claims 1 to 7.