Multi-user real-time collaborative editing method based on virtual nodes and distributed control

By adopting virtual nodes and distributed control methods in a multi-user real-time collaborative editing system, combining multi-version concurrent control and real-time file system monitoring, the system's instruction processing delay and data synchronization inconsistent in high concurrency scenarios is solved, and the system's implementation of the inconsistent command processing delay and data synchronization is realized. More efficient collaborative editing experience and system stability.

CN119441142APending Publication Date: 2025-02-14GUANGZHOU YUNBIAO NETWORK TECH CO LTD
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202411474657.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-10-22
Publication Date
2025-02-14

AI Technical Summary

Technical Problem

When the existing multi-user real-time collaborative editing system is operated simultaneously by high concurrency and multiple users, it faces problems such as delay in instruction processing, inconsistent data synchronization, poor conflict management, and poor system compatibility and scalability.

Method used

Using a method based on virtual nodes and distributed control, the reception, processing and distribution of collaborative instructions are realized through the collaborative work of Broker, Curator, Binder and Emitter nodes. Using the multi-version concurrency control mechanism (MVCC) and real-time file system monitoring mechanism, the editing operations of multiple users are synchronized and concurrent conflicts are automatically handled.

Benefits of technology

It significantly improves the stability and data consistency of multi-user real-time editing, improves the system's response speed and user experience, enhances the system's compatibility and scalability, and optimizes the conflict management and data synchronization process.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119441142A_ABST
    Figure CN119441142A_ABST
Patent Text Reader

Abstract

The invention discloses a multi-user real-time collaborative editing method based on virtual nodes and distributed control, which adopts a Cooper distributed control architecture and introduces control nodes such as Broker, Cursor, Binder and the like to realize accurate control and efficient processing of collaborative instructions, ensure data consistency and system response speed and remarkably improve the real-time performance, stability and expansibility of a system. In combination with multi-version concurrency control (MVCC) and a real-time file system monitoring technology, synchronous editing and conflict management of the same file by multiple users are realized, and the system performance is optimized. And the virtual Peer node design is introduced, so that the front-end editor is seamlessly connected with the back-end service, and the compatibility and adaptability of the system are improved. Through a linkage mechanism of Broker and Emitter, fine-grained processing and efficient distribution of instructions are realized, and system performance in a high-frequency interaction scene is optimized. The whole technical scheme breaks through the limitation of an existing collaborative editing system, and a brand-new, efficient and stable solution is provided for multi-user real-time collaboration.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of multi-user real-time collaborative editing and distributed data processing, and in particular to a multi-user real-time collaborative editing method based on virtual nodes and distributed control. Background Art

[0002] Existing multi-user real-time collaborative editing systems are widely used in code editing, document processing, and remote collaboration. The basic principle is to synchronize the editing operations of multiple users to the same file through the network to achieve real-time collaboration. In these systems, the traditional approach usually adopts a centralized control architecture, that is, a central server is responsible for managing the operations and data synchronization of all users.

[0003] However, this centralized architecture often faces problems such as command processing delays, inconsistent data synchronization, and poor system response speed when dealing with high concurrency and multi-user operations, which affects the efficiency of collaborative work and user experience.

[0004] In order to solve the above problems, the industry has gradually introduced decentralized architectures to process and synchronize data through distributed nodes, thereby reducing server load and latency. However, the instruction processing methods of existing decentralized systems are usually relatively simple, lacking fine-grained control over collaborative instructions, which leads to data inconsistency and inefficient conflict handling in high-frequency interaction scenarios. In addition, decentralized architectures often face challenges such as imperfect data synchronization mechanisms and poor system stability.

[0005] In order to further improve the stability and data consistency of multi-user real-time editing, some systems have introduced a single locking mechanism or a simple conflict detection method, but these methods often sacrifice the user's editing freedom and affect the efficiency of collaboration. At the same time, the locking mechanism will significantly reduce system performance in scenarios with high concurrency of multiple users, and will result in high operation delays and poor user experience. In addition, the existing real-time file monitoring technology has limited processing efficiency when facing complex file operations, and it is difficult to effectively cope with the high-frequency multi-user interaction needs.

[0006] Also, in order to enhance the compatibility and scalability of the system, the existing technology usually integrates the front-end editor and the back-end service through plug-ins or additional configurations, but this method is highly complex and difficult to integrate, increases the system maintenance cost, and reduces the flexibility and adaptability of the system.

[0007] Therefore, how to improve the instruction processing efficiency, data consistency and system stability of the multi-user real-time collaborative editing system has become a technical problem to be solved by the present invention. Summary of the invention

[0008] The technical problem solved by the present invention is to provide a multi-user real-time collaborative editing method based on virtual nodes and distributed control in response to the defects existing in the above-mentioned prior art, so as to solve the problems of instruction processing delay, inconsistent data synchronization, poor conflict management and poor system compatibility and scalability in the existing system proposed in the above-mentioned background technology.

[0009] In order to solve the above technical problems, the technical solution adopted by the present invention is as follows:

[0010] A multi-user real-time collaborative editing method based on virtual nodes and distributed control, comprising the following steps:

