OFD document modification system and method oriented to cloud collaboration, computer equipment and computer readable storage medium

By combining OT and CRDT algorithms, the incremental patching mechanism and LSTM neural network predict user operations are used to solve the efficiency and accuracy problems in online multi-person editing of OFD documents, and efficient multi-person collaborative editing is achieved.

CN120430286AActive Publication Date: 2025-08-05ADVANCED SYST DEV
View PDF 6 Cites 0 Cited by

Patent Information

Application Number
CN202510887319.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-06-30
Publication Date
2025-08-05
Estimated Expiration
2045-06-30

AI Technical Summary

Technical Problem

The existing OFD online multi-person editing solutions have room to improve efficiency and accuracy when synchronously modifying editing content, especially in the lack of effective technical solutions in collaborative editing of OFD documents.

Method used

Combining OT and CRDT algorithms, through hierarchical architecture design and intelligent prediction mechanism, the incremental patch mechanism of OT algorithm is used for operation compression, and the LSTM neural network is used to predict user operations, and the CRDT state merger and conflict decision-making layer are used to solve conflicts to achieve efficient collaboration of multiple people online editing.

Benefits of technology

It improves the efficiency of multiple online editing of OFD documents, reduces the number of conflicts, improves the accuracy and efficiency of editing, and reduces the pressure on the server when multiple online editing.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120430286A_ABST
    Figure CN120430286A_ABST
Patent Text Reader

Abstract

The invention belongs to the technical field of digital text editing, and particularly relates to an OFD document modification system and method oriented to cloud collaboration, computer equipment and a computer readable storage medium. The client comprises an operation layer, and the server comprises a coordination layer and a conflict decision layer; the operation layer is dominated by an OT algorithm, and real-time compression of operation is carried out by adopting an incremental patch mechanism of the OT algorithm; the method comprises the following steps: predicting subsequent operation of a user through an LSTM neural network, locally pre-generating an operation chain, and when prediction accuracy is greater than a preset threshold, sending the pre-generated operation chain to a server; adding a unique mark to each operation sent to the server; the coordination layer is dominated by a CRDT algorithm, performs type judgment on received operation, processes the operation in different modes, combines all results and performs dual-structure storage on combined versions, and the conflict decision-making layer performs conflict detection after the versions are combined. According to the invention, conflicts caused by simultaneous editing by multiple persons can be reduced, and editing efficiency is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the technical field of digital text editing, and specifically relates to an OFD document modification system, method, computer device and computer-readable storage medium for cloud collaboration. Background Art

[0002] Current online collaborative editing solutions for Word and Excel often rely on single-process transformations (OT) or CRDTs to ensure consistency across multiple editors. However, due to their respective strengths, both efficiency and accuracy in synchronized editing could be improved. OFD online multi-person editing solutions are a relatively new area, requiring a technical solution to address both feasibility and efficiency. Summary of the Invention

[0003] The present invention aims to address the technical problems existing in the prior art and provide an OFD document modification system, a computer device and a computer-readable storage medium for cloud collaboration.

[0004] Operation Transformation (OT) is a method used in collaborative technology to maintain consistency across different data copies. On different terminals, operations are adjusted based on their order to maintain data consistency. OT transformation features an incremental patching mechanism: it converts concurrent operations into a "sequence of patches" that can be executed sequentially, ensuring convergence of the final state.

[0005] Conflict-free Replicated Data Types (CRDTs) are a data type or scheme that ensures that data remains consistent across different replicas in a network. They are particularly well-suited for collaborative editing. The core concept of CRDTs is to allow each client to independently operate on a replica, supporting concurrent operations without the need to coordinate with other replicas, thereby achieving conflict-free data replication.

[0006] The present invention cleverly combines the above two technologies. Through layered architecture design and intelligent prediction mechanism, it can greatly improve the conflict problem of multiple people's online concurrent operations on OFD documents and improve editing efficiency.

