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

Through dynamic selection of operation conversion and conflict-independent data type algorithms, combined with role permission management, the real-time consistency and permission management problems of the multi-person online document collaborative editing system in a high-concurrency environment are solved, and efficient conflict handling and system scalability are achieved. , improving user experience and performance.

CN118798136APending Publication Date: 2024-10-18XIDIAN UNIV
View PDF 0 Cites 12 Cited by

Patent Information

Application Number
CN202410789994.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-06-19
Publication Date
2024-10-18

AI Technical Summary

Technical Problem

The existing multi-person online document collaborative editing system is difficult to ensure real-time consistency in a high concurrency environment, has complex conflict handling, poor scalability, and insufficient permission management, which affects system performance and user experience.

Method used

It adopts a dynamic synchronization mechanism, combines the operation transformation (OT) algorithm and the conflict-independent data type (CRDT) algorithm, automatically selects the appropriate algorithm based on user concurrency and operation frequency, simplifies the conflict resolution process, and configures fine-grained permissions through role permission management. Ensure document consistency and security.

Benefits of technology

It improves the real-time performance and consistency of the system in high-concurrency environments, simplifies conflict handling, reduces computing and storage overhead, enhances system scalability and user experience, provides more flexible permission management, and significantly improves system performance. and security.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118798136A_ABST
    Figure CN118798136A_ABST
Patent Text Reader

Abstract

The invention discloses a real-time collaborative editing system and method for multi-person online documents, and the system comprises a client application program which is installed on a computer or mobile equipment of a user and communicates with a server through network connection; the server software is deployed on a server and used for processing and sending requests and data synchronization tasks; a dynamic synchronization mechanism module; a conflict detection and resolution mechanism module; a role authority management configuration module and a document storage module; the method comprises the steps that a client application program carries out editing operation, and server software carries out dynamic synchronization mechanism algorithm selection; the server software selects an OT algorithm or a CRDT algorithm; performing conflict detection and resolution on the selected OT algorithm operation or CRDT algorithm operation, detecting conflicts through a middleware component, resolving the conflicts according to a preset priority rule, and merging, modifying and updating a final document; the method has the advantages that the real-time performance, the consistency, the system expansibility and the multi-user high-concurrency processing capacity are improved, and the cost is reduced.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the technical field of document editing, and in particular relates to a real-time collaborative editing system and method for multi-person online documents. Background Art

[0002] With the development of the Internet and remote collaboration technology, multi-person online document collaborative editing has become an indispensable part of the modern working environment. Whether it is internal project collaboration within an enterprise, teaching content editing on an online education platform, or code collaborative editing in software development, it is inseparable from the need for multi-person real-time collaboration.

[0003] When multiple people are editing a document online, it is necessary to ensure that each user sees the same content and that all users' modifications are synchronized in real time. This requires the system to have an efficient synchronization and conflict resolution mechanism.

[0004] When multiple users edit the same text at the same time, conflicts are likely to occur. If these conflicts are not resolved promptly and effectively, they will lead to inconsistent document content.

[0005] In large-scale usage scenarios, the collaborative editing system needs to be able to handle a large number of concurrent requests while ensuring performance and stability.

[0006] The collaborative editing system needs to support permission management for different user roles to ensure document security and editing flexibility.

[0007] At present, the mainstream multi-person collaborative editing technologies mainly include operational transformation (OT) and conflict-free replicated data type (CRDT). These two technologies have their own advantages and disadvantages.

[0008] 1. Operational Transformation (OT) Algorithm

[0009] The Operation Transformation (OT) algorithm is one of the earliest technologies used in real-time collaborative editing systems. It is mainly used to resolve conflicts when multiple users operate on shared documents at the same time. Its basic principle is to transform the user's operations to ensure that all users can eventually see the same document version. Its advantages are:

[0010] Strong consistency: The OT algorithm uses an operation conversion mechanism to ensure that all users' operations are applied in sequence to achieve strong consistency.

[0011] Real-time responsiveness: Ability to quickly process user editing operations to ensure the real-time performance of the system.

[0012] 2. Conflict-free Data Type (CRDT) Algorithm

[0013] The Conflict-Free Data Type (CRDT) algorithm is an algorithm that can achieve eventual consistency in a distributed environment. Its core idea is to design a data type whose multiple copies can be modified independently and eventually achieve consistency through a merge operation. Its advantages are:

[0014] Simplicity: The CRDT algorithm has a simple structure and is easy to implement and understand.

[0015] Scalability: The CRDT algorithm naturally supports distribution and high concurrency, and is suitable for large-scale systems.

[0016] However, the above prior art has the following disadvantages:

[0017] 1. Lack of real-time and consistency

[0018] Although the operation transformation (OT) algorithm can ensure real-time responsiveness and strong consistency, its operation transformation mechanism is complex. Especially in a high-concurrency environment, the operation transformation rules become difficult to maintain, resulting in a decrease in system performance.

[0019] The conflict-free data type (CRDT) algorithm provides eventual consistency, but cannot guarantee real-time consistency. When multiple users edit at the same time, temporary data inconsistencies may occur, affecting the user experience.

[0020] 2. Poor system scalability

[0021] Due to the need to maintain a large amount of operation history and complex conversion rules, the OT algorithm has poor scalability when the number of users increases and is difficult to apply in large-scale systems.

[0022] Although the CRDT algorithm naturally supports distribution and high concurrency, in actual applications, it requires a lot of network communication and data synchronization, which increases the complexity of the system and resource consumption.

[0023] 3. Conflict resolution is complex

[0024] OT algorithms need to perform complex transformations at each operation to ensure that all users' operations can be executed in order to avoid conflicts. As the number of users and the frequency of operations increase, conflict handling becomes more complicated.

[0025] Although the conflict handling of the CRDT algorithm is relatively simple, the eventual consistency it provides leads to temporary data inconsistency in high-concurrency scenarios, resulting in a poor user experience.

[0026] 4. High cost and low efficiency