[0011] Step 1: Provide a distributed collaborative control system, which includes multiple control nodes, including Broker, Curator, Binder and Emitter nodes, and receive, process and distribute instructions through a distributed architecture;

[0012] Step 2: Create a virtual Peer node in the front-end editor. The virtual Peer node acts as a proxy between the front-end and the back-end Cooper service to realize the sending and receiving of data and the conversion of instructions, and interact with the Cooper service in real time;

[0013] Step 3: Use the multi-version concurrency control mechanism (MVCC) and real-time file system monitoring mechanism to synchronize multiple users' real-time edits of the same file, monitor file changes and automatically handle concurrency conflicts;

[0014] Step 4: Through the linkage mechanism between Broker and Emitter, the collaboratively edited instructions are distributed to the corresponding Broker nodes for processing. Emitter judges based on the instruction type and returns the result to the corresponding collaborative node to ensure the efficiency and accuracy of instruction processing;

[0015] Step 5: Use a distributed control architecture to synchronize the real-time editing content of multiple users to ensure data consistency and real-time system response. At the same time, detect and respond to abnormal operations through control nodes to improve system stability.

[0016] As a further solution of the present invention, the virtual Peer node uses the Vimcall protocol as a communication bridge between the editor and the backend service to achieve joining, exiting and data interaction of the collaborative service.

[0017] As a further solution of the present invention, the Broker node is used to receive collaborative instructions, the Curator node is used to monitor changes in the file system and manage file subscriptions, the Binder node is used to process subscription messages for a single file and is responsible for message broadcasting between subscribers, and the Emitter node serves as the external interaction interface of the system.

[0018] As a further solution of the present invention, a multi-version concurrency control mechanism (MVCC) is used to allow multiple users to edit the same file at the same time, automatically detect and handle concurrency conflicts, and ensure the real-time and consistency of file content.

[0019] As a further solution of the present invention, the real-time file system monitoring mechanism adopts a file system API, such as inotify of Linux or FileSystemWatcher of Windows, to achieve real-time monitoring and updating of files.

[0020] As a further solution of the present invention, the distributed control system adopts a three-segment address design, and the instructions between the front end and the Gateway and Cooper services interact directly, thereby improving the stability and response speed of data interaction.

[0021] As a further solution of the present invention, the system further includes a Cooper Service Manager module and a PeerManager module, which are respectively used to manage the connection status of multiple Cooper service instances and Peer nodes, thereby enhancing the scalability and connection management capabilities of the system.

[0022] As a further solution of the present invention, instruction processing includes the collaborative work of Broker and Emitter based on the event-driven model, which realizes precise control and efficient processing of instructions through a distributed architecture, and optimizes the performance of the system in multi-user high-frequency interaction scenarios.

[0023] As a further solution of the present invention, data transmission is encrypted through the SSL / TLS encryption protocol to ensure the security and privacy of data during the collaborative editing process.

[0024] As a further solution of the present invention, users can invite other members to participate in the collaboration through external links, search accounts or emails, and set permission levels for different members to ensure the security and controllability of project data.

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

[0026] 1. The Cooper distributed control architecture is adopted, which is different from the traditional centralized system. By introducing control nodes such as Broker, Curator, and Binder, precise control and efficient processing of collaborative instructions are achieved. This design utilizes the collaborative work of multiple modules (such as the Vimcall mechanism of the Peer node) to ensure data consistency and efficiency while being decentralized. Compared with the common command processing delays and data synchronization inconsistencies in existing decentralized collaborative editing systems, the present invention effectively improves the accuracy of data processing and the response speed of the system by refining and layering multiple proprietary modules, thereby significantly improving real-time, stability, and scalability. Especially in multi-user high-frequency interaction scenarios, the modular improvements of the present invention show great advantages and significantly improve the user experience.

[0027] 2. By combining multi-version concurrency control (MVCC) and real-time file system monitoring technology (such as Linux's inotify and Windows' FileSystemWatcher), the conflict problem when multiple users edit the same file at the same time is solved. Traditional collaborative systems usually use a single locking mechanism or a simple conflict detection method, which often cannot effectively handle complex concurrency conflicts. The combination of the two mechanisms of the present invention not only ensures the real-time performance of the file, but also greatly reduces the risk of inconsistency caused by concurrency conflicts, optimizes the performance of the system in multi-user real-time editing, achieves more efficient synchronization and conflict management, and provides users with a more stable and smooth collaborative experience.

[0028] 3. By introducing the innovative design of virtual Peer nodes in the front-end editor, the front-end editor can directly interact with the Cooper service as a proxy of the Vimcall protocol, thereby achieving seamless connection between the front-end and the back-end. This design breaks through the limitation that traditional front-end and back-end collaboration requires additional plug-ins or complex configurations, and greatly enhances the compatibility and flexibility of the system. Especially for scenarios that require rapid integration of existing front-end editors, the virtual node design of the present invention greatly reduces the complexity and time cost of system integration, making the collaborative editing system more adaptable and scalable, and becoming an important breakthrough in existing collaborative editing methods.