[0007] In order to achieve the above technical objectives, the present invention adopts the following technical solutions: The present invention provides an OFD document modification system for cloud collaboration, including a client and a server; The client includes the operation layer, and the server includes the coordination layer and the conflict decision layer; The operation layer includes an operation compression module, an intent prediction module, and a conflict pre-detection module. The operation compression module uses the incremental patch mechanism of the OT algorithm to perform real-time compression of operations and generate OT patches. The intent prediction module predicts the user's subsequent operations through an LSTM neural network, pre-generates and caches the operation chain locally. In offline situations, the operation layer uses CRDT for local storage, and in online situations, uses OT patches for local storage. When the prediction accuracy is greater than a preset threshold, the pre-generated operation chain is sent to the server. The conflict pre-detection module adds a unique tag to each operation sent to the server. The coordination layer stores the received client operations into the operation queue, performs conflict pre-detection first, and then determines the operation type. For OT type operations, OT conversion is performed first, and then CRDT state merging is performed. For CRDT type operations, CRDT state merging is performed, and all results of different types of operations are merged to obtain a merged version. The merged version is stored in a dual structure, and the dual structure storage includes the OT log and the CRDT state tree. After the version is merged, the conflict decision layer performs conflict detection and adopts different methods to resolve conflicts for different conflicts; the merged version after the conflict is resolved is broadcast.

[0008] Preferably, the operation compression module further combines consecutive input operations into semantic operation units.

[0009] Preferably, the conflict pre-detection module introduces the ID sequential marking mechanism of CRDT, and adds the user ID, local clock and parent operation hash value to each operation.

[0010] Preferably, the conflict decision layer first performs ID sequential sorting of the CRDT algorithm for concurrent insertion operations, and then performs position offset compensation of the OT algorithm based on the parent operation.

[0011] Preferably, the conflict decision layer prioritizes OT conversion for overwriting modification operations. If the OT conversion fails, it automatically triggers the CRDT state reconstruction, reversely deduces the mergeable version through the OT operation log, and implements the CRDT version rollback.

[0012] Preferably, the conflict decision layer processes metadata conflicts based on the LWW strategy of the Lamport logical clock.

[0013] Preferably, the server also supports an adaptive synchronization protocol to synchronize the server's state to the client through the state synchronization layer, specifically including: when the bandwidth is higher than a preset bandwidth threshold, starting CRDT incremental state synchronization; when the network bandwidth is lower than or equal to the preset bandwidth threshold, using OT packet transmission for state synchronization; when the network is disconnected, the server switches from the network synchronization mode to the local copy mode of CRDT. After the network connection is restored, the server deserializes the CRDT into an OT patch through the OT converter, merges the differences, and performs state synchronization.

[0014] Preferably, the server adds a timestamp to the OFD document when receiving the operation chain, adopting a three-level hierarchical timestamp architecture, including document-level timestamp, page-level timestamp and OFD object-level timestamp, and adds timestamps to the document, page and OFD object respectively.

[0015] Preferably, the OFD object-level timestamp is specifically: adding an independent timestamp to each OFD element, and the OFD elements include paragraphs, pictures and tables.

[0016] Preferably, the document-level timestamp is specifically: generating a hash value of the full-text document at every preset time interval and applying for an authoritative timestamp.

[0017] Preferably, the server uses a history tracing mechanism to compare with the version information storage standard in the OFD standard to store the corresponding timeline for the modification of the OFD document, including the identity of the modifier, the operation time of the OFD document, and the comparison of the content before and after the operation.

[0018] The present invention also provides an OFD document modification method for cloud collaboration, which utilizes the above-mentioned OFD document modification system for cloud collaboration and includes the following steps: The user operates on the OFD document on the client; The client operation compression module uses the incremental patch mechanism of the OT algorithm to perform real-time compression of user operations and generate OT patches; The client's intention prediction module predicts the user's subsequent actions through an LSTM neural network, pre-generates and caches an operation chain locally. In offline situations, the operation layer uses CRDT for local storage, and in online situations, it uses OT patches for local storage. When the prediction accuracy exceeds a preset threshold, the pre-generated operation chain is sent to the server. The client's conflict pre-detection module adds a unique tag to each operation sent to the server; The client sends the operation chain to the server in the form of an operation stream; After receiving the client's operation flow, the server puts the operation into the operation receiving queue; The coordination layer on the server side first performs conflict pre-detection on the client operations received, and then determines the operation type. For OT type operations, OT conversion is first performed, and then CRDT state merging is performed. For CRDT type operations, CRDT state merging is performed, and all results of different types of operations are merged to obtain a merged version. The merged version is stored in a dual structure, which includes the OT log and the CRDT state tree. After the versions are merged, the conflict layer on the server side performs conflict detection and adopts different conflict resolution methods for different conflicts; the merged version after conflict resolution is broadcast.