[0027] Existing collaborative editing systems, whether based on OT algorithms or CRDT algorithms, require high computing and storage resources. Complex conflict handling and data synchronization mechanisms increase the operating costs of the system, resulting in overall inefficiency.

[0028] 5. Insufficient permissions management

[0029] The permission management mechanism of existing systems is usually rough, and it is difficult to flexibly adjust permissions according to user roles and behaviors. The lack of fine-grained permission control affects the security of the system and user experience.

[0030] The patent application document with publication number CN106844395A discloses a method and device for multi-person synchronous online document editing, including: receiving a lesson preparation request instruction initiated by a client, determining the attributes of all clients participating in the lesson preparation according to the lesson preparation request instruction; creating relevant data information of collective lesson preparation according to the received lesson preparation request instruction, and storing the data in a memory; creating a new temporary collective lesson preparation document under a specified file path; activating collective lesson preparation, and initiating a lesson preparation request instruction to all clients participating in the lesson preparation; regularly receiving lesson preparation information entered by the client, performing real-time data integration on the received data, and then synchronizing the integrated data to each client participating in the lesson preparation for display. However, due to its reliance on regular reception and integration of client data, this method cannot guarantee that the data of each client is always in a consistent state. In a high-concurrency environment, short-term data inconsistency may occur, affecting the user experience; due to the need to integrate and synchronize the data of all clients in real time, this method may significantly reduce system performance when the number of users increases, and it is difficult to expand to large-scale application scenarios.

[0031] The patent application document with publication number CN111985191A discloses a multi-person collaborative online document editing method and device thereof, which includes splitting the document into several chapters when creating the initial document, each chapter of the document is designed with a unique identification ID and the location identification of the chapter, and multiple users with the permission to add, edit, delete, and drag operations are recorded at the same time; the method and device allow users to perform multi-person collaborative online editing of the document, and for users who are editing the document, they can see all users currently editing the document at any time, and the method will save the document in real time after each addition, editing, deletion, and dragging. However, since this method mainly avoids conflicts through long connection exclusive locks, it fails to explain in detail how to solve the conflict problem of editing the same chapter at the same time. If two or more users request to edit the same chapter at the same time, data loss or conflicts that cannot be resolved in time may result, affecting the efficiency and reliability of collaborative editing. Summary of the invention

[0032] In order to overcome the deficiencies of the above-mentioned prior art, the purpose of the present invention is to provide a real-time collaborative editing system and method for multi-person online documents, which can achieve efficient synchronization, conflict resolution, high concurrency processing, and real-time response through a dynamic synchronization mechanism, an innovative conflict detection and resolution mechanism, an improved metadata structure and management strategy, and low computing and storage overhead, and has the advantages of improving real-time performance and consistency, enhancing system scalability, multi-user high-concurrency processing capabilities, improving efficiency, and reducing costs.

[0033] In order to achieve the above object, the technical solution adopted by the present invention is:

[0034] A real-time collaborative editing system for multiple online documents, comprising:

[0035] Client application: installed on the user's computer or mobile device, communicates with the server through a network connection;

[0036] Server-side software: deployed on the server, used to process and send requests and data synchronization tasks; including dynamic synchronization mechanism module, conflict detection and resolution mechanism module, role authority management configuration module and document storage module; among which:

[0037] Dynamic synchronization mechanism module: automatically selects the most suitable data synchronization algorithm based on the current number of online users and operation frequency: when the user concurrency is low and high real-time response is required, the system uses the operation transformation (OT) algorithm; when the user concurrency increases, the system automatically switches to the conflict-free data type (CRDT) algorithm;

[0038] Conflict detection and resolution mechanism module: combines the real-time responsiveness of the Operational Transformation (OT) algorithm and the data structure characteristics of the Conflict-Free Data Type (CRDT) algorithm to simplify the conflict resolution process and ensure document consistency;

[0039] Role permission management configuration module: supports fine-grained permission management and dynamic adjustment functions to ensure the security and flexibility of the system;

[0040] Document storage module: used to centrally manage and save document data edited by all users to ensure data persistence and consistency.

[0041] The role authority management configuration module specifically includes:

[0042] System administrator configures permission module: the system administrator logs in to the system and configures user permissions through the management interface;

[0043] Determine User Role Module: Assign users to corresponding roles, namely, administrator role, editor role, and viewer role, according to the user permissions configured by the system administrator in the permission configuration module;

[0044] Dynamically adjust permissions module: used by the system to monitor the user's activity frequency and behavior patterns, and dynamically adjust user permissions based on preset priority rules.

[0045] The administrator role in the user role module is used to configure system settings and assign role permissions; wherein, configuring system settings: the administrator role accesses the system settings page to configure and maintain system parameters; assigning role permissions: the administrator role assigns and adjusts the roles and permissions of other users to ensure that they meet project requirements;

[0046] The editor role is used to edit documents and submit changes. To edit a document, the editor role edits and saves the document content. To submit changes, the editor role submits a request for change after completing the editing process, and the system triggers the approval process.

[0047] The viewer role is used to view documents and request access permissions. To view documents, the viewer role views document content. To request access permissions, the viewer role requests higher access permissions, and permissions are adjusted dynamically after approval by the administrator role.

[0048] The present invention also provides a real-time collaborative editing method for multiple online documents, comprising the following steps:

[0049] Step 1: The client application performs editing operations, and the server software selects the dynamic synchronization mechanism algorithm;

[0050] Step 2: Using the dynamic synchronization mechanism algorithm in step 1, the server-side software selects the operation transformation (OT) algorithm or the conflict-free data type (CRDT) algorithm;

[0051] Step 3: Conflict detection and resolution are performed on the operational transformation (OT) algorithm operations or conflict-free data type (CRDT) algorithm operations selected in step 2. Conflicts are detected through the middleware component, resolved according to the preset priority rules, and the modifications are merged and the final document is updated.

[0052] The specific method of step 1 is:

[0053] When users perform editing operations on the client application, the server automatically selects a synchronization algorithm based on the current number of online users and the frequency of operations, namely the Operational Transformation (OT) algorithm or the Conflict-Free Data Type (CRDT) algorithm. The system configures user editing permissions based on role permission management. Role types include editor role, viewer role, and administrator role. The editor role edits documents, submits modifications, or requests higher permissions. The viewer role requests higher access permissions, and the administrator role makes dynamic permission adjustments after approval.

[0054] The specific method of step 2 is:

[0055] When the number of concurrent users is low and the real-time requirement is high, the Operation Transformation (OT) algorithm is selected; the system responds to user operations in real time, updates local documents through the Operation Transformation mechanism, and broadcasts the operations to other users;

[0056] When the number of concurrent users is large and the system scalability requirements are high, the conflict-free data type (CRDT) algorithm is selected. The system guarantees eventual consistency, converts user operations into CRDT operations, synchronizes data, and ensures that all users eventually see consistent documents.

[0057] When the user performs editing operations and selects the Operational Transformation (OT) algorithm or the Conflict-Free Data Type (CRDT) algorithm, the system configures the user's editing permissions based on role permission management, and the editor role edits documents, submits changes, or requests higher permissions.

[0058] The middleware component in step 3 is a software module for detecting and resolving conflicts, which is responsible for real-time monitoring of user operations, identifying conflicts, and applying preset priority rules to resolve conflicts; specifically, it includes:

[0059] Conflict detection: identifying conflicts when multiple users are editing the same document portion simultaneously;

[0060] Conflict resolution: automatically resolve conflicts based on preset priority rules to ensure data consistency;

[0061] Merge changes: Merge the conflict-resolving operations into the final document and synchronize them to all users.

[0062] The implementation method of the conflict detection includes:

[0063] Operation timestamp: Each user's editing operation is accompanied by a timestamp to record the time when the operation occurred;

[0064] Operation sequence number: Each editing operation is assigned a unique sequence number to track the order of operations;

[0065] Operation log: The system maintains an operation log that records all user editing operations, including timestamps and sequence numbers;

[0066] Conflict judgment: When the system receives a new editing operation, it determines whether the operation conflicts with other operations by comparing the timestamp and sequence number; if the timestamps of the two operations are very close and the edited content partially overlaps, it is considered a conflict.

[0067] The priority rules in step 3 include: editing time order and user authority rules, which are used to determine the priority of conflict resolution.

[0068] The step 2 may also adopt a hybrid synchronization algorithm:

[0069] Combine the operation transformation (OT) algorithm and the conflict-free data type (CRDT) algorithm. In low-concurrency situations, the operation transformation (OT) algorithm is mainly used to process real-time operations. In high-concurrency situations, the system switches to a hybrid mode, where one part uses the operation transformation (OT) algorithm for operation transformation, and the other part uses the conflict-free data type (CRDT) algorithm for conflict resolution.

[0070] Dynamic weight adjustment: According to the real-time monitored user concurrency and operation frequency, the weight ratio of the operation transformation (OT) algorithm and the conflict-free data type (CRDT) algorithm in the hybrid mode is dynamically adjusted to ensure the efficiency and consistency of the system in different scenarios.

[0071] Compared with the prior art, the present invention has the following beneficial effects:

[0072] The present invention proposes an innovative solution combining an operation transformation (OT) algorithm and a conflict-free data type (CRDT) algorithm in the field of real-time collaborative editing of multi-person online documents, which has the following creativity and advantages:

[0073] 1. Improved real-time performance and consistency

[0074] The OT algorithm in the prior art can provide strong consistency and real-time response, but it is highly complex and difficult to expand to large-scale systems. Although the CRDT algorithm is easy to expand, it can only provide eventual consistency, and data inconsistency may occur in a short period of time; the present invention dynamically selects the OT or CRDT algorithm according to the current user concurrency and operation frequency, and provides the best synchronization strategy in different scenarios. When the user concurrency is small and the real-time requirement is high, the OT algorithm is used first; when the user concurrency is large and the scalability requirement is high, the CRDT algorithm is used first, which improves the real-time and consistency of the system in a high-concurrency environment and ensures that all users eventually see a consistent version of the document.

[0075] 2. Enhanced system scalability

[0076] The complexity of the OT algorithm in the prior art makes it difficult to expand in large-scale systems. Although the CRDT algorithm is easy to expand, the data synchronization overhead is large in high-concurrency situations. The present invention combines the advantages of the OT algorithm and the CRDT algorithm, and uses the data structure characteristics of the CRDT algorithm to simplify the conflict resolution process and reduce computing and storage overhead; the system can efficiently handle a large number of concurrent requests, improving scalability and stability.

[0077] 3. Simplified conflict handling

[0078] The operation conversion rules of the OT algorithm in the prior art are complex and conflict handling is difficult. Although the conflict handling of the CRDT algorithm is relatively simple, it can only provide eventual consistency. The present invention simplifies the conflict handling process by optimizing the metadata structure and management strategy, ensures real-time response and eventual consistency, reduces the complexity of conflict handling, and improves the performance and reliability of the system.

[0079] 4. Improved efficiency and reduced costs

[0080] In the prior art, the complex conflict handling and data synchronization mechanisms of existing collaborative editing systems increase the consumption of computing and storage resources and have high operating costs; the present invention is implemented through an optimization algorithm, which reduces the computing and storage overhead in the data synchronization and conflict resolution process, reduces the operating cost of the system, and improves the overall efficiency.

[0081] 5. Improved permission management

[0082] The permission management mechanism of the existing system is relatively rough and lacks flexible dynamic adjustment functions; the present invention supports fine-grained permission management and dynamic adjustment functions, and administrators can configure the permission levels of different roles according to actual needs; the system can automatically adjust permissions according to the user's activity frequency and behavior patterns to ensure the security and compliance of the document, enhance the security of the system and user experience, and improve the flexibility and adaptability of permission management.

[0083] 6. High concurrent processing capability for multiple users