[0029] 4. The linkage mechanism of Broker and Emitter is introduced into the system architecture to ensure the efficient execution of collaborative instructions through fine-grained instruction processing and precise distribution. Emitter, as the core interactive interface, can distribute instructions to the corresponding Broker node for processing according to the instruction type. Compared with the simple instruction processing method of the existing collaborative system, the present invention optimizes the speed and reliability of instruction execution, especially in high-frequency interactions and complex collaborative scenarios. Such processing logic gives the system higher flexibility and adaptability, which is a significant improvement over the traditional collaborative architecture.

[0030] Additional aspects and advantages of the present invention will be given in part in the following description and in part will be obvious from the following description, or will be learned through practice of the present invention. BRIEF DESCRIPTION OF THE DRAWINGS

[0031] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative labor.

[0032] Figure 1 This is an architecture diagram of the multi-user real-time collaborative editing system based on virtual nodes and distributed control of the present invention.

[0033] Figure 2 This is the collaborative function flow of Cooper of the present invention.

[0034] Figure 3 This is a diagram of the interaction architecture between the Cooper system front end and the server end of the present invention. DETAILED DESCRIPTION

[0035] The technical solutions in the embodiments of the present invention are described clearly and completely below. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of them. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0036] See also Figure 1 —3. In an embodiment of the present invention, a multi-user real-time collaborative editing method based on virtual nodes and distributed control includes the following steps:

[0037] Step 1: Provide a distributed collaborative control system, which includes multiple control nodes, including Broker, Curator, Binder and Emitter nodes, and receive, process and distribute instructions through a distributed architecture;

[0038] Step 2: Create a virtual Peer node in the front-end editor. The virtual Peer node acts as a proxy between the front-end and the back-end Cooper service to realize the sending and receiving of data and the conversion of instructions, and interact with the Cooper service in real time;

[0039] Step 3: Use the multi-version concurrency control mechanism (MVCC) and real-time file system monitoring mechanism to synchronize multiple users' real-time edits of the same file, monitor file changes and automatically handle concurrency conflicts;

[0040] Step 4: Through the linkage mechanism between Broker and Emitter, the collaboratively edited instructions are distributed to the corresponding Broker nodes for processing. Emitter judges based on the instruction type and returns the result to the corresponding collaborative node to ensure the efficiency and accuracy of instruction processing;

[0041] Step 5: Use a distributed control architecture to synchronize the real-time editing content of multiple users to ensure data consistency and real-time system response. At the same time, detect and respond to abnormal operations through control nodes to improve system stability.

[0042] As a further solution of the present invention, the virtual Peer node uses the Vimcall protocol as a communication bridge between the editor and the backend service to achieve joining, exiting and data interaction of the collaborative service.

[0043] As a further solution of the present invention, the Broker node is used to receive collaborative instructions, the Curator node is used to monitor changes in the file system and manage file subscriptions, the Binder node is used to process subscription messages for a single file and is responsible for message broadcasting between subscribers, and the Emitter node serves as the external interaction interface of the system.

[0044] As a further solution of the present invention, a multi-version concurrency control mechanism (MVCC) is used to allow multiple users to edit the same file at the same time, automatically detect and handle concurrency conflicts, and ensure the real-time and consistency of file content.

[0045] As a further solution of the present invention, the real-time file system monitoring mechanism adopts a file system API, such as inotify of Linux or FileSystemWatcher of Windows, to achieve real-time monitoring and updating of files.

[0046] As a further solution of the present invention, the distributed control system adopts a three-segment address design, and the instructions between the front end and the Gateway and Cooper services interact directly, thereby improving the stability and response speed of data interaction.

[0047] As a further solution of the present invention, the system further includes a Cooper Service Manager module and a PeerManager module, which are respectively used to manage the connection status of multiple Cooper service instances and Peer nodes, thereby enhancing the scalability and connection management capabilities of the system.

[0048] As a further solution of the present invention, instruction processing includes the collaborative work of Broker and Emitter based on the event-driven model, which realizes precise control and efficient processing of instructions through a distributed architecture, and optimizes the performance of the system in multi-user high-frequency interaction scenarios.

[0049] As a further solution of the present invention, data transmission is encrypted through the SSL / TLS encryption protocol to ensure the security and privacy of data during the collaborative editing process.

[0050] As a further solution of the present invention, users can invite other members to participate in the collaboration through external links, search accounts or emails, and set permission levels for different members to ensure the security and controllability of project data.

[0051] Embodiment 1:

[0052] 1. Cooper controls data.

[0053] 1. System architecture design:

[0054] Front-end and Gateway: responsible for the display, storage and interactive control of Cooper status. Participants and collaborative status are saved in the database.

[0055] Cooper service and Peer node: responsible for the specific implementation of the collaborative protocol. The reception, execution and feedback of control instructions are implemented by the Peer node through vimcall. The execution of control instructions is entirely determined by the Peer node.

[0056] 2. Connection handshake data structure:

[0057] Including key information such as project ID, project path, user name, whether writing is allowed, and shadowpath.

[0058] 3. Cooper service internal concept:

[0059] Broker: instruction processing logic, responsible for receiving requests and processing them. Each functional module has its own exclusive

[0060] Curator: responsible for monitoring the directory and managing file subscriptions.

[0061] Binder: Single file subscription message processing, responsible for broadcasting to multiple subscribers at the same time.