[0019] The present invention also provides a computer device, including a memory and a processor, wherein the memory stores a computer program, and is characterized in that when the processor executes the computer program, it implements the processing process of the above-mentioned OFD document modification system for cloud collaboration. The present invention also provides a computer-readable storage medium having a computer program stored thereon, wherein the computer program, when executed by a processor, implements the processing of the above-mentioned OFD document modification system for cloud collaboration.

[0020] Compared with the prior art, the present invention has the following beneficial effects: (1) The present invention establishes OT and CRDT coordinated conversion storage merging technology, and OFD hierarchical timestamp technology to dynamically adjust the OFD document online editing algorithm, effectively improving the efficiency of OFD document multi-person online editing and reducing the number of conflicts.

[0021] (2) The present invention adopts different conflict resolution methods for concurrent insertion, overwriting modification and metadata conflicts, combining the OT algorithm with CRDT. The conflict resolution success rate is higher than that of the single OT algorithm and CRDT algorithm.

[0022] (3) Local operations performed by users are often not necessarily useful. The present invention first pre-generates an operation chain for the operation, caches the operation, and sends it to the server when the prediction accuracy is greater than a threshold, thereby reducing the pressure on the server when multiple people are editing online at the same time. BRIEF DESCRIPTION OF THE DRAWINGS

[0023] Figure 1 This is a schematic diagram of the workflow of an OFD document modification system for cloud collaboration according to an embodiment of the present invention; Figure 2 This is a schematic diagram of the mutual conversion between OT logs and CRDT state trees according to an embodiment of the present invention; Figure 3 This is a schematic diagram of a server-side operation chain reconstruction process after a client offline network is restored according to an embodiment of the present invention; Figure 4 This is the operation process of each layer of the client and server of an embodiment of the present invention; Figure 5 This is a flow chart of conflict pre-detection on the server side according to an embodiment of the present invention; Figure 6 This is the core processing flow of the Lamport LWW policy according to one embodiment of the present invention; Figure 7 The figure is a schematic diagram of a process of client verification according to an embodiment of the present invention. DETAILED DESCRIPTION

[0024] The following will clearly and completely describe the technical solutions in the embodiments of the present invention in conjunction with the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative efforts are within the scope of protection of the present invention.

[0025] The present invention provides an OFD document modification system for cloud collaboration, including a client and a server; The client includes the operation layer, and the server includes the coordination layer and the conflict decision layer; The operation layer includes an operation compression module, an intent prediction module, and a conflict pre-detection module. The operation compression module uses the incremental patch mechanism of the OT algorithm (the incremental patch mechanism of OT conversion: converts concurrent operations into a "patch sequence" that can be executed sequentially to ensure the final state convergence) to perform real-time compression of operations and generate OT patches. The intent prediction module predicts the user's subsequent operations through an LSTM neural network, pre-generates and caches the operation chain locally. In offline conditions, the operation layer uses CRDT for local storage, and in online conditions, uses OT patches for local storage. When the prediction accuracy exceeds a preset threshold, the pre-generated operation chain is sent to the server. The conflict pre-detection module adds a unique tag to each operation sent to the server. The coordination layer stores the received client operations into the operation queue, performs conflict pre-detection first, and then determines the operation type. For OT type operations, OT conversion is performed first, and then CRDT state merging is performed. For CRDT type operations, CRDT state merging is performed, and all results of different types of operations are merged to obtain a merged version. The merged version is stored in a dual structure, and the dual structure storage includes the OT log and the CRDT state tree. After the version is merged, the conflict decision layer performs conflict detection and adopts different methods to resolve conflicts for different conflicts; the merged version after the conflict is resolved is broadcast, and if it cannot be resolved, it is prompted for manual processing.

[0026] According to a specific embodiment of the present invention, the operation compression module further combines consecutive input operations into semantic operation units.