[0084] The performance of the OT algorithm in the prior art degrades under high-concurrency scenarios, and the data synchronization overhead of the CRDT algorithm is large under high-concurrency. However, the present invention significantly improves the processing capability of the system in a high-concurrency environment through an innovative synchronization mechanism and conflict resolution strategy. The system can efficiently handle the editing operations of multiple users and maintain high performance and stability.

[0085] 7. Able to provide a better user experience

[0086] The existing technology has poor user experience in environments with high concurrency and high real-time requirements. The present invention combines the advantages of the OT algorithm and the CRDT algorithm to provide a better user experience through a dynamic synchronization mechanism, improved conflict handling and optimized permission management. Users can see consistent content in real time when editing documents, the system responds quickly, permission management is flexible, and the overall user experience is significantly improved. BRIEF DESCRIPTION OF THE DRAWINGS

[0087] Figure 1 It is the overall architecture diagram of the system of the present invention.

[0088] Figure 2 It is a flow chart of the principle of the implementation method of the present invention.

[0089] Figure 3 It is a flow chart of the dynamic synchronization mechanism of the present invention.

[0090] Figure 4 It is a flowchart of the authority control mechanism of the role authority management configuration module of the present invention. DETAILED DESCRIPTION

[0091] The technical solution adopted by the present invention is further introduced below in conjunction with the accompanying drawings.

[0092] like Figure 1 As shown, a real-time collaborative editing system for multiple online documents includes:

[0093] Client application: installed on the user's computer or mobile device, communicating with the server over a secure network connection;

[0094] Server-side software: deployed on high-performance servers, used to process and send requests and data synchronization tasks; including dynamic synchronization mechanism module, conflict detection and resolution mechanism module, role authority management configuration module and document storage module; among which:

[0095] Dynamic synchronization mechanism module: automatically selects the most suitable data synchronization algorithm based on the current number of online users and operation frequency: when the user concurrency is low and high real-time response is required, the system uses the operation transformation (OT) algorithm; when the user concurrency increases, the system automatically switches to the conflict-free data type (CRDT) algorithm;

[0096] Conflict detection and resolution mechanism module: combines the real-time responsiveness of the Operational Transformation (OT) algorithm and the data structure characteristics of the Conflict-Free Data Type (CRDT) algorithm to simplify the conflict resolution process and ensure document consistency;

[0097] When an editing operation conflict occurs, the system detects the conflict through a middleware software module used to detect and resolve conflicts, and resolves the conflict according to preset priority rules (such as editing time, user permissions, etc.) to ensure the accuracy and consistency of the document content.

[0098] like Figure 4 As shown, the role permission management configuration module: supports fine-grained permission management and dynamic adjustment functions to ensure the security and flexibility of the system;

[0099] Define different user roles and their corresponding permission levels. The system allows administrators to configure and adjust user permissions based on project requirements and team structure. The permission control framework supports dynamic adjustment of permissions, automatically adjusting the user's permissions based on the user's activity frequency and behavior patterns to enhance document security and compliance.

[0100] The role authority management configuration module specifically includes:

[0101] System administrator configures permission module: the system administrator logs in to the system and configures user permissions through the management interface;

[0102] Determine User Role Module: Assign users to corresponding roles, namely, administrator role, editor role, and viewer role, according to the user permissions configured by the system administrator in the permission configuration module;

[0103] The administrator role is used to configure system settings and assign role permissions. To configure system settings, the administrator role accesses the system settings page to configure and maintain system parameters. To assign role permissions, the administrator role assigns and adjusts the roles and permissions of other users to ensure that they meet project requirements.

[0104] The editor role is used to edit documents and submit changes. To edit a document, the editor role edits and saves the document content. To submit changes, the editor role submits a request for change after completing the editing process, and the system triggers the approval process.

[0105] The viewer role is used to view documents and request access permissions. To view documents, the viewer role can view document contents but cannot edit them. To request access permissions, the viewer role can request higher access permissions, and permissions can be adjusted dynamically after approval by the administrator role.

[0106] Dynamically adjust permissions module: used by the system to monitor the user's activity frequency and behavior patterns, and dynamically adjust user permissions based on preset priority rules.

[0107] Document storage module: used to centrally manage and save document data edited by all users to ensure data persistence and consistency.

[0108] The present invention also provides a real-time collaborative editing method for multiple online documents, comprising the following steps:

[0109] like Figure 2 As shown, step 1: the client application performs editing operations, and the server software selects the dynamic synchronization mechanism algorithm;

[0110] The specific method of step 1 is:

[0111] When users perform editing operations on the client application, the server automatically selects a synchronization algorithm based on the current number of online users and the frequency of operations, namely the Operational Transformation (OT) algorithm or the Conflict-Free Data Type (CRDT) algorithm. The system configures user editing permissions based on role permission management. Role types include editor role, viewer role, and administrator role. The editor role edits documents, submits modifications, or requests higher permissions. The viewer role requests higher access permissions, and the administrator role makes dynamic permission adjustments after approval.

[0112] like Figure 3 As shown, step 2: using the dynamic synchronization mechanism algorithm in step 1, the server-side software selects an operation transformation (OT) algorithm or a conflict-free data type (CRDT) algorithm;

[0113] The specific method of step 2 is:

[0114] When the number of concurrent users is low and the real-time requirement is high, the Operation Transformation (OT) algorithm is selected; the system responds to user operations in real time, updates local documents through the Operation Transformation mechanism, and broadcasts the operations to other users;

[0115] When the number of concurrent users is large and the system scalability requirements are high, the conflict-free data type (CRDT) algorithm is selected. The system guarantees eventual consistency, converts user operations into CRDT operations, synchronizes data, and ensures that all users eventually see consistent documents.

[0116] When a user performs an editing operation and selects the Operational Transformation (OT) algorithm or the Conflict-Free Data Type (CRDT) algorithm, the system configures the user's editing permissions based on role permission management, and the editor role edits documents, submits changes, or requests higher permissions.