[0062] Emitter: An interface for interacting with the outside world. Multiple Brokers can register Emitter callbacks. The corresponding messages are judged by type and distributed to different Brokers for processing, and the results are returned.

[0063] 4. System transformation and improvement:

[0064] Added Broker and Emitter: For example, CooperBusiness Broker is responsible for receiving and processing Cooper instructions from the front end, Vimcall Emitter converts Gateway's Vimcall into OT protocol data and transmits it to CooperBusinessBroker, and is responsible for returning the return result in Vimcall encapsulation.

[0065] Cooper Service Manager: Manages multiple Cooper Service instances to improve system scalability.

[0066] Connection Handle and PeerManager: respectively handle the request processing when the peer accesses (including initializing the copy directory, etc.) and manage the peer connection after the handshake, enhancing the flexibility of the system connection management.

[0067] Three-segment address transformation: Gateway and the front end adapt to the new Cooper service three-segment address data, and the instructions directly reach the Cooper service, improving the stability of data interaction.

[0068] 5. Exception handling and stability improvement:

[0069] Automatically detect and respond to abnormal commands issued by the front end, Vim connection interruptions and other abnormal situations.

[0070] By introducing management modules such as Cooper Service Manager and Peer Manager, the system can more effectively manage multiple Cooper service instances and Peer connections, improving the stability and reliability of the system.

[0071] 2. Cooper functional design.

[0072] 1. System architecture:

[0073] The Cooper function is based on a distributed architecture and mainly includes five parts: the initiator side, the collaborator side, the Peer service, the Cooper service and the Gateway service.

[0074] The initiator side is responsible for initiating collaborative requests; the collaborator side is responsible for receiving collaborative requests and participating in collaborative editing; the Peer service is responsible for handling the synchronization of file editing content; the Cooper service is responsible for the management of the entire collaborative process and the synchronization of file operations; the Gateway service, as the middleware, is responsible for message forwarding between components.

[0075] 2. Function realization:

[0076] Collaboration function process: The initiator initiates a collaboration request, and the collaborator accepts it to generate a collaborative project. The two parties exchange messages through websocket to achieve real-time editing and content synchronization of files. During the editing process, any modification of the file by either party will be broadcast to all collaborators in real time to ensure content consistency.

[0077] User invitation and permission management: Users can invite other members to join the collaboration through external links, search accounts or emails, and set different permission levels to ensure the security and controllability of project data

[0078] File operation synchronization: In addition to real-time editing of file content, it also supports synchronization of the initiator's operations on files or folders (such as creating, renaming, deleting, etc.) to all collaborators. FileSync messages are sent to the Peer service via websocket, and the operation results are broadcast after the Peer completes the processing.

[0079] End of collaborative process: The initiator or collaborator can send a closing request to the Gateway service by clicking the "Exit Collaboration" button. The Gateway operation closes the collaborative data and notifies all collaborators through websocket to end the collaboration.

[0080] 3. The Agreement involves:

[0081] A complete protocol system has been designed, including collaborative initiation protocol, file content editing protocol, cursor movement protocol, file operation synchronization protocol and collaborative termination protocol.

[0082] The specific implementation method is:

[0083] 1. Detailed implementation of control data structure.

[0084] Project ID management: The system assigns a unique identifier (Project ID) to each collaborative project;

[0085] Path and permission management: Each project is associated with a path (Project Path) and permission settings (AllowWrites), which define the user's operation permissions on project files.

[0086] Dynamic rendering of user interface: The system dynamically renders the user interface based on user information (Username) and permissions, including access permissions and visual elements.

[0087] 2. Multiple directory management logic.

[0088] Real-time file system monitoring: Use file system APIs, such as inotify for Linux or FileSystemWatcher for Windows, to achieve real-time monitoring of project directories.

[0089] Multi-version concurrency control (MVCC): The MVCC mechanism allows multiple users to edit the same file at the same time, and the system automatically handles concurrency conflicts.

[0090] 3. Three-stage service address design.

[0091] Service discovery and registration: Use service discovery mechanisms, such as Consul or Eureka, to achieve automatic registration and discovery of service instances.

[0092] Load balancing: Through load balancing technologies such as Nginx or HAProxy, requests are reasonably distributed to different service instances to improve system availability and scalability.

[0093] 4. Implementation of internal component functions.

[0094] Broker component: As the core of instruction processing, it is responsible for receiving and distributing collaborative operation instructions and adopts an event-driven model to improve processing efficiency.

[0095] Curator component: responsible for monitoring file system changes, managing file subscriptions and version control.

[0096] Binder component: handles subscription messages for a single file and is responsible for message broadcasting to multiple subscribers.

[0097] Emitter component: As a unified interface for the system to interact with the outside world, it supports multiple message types and interaction protocols.

[0098] 5. Service transformation and expansion.

[0099] Plug-in architecture: The plug-in architecture design allows third-party developers to develop and integrate new functional modules as needed;

[0100] API extension: Provides rich API interfaces and supports integration with other systems, such as project management tools, code repositories, etc.

[0101] 6. Exception handling mechanism.

[0102] Error detection and response: The system detects operational errors in real time, such as network interruption, insufficient permissions, etc., and provides corresponding error handling and user prompts.

