Cloud-oriented OFD document modification system, method, computer device and computer readable storage medium
By combining OT and CRDT technologies, and adopting a layered architecture and intelligent prediction mechanism, the problems of editing efficiency and conflict in OFD online multi-user editing are solved, and efficient document synchronization and conflict management are achieved.
Patent Information
- Application Number
- CN202510887319.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-06-30
- Publication Date
- 2026-01-23
- Estimated Expiration
- 2045-06-30
AI Technical Summary
Existing OFD online multi-user editing solutions have room for improvement in both efficiency and accuracy when simultaneously modifying content, and lack effective technical solutions to address the issues of editing feasibility and efficiency.
By combining OT and CRDT technologies, and through a layered architecture design and intelligent prediction mechanism, employing operation compression, intent prediction, and conflict pre-detection modules, conflict resolution for multi-user online concurrent operations on OFD documents is achieved, thereby improving editing efficiency.
It effectively improves the efficiency of multi-user online editing of OFD documents, reduces the number of conflicts, increases the success rate of concurrent insertion, overwrite modification and metadata conflict resolution, and reduces server pressure.
Smart Images

Figure CN120430286B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The application belongs to the technical field of digital text editing, and particularly relates to an OFD document modification system and method for cloud collaboration, computer equipment and a computer readable storage medium. BACKGROUND
[0002] The current online collaborative editing of word or excel mostly adopts single OT conversion or CRDT to ensure the consistency of edited content when multiple people edit. However, due to the respective advantages of the two methods, there is still room for improvement in efficiency and accuracy when synchronously modifying the edited content. The OFD online multi-person editing scheme is a blank field, and a technical solution is needed to solve the editing feasibility and efficiency problem. SUMMARY
[0003] The application aims at the technical problems existing in the prior art, and provides an OFD document modification system and computer equipment for cloud collaboration and a computer readable storage medium.
[0004] OT (Operation Transformation) is a method used to maintain consistency of different data copies in collaborative technology. In different terminals, operations are adjusted according to the order of operations to maintain data consistency. OT conversion has an incremental patch mechanism: concurrent operations are converted into a "patch sequence" that can be executed sequentially, ensuring that the final state converges.
[0005] CRDT (Conflict-free Replicated Data Types) is a data type or scheme that ensures that different copies in the network maintain consistent data, and is particularly suitable for the field of collaborative editing. The core idea of CRDT is to allow each client to operate independently on the copy, support concurrent operations without coordination with other copies, and thus realize conflict-free data replication.
[0006] The application ingeniously combines the above two technologies, and through hierarchical architecture design and intelligent prediction mechanism, can greatly improve the conflict problem of OFD document multi-person online concurrent operation and improve the editing efficiency.
[0007] To achieve the above technical purposes, the application adopts the following technical solutions:
[0008] The application provides an OFD document modification system for cloud collaboration, which comprises a client and a server.
[0009] The client comprises an operation layer, and the server comprises a coordination layer and a conflict decision layer.
[0010] The operation layer includes an operation compression module, an intention prediction module, and a conflict pre-detection module; the operation compression module adopts an incremental patch mechanism of an OT algorithm for real-time compression of operations to generate OT patches; the intention prediction module predicts subsequent operations of a user through an LSTM neural network, pre-generates an operation chain locally and caches, in an offline case, the operation layer adopts a CRDT form for local storage, in a networking case, adopts an OT patch form for local storage, when a prediction accuracy is greater than a preset threshold, the pre-generated operation chain is sent to a server; the conflict pre-detection module adds a unique mark to each operation sent to the server;
[0011] The coordination layer stores received operations of the client in an operation queue, first performs conflict pre-detection, then performs operation type judgment, for an OT type operation, first performs OT conversion, then performs CRDT state merging, for a CRDT type operation, performs CRDT state merging, merges all results of operations of different types to obtain a merged version, performs double-structure storage on the merged version, the double-structure storage includes an OT log and a CRDT state tree, the conflict decision layer performs conflict detection after version merging, and solves conflicts in different ways according to different conflicts; the merged version after solving the conflicts is broadcasted.
[0012] Preferably, the operation compression module further merges continuous input operations into semantic operation units.
[0013] Preferably, the conflict pre-detection module introduces an ID sequential marking mechanism of CRDT, and adds a user ID, a local clock, and a parent operation hash value to each operation.
[0014] Preferably, the conflict decision layer, for a concurrent insertion operation, first performs ID sequential sorting of a CRDT algorithm, and then performs position offset compensation of an OT algorithm according to a parent operation.
[0015] Preferably, the conflict decision layer, for an overwrite modification operation, preferentially performs OT conversion, if OT conversion fails, automatically triggers state reconstruction of CRDT, reversely deduces a mergable version through an OT operation log, and realizes rollback of a CRDT version.
[0016] Preferably, the conflict decision layer, for a metadata conflict, processes based on a LWW strategy of a Lamport logical clock.
[0017] Preferably, the server also supports an adaptive synchronization protocol to synchronize the state of the server to the client through a 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, state synchronization is performed using OT package transmission; when the network is disconnected, the server is switched from the network synchronization mode to the local copy mode of CRDT, and after the network is restored, the server converts the CRDT into an OT patch through an OT converter, and performs state synchronization after merging the differences.
[0018] Preferably, the server timestamps the OFD document when receiving the operation chain, and adopts a three-level hierarchical timestamp architecture, including a document-level timestamp, a page-level timestamp and an OFD object-level timestamp, respectively.
[0019] Preferably, the OFD object-level timestamp specifically is: an independent timestamp is attached to each OFD element, and the OFD element includes a paragraph, a picture and a table.
[0020] Preferably, the document-level timestamp specifically is: a hash value of the full-text document is generated every preset time interval and an authoritative timestamp is applied.
[0021] Preferably, the server uses a history tracing mechanism, compares with the version information storage standard in the OFD standard, and stores the corresponding time axis for the modification of the OFD document, including the identity of the modifier, the operation time of the OFD document, and the content comparison before and after the operation.
[0022] The application 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:
[0023] The user operates on the OFD document of the client;
[0024] The client operation compression module generates an OT patch by using the incremental patch mechanism of the OT algorithm for real-time compression of the user's operation.
[0025] The intention prediction module of the client predicts the subsequent operation of the user through an LSTM neural network, pre-generates an operation chain locally and caches, in an offline case, the operation layer is stored locally in the form of CRDT, in a networked case, the operation layer is stored locally in the form of OT patch, and when the prediction accuracy is greater than a preset threshold, the pre-generated operation chain is sent to the server.
[0026] The conflict pre-detection module of the client attaches a unique mark to each operation sent to the server.
[0027] The client sends the operation chain to the server in the form of an operation stream.
[0028] The service end receives the operation flow of the client and puts the operation into an operation receiving queue;
[0029] The coordination layer of the service end performs conflict pre-detection on the received operation of the client, then performs operation type judgment, for the OT type operation, performs OT conversion first, then performs CRDT state merging, for the CRDT type operation, performs CRDT state merging, all results of operations of different types are merged to obtain a merged version, and the merged version is stored in a double structure, including an OT log and a CRDT state tree;
[0030] The conflict layer of the service end performs conflict detection after version merging, and solves conflicts in different ways according to different conflicts; and the merged version after solving the conflicts is broadcasted.
[0031] The application further provides a computer device comprising a memory and a processor, wherein the memory stores a computer program, and the processor implements the processing procedure of the cloud-oriented collaborative OFD document modification system when executing the computer program.
[0032] The application further provides a computer readable storage medium, which stores a computer program, and the computer program is executed by a processor to implement the processing procedure of the cloud-oriented collaborative OFD document modification system.
[0033] Compared with the prior art, the application has the following beneficial effects:
[0034] (1) The application establishes an OT, CRDT coordination conversion storage merging technology and an OFD hierarchical timestamp technology to dynamically adjust the algorithm of OFD document online editing, thereby effectively improving the online editing efficiency of the OFD document and reducing the number of conflicts.
[0035] (2) The application adopts different conflict resolution methods for concurrent insertion, covering modification and metadata conflict, and combines the OT algorithm with the CRDT, so that the success rate of conflict resolution is higher than that of the single OT algorithm and the single CRDT algorithm.
[0036] (3) The user operates locally, and the operation is pre-generated into an operation chain in many cases, and the operation is cached, and when the prediction accuracy is greater than a threshold, the operation is sent to the service end, so that the pressure of the service end during online editing of multiple people at the same time is reduced. DETAILED DESCRIPTION
[0037] Figure 1 The application further provides a computer readable storage medium, which stores a computer program, and the computer program is executed by a processor to implement the processing procedure of the cloud-oriented collaborative OFD document modification system.
[0038] Figure 2 A schematic diagram of mutual conversion of OT logs and CRDT state trees for an embodiment of the present application;
[0039] Figure 3 A schematic diagram of a server operation chain reconstruction process after a client offline network recovery for an embodiment of the present application;
[0040] Figure 4 An operation flow of each layer of the client and the server for an embodiment of the present application;
[0041] Figure 5 A conflict pre-detection flowchart of the server for an embodiment of the present application;
[0042] Figure 6 A core processing flow of the Lamport LWW strategy for an embodiment of the present application;
[0043] Figure 7 A flowchart of client verification for an embodiment of the present application. DETAILED DESCRIPTION
[0044] The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, rather than all the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without creative labor fall within the scope of protection of the present application.
[0045] The present application provides an OFD document modification system for cloud collaboration, including a client and a server;
[0046] The client includes an operation layer, and the server includes a coordination layer and a conflict decision layer;
[0047] The operation layer includes an operation compression module, an intention prediction module, and a conflict pre-detection module. The operation compression module performs real-time compression of operations using the incremental patch mechanism of the OT algorithm (OT converted incremental patch mechanism: converts concurrent operations into a "patch sequence" that can be executed sequentially, ensuring that the final state converges.) to generate OT patches. The intention prediction module predicts subsequent operations of the user through an LSTM neural network, pre-generates an operation chain locally and caches it. In an offline situation, the operation layer stores locally in CRDT form, and in a networked situation, stores locally in OT patch form. 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 attaches a unique mark to each operation sent to the server;
[0048] The coordination layer stores the received operation of the client into an operation queue, performs conflict pre-detection, and then performs operation type judgment. For an OT type operation, OT conversion is performed first, and then CRDT state merging is performed. For a CRDT type operation, CRDT state merging is performed. All results of operations of different types are merged to obtain a merged version. The merged version is stored in a double structure, including an OT log and a CRDT state tree. The conflict decision layer performs conflict detection after version merging, and uses different ways to solve conflicts according to different conflicts. The merged version after solving the conflict is broadcasted, and the conflict that cannot be solved is prompted to be manually processed.
[0049] According to a specific embodiment of the present application, the operation compression module further merges continuous input operations into semantic operation units.
[0050] According to a specific embodiment of the present application, the conflict pre-detection module introduces an ID sequential marking mechanism of CRDT, and adds a user ID, a local clock and a parent operation hash value to each operation. The ID sequential marking mechanism is a distributed tracking technology that combines a vector clock and operation tracing. A causal triple, including a device unique identification, an incremental logical clock and a parent operation fingerprint, is added to each operation. Except for the first operation (i.e., the root), other operations have parent operations.
[0051] According to a specific embodiment of the present application, the conflict decision layer performs ID sequential sorting of the CRDT algorithm for concurrent insertion operations, and then performs position offset compensation of the OT algorithm according to the parent operation.
[0052] According to a specific embodiment of the present application, the conflict decision layer performs OT conversion for an overwrite modification operation, and if the OT conversion fails, triggers state reconstruction of the CRDT, reversely deduces a mergable version from the OT operation log, and realizes rollback of the CRDT version. Before the OT conversion, the CRDT state number is backed up. When the OT conversion is performed, a branch is added to the CRDT state tree. When the OT conversion fails, the original backup CRDT state tree is replaced.
[0053] According to a specific embodiment of the present application, the conflict decision layer processes metadata conflicts based on the LWW strategy of the Lamport logical clock. The LWW (Last Write Wins) of the Lamport logical clock refers to Figure 6 .
[0054] According to one specific embodiment of the present application, the service end also supports an adaptive synchronization protocol, which synchronizes the state of the service end to the client through a state synchronization layer, and specifically includes: 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 package transmission for state synchronization; when the network is disconnected, the service end is switched from the network synchronization mode to the local copy mode of CRDT, and after the network is restored, the service end converts CRDT into an OT patch through an OT converter, and synchronizes the state after merging the differences. According to the network transmission state, the corresponding mode is dynamically switched, when the network bandwidth is sufficient, the OT and CRDT rules are directly used to synchronize to the server using the network synchronization mode, and when the network cannot be connected, the local copy cache is started.
[0055] According to one specific embodiment of the present application, the service end timestamps the OFD document when receiving the operation chain, and adopts a three-level hierarchical timestamp architecture, including a document-level timestamp, a page-level timestamp and an OFD object-level timestamp, and respectively attaches timestamps to the document, the page and the OFD object.
[0056] According to one specific embodiment of the present application, the OFD object-level timestamp specifically is: attaching an independent timestamp to each OFD element, and the OFD element includes a paragraph, a picture and a table.
[0057] According to one specific embodiment of the present application, the document-level timestamp specifically is: generating a hash value of the full-text document every preset time interval and applying an authoritative timestamp.
[0058] According to one specific embodiment of the present application, an independent timestamp is attached to each page, and the page-level timestamp is written into the OFD page Page_N.xml through the OFD interface.
[0059] According to one specific embodiment of the present application, the service end uses a history tracing mechanism, compares with the version information storage standard in the OFD standard, stores the corresponding time axis for the modification of the OFD document, including the identity of the modifier, the operation time of the OFD document, and the content comparison before and after the operation.
[0060] The present application 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:
[0061] The user operates on the OFD document of the client end;
[0062] The client operation compression module adopts the incremental patch mechanism of the OT algorithm to realize real-time compression of the user's operation, and generates an OT patch;
[0063] The intention prediction module of the client predicts the subsequent operation of the user through an LSTM neural network, pre-generates the operation chain locally and caches, in an offline case, the operation layer adopts a CRDT form for local storage, in a networking case, adopts an OT patch form for local storage, when the prediction accuracy is greater than a preset threshold, the pre-generated operation chain is sent to the server;
[0064] The conflict pre-detection module of the client attaches a unique mark to each operation sent to the server;
[0065] The client sends the operation chain to the server in the form of an operation stream;
[0066] After receiving the operation stream of the client, the server puts the operation into an operation receiving queue;
[0067] The coordination layer of the server performs conflict pre-detection on the received operation of the client, then performs operation type judgment, for the OT type operation, first performs OT conversion, then performs CRDT state merging, for the CRDT type operation, performs CRDT state merging, merges all results of operations of different types to obtain a merged version, performs double-structure storage on the merged version, the double-structure storage includes an OT log and a CRDT state tree;
[0068] After version merging, the conflict layer of the server performs conflict detection, and solves the conflict in different ways according to different conflicts; the merged version after solving the conflict is broadcasted.
[0069] The application further provides a computer device comprising a memory and a processor, wherein the memory stores a computer program, and wherein the processor implements the processing procedure of the cloud-oriented collaborative OFD document modification system when executing the computer program.
[0070] The application further provides a computer readable storage medium, which stores a computer program, and wherein the computer program implements the processing procedure of the cloud-oriented collaborative OFD document modification system when executed by a processor.
[0071] Embodiment 1
[0072] As shown in Figures 1-2 The application provides a cloud-oriented collaborative OFD document modification system, comprising a client and a server;
[0073] The client comprises an operation layer, and the server comprises a coordination layer and a conflict decision layer;
[0074] The operation layer includes an operation compression module, an intention prediction module, and a conflict pre-detection module; the operation compression module adopts an incremental patch mechanism of the OT algorithm for real-time compression of operations to generate OT patches; the intention prediction module predicts subsequent operations of a user through an LSTM neural network, pre-generates an operation chain locally and caches, in an offline case, the operation layer adopts a CRDT form for local storage, in a networking case, adopts an OT patch form for local storage, when the prediction accuracy is greater than a preset threshold, the pre-generated operation chain is sent to a server; the conflict pre-detection module adds a unique mark to each operation sent to the server;
[0075] The coordination layer stores the received operations of the client in an operation queue, first performs conflict pre-detection, then performs operation type judgment, for an OT type operation, first performs OT conversion, then performs CRDT state merging, for a CRDT type operation, performs CRDT state merging, merges all results of operations of different types to obtain a merged version, performs double-structure storage on the merged version, the double-structure storage includes an OT log and a CRDT state tree (reference Figure 2 , performs conversion between the OT operation log and the CEDT state tree, and then stores), the conflict decision layer performs conflict detection after version merging, and solves conflicts in different ways according to different conflicts; the merged version after solving the conflicts is broadcasted.
[0076] Embodiment 2
[0077] Different from Embodiment 1, the incremental patch mechanism of the OT algorithm is adopted for real-time compression of operations to generate OT patches, specifically as follows:
[0078] Operation atomization and marking:
[0079] All editing operations are split into atomic operations: Retain(n) (retain n characters), Insert(str) (insert a string), and Delete(n) (delete n characters).
[0080] For example, inserting "d" at position 2 in the text "abc" → operation sequence: [Retain(2), Insert("d")].
[0081] Conflict detection and conversion (Transform):
[0082] Core function: transform(opA, opB) → generate modified operations opA' and opB'.
[0083] Conversion rule (taking an insertion conflict as an example):
[0084] If both opA and opB are inserted at position p, then the position is adjusted according to the device ID priority or the timing.
[0085] Example: A inserts "d" (position 2), B inserts "e" (position 2) -> opB' is modified to Insert(3, "e").
[0086] Embodiment 3
[0087] As shown in the Figures 1-6 The present application provides a cloud-oriented collaborative OFD document modification method, comprising the following steps:
[0088] Scenario setting:
[0089] User A (Beijing): insert "My " at position 6 (before W) -> target: "Hello My World";
[0090] User B (New York): delete "Hello" at position 0-5 at the same time -> target: "World";
[0091] Note: AB are offline when the operation occurs, and then reconnect. The above operation is concurrent insertion.
[0092] Step 1: The user performs operations on the OFD document on the client side; the client operation compression module adopts the incremental patch mechanism of the OT algorithm to perform real-time compression of the user's operations, and generates an OT patch; the intention prediction module of the client side predicts the user's subsequent operations through an LSTM neural network, pre-generates an operation chain locally and caches it, in the offline case, the operation layer adopts CRDT form for local storage, in the networking case, adopts OT patch form for local storage, when the prediction accuracy is greater than the preset threshold, the pre-generated operation chain is sent to the server side; the conflict pre-detection module of the client side attaches a unique mark (generates a triple operation mark) to each operation sent to the server side;
[0093] Table 1 Step 1: Perform operations on the client side and operation results
[0094]
[0095] Step 2: After reconnection (the server side reconstruction chain process is as shown in Figure 3 , it is a conventional chain building process, which is not the focus of the present application, and will not be discussed), the client sends the operation chain in the form of operation stream to the server side in the form of CRDT OFD document; or in the networking case, the client directly sends the operation chain in the form of operation stream to the server side in the form of OT patch, and the server coordination layer receives the operation stream and puts it into the operation queue, and first performs conflict pre-detection, which specifically includes the following steps (as shown in Figure 5 ):
[0096] receiving operation package;
[0097] decoding triplets;
[0098] checking parent hash chain;
[0099] determining whether the additional ID is the same, if not, there is a concurrent conflict, marking the concurrent conflict; (most cases can be merged, there is no conflict).
[0100] triggering mixed editing processing.
[0101] Step 3: The server judges the operation type, for OT type operation, OT conversion is performed first, and then CRDT state merging is performed, for CRDT type operation, CRDT state merging is performed, all results of operations of different types are merged to obtain a merged version, and the merged version is stored in a double structure, including OT log and CRDT state tree; Specifically, for this embodiment:
[0102] OT conversion explanation:
[0103] Original: insert "My " at position 6; because there are 5 characters before it -> new position = 6 - 5 = 1;
[0104] After conversion: Insert(pos=1, text="My ").
[0105] CRDT merging explanation:
[0106] Based on the LWW register strategy, the operation takes effect according to the timestamp;
[0107] Final state = OP_B delete + converted OP_A insert.
[0108] Step 4: After version merging, the conflict layer of the server detects conflicts (among them, ), and solves conflicts in different ways according to different conflicts; broadcast the merged version after solving the conflict.
[0109] Table 2: Contents and application methods of the server broadcast received by the client
[0110]
[0111] Embodiment 4
[0112] Different from embodiment 3, in this embodiment, after the client receives the server broadcast, the merged result verification is performed, as shown in Figure 7 .
[0113] Final effect:
[0114] Initial state: "Hello World";
[0115] User A operation: insert "My " → expected "Hello My World";
[0116] User B operation: delete "Hello " → expected "World";
[0117] Final operation result: "My World".
[0118] The above only describes the preferred embodiments of the present application and is not used to limit the present application. Various modifications and changes can be made by those skilled in the art to the present application. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application is included in the protection scope of the present application.
Claims
1. An OFD document editing system for cloud-based collaboration, characterized in that, Including both client and server sides; The client includes an operation layer, and the server includes a coordination layer and a conflict decision-making layer; The operation layer includes an operation compression module, an intent prediction module, and a conflict pre-detection module. The operation compression module uses an incremental patching mechanism of the OT algorithm to compress operations in real time and generate OT patches. The intent prediction module predicts subsequent user operations through an LSTM neural network, pre-generates operation chains locally and caches them. In offline mode, the operation layer uses CRDT for local storage; in network mode, it 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 an operation queue, first performing conflict pre-detection, then determining the operation type. For OT type operations, OT conversion is performed first, followed by CRDT state merging. For CRDT type operations, CRDT state merging is performed. All results of different types of operations are merged to obtain a merged version. The merged version is stored in a dual-structure system, including OT logs and CRDT state trees. After version merging, the conflict decision layer performs conflict detection and resolves conflicts using different methods for different types of conflicts. The merged version after conflict resolution is then broadcast. The conflict pre-detection module introduces the CRDT ID sequential marking mechanism, attaching a user ID, local clock, and parent operation hash value to each operation. For concurrent insertion operations, the conflict decision layer first performs ID sequential sorting using the CRDT algorithm, and then performs position offset compensation using the OT algorithm based on the parent operation. For overwrite modification operations, the conflict decision layer prioritizes OT transformation. If OT transformation fails, it automatically triggers CRDT state reconstruction, and reverse-engineers the mergeable version through the OT operation log, thus realizing the rollback of the CRDT version. The conflict decision-making layer handles metadata conflicts using the LWW strategy based on the Lamport logical clock. The process of processing using the LWW strategy based on Lamport logical clock specifically includes: When concurrent operations are received, the Lamport logical clock is extracted and compared. If the logical clock values of the two operations are different, the operation with the larger logical clock value is adopted for modification. If the logical clock values of the two operations are the same, the decision is made according to the dictionary order of the device ID.
2. The OFD document editing system for cloud collaboration according to claim 1, characterized in that, The operation compression module also merges consecutive input operations into semantic operation units.
3. The OFD document editing system for cloud collaboration according to claim 1, characterized in that, The server also supports an adaptive synchronization protocol, which synchronizes the server's state to the client through a state synchronization layer. Specifically, this includes: initiating CRDT incremental state synchronization when the bandwidth is higher than a preset bandwidth threshold; using OT packet transmission for state synchronization when the network bandwidth is lower than or equal to the preset bandwidth threshold; and switching from network synchronization mode to CRDT local copy mode when the network is disconnected. After the network connection is restored, the server deserializes the CRDT into OT patches through an OT converter, merges the differences, and then performs state synchronization.
4. The OFD document editing system for cloud collaboration according to claim 1, characterized in that, When the server receives the operation chain, it adds a timestamp to the OFD document. It adopts a three-level hierarchical timestamp architecture, including document-level timestamp, page-level timestamp, and OFD object-level timestamp, which are respectively used to add timestamps to the document, page, and OFD object.
5. The OFD document editing system for cloud collaboration according to claim 4, characterized in that, Specifically, OFD object-level timestamps are: attaching an independent timestamp to each OFD element, which includes paragraphs, images, and tables.
6. The OFD document editing system for cloud collaboration according to claim 4, characterized in that, Document-level timestamps specifically involve generating a hash value for the full-text document and applying for an authoritative timestamp at preset time intervals.
7. The OFD document editing system for cloud collaboration according to claim 1, characterized in that, The server uses a historical tracking mechanism to store the modification of OFD documents in a timeline by comparing the modification with the version information storage standard in the OFD standard. This includes the identity of the modifier, the operation time of the OFD document, and a comparison of the content before and after the operation.
8. A method for modifying OFD documents for cloud-based collaboration, characterized in that, The OFD document editing system for cloud collaboration as described in any one of claims 1-7 includes the following steps: Users perform operations on the OFD document in the client; The client-side operation compression module uses an incremental patching mechanism based on the OT algorithm to compress user operations in real time and generate OT patches. The client's intent prediction module predicts the user's subsequent operations through an LSTM neural network, pre-generates the operation chain locally and caches it. In offline mode, the operation layer uses CRDT for local storage, and in network mode, it uses OT patching for local storage. When the prediction accuracy is greater than a preset threshold, the pre-generated operation chain is sent to the server. The client's conflict pre-detection module attaches a unique identifier 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 operation stream from the client, the server puts the operations into the operation receiving queue; The server-side coordination layer first performs conflict pre-detection on the received client operations, then determines the operation type. For OT type operations, it first performs OT conversion, then performs CRDT state merging. For CRDT type operations, it performs CRDT state merging. All results of different types of operations are merged to obtain a merged version. The merged version is stored in a dual-structure system, which includes OT logs and CRDT state trees. After the versions are merged, the server-side conflict layer performs conflict detection and resolves conflicts in different ways for different types of conflicts; the merged version after resolving conflicts is then broadcast.
9. A computer device comprising a memory and a processor, wherein the memory stores a computer program, characterized in that, When the processor executes the computer program, it implements the processing procedure of the OFD document modification system for cloud collaboration as described in any one of claims 1-7.
10. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by the processor, it implements the processing procedure of the OFD document modification system for cloud collaboration as described in any one of claims 1-7.
Citation Information
Patent Citations
Multi-person online document-oriented real-time collaborative editing system and method
CN118798136A
Real-time data updating method and device based on AI prediction and computer equipment
CN120179666A