[0027] According to a specific embodiment of the present invention, the conflict pre-detection module incorporates the CRDT ID sequential tagging mechanism, attaching the user ID, local clock, and parent operation hash value to each operation. The ID sequential tagging mechanism is a distributed tracing technology that integrates vector clocks and operation provenance. It appends a causal triple to each operation: Device ID (device unique identifier), Logical Clock (incrementing logical clock), and Parent Hash (parent operation fingerprint). Except for the first operation (i.e., the root operation), all other operations have a parent operation.

[0028] According to a specific embodiment of the present invention, the conflict decision layer first performs ID sequential sorting of the CRDT algorithm for concurrent insertion operations, and then performs position offset compensation of the OT algorithm based on the parent operation.

[0029] According to a specific embodiment of the present invention, the conflict decision layer prioritizes overwriting modification operations by performing overwriting modification operations. If the OT conversion fails, it automatically triggers a CRDT state reconstruction, reversely deducing the mergeable version from the OT operation log to implement CRDT version rollback. Before the OT conversion, the CRDT state tree is backed up. During the OT conversion, branches are added to the CRDT state tree. If the OT conversion fails, the state tree is replaced with the original backup CRDT state tree.

[0030] According to a specific embodiment of the present invention, the conflict decision layer handles metadata conflicts based on the LWW strategy of the Lamport logical clock. For details about the LWW (Last Write Wins) of the Lamport logical clock, please refer to Figure 6 .

[0031] According to a specific embodiment of the present invention, the server also supports an adaptive synchronization protocol, synchronizing the server's status to the client through a status synchronization layer, specifically including: when the bandwidth is higher than a preset bandwidth threshold, starting CRDT incremental state synchronization; when the network bandwidth is lower than or equal to the preset bandwidth threshold, using OT packet transmission for state synchronization; when the network is disconnected, the server switches from network synchronization mode to CRDT's local copy mode. After the network connection is restored, the server deserializes CRDT into OT patches through the OT converter, merges the differences, and then performs state synchronization. The corresponding mode is dynamically switched according to the network transmission status. When the network bandwidth is sufficient, the network synchronization mode is directly used to synchronize to the server using the rules of OT and CRDT. When the network cannot be connected, the local copy cache is started.

[0032] According to a specific embodiment of the present invention, the server adds a timestamp to the OFD document when receiving the operation chain, adopting a three-level hierarchical timestamp architecture, including document-level timestamp, page-level timestamp and OFD object-level timestamp, and adds timestamps to the document, page and OFD object respectively.

[0033] According to a specific embodiment of the present invention, OFD object-level timestamp is specifically: adding an independent timestamp to each OFD element, and OFD elements include paragraphs, pictures and tables.

[0034] According to a specific embodiment of the present invention, the document-level timestamp is specifically as follows: a hash value of the full-text document is generated at every preset time interval and an authoritative timestamp is applied.

[0035] According to a specific embodiment of the present invention, an independent timestamp is added to each page, and the page-level timestamp is written into the OFD page Page_N.xml through the OFD interface.

[0036] According to a specific embodiment of the present invention, the server uses a historical tracing mechanism to compare with the version information storage standard in the OFD standard to store the corresponding timeline for the modification of the OFD document, including the identity of the modifier, the operation time of the OFD document, and the comparison of the content before and after the operation.

[0037] The present invention also provides an OFD document modification method for cloud collaboration, which utilizes the above-mentioned OFD document modification system for cloud collaboration and includes the following steps: The user operates on the OFD document on the client; The client operation compression module uses the incremental patch mechanism of the OT algorithm to perform real-time compression of user operations and generate OT patches; The client's intention prediction module predicts the user's subsequent actions through an LSTM neural network, pre-generates and caches an operation chain locally. In offline situations, the operation layer uses CRDT for local storage, and in online situations, it uses OT patches for local storage. When the prediction accuracy exceeds a preset threshold, the pre-generated operation chain is sent to the server. The client's conflict pre-detection module adds a unique tag to each operation sent to the server; The client sends the operation chain to the server in the form of an operation stream; After receiving the client's operation flow, the server puts the operation into the operation receiving queue; The coordination layer on the server side first performs conflict pre-detection on the client operations received, and then determines the operation type. For OT type operations, OT conversion is first performed, and then CRDT state merging is performed. For CRDT type operations, CRDT state merging is performed, and all results of different types of operations are merged to obtain a merged version. The merged version is stored in a dual structure, which includes the OT log and the CRDT state tree. After the versions are merged, the conflict layer on the server side performs conflict detection and adopts different conflict resolution methods for different conflicts; the merged version after conflict resolution is broadcast.