[0103] Logging and auditing: All operations and abnormal events are recorded in the system log to support problem tracking and security auditing.

[0104] 7. Security and privacy protection.

[0105] Data transmission encryption: All data transmission uses SSL / TLS encryption protocol to ensure the security of data transmission.

[0106] Access Control: The system implements strict access control policies to ensure that only authorized users can access sensitive data.

[0107] Embodiment 2:

[0108] In current multi-person collaborative editing scenarios, such as when software development teams are writing code, debugging, and managing versions, multiple developers are often required to edit and modify the same project at the same time. Traditional centralized collaborative editing systems rely on a single server to handle all user requests, which can easily cause problems such as command processing delays, reduced system response speed, and inconsistent data synchronization under high-concurrency operations, resulting in low collaboration efficiency and even the risk of code conflicts and loss.

[0109] To solve these problems, the present invention proposes a multi-user real-time collaborative editing method based on virtual nodes and distributed control. In a typical code collaborative editing scenario, the existing problems are optimized in the following ways:

[0110] First, the present invention distributes collaborative control to multiple nodes, including Broker, Curator, Binder, and Emitter control nodes, by building a Cooper distributed control architecture. Each node works together to share the load of the traditional centralized server. In actual applications, when multiple developers edit the code at the same time, each user's editing instructions are captured by the virtual Peer node of the front-end editor. The virtual Peer node acts as a proxy for the Vimcall protocol to convert and transmit the front-end editing instructions to the Cooper service. The Cooper service uses a distributed architecture to achieve efficient processing of instructions, ensuring that the operations of all collaborative users can be accurately captured and synchronized to the system.

[0111] In this process, the Broker node of the Cooper service distributes and processes each instruction in a fine-grained manner, and the Curator node monitors file changes in real time to ensure that each file version change is correctly recorded. The Binder node is responsible for broadcasting the results of the edit instruction to all subscribers, and the Emitter node manages the interaction with external users as an interface to ensure the accuracy and timeliness of data transmission. Through a distributed control mechanism, the present invention realizes parallel processing of instructions, greatly improves the response speed of the system, and avoids the bottleneck problem of centralized processing.

[0112] In addition, in order to effectively solve the conflict problem in multi-user collaborative editing, the present invention combines multi-version concurrency control (MVCC) and real-time file system monitoring technology (such as Linux's inotify and Windows's FileSystemWatcher). When the developer modifies the same code file, the MVCC mechanism allows each user to edit different versions of the file in parallel, and the system automatically detects and handles conflicts. The file system monitoring technology monitors the modification behavior of each user in real time to ensure that any changes can be captured and fed back to other users in a timely manner. In specific applications, when two developers modify the same code at the same time, the system can intelligently detect the conflict and prompt the developer to merge or select, avoiding the operation delays and limited freedom caused by the traditional locking mechanism, thereby significantly improving the efficiency of code collaborative editing in a multi-user environment.

[0113] The present invention also enables the front-end editor to seamlessly connect to the back-end service through the innovative design of the virtual Peer node. The front-end developer can directly participate in collaborative editing without installing additional complex plug-ins or performing cumbersome configuration. The virtual Peer node acts as a bridge between the front-end and the back-end, transmitting the user's operations to the Cooper service through the Vimcall protocol, realizing two-way transmission and real-time synchronization of instructions. This method significantly simplifies the system integration process, allowing different types of front-end editors (such as Monaco Editor, VS Code, etc.) to be quickly integrated, greatly improving the compatibility and flexibility of the system.

[0114] In high-frequency collaborative operations, the present invention optimizes the efficiency of instruction processing through the linkage mechanism of Broker and Emitter. The Emitter node distributes different editing operations to the corresponding Broker node for special processing according to the type of instruction, ensuring that collaborative instructions in complex scenarios will not cause delays or conflicts due to excessive frequency. Such a mechanism is particularly suitable for high-frequency interaction scenarios of development teams in large projects, effectively solving the performance bottleneck problem of traditional systems in high-concurrency operations, and significantly improving the speed and accuracy of collaborative editing.

[0115] Through the above implementation, the present invention has achieved unexpected technical effects in practical applications, not only solving the high concurrency delay and data synchronization problems in the prior art, but also improving the stability and scalability of the system through innovative architecture and design. In particular, the combination of multi-version concurrent control and real-time monitoring, and the seamless docking design of virtual peer nodes, provide an efficient, stable and highly compatible solution for multi-user real-time collaborative editing, and bring significant efficiency improvement and experience optimization to various collaborative scenarios such as software development and document editing.

[0116] Embodiment 3:

[0117] In actual enterprise collaborative office scenarios, if multiple team members need to edit, modify and manage project files at the same time during project development, traditional collaborative office platforms often rely on centralized architectures, which have problems with centralized data processing and make it difficult to effectively ensure the real-time, security and consistency of data. Especially in large projects, high-frequency operations of multiple collaborators will lead to slower system response, operation delays and data conflicts, thus affecting the team's collaborative efficiency and project progress.

