A graphical programming online collaboration method
By using a graphical programming online collaboration method and leveraging abstract syntax trees and atomic operation protocols, we have achieved real-time synchronous programming for multiple users, solving the problem of low collaboration efficiency in existing technologies and improving the programming experience in team collaboration and educational scenarios.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- CHENGDU LOUWAI TECH CO LTD
- Filing Date
- 2025-12-22
- Publication Date
- 2026-05-26
AI Technical Summary
Existing graphical programming tools lack real-time collaboration capabilities, face difficulties in version conflicts and merging, and have unintuitive collaboration modes, which limits their application potential in education and team collaboration scenarios.
This system enables online collaborative graphical programming through multiple user terminals and a collaboration server. It uses an abstract syntax tree to represent projects, captures user interaction behaviors and transforms them into atomic operations, and the collaboration server serializes and broadcasts the operations to ensure data consistency. It adopts a client-collaboration server architecture and an atomic operation protocol to achieve real-time synchronization.
It enables real-time synchronous programming by multiple users, significantly shortens the project development cycle, solves version conflicts and merging difficulties, and improves collaboration efficiency and learning interactivity.
Smart Images

Figure CN122086384A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of computers, and in particular to a graphical programming online collaboration method. Background Technology
[0002] Problems existing in the prior art:
[0003] 1. Lack of real-time collaboration capabilities: Currently mainstream graphical programming environments, such as Scratch developed by MIT (see its official website, version information, or relevant academic papers for reference), were designed for single-user creation experiences. Collaboration between users typically relies on non-real-time, cumbersome file transfer methods, such as sharing project files (e.g., .sb3 files) via email, instant messaging tools, or cloud storage. The recipient downloads the file, modifies it locally, and then sends the modified file back. This process is inefficient and cannot achieve synchronous editing and instant feedback.
[0004] 2. Version Conflicts and Merging Difficulties: The file-based collaboration method described above is highly prone to version conflicts. When multiple users modify the same original file, their contributions cannot be automatically and effectively merged. Manually merging graphical programming projects is an extremely complex and error-prone process because the project's logical structure (the stacking, nesting, and connection relationships of blocks) is not simple text. Traditional text diffing tools (such as diff) cannot be used for effective merging, often leading to logical errors, lost modifications, or even file corruption.
[0005] 3. Unintuitive Collaboration Mode: Existing collaborative development tools, such as Git (for code version control) or VSCode Live Share (for real-time text-based code collaboration), use linear text files as their collaboration objects. However, graphical programming is essentially based on a two-dimensional spatial layout and structured connections of blocks, with a tree-like or graph-like data structure. Directly applying text-based collaboration logic to a graphical programming environment cannot solve the unique structured data synchronization problems related to block position, connection, and nesting. For example, one user might drag an entire block script stack while another user simultaneously modifies the parameter value of a block within that stack; such compound operations lack mature solutions in current technology.
[0006] 4. Barriers in Educational and Team Collaboration Scenarios: In scenarios such as programming education, team competitions, or creative workshops, real-time interaction and guidance between teachers and students, and among team members, are crucial. The limitations of current technology prevent teachers from viewing and guiding students' programming processes in real time, and team members cannot brainstorm and implement code collaboratively as they would on a whiteboard, significantly restricting the potential of graphical programming in collaborative learning and development. Summary of the Invention
[0007] To address the aforementioned technical problems, the present invention aims to fill the gaps and technical difficulties in multi-user collaboration within existing graphical programming tools, and provides a graphical programming online collaboration method.
[0008] A graphical online collaborative programming method, implemented through multiple user terminals and a collaborative server, includes the following steps:
[0009] Step 1: Render the programming interface on the user terminal for the user to program, and represent the created graphical programming project through an abstract syntax tree on the collaboration server;
[0010] Step 2: Capture user interaction behavior through the user terminal, convert the user interaction behavior into atomic operations and send them to the collaboration server;
[0011] Step 3: The collaboration server receives and verifies the atomic operations sent by all user terminals, maintains the authoritative data state of the project, performs serialization and transformation on the atomic operations, thereby determining the final operation and broadcasting it to all other user terminals in the session.
[0012] Step 4: The user terminal updates the programming interface according to the operation broadcast by the collaboration server.
[0013] Furthermore, in step 1, the graphical programming project is represented by an abstract syntax tree. Specifically, this involves: reading the content of the project, including characters, backgrounds, script blocks, variables, images, and sounds, and checking for any missing important data; converting the project content into the corresponding structure according to the project specification format requirements, embedding it into a file, and recording the format and size; combining all the content according to the original fixed hierarchy of the project; checking the format, and finally generating the project abstract syntax tree.
[0014] Furthermore, the atomic operation is represented by metadata, which includes operation type, target object ID, parameters, user ID, and timestamp.
[0015] Furthermore, in step 2, user interaction behavior is transformed into atomic operations. Specifically, the user's various interactions are first captured by a listener, a local cache structure is established to locate the modification unit and initialize the sequence index; then, the interaction is classified into a standard atomic operation type, a unique event path is encoded, the change load is serialized, and the code change sequence is controlled by a queue; finally, atomic events are assembled in batches and sent.
[0016] Furthermore, step 3 specifically includes:
[0017] First, a basic pre-check is performed at the entry point, and a context flag is injected to construct a permission checker;
[0018] Furthermore, concurrent access control is achieved through lock granularity design and occupancy strategies;
[0019] Subsequently, in the semantic structure verification, the operation is parsed, the parameters and permissions are verified, and a remedial event is generated;
[0020] Next, global version increment, sequence rewrite persistence, and memory state update are completed;
[0021] Finally, it responds to the initiator and broadcasts the status to other clients. When the conditions are met, it triggers a snapshot policy to ensure full consistency. If an error occurs, it performs a partial rollback or global protection, updates the operation time, and pushes the changes.
[0022] Furthermore, the user terminal is a device that runs a graphical programming interface, responsible for rendering the programming interface, capturing user interaction behavior, converting user interaction behavior into atomic operations, sending atomic operations to the server, receiving broadcast operations from the server, and updating the local interface.
[0023] Furthermore, the collaboration server, acting as the collaboration hub, is responsible for managing collaboration sessions, receiving and verifying operations sent by all user terminals, maintaining the authoritative data status of the project, resolving conflicts between concurrent operations, and broadcasting the finalized operations to all other user terminals within the session.
[0024] Furthermore, the specific process for resolving conflicts in concurrent operations by the collaborative server includes:
[0025] First, receiving and queuing:
[0026] Inbound verification: Verify write permissions and project availability; reject writes directly if they do not meet the requirements to prevent illegal or invalid writes.
[0027] Queuing and serialization: Atomized operations are entered into a single processing channel on the server side, ensuring that operations of the same project are processed in a strict order, forming a natural linear sequence;
[0028] Fine-grained concurrency control: Establish lockable scopes for potentially conflicting resources; if a resource is occupied by another user, the current operation is rejected or requires waiting.
[0029] Second, status baseline and version control:
[0030] Benchmark model: Maintains a normalized project state in memory, while saving the most recent snapshot and incremental log as an authoritative benchmark for rollback and alignment;
[0031] Global sequence: Assign a monotonically increasing global version number to each successfully enqueued atomic operation, and rewrite the operation sequence number with this version number to ensure a global total order;
[0032] Persistent logs: Standardized operations are serialized into logs and appended to the persistence layer to form a replayable linear history;
[0033] Third, operational transformation or equivalent mechanisms:
[0034] Semantic and structural validation: Parse the path and target entity of each event, and strictly validate the type, required fields, and reference integrity; failure occurs if the reference is missing or the type does not match.
[0035] Permission hooks: These check resource usage and permissions at the resource level, halting unauthorized writes to prevent unauthorized cross-resource writes.
[0036] Equivalent Normalization: When there is a deviation in the order or dependency between the user operation event and the current structure, a remedial action is automatically generated to transform the user operation into a standard form that conforms to the norm.
[0037] Large operation tip: When an operation that will significantly change the data size is detected, mark it as a subsequent snapshot to shorten the convergence path and reduce replay costs;
[0038] Fourth, Applications and Broadcasting:
[0039] Atomic commit: The in-memory version and visible state are only advanced after semantic verification, permission verification, and log persistence are all successful; if any step fails, an error is returned immediately without changing the visible state.
[0040] Failure rollback: If processing fails, the system will roll back to the most recent security snapshot and replay the data according to the logs to quickly restore the system to a consistent state; severe anomalies will trigger reconnection protection to prevent the system from continuing to provide services in an inconsistent state.
[0041] Confirmation and dissemination: Return a confirmation message to the initiator, including the authoritative sequence number and remedial action; simultaneously broadcast the standardized event and authoritative sequence to other collaborators;
[0042] Fifth, client state synchronization:
[0043] Full alignment: When establishing a new connection or reconnecting, a full snapshot is sent to ensure that the client first obtains a consistent structural baseline;
[0044] Incremental catching up: Logs from the last progress on the client are sent simultaneously, and the client replays them in authoritative sequence order to quickly catch up to the latest state;
[0045] Remedial convergence: The remedial actions and standardized events received by the client are ensured to be semantically consistent with those of the server, so that even if different clients have edited in different orders, they can eventually converge to the same standard state;
[0046] Periodic snapshots: The server triggers snapshots based on thresholds or large operations to shorten log length and reduce the catch-up time for newly joined or offline users.
[0047] The beneficial effects of this invention are as follows: This solution, through a client-collaboration server architecture and an atomic operation protocol, synchronizes each user's modification to all collaborators with a millisecond-level delay, achieving WYSIWYG real-time synchronization. This completely changes the traditional asynchronous and inefficient collaboration mode based on file sharing, enabling team members to perform parallel programming as smoothly as co-editing an online document, significantly shortening the project development cycle. Attached Figure Description
[0048] Figure 1 This is a flowchart of the method of the present invention.
[0049] Figure 2 This is a system architecture diagram from an embodiment. Detailed Implementation
[0050] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0051] In this embodiment, as Figure 1 and Figure 2 As shown, a graphical programming online collaboration method is implemented through a graphical programming system that supports real-time online collaboration among multiple users. The system includes user terminals (clients) and collaboration servers. Its core lies in adopting an atomic operation instruction set for the graphical programming environment and using a central collaboration server to serialize, transform, and broadcast these operations, thereby ensuring the eventual consistency of the data states of all user terminals.
[0052] User terminal: A device that runs a graphical programming interface, such as a web browser or desktop application. It is responsible for rendering the programming interface, capturing user interactions, converting user interactions into atomic operations, sending atomic operations to the collaboration server, receiving broadcast operations from the collaboration server, and updating the local interface.
[0053] Collaboration Server: As the collaboration hub, it is responsible for managing collaboration sessions (project rooms), receiving and verifying operations sent by all user terminals, maintaining the authoritative data status of the project, resolving conflicts of concurrent operations, and broadcasting the finalized operations to all other user terminals in the session.
[0054] The specific online collaboration methods are as follows:
[0055] Step 1: Render the programming interface on the user terminal for the user to program, and represent the created graphical programming project on the server through an abstract syntax tree;
[0056] Step 2: Capture user interaction behavior through the user terminal, convert the user interaction behavior into atomic operations and send them to the server;
[0057] Step 3: The server receives and verifies the atomic operations sent by all user terminals;
[0058] Step 4: The server maintains the authoritative data state of the project, serializes and transforms atomic operations to determine the final operation and broadcasts it to all other user terminals in the session;
[0059] Step 5: The user terminal updates the programming interface according to the operation broadcast by the server.
[0060] In this embodiment, a graphical programming project is no longer treated as a single file, but is represented as a structured data model, typically an abstract syntax tree in JSON format. The implementation process is as follows:
[0061] Read all content from the project, including roles, backgrounds, script blocks, variables, images, and sounds, and check for any missing important data. Convert this content into the corresponding structure according to the project's formatting specifications; for example, map role attributes such as position and size to specified fields, and convert blocks into descriptions with types and parameters. Convert images and sounds into their encoding formats and embed them into files, recording format and size information. Combine all content into a fixed hierarchy, including project name and creation time, ensuring correct referencing of each part. Check for format validity and finally generate the project's abstract syntax tree.
[0062] In this embodiment, the atomic operation design involves decomposing all possible modifications made by the user on the graphical interface into a finite set of serializable, idempotent atomic operations. Specifically, converting user interaction behavior into atomic operations involves: first, capturing various user interactions through a listener, establishing a local cache structure to locate the modification unit, and initializing the sequence index; then, classifying the interaction into a standard atomic operation type, encoding a unique event path, serializing the change payload, and managing the timing of code changes through a queue; finally, assembling atomic events in batches and sending them.
[0063] After receiving an operation, the server first performs a basic pre-check at the entry point (permissions, project availability) and injects context flags and constructs a permission checker. Then, it implements concurrent permission control through lock granularity design and occupancy strategy. Subsequently, in semantic structure verification, it parses the operation, verifies parameters and permissions, and generates remedial events. Then, it completes global version increment, sequence rewriting persistence, and memory state update. After that, it responds to the initiator and broadcasts the status to other clients. When the conditions are met, it triggers a snapshot strategy to ensure full consistency. If an error occurs, it performs partial rollback or global protection, updates the operation time, and pushes the changes. The entire process ensures that project operations are legal, data is consistent, and collaboration is orderly.
[0064] The user terminal does not send procedural information such as "mouse dragging," but instead sends explicit instructions. Each operation includes metadata such as operation type, target object ID, parameters, user ID, and timestamp.
[0065] In this embodiment, the conflict resolution and merging mechanism of the collaboration server is the core of ensuring data consistency. Its workflow is as follows:
[0066] 1. Receiving and Queuing:
[0067] Inbound verification: Verify write permissions and project availability. If not satisfied, reject the write operation to prevent illegal or invalid writes.
[0068] Queuing and serialization: Atomized operations are sent to a single processing channel on the server side, ensuring that operations of the same project are processed in a strict order, forming a natural linear sequence.
[0069] Fine-grained concurrency control: Establish lockable scopes for potentially conflicting resources (such as script blocks, character models, audio, and assets). If a resource is occupied by another user, the current operation is rejected or requires waiting, thus inherently eliminating concurrent write conflicts for the same resource.
[0070] 2. Status baseline and version control:
[0071] Baseline model: Maintains a normalized project state (abstract syntax tree) in memory, while saving the most recent snapshot and incremental log as an authoritative baseline for rollback and alignment.
[0072] Global Sequence: Assign a monotonically increasing global version number to each successfully enqueued atomic operation, and rewrite the operation sequence number with this version number to ensure global total order.
[0073] Persistent logs: Standardized operations are serialized into logs and appended to the persistence layer to form a replayable linear history.
[0074] 3. Operational transformation or equivalent mechanism:
[0075] Semantic and structural validation: Parse the path and target entity of each event, and strictly validate the type, required fields, and reference integrity; failure occurs if the reference is missing or the type does not match.
[0076] Permission hooks: Check usage and permissions at the specific resource level, and stop the write if no authorization is granted to prevent unauthorized cross-resource writes.
[0077] Equivalent Normalization: When there is a discrepancy in the order or dependency between the user operation event and the current structure, "remedial actions" (such as inserting a prefix, padding values, deleting invalid items, batch appending, etc.) are automatically generated to transform the user operation into a standard form that conforms to the norm.
[0078] Large operation tip: When an operation that will significantly change the data size is detected, mark it as a subsequent snapshot to shorten the convergence path and reduce replay costs.
[0079] 4. Applications and Broadcasting:
[0080] Atomic commit: Only after semantic verification, permission verification, and log persistence are all successful will the in-memory version and visible state be advanced; if any step fails, an error will be returned immediately without changing the visible state.
[0081] Failure rollback: If processing fails, the system will roll back to the most recent security snapshot and replay the data according to the logs to quickly restore the system to a consistent state; severe anomalies will trigger reconnection protection to prevent the system from continuing to provide services in an inconsistent state.
[0082] Confirmation and dissemination: Return a confirmation message to the initiator, including the authoritative sequence number and remedial action; at the same time, broadcast the standardized event and authoritative sequence to other collaborators.
[0083] 5. Client state synchronization:
[0084] Full Alignment: When establishing or reconnecting, a full snapshot is sent to ensure that the client first obtains a consistent structural baseline.
[0085] Incremental catching up: Logs from the last progress on the client are simultaneously sent, and the client replays them in authoritative sequence order to quickly catch up to the latest state.
[0086] Remedial convergence: The remedial actions and standardized events received by the client are ensured to be semantically consistent with those of the server, so that even if different clients have edited in different orders, they can eventually converge to the same standardized state.
[0087] Periodic snapshots: The server triggers snapshots based on thresholds or large operations to shorten log length and reduce the catch-up time for newly joined or offline users.
[0088] This solution supports multiple users editing the same block simultaneously. For example, a block may have multiple input fields. User A can edit the first input field, while user B can simultaneously edit the second input field. Technically, this is broken down into two independent `change_field` atomic operations. Because they operate on different attributes (different domains), the collaboration server can merge these two modifications without conflict.
[0089] This solution, through a client-collaboration server architecture and atomic operation protocol, synchronizes each user's modification to all collaborators with millisecond-level latency, achieving WYSIWYG real-time synchronization. This completely changes the traditional asynchronous and inefficient collaboration model based on file sharing, enabling team members to perform parallel programming as smoothly as collaboratively editing an online document, significantly shortening the project development cycle.
[0090] The core innovation of this invention—a collaborative server-side conflict resolution and transformation mechanism based on atomic operations—intelligently handles various complex concurrent editing scenarios, including attribute modifications, structural additions and deletions, and changes in connection relationships for the same building block. It automatically merges conflict-free modifications and resolves conflicts according to preset rules (such as timestamps and operation priorities), fundamentally eliminating data loss, logical errors, and version chaos caused by manual merging, ensuring the eventual consistency of the project state.
[0091] The invention makes complex version control and merging logic completely transparent to users, allowing them to participate in collaboration intuitively without needing to learn professional tools like Git. In educational settings, teachers can enter students' projects in real time to observe, demonstrate, and modify them, providing "shoulder-to-shoulder" remote guidance; student groups can also explore and debug together on the same project, greatly enhancing the interactivity, fun, and effectiveness of learning.
[0092] Finally, a central collaboration server acts as the authoritative arbiter of state, ensuring that core project data remains intact even in the event of network instability or client crashes. Upon reconnection, clients can quickly synchronize the latest state from the collaboration server. Furthermore, the modular design based on atomic operations allows for easy addition of new block types or interactive functions in the future; simply define the corresponding new atomic operations, resulting in excellent system scalability.
[0093] In the description of embodiments of the present invention, the terms "first," "second," "third," and "fourth" are used for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the number of indicated technical features. Thus, a feature defined as "first," "second," "third," or "fourth" may explicitly or implicitly include one or more of that feature. In the description of the present invention, unless otherwise stated, "a plurality of" means two or more.
[0094] In the description of embodiments of the present invention, the term "and / or" is used only to describe the relationship between associated objects, indicating that three relationships can exist. For example, A and / or B can represent three cases: A alone, A and B simultaneously, and B alone. Additionally, the character " / " generally indicates that the preceding and following associated objects are in an "or" relationship.
[0095] Although embodiments of the invention have been shown and described, it will be understood by those skilled in the art that various changes, modifications, substitutions and alterations can be made to these embodiments without departing from the principles and spirit of the invention, the scope of which is defined by the appended claims and their equivalents.
Claims
1. A graphical programming online collaboration method, characterized in that, This is achieved through multiple user terminals and a collaborative server, and the method includes the following steps: Step 1: Render the programming interface on the user terminal for the user to program, and represent the created graphical programming project through an abstract syntax tree on the collaboration server; Step 2: Capture user interaction behavior through the user terminal, convert the user interaction behavior into atomic operations and send them to the collaboration server; Step 3: The collaboration server receives and verifies the atomic operations sent by all user terminals, maintains the authoritative data state of the project, performs serialization and transformation on the atomic operations, thereby determining the final operation and broadcasting it to all other user terminals in the session. Step 4: The user terminal updates the programming interface according to the operation broadcast by the collaboration server.
2. The graphical programming online collaboration method according to claim 1, characterized in that, In step 1, the graphical programming project is represented by an abstract syntax tree. Specifically, this involves: reading the content of the project, including characters, backgrounds, script blocks, variables, images, and sounds, and checking for any missing important data; converting the project content into the corresponding structure according to the project specification format requirements, embedding it into a file, and recording the format and size; and combining all the content according to the original fixed hierarchy of the project. The format is checked, and finally the project abstract syntax tree is generated.
3. The graphical programming online collaboration method according to claim 1, characterized in that, The atomic operation is represented by metadata, which includes operation type, target object ID, parameters, user ID, and timestamp.
4. The graphical programming online collaboration method according to claim 1, characterized in that, In step 2, user interaction behavior is transformed into atomic operations. Specifically, the following steps are taken: First, various user interactions are captured by a listener, a local cache structure is established to locate the modification unit and initialize the sequence index; then, the interaction is classified into a standard atomic operation type, a unique event path is encoded, the change load is serialized, and the code change sequence is controlled by a queue; finally, atomic events are assembled in batches and sent.
5. The graphical programming online collaboration method according to claim 1, characterized in that, Step 3 specifically involves: First, a basic pre-check is performed at the entry point, and a context flag is injected to construct a permission checker; Furthermore, concurrent access control is achieved through lock granularity design and occupancy strategies; Subsequently, in the semantic structure verification, the operation is parsed, the parameters and permissions are verified, and a remedial event is generated; Next, global version increment, sequence rewrite persistence, and memory state update are completed; Finally, it responds to the initiator and broadcasts the status to other clients. When the conditions are met, it triggers a snapshot policy to ensure full consistency. If an error occurs, it performs a partial rollback or global protection, updates the operation time, and pushes the changes.
6. The graphical programming online collaboration method according to claim 1, characterized in that, The user terminal is a device that runs a graphical programming interface and is responsible for rendering the programming interface, capturing user interaction behavior, converting user interaction behavior into atomic operations, sending atomic operations to the server, receiving broadcast operations from the server, and updating the local interface.
7. The graphical programming online collaboration method according to claim 1, characterized in that, The collaboration server acts as the collaboration hub, responsible for managing collaboration sessions, receiving and verifying operations from all user terminals, maintaining the authoritative data status of the project, resolving conflicts between concurrent operations, and broadcasting the finalized operations to all other user terminals within the session.
8. The graphical programming online collaboration method according to claim 7, characterized in that, The specific process by which the collaborative server resolves conflicts in concurrent operations includes: First, receiving and queuing: Inbound verification: Verify write permissions and project availability; reject writes directly if they do not meet the requirements to prevent illegal or invalid writes. Queuing and serialization: Atomized operations are entered into a single processing channel on the server side, ensuring that operations of the same project are processed in a strict order, forming a natural linear sequence; Fine-grained concurrency control: Establish lockable scopes for potentially conflicting resources; if a resource is occupied by another user, the current operation is rejected or requires waiting. Second, status baseline and version control: Benchmark model: Maintains a normalized project state in memory, while saving the most recent snapshot and incremental log as an authoritative benchmark for rollback and alignment; Global sequence: Assign a monotonically increasing global version number to each successfully enqueued atomic operation, and rewrite the operation sequence number with this version number to ensure a global total order; Persistent logs: Standardized operations are serialized into logs and appended to the persistence layer to form a replayable linear history; Third, operational transformation or equivalent mechanisms: Semantic and structural validation: Parse the path and target entity of each event, and strictly validate the type, required fields, and reference integrity; failure occurs if the reference is missing or the type does not match. Permission hooks: These check resource usage and permissions at the resource level, halting unauthorized writes to prevent unauthorized cross-resource writes. Equivalent Normalization: When there is a deviation in the order or dependency between the user operation event and the current structure, a remedial action is automatically generated to transform the user operation into a standard form that conforms to the norm. Large operation tip: When an operation that will significantly change the data size is detected, mark it as a subsequent snapshot to shorten the convergence path and reduce replay costs; Fourth, Applications and Broadcasting: Atomic commit: The in-memory version and visible state are only advanced after semantic verification, permission verification, and log persistence are all successful; if any step fails, an error is returned immediately without changing the visible state. Failure rollback: If processing fails, the system will roll back to the most recent security snapshot and replay the data according to the logs to quickly restore the system to a consistent state; severe anomalies will trigger reconnection protection to prevent the system from continuing to provide services in an inconsistent state. Confirmation and dissemination: Return a confirmation message to the initiator, including the authoritative sequence number and remedial action; simultaneously broadcast the standardized event and authoritative sequence to other collaborators; Fifth, client state synchronization: Full alignment: When establishing a new connection or reconnecting, a full snapshot is sent to ensure that the client first obtains a consistent structural baseline; Incremental catching up: Logs from the last progress on the client are sent simultaneously, and the client replays them in authoritative sequence order to quickly catch up to the latest state; Remedial convergence: The remedial actions and standardized events received by the client are ensured to be semantically consistent with those of the server, so that even if different clients have edited in different orders, they can eventually converge to the same standard state; Periodic snapshots: The server triggers snapshots based on thresholds or large operations to shorten log length and reduce the catch-up time for newly joined or offline users.