Component-level collaborative editing control method and system
By using a front-end engine to compare component differences and handle preset conflicts, the low efficiency and high cost issues in multi-user collaborative editing on low-code platforms are resolved. This enables efficient collaborative editing control under a lightweight architecture, improving response speed and user experience.
Patent Information
- Application Number
- CN202511621976.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-11-07
- Publication Date
- 2025-12-09
- Estimated Expiration
- 2045-11-07
AI Technical Summary
Existing low-code platforms suffer from low efficiency or high implementation costs when multiple users collaborate on editing, making it difficult to support real-time collaboration among multiple users while maintaining consistency of page data and smooth editing.
By using a front-end engine to perform component-level structural difference comparisons and preset conflict handling strategies, the amount of data transmission and back-end server load are reduced, enabling component-level collaborative editing control, and a lightweight architecture is used to handle editing operations and merging.
It significantly improves the response speed and efficiency of multi-user collaborative editing, provides a better user experience, and ensures data consistency and smooth editing.
Smart Images

Figure CN121092159A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the field of computer, in particular to a component-level collaborative editing control method and system. BACKGROUND
[0002] Low-code development platforms are being widely applied due to their high development efficiency and high visualization. In a low-code platform, users can quickly build a front-end page by dragging and dropping components, configuring components, and binding logic. As the application range of the platform continues to expand, the number of users is also growing. In the context of fast business iteration, the demand for multiple users or multiple devices to edit the same page simultaneously is increasingly common. Users want to support multiple members to add, modify, and delete components simultaneously at different locations, and maintain the consistency of page data, the smoothness of editing, and the accuracy of the final result during collaboration.
[0003] Existing solutions have a coarse-grained locking mechanism, which allows only one user to edit one component or page at the same time, and other users only read or queue. Locking the components of a low-code page (such as using Redis locks or database marker locks), and only when unlocked can it be edited by other users. This solution is low in implementation cost, but low in efficiency, and does not essentially support real-time collaboration of multiple users. Another solution is to implement it together with the front and back ends, and all editing operations are synchronized to the server and broadcast to other terminals. The front end listens to and broadcasts operations (non-saved content), and the back end maintains operation flow and version synchronization, using WebSocket communication for real-time transmission of changes. This solution can truly support real-time conflict-free editing of multiple users, but has high implementation cost, complex technical implementation, especially real-time merging of component structured JSON, and high performance requirements.
[0004] In view of this, it is a technical problem for those skilled in the art to provide a lightweight component-level collaborative editing control method and system suitable for low-code platform multi-user simultaneous editing with low transmission cost. SUMMARY
[0005] To solve the above technical problems, the purpose of the present application is to provide a component-level collaborative editing control method, in which each user corresponds to an independent front-end engine for simultaneous editing, and the component-level structured difference comparison is performed by the front-end engine. Based on the component-level difference, the editing operation is merged according to the preset conflict resolution strategy and transmitted to the back-end server. The present application reduces the amount of data transmission and the load of the back-end server through front-end component-level difference comparison and preset conflict resolution strategy, without frequent requests to the back-end server for conflict resolution and data merging, significantly improving the response speed and collaborative editing efficiency, and providing better user experience for users The purpose of the present application is to provide a component-level collaborative editing control method; The technical scheme provided by the application is as follows: A component-level collaborative editing control method applied to a multi-user collaborative editing control system, the multi-user collaborative editing control system comprising: a plurality of front-end engines and a back-end server, and a method executed by each front-end engine comprising: obtaining editing operation data of a component submitted by a user; receiving a real-time version snapshot sent by the back-end server; differentially comparing each component of the real-time version snapshot with a component in the editing operation data to generate a component operation list; performing component conflict determination on the component operation list to obtain a conflict determination result; according to the conflict determination result, performing processing on the real-time version snapshot and the editing operation data according to a preset conflict processing strategy to obtain a processed version snapshot; sending the processed version snapshot to the back-end server as a latest version snapshot, so that the back-end server sends the latest version snapshot to each front-end engine.
[0006] Preferably, the processing of the real-time version snapshot and the editing operation data according to the conflict determination result and the preset conflict processing strategy to obtain the processed version snapshot comprises: if the conflict determination result is that the components do not conflict, directly merging the real-time version snapshot and the editing operation data to obtain a directly merged version snapshot.
[0007] Preferably, the processing of the real-time version snapshot and the editing operation data according to the conflict determination result and the preset conflict processing strategy to obtain the processed version snapshot further comprises: if the conflict determination result is that the components conflict, merging the real-time version snapshot and the editing operation data according to a preset priority processing strategy to obtain a version snapshot merged based on the preset priority processing strategy.
[0008] Preferably, the preset priority processing strategy comprises a preset operation type priority rule and a current front-end engine editing priority rule, and if the conflict determination result is that the components conflict, the merging of the real-time version snapshot and the editing operation data according to the preset priority processing strategy to obtain the version snapshot merged based on the preset priority processing strategy comprises: determining whether each component in the component operation list contains a plurality of editing operation types of the same priority according to the preset operation type priority rule to obtain a determination result. If the judgment result is that the editing operation types do not include multiple same priority, the editing operation data is merged with the real-time version snapshot according to a preset operation type priority rule, to obtain a version snapshot after merging based on the preset operation type priority rule; If the judgment result is that the editing operation types include multiple same priority, the editing operation data is merged with the real-time version snapshot according to the current front-end engine editing priority rule, to obtain a version snapshot after merging based on the current front-end engine editing priority rule.
[0009] Preferably, the preset operation type priority rule is specifically: Component deletion operation > component editing operation > component addition operation.
[0010] Preferably, before the processed version snapshot is sent to the back-end server as a latest version snapshot, so that the back-end server sends the latest version snapshot to each front-end engine, the method further comprises: performing component structure consistency verification on the processed version snapshot; if the component structure consistency verification is qualified, the processed version snapshot is taken as a version snapshot to be sent.
[0011] The second object of the application is to provide a component-level collaborative editing control system.
[0012] A component-level collaborative editing control system comprises a plurality of front-end engines and a back-end server. The front-end engine is configured to acquire editing operation data of a component submitted by a user, receive a real-time version snapshot sent by the back-end server, compare each component of the real-time version snapshot with a component in the editing operation data, generate a component operation list, perform component conflict determination on the component operation list to obtain a conflict determination result, process the real-time version snapshot and the editing operation data according to a preset conflict processing strategy based on the conflict determination result, obtain a processed version snapshot, and send the processed version snapshot to the back-end server. The back-end server is configured to receive the processed version snapshot sent by the front-end engine, store the processed version snapshot as a latest version snapshot, and send the latest version snapshot to each front-end engine.
[0013] Preferably, when the front-end engine performs the processing of the real-time version snapshot and the editing operation data according to the preset conflict processing strategy based on the conflict determination result to obtain a processed version snapshot, the front-end engine is specifically configured to: If the conflict determination result is that the components do not conflict, the real-time version snapshot is directly merged with the editing operation data to obtain a directly merged version snapshot.
[0014] Preferably, when performing the processing of the real-time version snapshot and the editing operation data according to the conflict determination result and according to a preset conflict processing strategy to obtain a processed version snapshot, the front-end engine is further configured to: If the conflict determination result is that the components conflict, the real-time version snapshot and the editing operation data are merged according to a preset priority processing strategy to obtain a version snapshot merged based on the preset priority processing strategy.
[0015] Preferably, the front-end engine is further configured to: perform a structural consistency check on the processed version snapshot; If the structural consistency check on the components is qualified, the processed version snapshot is taken as a version snapshot to be sent.
[0016] The application provides a component-level collaborative editing control method applied to a multi-user collaborative editing control system, and the system comprises a plurality of front-end engines and a back-end server. The front-end engine acquires user editing operation data and a back-end real-time version snapshot, performs component structure difference comparison, and generates a component operation list. Based on the operation list, component conflict determination is performed, and according to the conflict determination result, the editing operation data is merged according to a preset conflict resolution strategy to generate a processed version snapshot which is sent to the back-end. The back-end server stores and sends to each front-end engine. Compared with the prior art, the application reduces the data transmission amount and the load of the back-end server through front-end component-level difference comparison and a preset conflict resolution strategy in a lightweight architecture, and does not need to frequently request the back-end server for conflict resolution and data merging, thereby significantly improving the response speed and collaborative editing efficiency and bringing better user experience to users.
[0017] The application also provides a component-level collaborative editing control system. Since the system and the component-level collaborative editing control method solve the same technical problems and belong to the same technical concept, the system should have the same beneficial effects as the component-level collaborative editing control method, and thus will not be described here. BRIEF DESCRIPTION OF DRAWINGS
[0018] In order to more clearly illustrate the technical solutions in the embodiments or the prior art, the drawings needed in the embodiments or the prior art description will be briefly introduced. Obviously, the drawings in the following description are only some embodiments of the application, and other drawings can be obtained by those skilled in the art without creative labor.
[0019] Figure 1A flowchart of a component-level collaborative editing control method in an embodiment of the present application; Figure 2 A structural schematic diagram of a component-level collaborative editing control system in an embodiment of the present application. DETAILED DESCRIPTION
[0020] In order for those skilled in the art to better understand the technical solutions in the present application, the technical solutions in the embodiments of the present application will be clearly and completely described below. Obviously, the described embodiments are only some of the embodiments of the present application, not all. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without creative labor fall within the scope of protection of the present application.
[0021] As shown in Figure 1 An embodiment of the present application provides a component-level collaborative editing control method, applied to a multi-user collaborative editing control system, the multi-user collaborative editing control system comprising: a plurality of front-end engines and a back-end server, the method executed by each front-end engine comprising: S1, obtaining editing operation data of a component submitted by a user; It should be noted that the component structure in the multi-user collaborative editing control system can be a tree structure, a table structure, a list structure, a card structure, etc.
[0022] As an implementation manner, the method can be applied to a multi-user collaborative editing scene of a low-code platform / zero-code platform. In actual application process, a page is composed of a component tree structure of a plurality of components, expressed by a JSON hierarchical structure, and can be nested with container components and sub-components, and each node of the component tree is a component. Before step S1, when a user enters a page for the first time, the user will first obtain a real-time version snapshot of the page from the back-end server as a historical version snapshot. The editing operation data in step S1 is a component tree snapshot formed after the user edits on the basis of the component tree structure of the historical version snapshot, and contains all change operations of the user in the current front-end engine which are not submitted to the back-end server. The editing operation of the component in step S1 includes an adding operation, a deleting operation, an editing operation and a sorting operation.
[0023] S2, receiving a real-time version snapshot sent by the back-end server; It should be noted that the real-time version snapshot is the full version data of the latest page component tree stored in the current back-end server, which can completely restore the page state.
[0024] S3, comparing each component of the real-time version snapshot with the components in the editing operation data to generate a component operation list; In actual application, the difference comparison is performed in step S3, and a difference comparison result is obtained and saved in the form of a component operation list. The component operation list can specifically include an addition list, a deletion list, and an edit list.
[0025] As an implementation, the component operation list is saved in the form of a temporary operation list, each record only contains a component unique identifier (component ID) and necessary difference description, and full data storage is not performed.
[0026] As an implementation, taking a component tree structure as an example, the difference comparison between each component of the real-time version snapshot and the component in the edit operation data in step S3 is specifically a difference comparison between the component tree of the real-time version snapshot and the component tree structure of the edit operation data. The difference comparison includes the following rules. Special component difference comparison rules, corresponding special and different difference comparison means are adopted for container switching components, carousel container components, and ordinary container components. Specifically, container switching components (Tab components): ignore the active state attribute and the running state subcomponent content in the container switching component, and only retain the structural meta information of the container switching component to participate in the difference comparison. Carousel container components (Banner components): ignore the current carousel index and the subcomponent content in the carousel container component, and only retain the carousel item structural meta information to participate in the comparison. Ordinary container components (Container components): ignore the subcomponent content of the ordinary container component, and only retain the container itself structural information to participate in the comparison.
[0027] Recursive traversal and deep difference detection rules, specifically: using depth-first traversal recursive processing of nested components to ensure that deep-level differences can be identified. In Tab components, Banner components, Container components, and other container component types, recursively enter the sub-containers (tabs, banners, components) to perform structural comparison.
[0028] Parent-child relationship difference tracking rules, specifically: when detecting a subcomponent structure change, recursively find and record all parent containers (Tab components, Banner components, Container components) through the parentId to ensure that the state of the container component can also be correctly processed.
[0029] Difference classification and identification rules, specifically including: addition difference: a component ID that exists in the edit operation data but does not exist in the real-time version snapshot. Deletion difference: a component ID that exists in the real-time version snapshot but is missing in the edit operation data. Edit difference: a same component ID has a difference in the structural field value. Sorting difference: the position index of a same component ID in the parent container changes.
[0030] The change cleaning rule is repeated, specifically: the component ID appearing in the operation set of adding and deleting, editing and adding, etc. at the same time is cleaned according to the preset cleaning rule, and the redundant or contradictory operation records are eliminated.
[0031] After the above rule processing, the component operation list in S3 is obtained.
[0032] It should be noted that in the actual application process, before the difference comparison of step S3, attribute filtering processing is also included. The attribute filtering processing is used to eliminate non-structural attributes in the real-time version snapshot and the editing operation data, specifically: before the difference comparison, the temporary attributes generated by the low-code platform runtime dynamically, which are irrelevant to the component structure, are removed in advance to avoid misjudgment. After attribute filtering, only the structural key fields of the component are retained as the basis for difference identification, including: component unique identifier, component attribute, component type, child node, etc.
[0033] S4, component conflict judgment is performed on the component operation list, and a conflict judgment result is obtained; It should be noted that in step S4, the component conflict judgment is performed on the component operation list, specifically: Whether the real-time version snapshot and the editing operation data contain editing conflicts, sorting conflicts and combination operation conflicts is judged in units of components in the component operation list. If one or more of the editing conflicts, sorting conflicts and combination operation conflicts exist, the conflict judgment result is component conflict, otherwise the conflict judgment result is component no conflict.
[0034] The editing conflict is specifically: the field difference of the component in the component operation list in the real-time version snapshot and the editing operation data is judged one by one, and if there is a field value difference, it is judged as an editing conflict. The sorting conflict is specifically: the index position difference of the component in the component operation list in the real-time version snapshot and the editing operation data in the parent container is judged one by one, and if there is an index position difference, it is judged as a sorting conflict; if the positions are consistent, the sorting change record is removed.
[0035] The combination operation conflict is specifically: whether the component in the component operation list appears in the adding operation list and the deleting operation list at the same time, or appears in the adding operation list and the editing operation list at the same time is judged one by one, if it exists in the above two component operation lists at the same time, it is judged as a combination operation conflict.
[0036] S5, according to the conflict judgment result, the real-time version snapshot and the editing operation data are processed according to the preset conflict processing strategy, and a processed version snapshot is obtained. Preferably, according to the conflict determination result, the real-time version snapshot and the editing operation data are processed according to a preset conflict processing strategy to obtain a processed version snapshot, including: If the conflict determination result is that the components do not conflict, the real-time version snapshot and the editing operation data are directly merged to obtain a directly merged version snapshot.
[0037] If the conflict determination result is that the components conflict, the real-time version snapshot and the editing operation data are merged according to a preset priority processing strategy to obtain a version snapshot merged based on the preset priority processing strategy.
[0038] It should be noted that in actual application, when the conflict determination result is that the components conflict, the merging can also be performed according to an artificial confirmation manner to obtain an artificial confirmation merged version snapshot.
[0039] In actual application, the preset priority processing strategy is specifically: the data is merged according to the operation type priority of the same component: the priority order of the operation types is as follows: a deletion operation > an editing operation > a sorting operation > an addition operation; when there are multiple operations of the same component with the same priority, the editing operation data is merged according to a current front-end engine editing priority rule, that is, the editing operation priority corresponding to the current user is set as the highest priority for merging. In addition, the priority of the editing operation for merging can also be set by the artificial confirmation manner or based on user permissions, and the operation data merging manner of the front-end engine of the present application is a flexible configuration manner.
[0040] Preferably, the preset priority processing strategy includes a preset operation type priority rule and a current front-end engine editing priority rule, and if the conflict determination result is that the components conflict, the real-time version snapshot and the editing operation data are merged according to the preset priority processing strategy to obtain a version snapshot merged based on the preset priority processing strategy, including: According to the preset operation type priority rule, it is determined whether each component in the component operation list contains multiple editing operation types of the same priority to obtain a determination result. If the determination result is that the component does not contain multiple editing operation types of the same priority, the editing operation data and the real-time version snapshot are merged according to the preset operation type priority rule to obtain a version snapshot merged based on the preset operation type priority rule. Preferably, the preset operation type priority rule is specifically: A component deletion operation > a component editing operation > a component addition operation.
[0041] If the determination result is that the component contains multiple editing operation types of the same priority, the editing operation data and the real-time version snapshot are merged according to the current front-end engine editing priority rule to obtain a version snapshot merged based on the current front-end engine editing priority rule.
[0042] In actual application, the processed version snapshot in step S5 is the front-end version snapshot after merging the current user editing operation data. Taking the component tree structure as an example, the generation rules of the front-end version snapshot structure include: A component insertion position rule, specifically: for a Container component, a nearest sibling component position in a components array is preferentially searched, and the component is inserted. If there is no sibling component, the component is inserted at the beginning of the components array. The same rule applies to a Tab component and a Banner component.
[0043] A sorting generation rule, specifically: a combined order is generated based on local sorting changes and server data; unchanged elements are retained, and relative positions are adjusted as needed; duplicates are removed to ensure list uniqueness and order correctness.
[0044] A structure-dependent sorting rule: in the same type of operation, a container component (parent node) is preferentially processed, and then its child components are processed to avoid structure suspension.
[0045] A component identifier and parent-child relationship generation rule, specifically: a unique identifier is assigned to a newly added component; a correct parent-child relationship is established and maintained; and the component identifier of a nested component is recursively updated to the backend server to ensure global uniqueness and correct relationship.
[0046] Various sub-operation execution rules: A component deletion operation execution rule, specifically: a deletion queue is traversed, and if the target component exists in the current component tree, a safe deletion is performed; if the target component has been deleted by another operation, the operation is skipped and marked as invalid.
[0047] An editing component operation execution rule, specifically: an editing queue is traversed, and if the component exists, affected fields are replaced, and unchanged fields remain unchanged; if the component does not exist: a parent container exists, and the component is automatically inserted into the original position of the parent container. If the parent container does not exist, a container component is automatically created as a new parent node based on the real-time version snapshot.
[0048] A new component operation execution rule, specifically: a new component queue is traversed, and it is determined whether the target position is a root level or within a container component. A nearest sibling component position within the container is preferentially searched and inserted. If there is no sibling component, the component is inserted at the beginning of the root array. If the container does not exist, a container is automatically created based on the local snapshot and the component is inserted.
[0049] Preferably, before the processed version snapshot is sent to the backend server as the latest version snapshot, so that the backend server sends the latest version snapshot to each front-end engine, it further includes: Performing a component structure consistency check on the processed version snapshot. If the structural consistency check of the component is qualified, the processed version snapshot is taken as the version snapshot to be sent.
[0050] As an implementation, the structural consistency check of the processed version snapshot is performed on the component tree structure, which can specifically include: The parent-child relationship legality check specifically refers to checking whether the parent node identifier of all components points to an effectively existing parent node. For the detected isolated node (for example, the parent component has been deleted), it is automatically removed or restored to the default parent container according to the rule.
[0051] The reference integrity check specifically refers to checking whether all component attribute values such as data source references still exist and are available.
[0052] The structural integrity check of the special component specifically refers to that the child node set of the container component should be completely accessible.
[0053] If the structural consistency check is unqualified, data rollback is performed. The data rollback specifically includes: Complete rollback: all editing operations of this submission are revoked, and the version snapshot before the operation is restored to ensure data consistency.
[0054] Partial rollback: the successfully executed sub-operations in the current editing operation are retained; the failed sub-operations are marked as “abnormal items”, which are highlighted or provided with error prompts in the interface; the user can manually repair (such as reselecting a container, adjusting component attributes, etc.) and submit again based on the prompts.
[0055] S6, the processed version snapshot is sent to the backend server as the latest version snapshot, so that the backend server sends the latest version snapshot to each front-end engine.
[0056] In actual application process, the backend server persistently stores the latest version snapshot into the database, and generates a corresponding version number or timestamp, which is used for subsequent version comparison and rollback. At the same time, the backend server returns the submission result and version information, and the front-end engine updates the front-end component tree structure according to the feedback result and the received latest version snapshot.
[0057] In actual application process, the front-end engine is also used for performing secondary difference comparison, secondary conflict determination and secondary conflict processing operation. The secondary difference comparison specifically refers to that when the processed version snapshot A of the user A is submitted to the backend server by the front-end engine of the user A, the real-time version snapshot B of the backend server is compared with the real-time version snapshot O obtained before the conflict processing operation of the user A, if the version snapshot B is inconsistent with the version snapshot O, at this time, the processed version snapshot A submitted by the user A and the version snapshot B exist differences.
[0058] The secondary conflict processing strategy includes: After the processed version snapshot A submitted by user A and the version snapshot B perform differential comparison, a secondary conflict determination result is obtained, and secondary merging is performed according to steps S4 and S5 to obtain a secondary conflict processed version snapshot; or a pop-up window prompts, and a user confirms a reserved version snapshot as a secondary conflict processed version snapshot; or a user performs manual merging, and a version snapshot obtained by manual merging is taken as a secondary conflict processed version snapshot.
[0059] In actual application, after the secondary conflict processing operation, the version snapshot after the secondary conflict processing operation is replaced as the latest version snapshot of the backend server before the front-end engine continues to perform differential comparison and conflict processing operation on the version snapshot after the secondary conflict processing operation and the real-time version snapshot of the backend server until the real-time version snapshot obtained by the conflict processed version snapshot is consistent with the current version snapshot of the backend server, and then the conflict processed version snapshot is sent to the backend server as the latest version snapshot.
[0060] The beneficial effects of the present application are as follows: The front-end engine realizes the core logic of multi-user editing, the architecture is lightweight and convenient to deploy, the front-end independently processes the addition, editing and deletion logic, frequent requests to the backend server are not required, the response speed and user experience are improved. The system architecture is decoupled, the backend server only serves as a data persistent storage channel and does not bear real-time collaboration logic, thereby reducing the system complexity. Different user operations on different components can take effect, and different users on the same component take the latest submitted user editing operation data content as the standard, thereby guaranteeing data consistency and reliability.
[0061] Compared with the prior art, the present application reduces the data transmission amount and the load of the backend server through front-end component-level differential comparison and a preset conflict resolution strategy, does not need to frequently request the backend server for conflict resolution and data merging, significantly improves the response speed and collaborative editing efficiency, and brings better user experience to users.
[0062] To facilitate understanding of the specific process of the present scheme, the following are two specific application scenarios of the present application.
[0063] Application scenario one: two users edit different components at the same time (no conflict) 1) Specific input of user operation (unsubmitted stage) User A 1. Edit: modify the URL of single-image component Id=37562cf530344970b8fc89abf362acf9 to newA.png 2. Add: add a rich text component at the end of container component Id=447d654ba6b64029be9d71187b7e49eb User B 1. Edit: Modify the text field of the rich text component Id=7686bdfafef24fd4b29ebc7ff16953fc to " Welcome " 2. Delete: Delete the root layer placeholder component Id=2668 2) How does the front-end engine collect / classify / process Front-end engine: 1. Initialization: Initialize the real-time version snapshot History = Vn (get from the back-end server), Current_A = Vn, Current_B = Vn 2. User A locally operates the application to Current_A; User B locally operates the application to Current_B Based on the difference comparison between History vs Current_*, get the component operation list User A Add list addList: ["A_new_1"] Edit list editList: ["37562cf530344970b8fc89abf362acf9"] Delete list delList: [] 2. User B Add list addList: [] Edit list editList: ["7686bdfafef24fd4b29ebc7ff16953fc"] Delete list delList: ["2668"] 3) Submission and merging a. User A submits 1. Front-end engine pulls the real-time version snapshot Vs of the back-end server 2. Change detection: Calculate the difference component operation list A' based on (History vs Current_A) 3. Conflict handling: Check conflicts based on component ID + field difference (A changes single image, B changes rich text and deletes placeholder, no overlapping fields), no conflicts 4. Front-end engine execution (delete operation -> edit operation > add operation) (1) Delete: empty (2) Edit: Update the url of single image 37562cf5... to newA.png (3) Add: Insert A_new_1 into container 447d654b... (4) The processed complete snapshot is sent to the backend server, and the backend service is persisted as the latest version snapshot Vs+1 (5) User A front-end engine update: History = Vs+1, Current_A = Vs+1 b. B submits (later than A) 1. The front-end engine pulls the real-time version snapshot Vs+1 2. Change detection: Calculate the difference component operation list B' based on (History vs Current_B) 3. Conflict processing: Based on component ID + field difference check (B's edit target 7686bd... is different from A's modified field; 2668 still exists), no conflict 4. The front-end engine executes (delete operation -> edit operation -> add operation) (1) Delete: Delete 2668 (2) Edit: Update the text field of rich text 7686bd... = " Welcome " (3) Add: Empty 4) Final merge result a. Single picture (37562cf5...) url = newA.png (A takes effect) b. Container (447d654b...) adds a child item A_new_1 (A takes effect) c. Rich text (7686bd...) text field = " Welcome " (B takes effect) d. Placeholder blank (2668) is deleted (B takes effect) e. No conflict, both user modifications are retained, the processed complete snapshot is sent to the backend server, and the backend service is persisted as the latest version snapshot Vs+2; the backend server stores three version snapshots Vs, Vs+1, and Vs+2.
[0064] Scenario two: Two users edit the same component at the same time (field conflict) 1) Specific input of user operation (front-end unsubmitted stage) User A: Edit the url of single picture component Id=37562cf530344970b8fc89abf362acf9 = "newA.png" User B: Edit the url of the same component Id=37562cf530344970b8fc89abf362acf9 = "newB.png" 2) Front-end engine collection / classification 1, User A addList: [] editList: ["37562cf530344970b8fc89abf362acf9"] delList: [] 2, User B addList: [] editList: ["37562cf530344970b8fc89abf362acf9"] delList: [] 3) Submission and conflict processing a. User A submits 1, Pull the backend server real-time complete snapshot Vs 2, Change detection: generate component operation list A' based on (History vs Current_A) 3, Conflict processing: the component url in Vs is still the old value, A modifies the field to url, no one else has effective changes, no conflict 4, Front-end engine executes edit operation: url = "newA.png" 5, Send the processed complete snapshot to the backend server, and the backend service stores it as the latest version snapshot Vs+1 6, Status management module (A side) update: History = Vs+1, Current_A = Vs+1 b. User B submits (later than A) 1, Pull the real-time version snapshot Vs+1 2, Change detection: generate B' based on (History vs Current_B) 3, Conflict processing (same component ID + same field): Find field-level conflict: url has been changed to newA.png by A in Vs+1, B wants to change it to newB.png Default priority processing strategy: a. Default: current front-end engine edit priority, take B's newB.png b. Or manual confirmation (popup to choose to keep A or B's value) 4, Front-end engine executes edit: url = "newB.png" 5. Send the processed full snapshot to the backend server, the backend service persists as the full snapshot Vs+2 6. Frontend engine update: History = Vs+2, Current = Vs+2 4) Final merge result (field conflict resolved) Single image (37562cf5…) final url = "newB.png" Other components remain unchanged User A's modification takes effect at Vs+1, but is overwritten by user B's modification in Vs+2 Send the processed full snapshot to the backend server, the backend service persists as the latest version snapshot Vs+2; the backend server saves three version snapshots Vs, Vs+1, Vs+2.
[0065] Scenario three: two users edit at the same time, user A transmits the front-end version snapshot to the backend server for storage, but the real-time version snapshot of the backend server has been updated (concurrent submission conflict) 1) Specific input of user operation • User A: edit the url of single image component Id=37562cf530344970b8fc89abf362acf9 "newA.png" • User B: after user A pulls the real-time version snapshot Vs (but before A transmits the front-end version snapshot to the backend server for storage), B's front-end version snapshot has updated the real-time version snapshot of the backend server, the real-time version snapshot of the backend server becomes Vs+1, B's operation is to modify the text field of rich text component Id=7686bdfafef24fd4b29ebc7ff16953fc = " welcome ".
[0066] 5) Front-end engine collection / classification (operation list only stores ID) 1. User A (based on History=Vn): addList: [] editList: ["37562cf530344970b8fc89abf362acf9"] delList: [] 2. User B (based on History=Vn): addList: [] editList: ["7686bdfafef24fd4b29ebc7ff16953fc"] delList: [] 3)Commit process 1. User A pulls the backend server snapshot Vs.
[0067] 2. User A generates operation list A' based on (History vs Current_A) (i.e. update single image url).
[0068] 3. When user A applies A' to Vs and prepares to send to the backend server, the front-end engine gets the current real-time version snapshot of the backend server and finds that the current latest version is Vs+1 (B's operation of Vs+1 has been sent to the backend server), not Vs based on which A performs the difference comparison.
[0069] 4) Conflict judgment • The system finds that A's submission is based on an outdated snapshot (Vs), at which time the conflict handling operation is triggered: • A's target component (single image) still exists in Vs+1, and B only modifies the rich text component > The two operations do not conflict with each other.
[0070] • Solution: The system merges user A's modifications based on Vs+1 again.
[0071] 5) Conflict handling and merging 1. The server first loads the latest snapshot Vs+1.
[0072] 2. The front-end engine merges A's modifications with Vs+1: • Rich text component (7686bd..) keeps B's modification = " Welcome " • Single image component (37562cf5..) updates url = "newA.png" 3. The merged result generates a new snapshot Vs+2.
[0073] 6) Final result • Single image (37562cf5.) url = "newA.png" (A takes effect) • Rich text (7686bd.) textHtmlStr = " Welcome " (B takes effect) • The final server stores the snapshot sequence: Vs (old) -> Vs+1 (B's submission) -> Vs+2. The complete snapshot after processing is sent to the backend server, and the backend service is persisted as the latest version snapshot Vs+2; the backend server saves three version snapshots Vs, Vs+1, and Vs+2.
[0074] A second object of the present application is to provide an assembly-level collaborative editing control system.
[0075] In one embodiment, as shown in Figure 2 An assembly-level collaborative editing control system includes a plurality of front-end engines and a back-end server. The front-end engine is configured to obtain editing operation data of an assembly submitted by a user, receive a real-time version snapshot sent by the back-end server, compare each component of the real-time version snapshot with a component in the editing operation data, generate an assembly operation list, perform assembly conflict determination on the assembly operation list to obtain a conflict determination result, perform processing on the real-time version snapshot and the editing operation data according to a preset conflict processing strategy based on the conflict determination result to obtain a processed version snapshot, and send the processed version snapshot to the back-end server. The back-end server is configured to receive the processed version snapshot sent by the front-end engine and store the processed version snapshot as a latest version snapshot, and send the latest version snapshot to each front-end engine.
[0076] Preferably, when performing processing on the real-time version snapshot and the editing operation data according to the preset conflict processing strategy based on the conflict determination result to obtain the processed version snapshot, the front-end engine is specifically configured to: If the conflict determination result is that the assemblies do not conflict, directly merge the real-time version snapshot and the editing operation data to obtain a directly merged version snapshot.
[0077] Preferably, when performing processing on the real-time version snapshot and the editing operation data according to the preset conflict processing strategy based on the conflict determination result to obtain the processed version snapshot, the front-end engine is further configured to: If the conflict determination result is that the assemblies conflict, merge the real-time version snapshot and the editing operation data according to a preset priority processing strategy to obtain a version snapshot merged based on the preset priority processing strategy.
[0078] Preferably, the front-end engine is further configured to: perform structure consistency verification on the processed version snapshot; If the structure consistency verification of the assembly is qualified, the processed version snapshot is taken as a version snapshot to be sent.
[0079] The specific limitation of the component-level collaborative editing control system can refer to the limitation of the component-level collaborative editing control method, which will not be repeated here. Each module in the component-level collaborative editing control system can be realized by software, hardware and their combination. The above-mentioned modules can be embedded in or independent of the processor in the computer device in hardware form, or can be stored in the memory in the computer device in software form, so that the processor calls and executes the operation corresponding to each module.
[0080] In the embodiments provided in the present application, it should be understood that the disclosed method and system can be implemented in other ways. The system embodiments described above are only schematic. For example, the division of the modules is only a logical function division, and there can be another division manner in actual implementation, such as: a plurality of modules or components can be combined, or can be integrated into another system, or some features can be ignored or not executed. In addition, the coupling or direct coupling or communication connection between the various components shown or discussed can be indirect coupling or communication connection through some interfaces, devices or modules, which can be electrical, mechanical or other forms.
[0081] In addition, each functional module in each embodiment of the present application can be integrated in one processor, or each module can be a separate device, or two or more modules can be integrated in one device; each functional module in each embodiment of the present application can be realized in the form of hardware or hardware plus software functional unit.
[0082] Those skilled in the art can understand that all or part of the steps of the above-mentioned method embodiments can be completed by program instructions and related hardware. The aforementioned program instructions can be stored in a computer readable storage medium, and the program instructions are executed to perform the steps of the above-mentioned method embodiments. The aforementioned storage medium includes mobile storage devices, read-only memory (ROM), magnetic discs or optical discs and various program code storage media.
[0083] It should be understood that if "system", "device", "unit" and / or "module" are used in the present application, it is only a method for distinguishing different components, elements, parts, portions or assemblies at different levels. However, if other words can achieve the same purpose, the words can be replaced by other expressions.
[0084] As used in this application and the appended claims, the articles "a," "an," and "the" are not limited to refer to only one of the identifiable items but rather include the plural of the identified items unless otherwise indicated. Generally, the terms "comprise," "comprising," "include," "including," and the like are not intended to be limiting and are understood to mean that the process, method, or apparatus includes the steps or elements that are expressly recited and that the process, method, or apparatus also includes other steps or elements that are not expressly recited. The term "consisting of" is intended to mean that the process, method, or apparatus includes only the steps or elements that are expressly recited.
[0085] Furthermore, the terms "first," "second," and the like, do not imply any particular order, but are used for naming purposes only. Use of the terms "a" and "an" and "the" include both singular and plural referents unless the context clearly dictates otherwise. The terms "comprising," "comprise" and "including," "include," along with the like, are used synonymously to refer to processes, methods, and apparatuses that include a recited step or element but not exclusive of other steps or elements. Use of the term "if" is intended to convey the meaning "if, or when." Use of the term "associated with" is intended to convey the meaning "associated with, or without."
[0086] If a flow diagram is used to illustrate the operations according to embodiments of the present application, it will be understood that each block of the flow diagram, and combinations of blocks in the flow diagram, can be implemented by various means, such as hardware, software, firmware, or any combination thereof. It will be appreciated that the operations of the flow diagram can be performed in an order other than that shown, or in parallel, or in any order, or in any combination. It will also be appreciated that the flow diagram can include additional operations, or that some operations can be omitted, or that additional operations can be performed in addition to those shown.
[0087] The above description of disclosed embodiments is intended to be illustrative and not restrictive. Many embodiments of the application will be apparent to those of skill in the art upon reviewing the above description. The scope of the application should, therefore, be determined not with reference to the above description, but instead with reference to the appended claims, along with their full scope of equivalents.
Claims
1. An assembly-level collaborative editing control method, characterized by, The application is applied to a multi-user collaborative editing control system, and the multi-user collaborative editing control system comprises a plurality of front-end engines and a back-end server, and a method executed by each front-end engine comprises: obtaining editing operation data of components submitted by a user; receiving a real-time version snapshot sent by the back-end server; differentially comparing each component of the real-time version snapshot with components in the editing operation data to generate a component operation list; performing component conflict determination on the component operation list to obtain a conflict determination result; according to the conflict determination result, performing processing on the real-time version snapshot and the editing operation data according to a preset conflict processing strategy to obtain a processed version snapshot; sending the processed version snapshot to the back-end server as a latest version snapshot, so that the back-end server sends the latest version snapshot to each front-end engine.
2. The component-level collaborative editing control method of claim 1, wherein, According to the conflict determination result, the real-time version snapshot and the editing operation data are processed according to the preset conflict processing strategy to obtain a processed version snapshot, which comprises: if the conflict determination result is that the components are not in conflict, the real-time version snapshot and the editing operation data are directly merged to obtain a directly merged version snapshot.
3. The component-level collaborative editing control method of claim 2, wherein, According to the conflict determination result, the real-time version snapshot and the editing operation data are processed according to the preset conflict processing strategy to obtain a processed version snapshot, which further comprises: if the conflict determination result is that the components are in conflict, the real-time version snapshot and the editing operation data are merged according to a preset priority processing strategy to obtain a version snapshot merged based on the preset priority processing strategy.
4. The component-level collaborative editing control method of claim 3, wherein, The preset priority processing strategy comprises a preset operation type priority rule and a current front-end engine editing priority rule, and if the conflict determination result is that the components are in conflict, the real-time version snapshot and the editing operation data are merged according to the preset priority processing strategy to obtain a version snapshot merged based on the preset priority processing strategy, which comprises: determining whether each component in the component operation list contains a plurality of editing operation types of the same priority according to the preset operation type priority rule to obtain a determination result; if the determination result is that the plurality of editing operation types of the same priority are not contained, the editing operation data and the real-time version snapshot are merged according to the preset operation type priority rule to obtain a version snapshot merged based on the preset operation type priority rule; if the determination result is that the plurality of editing operation types of the same priority are contained, the editing operation data and the real-time version snapshot are merged according to the current front-end engine editing priority rule to obtain a version snapshot merged based on the current front-end engine editing priority rule.
5. The component-level collaborative editing control method of claim 4, wherein, The preset operation type priority rule is specifically: component deletion operation > component editing operation > component addition operation.
6. The component-level collaborative editing control method of claim 1, wherein, Before the processed version snapshot is sent to the back-end server as a latest version snapshot so that the back-end server sends the latest version snapshot to each front-end engine, the method further comprises: performing component structural consistency verification on the processed version snapshot; if the component structural consistency verification is passed, taking the processed version snapshot as a version snapshot to be sent.
7. An assembly level collaborative editing control system, characterized by, comprise: a plurality of front-end engines and a back-end server; the front-end engine is configured to: acquire editing operation data of a component submitted by a user, receive a real-time version snapshot sent by the back-end server, perform difference comparison between each component of the real-time version snapshot and a component in the editing operation data, generate a component operation list, perform component conflict determination on the component operation list to obtain a conflict determination result, perform processing on the real-time version snapshot and the editing operation data according to a preset conflict processing strategy based on the conflict determination result, obtain a processed version snapshot, and send the processed version snapshot to the back-end server; the back-end server is configured to: receive the processed version snapshot sent by the front-end engine, store the processed version snapshot as a latest version snapshot, and send the latest version snapshot to each front-end engine.
8. The assembly-level co-authoring control system of claim 7, wherein, when performing the processing on the real-time version snapshot and the editing operation data according to the conflict determination result and the preset conflict processing strategy to obtain the processed version snapshot, the front-end engine is specifically configured to: if the conflict determination result is that the components do not conflict, directly merging the real-time version snapshot and the editing operation data to obtain a directly merged version snapshot.
9. The assembly-level co-authoring control system of claim 8, wherein, when performing the processing on the real-time version snapshot and the editing operation data according to the conflict determination result and the preset conflict processing strategy to obtain the processed version snapshot, the front-end engine is further configured to: if the conflict determination result is that the components conflict, merging the real-time version snapshot and the editing operation data according to a preset priority processing strategy to obtain a version snapshot merged based on the preset priority processing strategy.
10. The assembly-level co-authoring control system of claim 7, wherein, the front-end engine is further configured to: performing component structural consistency verification on the processed version snapshot; if the component structural consistency verification is passed, taking the processed version snapshot as a version snapshot to be sent.
Citation Information
Patent Citations
A method for editing documents by multiple people
CN109408790A
Data co-processing method, device and system
CN111553132A
Online visual demonstration document editing method
CN119378504A
WebSocket and JSON-PATCH-based conflict resolution method and system for realizing multi-person collaborative editing
CN119902754A
KR20190142942A
Cited By
List component state synchronization method, system, medium, device, and program product
CN122363804A
List component state synchronization method, system, medium, device, and program product
CN122363804B