[0118] To solve these problems, the present invention introduces the Cooper distributed control architecture and realizes a new mode of collaborative office through platform-specific code technology. In a typical application, the initiator can invite designated users or share links to collaborate in real time through the system. After accepting the invitation, the collaborator joins the collaboration and operates through the platform-specific collaborative protocol. These operations include adding, deleting, and renaming code files. The operations of each collaborator will be synchronized to the system in real time, and all participants can view and edit the file content instantly.

[0119] In the implementation process of the present invention, the Cooper service uses a distributed architecture to interact and control with the Gateway through the front end. The initiator's collaboration request is forwarded by the Gateway to the Cooper service, which is responsible for the management of the entire collaborative process and file synchronization. Each operation of the collaborator is synchronously processed by the Peer service, and the operation results are broadcast to all participants through the websocket connection to ensure content consistency. For example, when a collaborator edits a file, the edited content will be synchronized to the terminals of other collaborators in real time, avoiding the delays and inconsistencies common in traditional centralized systems.

[0120] To improve the security and reliability of the system, the present invention manages the operation conflicts of multiple users through multi-version concurrency control (MVCC) and real-time file system monitoring technology. When multiple collaborators modify the same file at the same time, the MVCC mechanism allows each user to edit on different versions of the file, and the system automatically handles concurrency conflicts to ensure the consistency of the final result. At the same time, real-time monitoring technology such as Linux's inotify or Windows's FileSystemWatcher monitors the status changes of each file in real time, and quickly detects and responds to user operations.

[0121] In addition, in order to achieve seamless docking with external editors, the present invention introduces a virtual Peer node design, which enables front-end editors such as Monaco Editor to directly act as agents of the Vimcall protocol and interact with the Cooper service. The virtual Peer node captures the user's operations and converts them into instructions that meet the platform requirements, avoiding the high complexity and low compatibility issues of traditional systems for front-end and back-end integration. For example, when a developer performs an editing operation in Monaco Editor, the virtual Peer node synchronizes the operation to the Cooper service in real time, and other collaborators can immediately see the changes, greatly improving the flexibility of collaboration and the compatibility of the system.

[0122] In practical applications, the multi-user real-time collaborative editing solution implemented by the present invention not only solves the centralized processing drawbacks of traditional systems, but also ensures data consistency and security through fine-grained control and efficient synchronization mechanisms. At the same time, the system manages multiple service instances and connections through the Cooper Service Manager and PeerManager modules to ensure that the system can maintain stable operation under high concurrency and high-frequency operations. Ultimately, the present invention has achieved significant results in improving collaborative efficiency, reducing conflicts, and optimizing operational experience in actual enterprise collaborative office scenarios, fully demonstrating its innovative progress in data processing, system stability, and user experience.

[0123] Embodiment 4:

[0124] See also Figure 2 , Flow chart of multi-user real-time collaborative editing based on Cooper distributed control system. This embodiment, combined with the illustrated process, explains the specific operation process of multi-user real-time collaborative editing based on Cooper control system, and demonstrates the system architecture design, operation steps and collaborative working mechanism of each component.

[0125] 1. The initiator issues a collaborative request:

[0126] In the initial stage of collaborative editing, the initiator publishes a collaborative request through the front-end interface to start the entire collaborative process. At this time, the Gateway service receives the request and forwards it to the Cooper service, where the Broker component processes the instruction, verifies the validity of the request, and records the request information.

[0127] 2. Do you accept the invitation?

[0128] The collaborator receives the collaboration request from the initiator. The system will confirm the identity through the connection handshake data structure (including project ID, path, user name, permissions, etc.). The Peer node implements the handshake through the Vimcall protocol and completes the connection with the Cooper service. When the collaborator chooses to accept the invitation, the system generates a collaborative project, otherwise the process terminates.

[0129] 3. Generate collaborative projects:

[0130] When the collaborator accepts the invitation, the system generates a collaborative project. During this process, the Broker component sets the project path based on the project ID and permissions, and saves the participants and collaboration status in the database. The Curator component monitors the project directory in real time and manages subscriptions to files. The Binder component processes file subscription messages and broadcasts changes to all collaborators to ensure file content synchronization.

[0131] 4. Initiators and collaborators modify project files:

[0132] During the collaboration process, both the initiator and the collaborator can edit the project files. The Peer node converts the editing instructions into OT (operation transformation) protocol data through the Vimcall protocol and sends it to the CooperBusinessBroker of the Cooper service. At this time, the Cooper service processes the editing operations of multiple users based on the multi-version concurrency control (MVCC) mechanism, automatically detects and resolves conflicts, and ensures the real-time and consistency of the file content.

[0133] 5. Mutual influence of file editing:

[0134] The system uses a real-time file system monitoring mechanism, such as Linux's inotify or Windows's FileSystemWatcher, to monitor file changes. When the initiator or collaborator modifies the file, Curator monitors the change and notifies Binder, which is responsible for broadcasting the change results to all collaborators. The Emitter node returns the editing operation results to the front end to ensure that the operations of both parties can affect each other in real time and realize collaborative editing.

[0135] 6. Collaborators exit collaboration:

[0136] Collaborators can choose to exit at any stage of collaborative editing. The system processes the exit request through the Gateway service and updates the collaborative status in the database. The PeerManager module is responsible for managing the Peer connection status and handling disconnection and resource release during the exit process.