[0038] The present invention also provides a computer device, including a memory and a processor, wherein the memory stores a computer program, and is characterized in that when the processor executes the computer program, it implements the processing process of the above-mentioned OFD document modification system for cloud collaboration. The present invention also provides a computer-readable storage medium having a computer program stored thereon, wherein the computer program, when executed by a processor, implements the processing of the above-mentioned OFD document modification system for cloud collaboration.

[0039] Example 1 like Figure 1-Figure 2 As shown, the present invention provides an OFD document modification system for cloud collaboration, including a client and a server; The client includes the operation layer, and the server includes the coordination layer and the conflict decision layer; The operation layer includes an operation compression module, an intent prediction module, and a conflict pre-detection module. The operation compression module uses the incremental patch mechanism of the OT algorithm to perform real-time compression of operations and generate OT patches. The intent prediction module predicts the user's subsequent operations through an LSTM neural network, pre-generates and caches the operation chain locally. In offline situations, the operation layer uses CRDT for local storage, and in online situations, uses OT patches for local storage. When the prediction accuracy is greater than a preset threshold, the pre-generated operation chain is sent to the server. The conflict pre-detection module adds a unique tag to each operation sent to the server. The coordination layer stores the received client operations into the operation queue, performs conflict pre-detection, and then determines the operation type. For OT type operations, it first performs OT conversion and then CRDT state merging. For CRDT type operations, it performs CRDT state merging and merges all results of different types of operations to obtain a merged version. The merged version is stored in a dual structure, which includes an OT log and a CRDT state tree (refer to Figure 2, converting between the OT operation log and the CEDT state tree and then storing them), the conflict decision layer performs conflict detection after the version is merged, and adopts different methods to resolve conflicts for different conflicts; broadcasts the merged version after the conflict is resolved.

[0040] Example 2 Different from Example 1, the incremental patch mechanism of the OT algorithm is used to perform real-time compression of the operation, and the OT patch is generated as follows: Operation atomicity and marking: All editing operations are split into atomic operations: Retain(n) (retain n characters), Insert(str) (insert string), Delete(n) (delete n characters).

[0041] For example: Insert "d" at position 2 in the text "abc" → Operation sequence: [Retain(2), Insert("d")].

[0042] Conflict Detection and Transformation: Core function: transform(opA, opB) → Generates the modified operations opA' and opB'.

[0043] Conversion rules (taking insert conflict as an example): If opA and opB are both inserted at position p, the positions are adjusted based on the device ID priority or timing.

[0044] Example: A inserts "d" (position 2), B inserts "e" (position 2) → opB' is corrected to Insert(3, "e").

[0045] Example 3 like Figures 1-6 As shown, the present invention provides an OFD document modification method for cloud collaboration, comprising the following steps: Scene setting: User A (Beijing): insert "My" at the 6th position (before "W") → Target: "Hello My World"; User B (New York): Delete digits 0-5 of "Hello" → Target: "World"; Note: When the operation occurred, both AB were offline and then reconnected. The above operation is a concurrent insertion.

[0046] Step 1: The user performs an operation on the OFD document on the client. The client operation compression module uses the incremental patch mechanism of the OT algorithm to compress the user's operation in real time and generate an OT patch. The client intention prediction module uses the LSTM neural network to predict the user's subsequent operation, pre-generates and caches the operation chain locally. In offline mode, the operation layer uses CRDT for local storage, and in network mode, it uses OT patches for local storage. When the prediction accuracy exceeds a preset threshold, the pre-generated operation chain is sent to the server. The client conflict pre-detection module adds a unique tag to each operation sent to the server (generating a triplet operation tag). Table 1 Step 1 Operations and results on the client