[0117] Step 3: Conflict detection and resolution:

[0118] Conflict detection and resolution are performed on the operational transformation (OT) algorithm operations or conflict-free data type (CRDT) algorithm operations selected in step 2. Conflicts are detected through middleware components, resolved according to preset priority rules, and the modifications are merged and the final document is updated.

[0119] The middleware component in step 3 is a software module for detecting and resolving conflicts, which is responsible for real-time monitoring of user operations, identifying conflicts, and applying preset priority rules to resolve conflicts; specifically, it includes:

[0120] Conflict detection: identifying conflicts when multiple users are editing the same document portion simultaneously;

[0121] The implementation methods of conflict detection include:

[0122] Operation timestamp: Each user's editing operation is accompanied by a timestamp to record the time when the operation occurred;

[0123] Operation sequence number: Each editing operation is assigned a unique sequence number to track the order of operations;

[0124] Operation log: The system maintains an operation log that records all user editing operations, including timestamps and sequence numbers;

[0125] Conflict determination: When the system receives a new editing operation, it determines whether the operation conflicts with other operations by comparing the timestamp and sequence number; for example, if the timestamps of two operations are very close and the edited content partially overlaps, it is considered a conflict.

[0126] Conflict resolution: automatically resolve conflicts based on preset priority rules to ensure data consistency;

[0127] Merge changes: Merge the conflict-resolving operations into the final document and synchronize them to all users.

[0128] The priority rules in step 3 include: editing time order and user authority rules, which are used to determine the priority of conflict resolution.

[0129] The key points and protection points of the present invention are:

[0130] 1. Dynamic synchronization mechanism

[0131] Key point: Dynamically select the operation transformation (OT) algorithm and the conflict-free data type (CRDT) algorithm based on user concurrency and real-time requirements.

[0132] Protection point: The system can automatically select the most suitable synchronization algorithm based on the current number of online users and operation frequency to ensure high efficiency and consistency in different scenarios.

[0133] 2. Innovative conflict detection and resolution mechanism

[0134] Key point: Combine the real-time responsiveness of OT algorithms and the data structure characteristics of CRDT to optimize the conflict detection and resolution process.

[0135] Protection point: While maintaining the real-time responsiveness of the OT algorithm, the system uses the data structure characteristics of the CRDT algorithm to simplify the conflict resolution process and reduce the computing and storage overhead during data synchronization.

[0136] 3. Improved metadata structure and management strategy

[0137] Key Points: Improve system performance and stability through improved metadata structure and management strategies, optimized tracking and recording of editing operations.

[0138] Protection point: The system can efficiently track and record user editing operations to ensure stability and performance improvement in high-concurrency environments.

[0139] 4. Role-based permission management framework

[0140] Key points: Support fine-grained permission management and dynamic adjustment functions to ensure the security and flexibility of the system.

[0141] Protection point: System administrators can configure permission levels for different roles based on project requirements and team structure, dynamically adjust permissions, and ensure document security and compliance.

[0142] 5. Real-time response and eventual consistency

[0143] Key point: Combine the advantages of OT algorithm and CRDT algorithm to achieve real-time response and eventual consistency.

[0144] Protection point: The system can provide real-time response when the user concurrency is small and the real-time requirements are high; when the user concurrency is large and the scalability requirements are high, it can provide eventual consistency to ensure that all users eventually see the same document version.

[0145] 6. High concurrent processing capability for multiple users

[0146] Key point: Improve the system's high-concurrency processing capabilities through innovative synchronization mechanisms and conflict resolution strategies.

[0147] Protection point: The system can efficiently handle the editing operations of multiple users in a high-concurrency environment to ensure system performance and stability.

[0148] 7. Low computation and storage overhead

[0149] Key point: Optimize algorithm implementation to reduce computing and storage overhead during data synchronization and conflict resolution.

[0150] Protection point: The system can reduce computing and storage resource consumption while maintaining high efficiency, thereby improving overall operating efficiency.

[0151] 8. Dynamically adjust permissions

[0152] Key point: Automatically adjust the user's permission settings based on the user's activity frequency and behavior pattern. Protection point: The system can monitor user behavior in real time and dynamically adjust user permissions based on preset rules to enhance the security and adaptability of the system.

[0153] In order to prevent others from circumventing the present technical solution to achieve the same purpose of the invention, several possible alternative solutions are provided below, which achieve similar functions and effects to the present invention to varying degrees.

[0154] 1. Dynamic selection mechanism based on hybrid algorithm

[0155] Description of alternatives:

[0156] Hybrid synchronization algorithm: A hybrid algorithm is introduced to combine some functions of the OT algorithm and the CRDT algorithm. In low concurrency, the OT algorithm is mainly used to handle real-time operations; in high concurrency, the system switches to hybrid mode, partially using the OT algorithm for operation conversion and partially using the CRDT algorithm for conflict resolution.

[0157] Dynamic weight adjustment: According to the real-time monitored user concurrency and operation frequency, the weight ratio of OT and CRDT algorithms in the hybrid mode is dynamically adjusted to ensure the efficiency and consistency of the system in different scenarios.

[0158] Effect:

[0159] It provides a more flexible and adaptable synchronization mechanism that can ensure real-time performance and handle high-concurrency scenarios.

[0160] 2. Collaborative editing based on blockchain technology

[0161] Description of alternatives:

[0162] Blockchain data structure: Using blockchain technology, each user's operation is regarded as a block to form an operation chain. The distributed ledger technology of blockchain ensures that the operation records of all users are consistent and cannot be tampered with.

[0163] Consensus mechanism: Introduce the consensus mechanism of blockchain (such as PoW, PoS, etc.). When multiple users edit concurrently, the application order and priority of operations are determined by the consensus algorithm to ensure data consistency.

[0164] Effect:

[0165] By utilizing the decentralized and high-security characteristics of blockchain technology, the reliability of the system and data security are enhanced, while ensuring the consistency and non-tamperability of operations.

[0166] 3. Conflict prediction and resolution based on machine learning