[0137] 7. The initiator withdraws from the collaboration:

[0138] When the initiator exits the collaboration, a request to close the collaboration is sent through Gateway, and the system notifies all collaborators to terminate the collaborative editing. The Cooper Service Manager module is responsible for managing multiple Cooper service instances, coordinating the exit process, and ensuring system stability. After the entire collaborative process ends, the system records the operation log for subsequent auditing and problem tracking.

[0139] 8. Functional design and transformation:

[0140] In order to improve the stability and scalability of the system, the Broker and Emitter modules are added in the embodiment to improve the efficiency of instruction processing. Cooper Service Manager and PeerManager further enhance the connection management capability of the system.

[0141] The three-segment address transformation allows instructions to interact directly with Cooper services, optimizing the stability of data transmission.

[0142] The exception handling mechanism automatically detects and responds to abnormal front-end operations, such as Vim connection interruption, to ensure that the system can maintain stable operation in high-concurrency and high-frequency collaborative scenarios.

[0143] IX. Security and Privacy Protection:

[0144] Data transmission uses SSL / TLS encryption protocol to ensure the security and privacy of data during collaborative editing.

[0145] The system implements strict access control to ensure data security of collaborative projects and prevents unauthorized users from accessing sensitive information.

[0146] Through the above embodiments, a multi-user real-time collaborative editing solution based on the Cooper distributed control system is demonstrated in detail, ensuring system stability, data consistency and operational security in high-concurrency, multi-user collaborative scenarios, and providing an efficient and reliable solution for collaborative work such as software development and document editing.

[0147] Embodiment 5:

[0148] See also Figure 3 , the collaborative editing implementation description is based on the Cooper system front-end and server interaction architecture diagram.

[0149] This embodiment describes in detail the interaction process between the front-end and the server in the Cooper system, especially how to achieve multi-user real-time collaborative editing through distributed control architecture and communication protocol. The following is an explanation of the "Cooper system front-end and server interaction architecture diagram":

[0150] 1. System architecture and component description.

[0151] This diagram shows the overall architecture of the Cooper system, including the front-end control part and the server-side collaboration part. The system consists of multiple user roles, databases, gateways, collaborative controllers, master controls, collaborative services and other components. Each component works together through the vimcall protocol and virtual calls to achieve multi-user real-time editing and content synchronization.

[0152] User role: represents each user (initiator or collaborator) who participates in collaborative editing. Users interact with the system through the front-end interface (such as editor) and issue control commands to participate in collaborative editing.

[0153] Database: used to store user information, collaborative project status, permission settings and instruction records to ensure data consistency and traceability of collaborative operations.

[0154] Gateway: As the middleware between the front-end users and the back-end services, it is responsible for controlling the forwarding of instructions and the synchronization of user status, and improving the data transmission stability of the system.

[0155] Collaborative controller: It is the core module of the system, which receives, processes and responds to user commands through virtual calls. It interacts with various collaborative service modules (main control, collaborative protocol) to perform specific collaborative operations.

[0156] Master control: responsible for managing the execution of multiple collaborative service instances, coordinating the distribution and processing of instructions, and ensuring the overall scheduling of the system.

[0157] Collaboration service: responsible for specific file synchronization, command execution and multi-version concurrency control (MVCC), managing user editing of files, conflict resolution and real-time broadcasting.

[0158] 2. Operation process and function implementation.

[0159] The operation process shown in the figure is as follows:

[0160] User issues collaborative control instructions: User roles issue collaborative control instructions (such as join, exit, kick, close) through the front-end interface, and these instructions are transmitted to the gateway through the vimcall protocol.

[0161] Control instructions arrive at the collaborative controller: After the gateway receives the user's instructions, it passes the instructions to the collaborative controller through a virtual call. The collaborative controller interprets the instructions and decides how to interact with the collaborative protocol.

[0162] Peer response control instructions: The collaborative controller passes the instructions to the Peer node, and the Peer node is responsible for performing the corresponding operations (such as disconnection, reconnection, exit, etc.). During the execution process, the collaborative service module monitors and records the operations in real time to ensure the update and synchronization of the content.

[0163] Feedback of command results to the front-end: After execution, the collaborative controller returns the operation results to the front-end gateway through the vimcall protocol. The gateway synchronizes the results to the database and updates the front-end user interface to ensure that users can see the effects of collaborative editing in real time.

[0164] Cooper status change: When an operation is performed that affects the status of a collaborative project, the system will automatically update the collaborative status information in the database. Whether it is a user joining or leaving, or a change in editing content, the system will record it in the database to ensure data consistency.

[0165] 3. Implementation details of collaborative editing.

[0166] Multi-version concurrency control (MVCC): When multiple users edit at the same time, the collaborative service uses the MVCC mechanism to handle concurrency conflicts. Each user's editing operation is recorded as a different version. The system automatically detects conflicts and prompts users to merge or select to ensure the real-time and accuracy of the edited content.

[0167] Real-time file monitoring and synchronization: The collaborative controller and collaborative service module monitor file changes in real time through the file system API (such as Linux's inotify or Windows's FileSystemWatcher) to ensure that all participants' changes can be fed back to other users in a timely manner.