[0047] Step 2: After disconnecting and reconnecting (the server rebuilds the chain as shown below Figure 3 As shown, this is a conventional chain building process, which is not the focus of the present invention and will not be discussed in detail). The client sends the OFD document in the form of CRDT to the server in the form of an operation flow. Alternatively, in the case of networking, the client directly sends the OT patch to the server in the form of an operation flow. After receiving the operation flow, the coordination layer of the server puts it into the operation queue and performs conflict pre-detection. The conflict pre-detection specifically includes the following steps (such as Figure 5 shown): Receive operation package; Decode triples; Check the parent hash chain; Determine whether the attached IDs are the same. If they are different, there is a concurrency conflict and mark the concurrency conflict; (in most cases, they can be merged and there is no conflict).

[0048] Triggers the mix edit process.

[0049] Step 3: The server determines the operation type. For OT type operations, it first performs OT conversion and then merges the CRDT states. For CRDT type operations, it merges the CRDT states and merges all the results of different types of operations to obtain a merged version. The merged version is stored in a dual structure, which includes the OT log and the CRDT state tree. Specifically for this embodiment: OT conversion instructions: Original: Insert "My " at position 6; because 5 characters were deleted before → new position = 6 - 5 = 1; After conversion: Insert(pos=1, text="My ").

[0050] CRDT Merge Description: Based on the LWW register policy, operations take effect according to timestamps; Final state = OP_B deleted + OP_A inserted after conversion.

[0051] Step 4: After the version is merged, the conflict layer on the server performs conflict detection (where ), and adopts different conflict resolution methods for different conflicts; the merged version after conflict resolution is broadcast.

[0052] Table 2 Content and application of server broadcast received by the client

[0053] Example 4 The difference from Example 3 is that, in this embodiment, the client also performs verification of the merged result after receiving the server broadcast, such as Figure 7 As shown; Final result: Initial state: "Hello World" ; User A's operation: insert "My " → expected "Hello My World"; User B's operation: delete "Hello" → expected "World"; Final operation result: "My World".

[0054] The foregoing description is merely a preferred embodiment of the present invention and is not intended to limit the present invention. Those skilled in the art will readily appreciate that various modifications and variations of the present invention are possible. Any modifications, equivalent substitutions, or improvements made within the spirit and principles of the present invention are intended to be within the scope of protection of the present invention.

Claims

1. An OFD document modification system for cloud collaboration, characterized by: Including client and server; The client includes the operation layer, and the server includes the coordination layer and the conflict decision layer; The operation layer includes an operation compression module, an intent prediction module, and a conflict pre-detection module. The operation compression module uses the incremental patch mechanism of the OT algorithm to perform real-time compression of operations and generate OT patches. The intent prediction module predicts the user's subsequent operations through an LSTM neural network, pre-generates and caches the operation chain locally. In offline situations, the operation layer uses CRDT for local storage, and in online situations, uses OT patches for local storage. When the prediction accuracy is greater than a preset threshold, the pre-generated operation chain is sent to the server. The conflict pre-detection module adds a unique tag to each operation sent to the server. The coordination layer stores the received client operations into the operation queue, performs conflict pre-detection first, and then determines the operation type. For OT type operations, OT conversion is performed first, and then CRDT state merging is performed. For CRDT type operations, CRDT state merging is performed, and all results of different types of operations are merged to obtain a merged version. The merged version is stored in a dual structure, and the dual structure storage includes the OT log and the CRDT state tree. After the version is merged, the conflict decision layer performs conflict detection and adopts different methods to resolve conflicts for different conflicts; the merged version after the conflict is resolved is broadcast.

2. The OFD document modification system for cloud collaboration according to claim 1, characterized in that: The operation compression module further combines consecutive input operations into semantic operation units.

3. The OFD document modification system for cloud collaboration according to claim 1, characterized in that: The conflict pre-detection module introduces the ID sequential marking mechanism of CRDT, adding the user ID, local clock and parent operation hash value to each operation.

4. The OFD document modification system for cloud collaboration according to claim 3, characterized in that: For concurrent insertion operations, the conflict decision layer first performs ID sequential sorting of the CRDT algorithm, and then compensates for the position offset of the OT algorithm based on the parent operation.