[0167] Description of alternatives:

[0168] Machine learning prediction model: Introduce machine learning algorithms and train prediction models through historical operation data to predict possible editing conflicts and handle them in advance.

[0169] Intelligent conflict resolution: When the system detects a potential conflict, the machine learning model automatically selects the optimal conflict resolution solution based on preset rules and prediction results, reducing manual intervention.

[0170] Effect:

[0171] It improves the intelligence of conflict resolution, reduces the complexity of conflict detection and resolution, and improves system efficiency and user experience.

[0172] The beneficial effects of the present invention compared with the prior art are:

[0173] 1. Conflict between real-time and consistency

[0174] Traditional collaborative editing systems usually need to ensure that multiple users edit documents simultaneously while maintaining document consistency and real-time performance. This requirement leads to complex conflict resolution and synchronization mechanisms. Operational Transformation (OT) algorithms and Conflict-Free Data Types (CRDT) algorithms are the main technical means at present. The OT algorithm ensures real-time responsiveness and strong consistency through the operational transformation mechanism, but its implementation is complex and difficult to expand to large-scale systems. The CRDT algorithm is known for its simplicity and scalability, but it can only provide eventual consistency, which may lead to short-term data inconsistency.

[0175] This invention combines the advantages of the OT algorithm and the CRDT algorithm, and optimizes the efficiency and stability of multi-person online document editing through innovative synchronization mechanisms and conflict resolution strategies. The OT algorithm is used first in scenarios with small user concurrency and high real-time requirements; the CRDT algorithm is used first in scenarios with large user concurrency and high scalability requirements.

[0176] 2. Operational complexity and system scalability

[0177] Although OT algorithms perform well in maintaining real-time and strong consistency, they are difficult to scale to large-scale systems due to their high operational complexity. CRDT algorithms are relatively simple to implement and easy to scale, but may perform poorly in environments with high concurrency and real-time requirements.

[0178] This paper introduces a new conflict detection and resolution mechanism, which can simplify the conflict resolution process by using the data structure characteristics of CRDT while maintaining the real-time responsiveness of the OT algorithm, and reduce the computation and storage overhead during data synchronization. At the same time, through the improved metadata structure and management strategy, the algorithm is optimized to track and record editing operations, improving the overall performance and stability of the system.

[0179] 3. Data consistency and synchronization

[0180] Ensuring data consistency and synchronization when multiple people edit a document at the same time is a technical challenge. OT algorithms can provide strong consistency, but are less efficient in high-concurrency scenarios. CRDT algorithms provide eventual consistency, but may cause temporary data inconsistency.

[0181] The present invention combines the advantages of the OT algorithm and the CRDT algorithm, and dynamically selects the most suitable synchronization strategy, dynamically selects the OT or CRDT algorithm according to the editing frequency of the document and the number of users, to ensure data consistency and synchronization in different scenarios.

[0182] 4. Conflict Detection and Resolution

[0183] In multi-person collaborative editing, conflict detection and resolution are key issues. Traditional OT algorithms resolve conflicts through operation conversion mechanisms, but their implementation is complex and has high computational and storage overhead. Although CRDT algorithms simplify the conflict resolution process, they can only provide eventual consistency, which may lead to temporary data inconsistency.

[0184] This paper proposes a new conflict detection and resolution mechanism, which combines the real-time responsiveness of the OT algorithm and the simplicity of the CRDT algorithm, and simplifies the conflict resolution process while ensuring real-time performance. Conflicts are detected through middleware components, and conflicts are resolved according to preset priority rules (such as editing time, user permissions, etc.), ensuring the accuracy and consistency of document content.

[0185] 5. Permission management and security

[0186] Multi-person collaborative editing systems require an effective permission management mechanism to ensure document security and user experience. Traditional permission management mechanisms are usually rough and difficult to flexibly adjust permissions based on user roles and behaviors.

[0187] The present invention proposes a role-based permission control framework that supports fine-grained permission management. The framework allows system administrators to configure the permission levels of different roles according to actual needs, and implement flexible management of document access control, editing permissions, and approval processes. In addition, the framework also includes a dynamic permission adjustment function that can automatically adjust the permission settings of the document according to the user's behavior pattern and the status of the document, thereby enhancing the security and adaptability of the system.

[0188] 6. System performance and stability

[0189] When processing a large number of concurrent requests, multi-person collaborative editing systems are prone to performance bottlenecks and stability issues. Traditional OT algorithms and CRDT algorithms have deficiencies in complexity and synchronization in high-concurrency scenarios.

[0190] The present invention improves the overall performance and stability of the system through improved metadata structure and management strategy, and optimizes the algorithm to track and record editing operations. At the same time, by dynamically selecting synchronization strategies, the most suitable data synchronization algorithm is automatically selected according to the number of current online users and operation frequency, thus improving the scalability and high concurrent processing capabilities of the system.

[0191] In view of the shortcomings of the prior art, the present invention proposes a novel multi-person online document real-time collaborative editing algorithm, aiming to achieve the following goals:

[0192] 1. Improve real-time performance and consistency

[0193] Combining the advantages of OT and CRDT algorithms, the most suitable synchronization algorithm is dynamically selected to ensure real-time and consistency in different scenarios. When the user concurrency is small and the real-time requirement is high, the OT algorithm is used first; when the user concurrency is large and the scalability requirement is high, the CRDT algorithm is used first.

[0194] 2. Enhance system scalability

[0195] A new conflict detection and resolution mechanism is introduced to simplify the conflict resolution process by utilizing the data structure characteristics of the CRDT algorithm while maintaining the real-time responsiveness of the OT algorithm, thereby reducing the computational and storage overhead during data synchronization and improving the scalability of the system.

[0196] 3. Simplify conflict resolution

[0197] Through innovative synchronization mechanisms and conflict resolution strategies, the complexity and computing overhead of operation conversion are reduced, ensuring the performance and stability of the system in a high-concurrency environment.