[0168] Security and exception handling: The system uses strict permission control and error detection mechanisms to ensure the security of user data during operation. If network interruption, insufficient permissions, etc. occur, the system will automatically record the exception and provide corresponding error prompts.

[0169] 4. System advantages and application scenarios.

[0170] Through the above-mentioned architecture design and operation process, the Cooper system has demonstrated excellent performance and stability in high-concurrency multi-user collaborative editing scenarios. Especially in scenarios such as software development, document editing, and enterprise collaborative office, the system can effectively solve the delay, conflict, and synchronization problems of the traditional centralized architecture, providing users with a smooth collaborative experience.

[0171] In summary, the Cooper system achieves seamless connection and efficient collaboration between the front-end and the server through distributed control and virtual calls, ensuring the efficiency and consistency of real-time editing by multiple users.

[0172] It will be apparent to those skilled in the art that the present invention is not limited to the details of the exemplary embodiments described above and that the present invention can be implemented in other specific forms without departing from the spirit or essential features of the present invention. Therefore, the embodiments should be considered exemplary and non-restrictive in all respects, and the scope of the present invention is defined by the appended claims rather than the above description, and it is intended that all changes falling within the meaning and scope of the equivalent elements of the claims be included in the present invention.

Claims

1. A multi-user real-time collaborative editing method based on virtual nodes and distributed control, characterized in that: The following steps are involved: Step 1: Provide a distributed collaborative control system, which includes multiple control nodes, including Broker, Curator, Binder and Emitter nodes, and receive, process and distribute instructions through a distributed architecture; Step 2: Create a virtual Peer node in the front-end editor. The virtual Peer node acts as a proxy between the front-end and the back-end Cooper service to realize the sending and receiving of data and the conversion of instructions, and interact with the Cooper service in real time; Step 3: Use the multi-version concurrency control mechanism (MVCC) and real-time file system monitoring mechanism to synchronize multiple users' real-time edits of the same file, monitor file changes and automatically handle concurrency conflicts; Step 4: Through the linkage mechanism between Broker and Emitter, the collaboratively edited instructions are distributed to the corresponding Broker nodes for processing. Emitter judges based on the instruction type and returns the result to the corresponding collaborative node to ensure the efficiency and accuracy of instruction processing; Step 5: Use a distributed control architecture to synchronize data of multiple users’ real-time editing content to ensure data consistency and real-time system response. At the same time, detect and respond to abnormal operations through control nodes to improve system stability.

2. According to claim 1, a multi-user real-time collaborative editing method based on virtual nodes and distributed control is characterized in that: The virtual Peer node uses the Vimcall protocol as a communication bridge between the editor and the backend service to achieve the joining, exiting and data interaction of collaborative services.

3. The multi-user real-time collaborative editing method based on virtual nodes and distributed control according to claim 1 is characterized in that: The Broker node is used to receive collaborative instructions, the Curator node is used to monitor changes in the file system and manage file subscriptions, the Binder node is used to process subscription messages for a single file and is responsible for message broadcasting between subscribers, and the Emitter node serves as the external interaction interface of the system.

4. The multi-user real-time collaborative editing method based on virtual nodes and distributed control according to claim 1 is characterized in that: The multi-version concurrency control mechanism (MVCC) is used to allow multiple users to edit the same file at the same time, automatically detect and handle concurrency conflicts, and ensure the real-time and consistency of file content.

5. The multi-user real-time collaborative editing method based on virtual nodes and distributed control according to claim 1 is characterized in that: The real-time file system monitoring mechanism uses the file system API, such as Linux's inotify or Windows's FileSystemWatcher, to achieve real-time monitoring and updating of files.

6. The multi-user real-time collaborative editing method based on virtual nodes and distributed control according to claim 1 is characterized in that: The distributed control system adopts a three-segment address design, and the instructions between the front end and Gateway and Cooper services interact directly, improving the stability and response speed of data interaction.

7. The multi-user real-time collaborative editing method based on virtual nodes and distributed control according to claim 1 is characterized in that: The system further includes a Cooper Service Manager module and a Peer Manager module, which are used to manage the connection status of multiple Cooper service instances and Peer nodes respectively, thereby enhancing the scalability and connection management capabilities of the system.

8. The multi-user real-time collaborative editing method based on virtual nodes and distributed control according to claim 1 is characterized in that: Instruction processing includes the collaborative work of Broker and Emitter based on the event-driven model, which achieves precise control and efficient processing of instructions through a distributed architecture, and optimizes the performance of the system in multi-user high-frequency interaction scenarios.

9. The multi-user real-time collaborative editing method based on virtual nodes and distributed control according to claim 1 is characterized in that: Data transmission is encrypted through SSL / TLS encryption protocol to ensure data security and privacy protection during collaborative editing.

10. The multi-user real-time collaborative editing method based on virtual nodes and distributed control according to claim 1, characterized in that: Users can invite other members to collaborate through external links, search accounts or emails, and set permission levels for different members to ensure the security and controllability of project data.

Citation Information

Cited By

  • Communication method applied to Codiger system

    CN120567908A