5. The OFD document modification system for cloud collaboration according to claim 3, characterized in that: The conflict decision layer prioritizes OT conversion for overwriting modification operations. If the OT conversion fails, it automatically triggers the reconstruction of the CRDT state, reversely deduces the mergeable version through the OT operation log, and implements the rollback of the CRDT version.

6. The OFD document modification system for cloud collaboration according to claim 3, characterized in that: The conflict decision layer handles metadata conflicts using the LWW strategy based on the Lamport logical clock.

7. The OFD document modification system for cloud collaboration according to claim 1, characterized in that: The server also supports an adaptive synchronization protocol, synchronizing the server's state to the client through the state synchronization layer, specifically including: when the bandwidth is higher than the preset bandwidth threshold, starting CRDT incremental state synchronization; when the network bandwidth is lower than or equal to the preset bandwidth threshold, using OT packet transmission for state synchronization; when the network is disconnected, the server switches from network synchronization mode to CRDT local copy mode. After the network connection is restored, the server deserializes CRDT into OT patches through the OT converter, merges the differences, and performs state synchronization.

8. The OFD document modification system for cloud collaboration according to claim 1, characterized in that: The server adds a timestamp to the OFD document upon receiving the operation chain, and adopts a three-level hierarchical timestamp architecture, including document-level timestamp, page-level timestamp and OFD object-level timestamp, adding timestamps to the document, page and OFD object respectively.

9. The OFD document modification system for cloud collaboration according to claim 8, characterized in that: The OFD object-level timestamp is specifically: an independent timestamp is added to each OFD element, and OFD elements include paragraphs, pictures and tables.

10. The OFD document modification system for cloud collaboration according to claim 8, characterized in that: Document-level timestamps are specifically: generating a hash value of the full-text document at preset time intervals and applying for an authoritative timestamp.

11. The OFD document modification system for cloud collaboration according to claim 1, characterized in that: The server uses a historical tracing mechanism to compare with the version information storage standard in the OFD standard to store the corresponding timeline for the modification of the OFD document, including the identity of the modifier, the operation time of the OFD document, and the comparison of the content before and after the operation.

12. A cloud-based collaborative OFD document modification method, characterized in that: The OFD document modification system for cloud collaboration according to any one of claims 1 to 11 comprises the following steps: The user operates on the OFD document on the client; The client operation compression module uses the incremental patch mechanism of the OT algorithm to perform real-time compression of user operations and generate OT patches; The client's intention prediction module predicts the user's subsequent actions through an LSTM neural network, pre-generates and caches an operation chain locally. In offline situations, the operation layer uses CRDT for local storage, and in online situations, it uses OT patches for local storage. When the prediction accuracy exceeds a preset threshold, the pre-generated operation chain is sent to the server. The client's conflict pre-detection module adds a unique tag to each operation sent to the server; The client sends the operation chain to the server in the form of an operation stream; After receiving the client's operation flow, the server puts the operation into the operation receiving queue; The coordination layer on the server side first performs conflict pre-detection on the client operations received, and then determines the operation type. For OT type operations, OT conversion is first performed, and then CRDT state merging is performed. For CRDT type operations, CRDT state merging is performed, and all results of different types of operations are merged to obtain a merged version. The merged version is stored in a dual structure, which includes the OT log and the CRDT state tree. After the versions are merged, the conflict layer on the server side performs conflict detection and adopts different conflict resolution methods for different conflicts; the merged version after conflict resolution is broadcast.

13. A computer device comprising a memory and a processor, wherein the memory stores a computer program, wherein: When the processor executes the computer program, the processing process of the OFD document modification system for cloud collaboration according to any one of claims 1 to 11 is implemented.

14. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the processing process of the OFD document modification system for cloud collaboration according to any one of claims 1 to 11 is implemented.

Citation Information

Patent Citations

  • Cloud-sharing multi-terminal real-time online document encryption device based on national secret

    CN115801352A

  • Multi-person online document-oriented real-time collaborative editing system and method

    CN118798136A

  • Method and device for collaboratively editing model, user terminal and storage medium

    CN119205047A

  • Network information security protection method and system based on artificial intelligence dynamic defense

    CN120165968A

  • Real-time data updating method and device based on AI prediction and computer equipment

    CN120179666A