[0198] 4. Reduce costs and improve efficiency

[0199] The optimization algorithm tracks and records editing operations, reduces network communication and computing resource consumption for data synchronization, reduces system operating costs, and improves overall efficiency.

[0200] 5. Improved permissions management

[0201] A role-based permission control framework is proposed to support fine-grained permission management and dynamic adjustment. Administrators can configure the permission levels of different roles according to actual needs, realize flexible management of document access control, editing permissions and approval processes, and enhance system security and user experience.

[0202] Through these improvements, the present invention not only solves the problems of the prior art in terms of real-time, consistency, complexity, scalability, conflict handling, high cost and low efficiency, but also improves the security and user experience of the system, and significantly improves the efficiency and stability of collaborative editing of online documents by multiple people.

[0203] Experimental analysis

[0204] In order to verify the effectiveness of the present invention, a number of experiments were conducted based on the technical solution of the present invention to evaluate its performance in terms of real-time performance, consistency, scalability, and authority management. The following is the experimental design and result analysis:

[0205] Experimental design

[0206] Experimental environment:

[0207] Server configuration: high-performance server equipped with multi-core CPU and large-capacity memory.

[0208] Client configuration: multiple user devices, including desktop computers and mobile devices, to simulate different user operation scenarios.

[0209] Network environment: High-speed network connection to ensure that network latency and bandwidth do not become bottlenecks during the experiment.

[0210] Experimental scenario:

[0211] Scenario 1: Low-concurrency environment: A small number of users edit documents at the same time. The real-time and consistency of the system are evaluated under low-concurrency conditions.

[0212] Scenario 2: High-concurrency environment: A large number of users edit documents at the same time. The scalability and consistency of the system under high-concurrency conditions are evaluated.

[0213] Scenario 3: Conflict handling: Multiple users edit the same chapter at the same time to evaluate the effectiveness of the conflict detection and resolution mechanism.

[0214] Scenario 4: Permission management: Users with different roles perform editing operations to evaluate the flexibility and security of permission management.

[0215] Experimental Results

[0216] Real-time and consistency:

[0217] Scenario 1 (low concurrency environment):

[0218] The system selects the OT algorithm, so all user operations can be responded to in real time and the documents are always consistent on all clients.

[0219] The average response time is less than 100ms, and the user experience is good.

[0220] Scenario 2 (high concurrency environment):

[0221] The system uses the CRDT algorithm to ensure eventual consistency. Despite a short delay, all users will eventually see the same document content.

[0222] Under high concurrency conditions, the system's processing capabilities are significantly better than traditional methods and can support more than 1,000 users editing at the same time.

[0223] Conflict handling:

[0224] Scenario 3 (Conflict Handling):

[0225] The system detects conflicts in real time through middleware components and resolves them according to preset priority rules.

[0226] After the conflict is resolved, the document content remains consistent on all user ends and no data is lost.

[0227] The average conflict detection and resolution time is less than 200ms, ensuring the efficiency of collaborative editing.

[0228] Permission management:

[0229] Scenario 4 (Permission Management):

[0230] System administrators can flexibly configure and adjust user permissions to ensure that users with different roles have corresponding permissions.

[0231] The system dynamically adjusts permissions based on the user's activity frequency and behavior patterns to ensure document security and compliance.

[0232] The permission adjustment and approval process is efficient, and permission changes can take effect within 1 second.

[0233] Real-time and consistency analysis:

[0234] By dynamically selecting synchronization algorithms, the system can provide excellent real-time and consistency performance in different concurrency scenarios. The OT algorithm can provide real-time response in a low-concurrency environment, while the CRDT algorithm ensures eventual consistency in a high-concurrency environment.

[0235] Experimental results show that the present invention significantly improves the system performance and user experience in different scenarios.

[0236] Scalability analysis:

[0237] The system shows good scalability in a high-concurrency environment, can support a large number of users editing documents at the same time, and its processing performance is significantly better than traditional methods.

[0238] Through innovative conflict detection and resolution mechanisms, the system can efficiently handle a large number of concurrent operations and ensure data consistency and integrity.

[0239] Conflict resolution analysis:

[0240] The system's conflict detection and resolution mechanism can detect and resolve conflicts in real time, ensuring data consistency when multiple users edit the same chapter at the same time.

[0241] High conflict resolution efficiency ensures the efficiency and reliability of collaborative editing.

[0242] Permission management analysis:

[0243] The system's role-based permission management mechanism can flexibly configure and dynamically adjust user permissions to ensure the security and compliance of documents.

[0244] Experimental results show that the permission management mechanism is efficient and secure, and can respond to user permission change requirements in a timely manner to ensure document security.

[0245] in conclusion

[0246] Through the above experimental analysis, the present invention shows significant advantages in real-time, consistency, scalability and authority management. The experimental results verify the effectiveness and superiority of the present invention in the field of multi-person online document collaborative editing, solve the key problems in the prior art, and provide users with a more efficient, stable and secure collaborative editing experience.

Claims

1. A real-time collaborative editing system for multiple online documents, characterized in that: include: Client application: installed on the user's computer or mobile device, communicates with the server through a network connection; Server-side software: deployed on the server, used to process and send requests and data synchronization tasks; It includes dynamic synchronization mechanism module, conflict detection and resolution mechanism module, role authority management configuration module and document storage module; among which: Dynamic synchronization mechanism module: automatically selects the most suitable data synchronization algorithm based on the current number of online users and operation frequency: when the user concurrency is low and high real-time response is required, the system uses the operation transformation (OT) algorithm; when the user concurrency increases, the system automatically switches to the conflict-free data type (CRDT) algorithm; Conflict detection and resolution mechanism module: combines the real-time responsiveness of the Operational Transformation (OT) algorithm and the data structure characteristics of the Conflict-Free Data Type (CRDT) algorithm to simplify the conflict resolution process and ensure document consistency; Role permission management configuration module: supports fine-grained permission management and dynamic adjustment functions to ensure the security and flexibility of the system; Document storage module: used to centrally manage and save document data edited by all users to ensure data persistence and consistency.

2. A method for real-time collaborative editing of multi-person online documents according to claim 1, characterized in that: The role authority management configuration module specifically includes: System administrator configures permission module: the system administrator logs in to the system and configures user permissions through the management interface; Determine user role module: according to the user permissions configured by the system administrator in the permission module, users are assigned to corresponding roles, namely, administrator role, editor role and viewer role; Dynamically adjust permissions module: used by the system to monitor the user's activity frequency and behavior patterns, and dynamically adjust user permissions based on preset priority rules.

3. A method for real-time collaborative editing of multi-person online documents according to claim 2, characterized in that: The administrator role in the user role module is used to configure system settings and assign role permissions; wherein, configuring system settings: the administrator role accesses the system settings page to configure and maintain system parameters; assigning role permissions: the administrator role assigns and adjusts the roles and permissions of other users to ensure that they meet project requirements; The editor role is used to edit documents and submit changes. To edit a document, the editor role edits and saves the document content. To submit changes, the editor role submits a request for change after completing the editing process, and the system triggers the approval process. The viewer role is used to view documents and request access permissions. To view documents, the viewer role views document content. To request access permissions, the viewer role requests higher access permissions, and permissions are adjusted dynamically after approval by the administrator role.

4. A method for a real-time collaborative editing system for multiple online documents according to any one of claims 1 to 3, characterized in that: The following steps are involved: Step 1: The client application performs editing operations, and the server software selects the dynamic synchronization mechanism algorithm; Step 2: Using the dynamic synchronization mechanism algorithm in step 1, the server-side software selects the operation transformation (OT) algorithm or the conflict-free data type (CRDT) algorithm; Step 3: Conflict detection and resolution are performed on the operational transformation (OT) algorithm operations or conflict-free data type (CRDT) algorithm operations selected in step 2. Conflicts are detected through the middleware component, resolved according to the preset priority rules, and the modifications are merged and the final document is updated.

5. A method for real-time collaborative editing of online documents for multiple people according to claim 4, characterized in that: The specific method of step 1 is: When users perform editing operations on the client application, the server automatically selects a synchronization algorithm based on the number of current online users and the frequency of operations, namely the Operational Transformation (OT) algorithm or the Conflict-Free Data Type (CRDT) algorithm; The system configures the user's editing permissions based on role permission management. Role types include editor role, viewer role and administrator role. The editor role can edit documents, submit changes or request higher permissions; The viewer role requests higher access permissions, and the administrator role dynamically adjusts permissions after approval.

6. A method for real-time collaborative editing of multi-person online documents according to claim 4, characterized in that: The specific method of step 2 is: When the number of concurrent users is low and the real-time requirement is high, the Operation Transformation (OT) algorithm is selected; the system responds to user operations in real time, updates local documents through the Operation Transformation mechanism, and broadcasts the operations to other users; When the number of concurrent users is large and the system scalability requirements are high, the conflict-free data type (CRDT) algorithm is selected. The system guarantees eventual consistency, converts user operations into CRDT operations, synchronizes data, and ensures that all users eventually see consistent documents. When a user performs an editing operation and selects the Operational Transformation (OT) algorithm or the Conflict-Free Data Type (CRDT) algorithm, the system configures the user's editing permissions based on role permission management, and the editor role edits documents, submits changes, or requests higher permissions.

7. A method for real-time collaborative editing of online documents for multiple people according to claim 4, characterized in that: The middleware component in step 3 is a software module for detecting and resolving conflicts, which is responsible for real-time monitoring of user operations, identifying conflicts, and applying preset priority rules to resolve conflicts; specifically, it includes: Conflict detection: identifying conflicts when multiple users are editing the same document portion simultaneously; Conflict resolution: automatically resolve conflicts based on preset priority rules to ensure data consistency; Merge changes: Merge the conflict-resolving operations into the final document and synchronize them to all users.

8. A method for real-time collaborative editing of online documents for multiple people according to claim 7, characterized in that: The implementation method of the conflict detection includes: Operation timestamp: Each user's editing operation is accompanied by a timestamp to record the time when the operation occurred; Operation sequence number: Each editing operation is assigned a unique sequence number to track the order of operations; Operation log: The system maintains an operation log that records all user editing operations, including timestamps and sequence numbers; Conflict judgment: When the system receives a new editing operation, it determines whether the operation conflicts with other operations by comparing the timestamp and sequence number; if the timestamps of the two operations are very close and the edited content partially overlaps, it is considered a conflict.

9. A method for real-time collaborative editing of online documents for multiple people according to claim 4, characterized in that: The priority rules in step 3 include: editing time order and user authority rules, which are used to determine the priority of conflict resolution.

10. The method for real-time collaborative editing of multi-person online documents according to claim 1, characterized in that: The step 2 may also adopt a hybrid synchronization algorithm: Combine the operation transformation (OT) algorithm and the conflict-free data type (CRDT) algorithm. In low-concurrency situations, the operation transformation (OT) algorithm is mainly used to process real-time operations. In high-concurrency situations, the system switches to a hybrid mode, where one part uses the operation transformation (OT) algorithm for operation transformation, and the other part uses the conflict-free data type (CRDT) algorithm for conflict resolution. Dynamic weight adjustment: According to the real-time monitored user concurrency and operation frequency, the weight ratio of the operation transformation (OT) algorithm and the conflict-free data type (CRDT) algorithm in the hybrid mode is dynamically adjusted to ensure the efficiency and consistency of the system in different scenarios.

Citation Information

Cited By

  • Multi-terminal medical data synchronous processing method and device

    CN119170181A

  • Electrical equipment detection report visual editing system based on LaTeX

    CN119416750A

  • Configuration management method for superconducting quantum regulation and control system and superconducting quantum regulation and control system

    CN119443296A

  • Configuration management method for superconducting quantum control system and superconducting quantum control system

    CN119443296B

  • Shared tray management method and system

    CN119831476A