Collaborative operation processing method, device, equipment and medium
By disassembling the collaborative operation into atomic operations and performing conflict merge processing, the problem of indistinguishable user operation time in online documents is solved, and more accurate collaborative operation results are achieved.
Patent Information
- Application Number
- CN202111149840.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-07-30
- Publication Date
- 2025-08-19
- Estimated Expiration
- 2041-07-30
AI Technical Summary
When multiple users operate on the same online document, the inability to distinguish the operation time leads to confusion in operation logic, resulting in incorrect modification results.
Disassemble the collaborative operation into atomic operations, and use conflict merge processing to generate subatomic operations containing lost operations to ensure operation accuracy.
Improve the accuracy of collaborative operation processing results and retain editing operations of multiple users.
Smart Images

Figure CN115688695B_ABST
Abstract
Description
[0001] This application is a divisional application of the Chinese patent application submitted to the China Patent Office on July 30, 2021, with application number 202110867959.5 and application name "Collaborative operation processing method, device, equipment and medium", all of which are incorporated by reference into this application. Technical Field
[0002] The present application relates to the field of Internet technology, and in particular to a collaborative operation processing method, apparatus, device, and medium. Background Art
[0003] Online documents, as shared documents that support real-time browsing and editing by multiple users, can save users significant time and effort, and therefore have attracted widespread attention. Currently, when multiple users work on the same version of an online document, modifications must be made sequentially based on the order in which their operations occurred. However, when the operations of user A and user B within an online document cannot be distinguished based on their respective time periods, this can easily lead to logical confusion between the two users' operations, potentially resulting in errors in the resulting online document modifications. Summary of the Invention
[0004] The embodiments of the present application provide a collaborative operation processing method, apparatus, device, and medium, which can improve the accuracy of collaborative operation processing results.
[0005] An embodiment of the present application provides a collaborative operation processing method, including:
[0006] Acquire at least two collaborative operations associated with the first editing area in the target document, and decompose the at least two collaborative operations to obtain atomic operations corresponding to the at least two collaborative operations;
[0007] If a first collaborative operation among at least two collaborative operations includes an atomic operation i for a first editing region and an atomic operation j for a second editing region, then conflicting merges are performed on the atomic operation i and the atomic operations corresponding to the second collaborative operation to obtain a first merge result for the first editing region; the second editing region belongs to the target document, the second collaborative operation is a collaborative operation among the at least two collaborative operations other than the first collaborative operation, and both i and j are positive integers less than or equal to the number of atomic operations corresponding to the first collaborative operation;
[0008] According to the first merge result, obtain the lost operation content in the atomic operation i and the atomic operation corresponding to the second collaborative operation, generate a sub-atomic operation containing the operation content, perform conflicting merge on the atomic operation j and the sub-atomic operation, and obtain the second merge result for the second editing area.
[0009] An embodiment of the present application provides a collaborative operation processing method, including:
[0010] A first collaborative operation for a target document is sent to a server, so that the server decomposes the first collaborative operation and the second collaborative operation into atomic operations; the first collaborative operation and the second collaborative operation are sent by different user terminals, the first collaborative operation includes an atomic operation i for a first editing area, and an atomic operation j for a second editing area, the second collaborative operation includes an atomic operation for the first editing area, the first editing area and the second editing area both belong to the target document, and i and j are both positive integers less than or equal to the number of atomic operations corresponding to the first collaborative operation;
[0011] Receive the first merge result and the second merge result returned by the server, and display the first merge result associated with the first editing area and the second merge result associated with the second editing area in the target document; the first merge result refers to the conflicting merge result between the atomic operation i and the atomic operation corresponding to the second collaborative operation, and the second merge result refers to the conflicting merge result between the atomic operation j and the sub-atomic operation, and the sub-atomic operation is determined by the operation content lost in the atomic operation corresponding to the atomic operation i and the second collaborative operation.
[0012] In one aspect, an embodiment of the present application provides a collaborative operation processing device, including:
[0013] a decomposition module, configured to obtain at least two collaborative operations associated with the first editing area in the target document, decompose the at least two collaborative operations, and obtain atomic operations corresponding to the at least two collaborative operations;
[0014] A first conflict merging module is configured to, if a first collaborative operation among at least two collaborative operations includes an atomic operation i for a first editing region and an atomic operation j for a second editing region, perform conflict merging on the atomic operation i and the atomic operation corresponding to the second collaborative operation to obtain a first merge result for the first editing region; the second editing region belongs to a target document, the second collaborative operation is a collaborative operation other than the first collaborative operation among the at least two collaborative operations, and i and j are both positive integers less than or equal to the number of atomic operations corresponding to the first collaborative operation;
[0015] The second conflict merge module is used to obtain the lost operation content in the atomic operation i and the atomic operation corresponding to the second collaborative operation based on the first merge result, generate a sub-atomic operation containing the operation content, perform conflict merge on the atomic operation j and the sub-atomic operation, and obtain a second merge result for the second editing area.
[0016] Among them, the disassembly module includes:
[0017] The area allocation unit is used to obtain an object identifier set corresponding to the target document, and allocate a document control area to each object identifier in the object identifier set in the target document;
[0018] An operation authority determination unit is used to, if original collaborative operations for the first editing area are received and uploaded by user terminals associated with M object identifiers, determine the original collaborative operations corresponding to the object identifier of the first editing area in the document control area as at least two collaborative operations among the original collaborative operations corresponding to the M object identifiers; M is a positive integer less than or equal to the number of object identifiers contained in the object identifier set.
[0019] The device further comprises:
[0020] An editing area number counting module is used to obtain editing area sets triggered by at least two collaborative operations in a target document, and count the number of editing areas corresponding to the at least two editing area sets;
[0021] The first collaborative operation determining module is configured to determine a collaborative operation to which an editing area set having a number of editing areas greater than a threshold value belongs as a first collaborative operation; the editing area set corresponding to the first collaborative operation includes the first editing area and the second editing area.
[0022] Among them, the disassembly module includes:
[0023] An operation decomposition unit, configured to decompose at least two coordinated operations respectively to obtain one or more coordinated sub-operations corresponding to each coordinated operation;
[0024] The operation conversion unit is used to convert one or more collaborative sub-operations into atomic operations according to the execution time sequence of the one or more collaborative sub-operations in the collaborative operation to which they belong.
[0025] The first collaborative operation includes a cut and move operation, the atomic operation i includes a content deletion operation, the atomic operation j includes a content insertion operation, and the atomic operation corresponding to the second collaborative operation includes a content modification operation;
[0026] The first conflict merge module is specifically used for:
[0027] If the cut-move operation in the at least two coordinated operations includes a content deletion operation for the first editing area and a content insertion operation for the second editing area, then performing a conflict merge on the content deletion operation and the content modification operation, resulting in a first merge result for the first editing area being a null operation;
[0028] The second conflict merge module is used to:
[0029] According to the empty operation, the operation contents lost in the content deletion operation and the content modification operation are determined to be content modification operations, and the content modification operation and the empty operation are determined to be subatomic operations.
[0030] The first collaborative operation includes a selective copy operation, the atomic operation i includes a content selection operation, the atomic operation j includes a content insertion operation, and the atomic operation corresponding to the second collaborative operation includes a content modification operation;
[0031] The first conflict merge module is specifically used for:
[0032] If the selective copy operation in the at least two coordinated operations includes a content selection operation on the first editing region and a content insertion operation on the second editing region, performing conflict merge on the content selection operation and the content modification operation, obtaining a first merge result for the first editing region as the modified content;
[0033] The second conflict merge module is used to:
[0034] According to the modified content, the operation content lost in the content selection operation and the content modification operation is determined to be the original operation content, and the original operation content is determined to be a subatomic operation; the original operation content refers to the original content in the first editing area triggered by the content selection operation.
[0035] The device further comprises:
[0036] An identifier acquisition module, configured to acquire an identifier of a target object having a binding relationship with the first editing area;
[0037] an expected result acquisition module, configured to acquire an expected operation result associated with a target object identifier if the second collaborative operations corresponding to N object identifiers received include a second collaborative operation corresponding to a target object identifier; N is a positive integer less than the number of at least two collaborative operations;
[0038] The result returning module is used to return both the expected operation result and the second merged result to the user terminal associated with the target object identifier if the second merged result is inconsistent with the expected operation result, so that the user terminal associated with the target object identifier can display the expected operation result and the second merged result in the target document.
[0039] In one aspect, an embodiment of the present application provides a collaborative operation processing device, including:
[0040] An operation sending module is used to send a first collaborative operation for a target document to a server, so that the server decomposes the first collaborative operation and the second collaborative operation into atomic operations; the first collaborative operation and the second collaborative operation are sent by different user terminals, the first collaborative operation includes an atomic operation i for a first editing area, and an atomic operation j for a second editing area, the second collaborative operation includes an atomic operation for the first editing area, the first editing area and the second editing area both belong to the target document, and i and j are both positive integers less than or equal to the number of atomic operations corresponding to the first collaborative operation;
[0041] A merge result receiving module is used to receive the first merge result and the second merge result returned by the server, and display the first merge result associated with the first editing area and the second merge result associated with the second editing area in the target document; the first merge result refers to the conflicting merge result between the atomic operation i and the atomic operation corresponding to the second collaborative operation, and the second merge result refers to the conflicting merge result between the atomic operation j and the sub-atomic operation, and the sub-atomic operation is determined by the operation content lost in the atomic operation corresponding to the atomic operation i and the second collaborative operation.
[0042] The merge result receiving module is specifically used for:
[0043] The first merged result and the second merged result returned by the server are received, the first merged result is inserted into the first editing area of the target document, and the second merged result is inserted into the second editing area.
[0044] Wherein, the first coordinated operation includes a shear movement operation;
[0045] The merge result receiving module includes:
[0046] A first content inserting unit is configured to receive the first merged result and the second merged result returned by the server, and insert the first merged result into the first editing area of the target document;
[0047] A first list display unit is configured to display a first candidate content list associated with the second editing area; the first candidate content list includes the second merge result and the original operation content triggered by the first collaborative operation;
[0048] The second content inserting unit is configured to respond to a selection operation on the first candidate content list and insert the original operation content triggered by the selection operation into the second editing area.
[0049] Wherein, the first coordinated operation includes a selective copy operation;
[0050] The merge result receiving module includes:
[0051] A first content inserting unit is configured to receive the first merged result and the second merged result returned by the server, and insert the first merged result into the first editing area of the target document;
[0052] A second list display unit is configured to display a second candidate content list associated with the second editing area; the second candidate content list includes the first merged result and the second merged result;
[0053] The third content inserting unit is configured to, in response to a selection operation on the second candidate content list, insert the first merged result triggered by the selection operation into the second editing area.
[0054] The device further comprises:
[0055] The object identification display module is used to obtain the editing object identification for the first editing area when it is monitored that the first editing area is operated, and display the editing object identification in the associated area corresponding to the first editing area.
[0056] In one aspect, an embodiment of the present application provides a computer device, including a memory and a processor, wherein the memory is connected to the processor, the memory is used to store a computer program, and the processor is used to call the computer program so that the computer device executes the method provided in the above aspect of the embodiment of the present application.
[0057] On one hand, an embodiment of the present application provides a computer-readable storage medium, in which a computer program is stored. The computer program is suitable for being loaded and executed by a processor, so that a computer device with a processor executes the method provided in the above aspect of the embodiment of the present application.
[0058] According to one aspect of the present application, a computer program product or computer program is provided, the computer program product or computer program including computer instructions stored in a computer-readable storage medium. A processor of a computer device reads the computer instructions from the computer-readable storage medium and executes the computer instructions, causing the computer device to perform the method provided in the above aspect.
[0059] An embodiment of the present application can obtain at least two collaborative operations associated with the first editing area in the target document, and decompose each collaborative operation into atomic operations. If the first collaborative operation among the at least two collaborative operations includes an atomic operation i for the first editing area and an atomic operation j for the second editing area, the atomic operation i and the atomic operation of the second collaborative operation are conflict-merged to obtain a first merge result for the first editing area, wherein the second editing area belongs to the target document, the second collaborative operation is a collaborative operation other than the first collaborative operation in the at least two collaborative operations, and i and j are both positive integers; then, based on the first merge result, a sub-atomic operation containing the operation content lost in the atomic operations corresponding to the atomic operation i and the second collaborative operation can be generated, and the atomic operation j and the sub-atomic operation are conflict-merged to obtain a second merge result for the second editing area. The second merge result at this time can be the conflict merge processing result between the above-mentioned at least two collaborative operations. It can be seen that in the processing scenario of at least two collaborative operations, each collaborative operation can be decomposed into atomic operations, and conflict merging processing can be performed between atomic operations. If there is lost operation content during the execution of the atomic operation, the final conflict merging processing result can be obtained by introducing a sub-atomic operation containing the operation content. The conflict processing result obtained in this way can retain the changes of at least two collaborative operations at the same time, thereby improving the accuracy of the collaborative operation processing results. BRIEF DESCRIPTION OF THE DRAWINGS
[0060] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without any creative work.
[0061] Figure 1 This is a schematic diagram of a network architecture provided by an embodiment of the present application;
[0062] Figure 2 This is a schematic diagram of a collaborative conflict handling scenario provided by an embodiment of the present application;
[0063] Figure 3 This is a flowchart of a collaborative operation processing method provided in an embodiment of the present application;
[0064] Figure 4 This is a processing flow chart of a collaborative operation provided by an embodiment of the present application;
[0065] Figure 5 This is a flowchart of a collaborative operation processing method provided in an embodiment of the present application;
[0066] Figure 6 This is a schematic diagram of a cut-and-move scenario in a target document provided by an embodiment of the present application;
[0067] Figure 7 This is a diagram of an editing and display interface of a target document provided in an embodiment of the present application;
[0068] Figure 8 This is a schematic diagram of the structure of a collaborative operation processing device provided in an embodiment of the present application;
[0069] Figure 9 This is a schematic diagram of the structure of a collaborative operation processing device provided in an embodiment of the present application;
[0070] Figure 10 It is a structural diagram of a computer device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0071] The following will be combined with the drawings in the embodiments of this application to clearly and completely describe the technical solutions in the embodiments of this application. Obviously, the embodiments described are only part of the embodiments of this application, not all of the embodiments. Based on the embodiments in this application, all other embodiments obtained by ordinary technicians in this field without making creative efforts are within the scope of protection of this application.
[0072] One or more embodiments of the present application involve the following concepts:
[0073] Online documents: Online documents can refer to text (for example, files in formats such as .doc, .docx, .txt, .rtf), spreadsheets (for example, files in formats such as .xls, .xlsx), presentations (for example, files in formats such as .ppt, .pptx), and other files that allow users to view and edit them through browser web pages (web), applications (APP), mini-programs, etc. Online documents can support real-time collaborative operations among multiple people.
[0074] Collaboration: Data interaction between different objects, including but not limited to: users, terminals, device components, and device modules.
[0075] Conflict resolution: When multiple objects edit the same version of a document, the document can handle these edits, preserving as many of the changes as possible. The same document can correspond to different versions, and conflict resolution is required for all edits within the same version.
[0076] Collaborative conflict resolution: Through the operational transformation (OT) algorithm, conflicts are resolved on the operation data generated by multiple objects to simultaneously preserve the modification operations of multiple objects on the same online document. Collaborative conflict resolution here can also be called conflict merging. The OT algorithm can refer to a class of technologies rather than a specific algorithm. Its idea is to split the edit into operations and transform these operations. This transformation is the core of the OT algorithm, and the core of the transformation lies in how to split the edits of multiple objects. The specific operations into which the edits should be split and the transformation algorithm can be customized. Therefore, the OT algorithm can flexibly support various collaborative editing applications, such as non-text editing (for example, editing of images and tables).
[0077] See Figure 1 , Figure 1 This is a schematic diagram of a network architecture provided by an embodiment of the present application. Figure 1 As shown, the network architecture may include a server 10d and a user terminal cluster, and the user terminal cluster may include one or more user terminals, and the number of user terminals is not limited here. Figure 1 As shown, the user terminal cluster may specifically include user terminal 10a, user terminal 10b and user terminal 10c, etc. Among them, server 10d may be an independent physical server, or a server cluster or distributed system composed of multiple physical servers, or a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, CDN, and big data and artificial intelligence platforms. User terminal 10a, user terminal 10b and user terminal 10c, etc. may include: smart phones, tablet computers, laptops, PDAs, mobile internet devices (MIDs) and desktop computers, etc., which have online document editing functions. As Figure 1 As shown, the user terminal 10a, the user terminal 10b and the user terminal 10c can respectively establish a network connection with the server 10d, so that each user terminal can exchange data with the server 10d through the network connection.
[0078] like Figure 1As shown, each user terminal in the user terminal cluster can view and edit online documents through the web page. When multiple user terminals in the user terminal cluster edit the same version of the online document, the server 10d corresponding to the online document can obtain the edits of the multiple user terminals and perform collaborative conflict resolution on the edit data of the multiple user terminals to preserve the modifications of the multiple user terminals to the same online document. For example, if Figure 1 If user terminals 10a, 10b, and 10c edit the same version of the online document, server 10d, after receiving the editing data from user terminals 10a, 10b, and 10c, needs to perform collaborative conflict processing on the editing data from user terminals 10a, 10b, and 10c, and output the results of the collaborative conflict processing in the areas edited by multiple user terminals.
[0079] The following describes in detail how to handle collaborative conflicts between multiple user terminals, taking the online document as a table file as an example. Figure 2 , Figure 2 This is a schematic diagram of a collaborative conflict handling scenario provided by an embodiment of the present application; Figure 2 The user terminal 20a and the user terminal 20b shown can both be the above-mentioned Figure 1 Any user terminal in the user terminal cluster shown, user terminal 20a may be a terminal device used by user A, and user terminal 20b may be a terminal device used by user B.
[0080] like Figure 2 As shown, the current display content of the first column of the first row of the spreadsheet file (which can be called cell A1 in the spreadsheet file) is "a1a1". If user A and user B operate based on the same version of the spreadsheet file, the operations of user A and user B need to be collaboratively handled. When user A's editing operation on the table file is: writing the content "a1z9" in the first column of the first row (cell A1), the user terminal 20a can monitor user A's editing operation on the table file, modify the content "a1a1" in the first column of the first row to "a1z9", and upload user A's editing operation to the server 10d (which may also refer to the background server of the online document); similarly, when user B's editing operation on the table file is: cutting the content in the first column of the first row (cell A1) to the first column of the fifth row (cell A5), the user terminal 20b can monitor user B's editing operation on the table file, cut the content "a1a1" in the first column of the first row, write the content in the first column of the first row into the first column of the fifth row, and upload user B's editing operation to the server 10d.
[0081] Server 10d can receive the editing operation of user A submitted by user terminal 20a and the editing operation of user B submitted by user terminal 20b, and can decompose user A's editing operation into "modify the content of the first column of the first row to 'a1z9'", that is, user A's editing operation can generate one edit in user terminal 20a; similarly, user B's editing operation can be decomposed into two operations: "delete the first column of the first row" and "insert the original data of the first column of the first row into the first column of the fifth row", that is, user B's editing operation can generate two edits in user terminal 20b.
[0082] In the process of collaborative conflict handling of the editing operations of user A and user B, server 10d can perform conflict merge on user A's "modify the content of the first column of the first row to 'a1z9'" operation and user B's "delete the first column of the first row" operation, and the first merge result after the merge is completed can be expressed as: no operation; in the above conflict merge processing process, it can be found that user A's editing operation "modify the content of the first column of the first row to 'a1z9'" is lost, so a sub-atomic operation can be generated based on the lost operation content and the first merge result; then, the sub-atomic operation can be conflict merged with user B's "insert the original data of the first column of the first row into the first column of the fifth row" operation, and the second merge result after the merge is completed can be: inserting the content "a1z9" into the first column of the fifth row. Server 10d can send the second merge result to user terminal 20a and user terminal 20b. After receiving the second merge result sent by server 10d, user terminal 20a and user terminal 20b display the first merge result in the first column of row 1 (the displayed content is empty) and insert the content "a1z9" in the first column of row 5. In this embodiment of the present application, a sub-atomic operation that includes the lost operation content can be introduced to simultaneously retain the editing operations of multiple users, thereby improving the accuracy of the collaborative operation processing results.
[0083] See Figure 3 , Figure 3 It is a flow chart of a collaborative operation processing method provided by an embodiment of the present application. It can be understood that the collaborative operation processing method can be performed by a server (for example, the above Figure 1 The server 10d) in the corresponding embodiment executes; Figure 3 As shown, the collaborative operation processing method may include the following steps:
[0084] Step S101: Acquire at least two collaborative operations associated with a first editing area in a target document, decompose the at least two collaborative operations, and obtain atomic operations corresponding to the at least two collaborative operations.
[0085] Specifically, when at least two user terminals monitor a user's collaborative operation on the first editing area in a target document and submit the monitored collaborative operation to the target document's backend server (hereinafter referred to as the server), the server can obtain the collaborative operation corresponding to the at least two user terminals. The target document can be the same version of an online document of the type of text, table, presentation, etc. Each user terminal can view and edit the target document through a browser web page, application, applet, etc. The target document can include one or more editing areas, such as a presentation, a cell in a spreadsheet file, a text page, a text editing location (for example, the first line of the first page in a text file), a subtable in a spreadsheet file, etc.
[0086] When a user holding a user terminal edits a first editing area in a target document (for example, Figure 2 When the cell A1) in the corresponding embodiment performs an editing operation, the user terminal can submit the user's editing operation to the server. At this time, the server can modify the target document according to the editing operation submitted by the user terminal, and send the modified content to each user terminal, so that each user terminal can display the modified target document. When the users holding multiple user terminals all perform editing operations on the first editing area in the target document, the multiple user terminals can submit their own editing operations to the server; because the users holding multiple user terminals all edit the first editing area, there may be conflicts between the editing operations submitted by the multiple user terminals, and the server needs to perform conflict merging processing on all received editing operations to retain the operations of at least two user terminals on the target document. In the conflict merging processing scenario, the editing operations submitted by the user terminal to the server can be called collaborative operations. For example, when multiple users edit the target document at the same time, each user's editing operation on the target document can be called a collaborative operation.
[0087] It should be noted that the at least two collaborative operations received by the server may be submitted by at least two user terminals in the same manner, for example: at least two collaborative operations are submitted through a browser; or, at least two collaborative operations may be submitted by at least two user terminals in different manners, for example: among at least two user terminals, some user terminals submit through a browser, and some user terminals submit through an application, etc. For example, when user terminal 1 views and edits the target document in the application, it listens to collaborative operation 1 in the target document, and can then submit collaborative operation 1 to the server; when user terminal 2 views and edits the target document in the mini program, it listens to collaborative operation 2 in the target document, and can then submit collaborative operation 2 to the server; when user terminal 3 views and edits the target document in the browser, it listens to collaborative operation 3 in the target document, and can then submit collaborative operation 3 to the server; when user terminal 4 views and edits the target document in the application, it listens to collaborative operation 4 in the target document, and can then submit collaborative operation 4 to the server; at this time, the server can receive the collaborative operations submitted by each user terminal (including collaborative operation 1, collaborative operation 2, collaborative operation 3 and collaborative operation 4), and perform conflict merging processing on the four received collaborative operations.
[0088] Optionally, the server may set editing permissions for the target document, for example: user A has permission to edit edit area 1 in the target document, but does not have permission to edit edit area 2 in the target document; user B has permission to edit edit area 3 in the target document, but does not have permission to edit edit areas 1 and 2 in the target document. The server may obtain a set of object identifiers corresponding to the target document, and in the target document, may allocate a document control area to each object identifier in the set of object identifiers; if the server receives original collaborative operations for the first editing area uploaded by user terminals associated with M object identifiers, then the server may determine, among the original collaborative operations corresponding to the M object identifiers, the original collaborative operations corresponding to the object identifier whose document control area contains the first editing area as at least two collaborative operations, where M may be a positive integer less than or equal to the number of object identifiers contained in the set of object identifiers.
[0089] Among them, the object identifiers in the object identifier set may include but are not limited to: user account, user name, user number, user nickname, and the document control area may refer to the area in the target document where each object identifier has editing authority. For example, when object identifier 1 has editing authority over editing area 1 and editing area 2 in the target document, editing area 1 and editing area 2 can be regarded as the document control area of object identifier 1; when the server receives all original collaborative operations for the first editing area, including the original collaborative operation corresponding to object identifier 1, it is necessary to determine whether object identifier 1 has authority to edit the first editing area. If the first editing area belongs to the document control area corresponding to object identifier 1, it means that object identifier 1 has authority to edit the first editing area, and the original collaborative operation corresponding to object identifier 1 is determined as a collaborative operation; if the first editing area does not belong to the document control area corresponding to object identifier 1, it indicates that object identifier 1 does not have authority to edit the first editing area, and the original collaborative operation corresponding to object identifier 1 can be ignored.
[0090] For example, assuming that the target document is a spreadsheet file for collecting employee information, if the target document is shared with an enterprise group, the object identifier set corresponding to the target document may include all employee identifiers in the enterprise group, and the number of object identifiers contained in the object identifier set may be the number of enterprise employees in the enterprise group. In this case, M may be a positive integer less than or equal to the number of enterprise employees. For example, when the number of enterprise employees is 100, M may be a positive integer less than or equal to 100, and the number of at least two collaborative operations is less than or equal to M; the target document may include an information column for each employee in the enterprise group (the information column here may be a row of cells in the target document), and each ordinary enterprise employee has the authority to edit his or her own information column. But they do not have the authority to edit the information columns of other company employees. The cells covered by their own information columns can be considered as the document control area of ordinary company employees; each team leader has the authority to edit the information columns of all team members (including the team leader himself), and the cells covered by all team members' information columns can be considered as the document control area of the team leader in the target document; each department director has the authority to edit the information columns of all department employees (including the department director himself), and the cells covered by all department employees' information columns can be considered as the document control area of the department director in the target document; the company boss has the authority to edit the information columns of all company employees, and the cells covered by all company employees' information columns can be considered as the document control area of the company boss in the target document.
[0091] Optionally, after obtaining at least two collaborative operations for the first editing area, the server can decompose each collaborative operation to obtain the atomic operation corresponding to each collaborative operation; wherein, an atomic operation can refer to an operation that cannot be preempted by a higher-level interrupt, and an atomic operation can be one operation step or multiple operation steps, but the order of multiple operation steps cannot be disrupted, nor can it be cut and only part of them executed; an atomic operation is indivisible and will not be terminated by any other task or event before execution is completed; operations that can be completed in a single instruction can be considered "atomic operations". The server can decompose at least two collaborative operations separately to obtain one or more collaborative sub-operations corresponding to each collaborative operation, and convert the one or more collaborative sub-operations into atomic operations according to the execution time sequence of the one or more collaborative sub-operations in the collaborative operation to which they belong; a collaborative operation can be decomposed into one atomic operation, or it can be decomposed into multiple atomic operations.
[0092] Optionally, the server can obtain the editing area sets triggered by at least two collaborative operations in the target document, and count the number of editing areas corresponding to the at least two editing area sets; the collaborative operation to which the editing area set with the number of editing areas greater than the quantity threshold belongs is determined as the first collaborative operation; wherein, the editing area set corresponding to the first collaborative operation includes the first editing area and the second editing area, and the above-mentioned quantity threshold can be set according to actual needs, such as the quantity threshold can be set to 2. It can be understood that a collaborative operation can be broken down into one or more atomic operations, and one atomic operation can trigger an editing area. When the number of editing areas triggered by one or more atomic operations corresponding to a collaborative operation is greater than or equal to 2 (the quantity threshold in this case can be set to 2), the collaborative operation can be determined as the first collaborative operation; the collaborative operation other than the first collaborative operation in the at least two collaborative operations is determined as the second collaborative operation; in other words, the second collaborative operation can refer to a collaborative operation that contains only one editing area in the editing area set. As Figure 2 As shown, the editing area triggered by user A's editing operation "modify the content of the first column of the first row to 'a1z9'" is the first column of the first row (cell A1), and the editing operation of user A can be considered as the second collaborative operation; the editing area triggered by user B's editing operation "cut the content in the first column of the first row (cell A1) to the first column of the fifth row (cell A5)" includes the first column of the first row (cell A1) and the first column of the fifth row (cell A5), and the editing operation of user B can be considered as the first collaborative operation.
[0093] It should be noted that embodiments of the present application can use an OT algorithm to handle collaborative conflicts between at least two collaborative operations. During the collaborative conflict handling process, each collaborative operation must first be converted into an atomic operation, and then collaborative conflicts can be handled based on the atomic operations. The OT algorithm can be bilateral OT or unilateral OT.
[0094] Step S102: If the first collaborative operation among at least two collaborative operations includes an atomic operation i for the first editing area and an atomic operation j for the second editing area, the atomic operation i and the atomic operation corresponding to the second collaborative operation are merged in conflict to obtain a first merge result for the first editing area; the second editing area belongs to the target document, and the second collaborative operation is a collaborative operation other than the first collaborative operation among the at least two collaborative operations, and i and j are both positive integers less than or equal to the number of atomic operations corresponding to the first collaborative operation.
[0095] Specifically, if the first collaborative operation of at least two collaborative operations includes an atomic operation i for the first editing region and an atomic operation i for the second editing region (for example, the above Figure 2 For the atomic operation j of cell A5 in the corresponding embodiment, the server can perform conflict merging on the atomic operation i and the atomic operation corresponding to the second collaborative operation to obtain a first merge result for the first editing area. The first merge result can refer to the merge result obtained by using the OT algorithm, at least two collaborative operations can be divided into a first collaborative operation and a second collaborative operation, and the first collaborative operation and the second collaborative operation can both be decomposed into one or more atomic operations; the above-mentioned atomic operation i and atomic operation j are different atomic operations in the first collaborative operation, and all atomic operations for the same editing area need to be conflict merged.
[0096] Among them, when the number of at least two collaborative operations is 2, and the at least two collaborative operations include a first collaborative operation and a second collaborative operation, the atomic operations for the first editing area contained in the first collaborative operation (the number of atomic operations for the first editing area here can be one or more) and the atomic operations corresponding to the second collaborative operation (the number of atomic operations for the first editing area here can be one or more) can be conflict merged to obtain a first merge result for the first editing area.
[0097] Optionally, when the number of first collaborative operations is multiple and the number of second collaborative operations is one, all atomic operations for the first editing area in the multiple first collaborative operations can be conflict-merged with all atomic operations corresponding to one second collaborative operation, and a first merge result for the first editing area can be obtained. Of course, when the number of first collaborative operations is one and the number of second collaborative operations is multiple, or the number of first collaborative operations and second collaborative operations are both multiple, the atomic operations for the first editing area contained in the first collaborative operation and the second collaborative operation can also be conflict-merged to obtain a first merge result for the first editing area. The atomic operations included in a collaborative operation may include but are not limited to: merging cells, adding borders, removing borders, changing fonts (for example, setting the font to italics), changing font color (for example, setting the font to red), deleting, inserting, copying, cutting, and cell function calculations (for example, averaging, summing, etc.).
[0098] Step S103, based on the first merge result, obtain the operation content lost in the atomic operation i and the atomic operation corresponding to the second collaborative operation, generate a sub-atomic operation containing the operation content, perform conflicting merge on the atomic operation j and the sub-atomic operation, and obtain a second merge result for the second editing area.
[0099] Specifically, the server can determine the operation data other than the first merge result in the atomic operations corresponding to the atomic operation i and the second collaborative operation as the lost operation content, and then generate a sub-atomic operation based on the lost operation content. Subsequently, the atomic operation j and the sub-atomic operation can be conflict merged to obtain a second merge result for the second editing area. At this time, the second merge result can be considered as the collaborative operation processing result between the above-mentioned at least two collaborative operations. The server can return the first merge result and the second merge result to at least two user terminals, so that each user terminal can display the first merge result and the second merge result in the target document.
[0100] Optionally, in a cut and move scenario, the first collaborative operation may include a cut and move operation, the atomic operation i may include a content deletion operation, the atomic operation j may include a content insertion operation, and the atomic operation corresponding to the second collaborative operation may include a content modification operation; if the cut and move operation in at least two collaborative operations includes a content deletion operation for the first editing area and a content insertion operation for the second editing area, the server may perform a conflict merge on the content deletion operation and the content modification operation, and obtain a first merge result for the first editing area as an empty operation; based on the empty operation, it can be determined that the operation content lost in the content deletion operation and the content modification operation is a content modification operation, and the content modification operation and the empty operation can be determined as sub-atomic operations, and then the atomic operation j and the sub-atomic operation can be conflict merged to obtain a second merge result for the second editing area.
[0101] See Figure 4 , Figure 4 This is a processing flow chart of a collaborative operation provided by an embodiment of the present application. Figure 4 As shown, assuming that the number of at least two collaborative operations is 2, and these two collaborative operations can include a cut-and-move operation by user A and a content modification operation by user B, the cut-and-move operation by user A can be expressed as: cutting edit area 1 (the first edit area mentioned above) to edit area 2 (the second edit area mentioned above), and the content modification operation by user B can be expressed as: modifying edit area 1. After receiving the cut-and-move operation and the content modification operation, the server can differentiate the cut-and-move operation into two fine-grained atomic operations, namely atomic operation i and atomic operation j. The atomic operation i can be expressed as: deleting edit area 1, and the atomic operation j can be expressed as: inserting the original data of edit area 1 at the location of edit area 2; the atomic operation t corresponding to the content modification operation of user B can be expressed as: modifying edit area 1.
[0102] When the server performs conflict merging on the cut operation and the content modification operation, it first performs conflict merging on the atomic operation i and the atomic operation t to obtain the first merge result for the editing area 1. The first merge result at this time is empty (it can be understood that the data at the location of the editing area 1 is empty); at the same time, the server can know that the modified data of the atomic operation t was lost when the atomic operation i and the atomic operation t were conflict merging, so the modified data of the atomic operation can be appended to the first merge result to obtain a sub-atomic operation. At this time, the sub-atomic operation can refer to the product of the conflict merging of the above-mentioned atomic operation i and the atomic operation t. Then, the atomic operation j and the sub-atomic operation can be conflict merged to obtain the conflict merging result for the editing area 2, that is, the second merge result. The second merge result can also refer to the collaborative conflict processing result between the cut and move operation of user A and the content modification operation of user B.
[0103] Optionally, in a content copy scenario, the first collaborative operation may include a selective copy operation, the atomic operation i may include a content selection operation, the atomic operation j may include a content insertion operation, and the atomic operation corresponding to the second collaborative operation may include a content modification operation; if the selective copy operation in at least two collaborative operations includes a content selection operation for the first editing area and a content insertion operation for the second editing area, the server may perform a conflict merge on the content selection operation and the content modification operation, and obtain a first merge result for the first editing area as the modified content; based on the modified content, it can be determined that the operation content lost in the content selection operation and the content modification operation is the original operation content, and the original operation content is determined as a sub-atomic operation, and then the atomic operation j and the sub-atomic operation may be conflict merged to obtain a second merge result for the second editing area; wherein the original operation content refers to the original content in the first editing area triggered by the content selection operation, and the selective copy operation may include but is not limited to: copying the content in the first editing area, and copying the first editing area containing all formats.
[0104] For example, if user A and user B operate on the target document at the same time, user A's collaborative operation on the first editing area is "copy content 1 in the first editing area to the second editing area", and user B's collaborative operation on the first editing area is "write content 2 in the first editing area", then user A's collaborative operation may include atomic operation i ("select content 1 in the first editing area") and atomic operation j ("insert the original content 1 in the first editing area into the second editing area"), and the atomic operation corresponding to user B's collaborative operation is "modify the first editing area to content 2"; after conflict merging processing of user A's collaborative operation and user B's collaborative operation, the first merge result obtained can be: modify the content in the first editing area to content 2, and the second merge result can be: write content 2 in the second editing area.
[0105] Optionally, the server can obtain a target object identifier with a binding relationship with the first editing area; if the second collaborative operations corresponding to N object identifiers received include a second collaborative operation corresponding to the target object identifier, the expected operation result associated with the target object identifier is obtained; N is a positive integer less than the number of at least two collaborative operations, such as N can take the value of 1, 2,...; if the second merged result and the expected operation result are inconsistent, the expected operation result and the second merged result are both returned to the user terminal associated with the target object identifier, so that the user terminal associated with the target object identifier can display the expected operation result and the second merged result in the target document. For example, if the first editing area can be used to input the personal basic information of user A, then the target object identifier that has a binding relationship with the first editing area can be the object identifier of user A (for example, user A's account, name, nickname, number, etc.). If the server simultaneously receives second collaborative operations corresponding to N object identifiers, and the N second collaborative operations include the second collaborative operation corresponding to user A, then the modification result of the second collaborative operation corresponding to user A can be determined as the expected operation result of the first editing area; when the second merged result obtained by the server after performing collaborative conflict processing on the first collaborative operation and the N second collaborative operations is inconsistent with the expected operation result of user A, the second merged result and the expected operation result can be returned together to the user terminal used by user A. At this time, the user terminal used by user A can display the expected operation result and the second merged result in the target document.
[0106] In an embodiment of the present application, for a conflict merging processing scenario of at least two collaborative operations, each collaborative operation can be decomposed into atomic operations, and conflict merging processing can be performed between the atomic operations. If there is lost operation content during the execution of the atomic operation, a sub-atomic operation containing the operation content can be introduced to obtain the final conflict merging processing result. The conflict processing result obtained in this way can simultaneously retain the changes of at least two collaborative operations, so that the output result of the collaborative conflict processing meets the user's expectations, thereby improving the accuracy of the collaborative operation processing results.
[0107] See Figure 5 , Figure 5 It is a flow chart of a collaborative operation processing method provided by an embodiment of the present application. It can be understood that the collaborative operation processing method can be performed by the target user terminal (for example, the above Figure 1 The user terminal 10a) in the corresponding embodiment executes; Figure 5 As shown, the collaborative operation processing method may include the following steps:
[0108] Step S201, sending the first collaborative operation for the target document to the server, so that the server decomposes the first collaborative operation and the second collaborative operation into atomic operations; the first collaborative operation and the second collaborative operation are sent by different user terminals, the first collaborative operation includes atomic operation i for the first editing area, and atomic operation j for the second editing area, the second collaborative operation includes atomic operation for the first editing area, and the first editing area and the second editing area both belong to the target document.
[0109] Specifically, when a user terminal accesses a target document through a web page, it can send an access request to the server of the target document. After receiving the access request, the server can verify the access rights of the user terminal. If the user terminal has the authority to access the target document, the target document can be returned to the user terminal so that the user terminal can display the target document returned by the server; if the user terminal does not have the authority to access the target document, the server can return an access failure prompt message to the user terminal.
[0110] The user can view and edit the target document displayed by the user terminal. When the user triggers two or more operations in the target document, and the two or more operations are for at least two editing areas in the target document, the user terminal can upload the two or more operations triggered by the user as the first collaborative operation to the server. At this time, the user terminal can be called the target user terminal. Of course, for any user terminal that can access the target document, when an editing operation in the target document is monitored, the monitored editing operation can be uploaded to the server. In other words, in addition to receiving the first collaborative operation uploaded by the target user terminal, the server can also receive the second collaborative operation uploaded by the remaining user terminals, and then the first collaborative operation and the second collaborative operation can be decomposed into atomic operations; wherein the number of the first collaborative operations can be one or more, and the number of the second collaborative operations can also be one or more, and each collaborative operation can be an editing operation generated by the user terminal when the user performs an edit trigger operation on the target document; in addition, the server's collaborative conflict handling process between the first collaborative operation and the second collaborative operation can be referred to above. Figure 3The description of steps S101 to S103 of the corresponding embodiment will not be repeated here. After obtaining the collaborative conflict processing result between the first collaborative operation and the second collaborative operation, the server can return the collaborative conflict processing result to the target client. The collaborative conflict processing result here may include a first merge processing result associated with the first editing area, and a second merge processing result associated with the second editing area; wherein, the first merge result may refer to the result obtained by the server after performing conflict merge processing on the atomic operation i and the atomic operation corresponding to the second collaborative operation, and the second merge result may refer to the result obtained by the server after performing conflict merge processing on the atomic operation j and the sub-atomic operation. The sub-atomic operation may include the operation content lost in the conflict merge processing of the atomic operation i and the atomic operation corresponding to the second collaborative operation, wherein i and j are both positive integers less than or equal to the number of atomic operations corresponding to the first collaborative operation.
[0111] Step S202, receive the first merge result and the second merge result returned by the server, and display the first merge result associated with the first editing area and the second merge result associated with the second editing area in the target document; the first merge result refers to the conflicting merge result between the atomic operation i and the atomic operation corresponding to the second collaborative operation, and the second merge result refers to the conflicting merge result between the atomic operation j and the sub-atomic operation, and the sub-atomic operation is determined by the operation content lost in the atomic operation corresponding to the atomic operation i and the second collaborative operation.
[0112] Specifically, the target user terminal may receive the first merged result and the second merged result returned by the server, and may insert the first merged result into the first editing area of the target document and the second merged result into the second editing area, as described above. Figure 2 The first merge result (data is empty) can be inserted into cell A1 as shown, and the second merge result "a1z9" can be inserted into cell A5.
[0113] Optionally, in a cut-and-move scenario, the first collaborative operation may include a cut-and-move operation; after the target user terminal receives the first merge result and the second merge result returned by the server, it may insert the first merge result into the first editing area of the target document; display a first candidate content list associated with the second editing area, the first candidate content list including the second merge result and the original operation content triggered by the first collaborative operation; when the user selects the original operation content in the first candidate content list, the target user terminal may respond to the selection operation for the first candidate content list and insert the original operation content triggered by the selection operation into the second editing area. In other words, in a cut-and-move scenario, if the content the user actually wants to cut is the original data in the first editing area, the user may choose to insert the original operation content into the second editing area; if the content the user actually wants to cut is the data in the first editing area, the user may choose to insert the second merge result into the second editing area. Users can select the data to be inserted according to actual needs, which can ensure the accuracy of the inserted content.
[0114] See Figure 6 , Figure 6 This is a schematic diagram of a cut-and-move scenario in a target document provided by an embodiment of the present application. Figure 6 As shown, based on the above Figure 2 In the corresponding embodiment, after receiving the first merge result (empty data) and the second merge result ("a1z9") returned by server 10d, user terminal 20b (i.e., the target user terminal) can display cell A1 in the target document as empty and display a first candidate content list 20c. This first candidate content list 20c can include the second merge result and the original content "a1a1" of cell A1. When the user selects the original content "a1a1," "a1a1" can be inserted into cell A5 and displayed. When the user selects the second merge result "a1z9," "a1z9" can be inserted into cell A5 and displayed.
[0115] Optionally, in a content copy scenario, the first collaborative operation includes a selective copy operation; after the target user terminal receives the first merged result and the second merged result returned by the server, it can insert the first merged result into the first editing area of the target document; display a second candidate content list associated with the second editing area, the second candidate content list including the first merged result and the second merged result; when the user selects the first merged result in the first candidate content list, the target user terminal can respond to a selection operation on the second candidate content list and insert the first merged result triggered by the selection operation into the second editing area. The first merged result here is the content after the first editing area is modified based on the second collaborative operation, and the second merged result is the original content of the first editing area that has not been modified. The presentation method in the target document can be as described above. Figure 6 As shown, no further details will be given here.
[0116] Optionally, when it is detected that the first editing area is operated, the editing object identifier for the first editing area is obtained and displayed in the associated area corresponding to the first editing area. The editing object identifier may refer to the object identifier of the object currently editing the first editing area. Figure 7 , Figure 7 This is a diagram of an editing and display interface of a target document provided by an embodiment of the present application. Figure 7 As shown, when the target user terminal monitors that users Xiao A, Xiao B and Xiao C edit cell A5 at the same time, Xiao A, Xiao B and Xiao C may be displayed in area 30b of the target document.
[0117] In an embodiment of the present application, for a conflict merge processing scenario of at least two collaborative operations, each collaborative operation can be decomposed into atomic operations, and conflict merge processing can be performed between the atomic operations. If there is lost operation content during the execution of the atomic operation, a sub-atomic operation containing the operation content can be introduced to obtain the final conflict merge processing result. The conflict processing result obtained in this way can simultaneously retain the changes of at least two collaborative operations, so that the output result of the collaborative conflict processing meets the user's expectations, thereby improving the accuracy of the collaborative operation processing results; optional insertion content can be provided to the user in the target document, so that the user can select the correct insertion content according to the user's intention, thereby ensuring the accuracy of the insertion content and enhancing the processing efficiency of the target document.
[0118] See Figure 8 , Figure 8 FIG is a structural diagram of a collaborative operation processing device provided in an embodiment of the present application. It can be understood that the collaborative operation processing device can be applied in a server, such as Figure 1 The server 10d in the corresponding embodiment; Figure 8 As shown, the collaborative operation processing device 1 may include: a disassembly module 11, a first conflict merging module 12, and a second conflict merging module 13;
[0119] A decomposition module 11 is configured to obtain at least two collaborative operations associated with the first editing area in the target document, decompose the at least two collaborative operations, and obtain atomic operations corresponding to the at least two collaborative operations.
[0120] A first conflict merging module 12 is configured to conflict-merge the atomic operation i with the atomic operation corresponding to the second collaborative operation to obtain a first merge result for the first editing area if a first collaborative operation among at least two collaborative operations includes an atomic operation i for a first editing area and an atomic operation j for a second editing area; the second editing area belongs to a target document, the second collaborative operation is a collaborative operation other than the first collaborative operation among the at least two collaborative operations, and i and j are both positive integers less than or equal to the number of atomic operations corresponding to the first collaborative operation;
[0121] The second conflict merge module 13 is used to obtain the lost operation content in the atomic operation i and the atomic operation corresponding to the second collaborative operation based on the first merge result, generate a sub-atomic operation containing the operation content, and perform conflict merge on the atomic operation j and the sub-atomic operation to obtain a second merge result for the second editing area.
[0122] The specific functional implementation of the disassembly module 11, the first conflict merging module 12, and the second conflict merging module 13 can be found in the above Figure 3 Steps S101 to S103 in the corresponding embodiment will not be described in detail here.
[0123] In one or more embodiments, the disassembly module 11 may include: an area allocation unit 111 , an operation authority determination unit 112 , an operation disassembly unit 113 , and an operation conversion unit 114 ;
[0124] The region allocation unit 111 is configured to obtain a set of object identifiers corresponding to a target document, and allocate a document control region to each object identifier in the set of object identifiers in the target document;
[0125] The operation authority determination unit 112 is used to determine the original collaborative operations for the first editing area uploaded by user terminals associated with M object identifiers as at least two collaborative operations among the original collaborative operations corresponding to the M object identifiers; M is a positive integer less than or equal to the number of object identifiers contained in the object identifier set.
[0126] An operation decomposition unit 113 is configured to decompose at least two coordinated operations to obtain one or more coordinated sub-operations corresponding to each coordinated operation;
[0127] The operation conversion unit 114 is configured to convert one or more coordinated sub-operations into atomic operations according to the execution time sequence of the one or more coordinated sub-operations in the coordinated operation to which they belong.
[0128] The specific functional implementation of the area allocation unit 111, the operation authority determination unit 112, the operation decomposition unit 113, and the operation conversion unit 114 can be found in the above Figure 3 Step S101 in the corresponding embodiment will not be described in detail here.
[0129] In one or more embodiments, the collaborative operation processing device 1 may include: an editing area quantity counting module 14, a first collaborative operation determining module 15;
[0130] The editing area number counting module 14 is used to obtain the editing area sets triggered by at least two collaborative operations in the target document, and count the number of editing areas corresponding to the at least two editing area sets;
[0131] The first collaborative operation determining module 15 is configured to determine a collaborative operation to which an editing area set having a number of editing areas greater than a threshold value belongs as a first collaborative operation; the editing area set corresponding to the first collaborative operation includes the first editing area and the second editing area.
[0132] The specific functional implementation of the editing area number counting module 14 and the first collaborative operation determination module 15 can be found in the above Figure 3 Step S101 in the corresponding embodiment will not be described in detail here.
[0133] In one or more embodiments, the first collaborative operation includes a cut-move operation, the atomic operation i includes a content deletion operation, the atomic operation j includes a content insertion operation, and the atomic operation corresponding to the second collaborative operation includes a content modification operation;
[0134] The first conflict merging module 12 is specifically configured to:
[0135] If the cut-move operation in the at least two coordinated operations includes a content deletion operation for the first editing area and a content insertion operation for the second editing area, then performing a conflict merge on the content deletion operation and the content modification operation, resulting in a first merge result for the first editing area being a null operation;
[0136] The second conflict merging module 13 is used to:
[0137] According to the empty operation, the operation contents lost in the content deletion operation and the content modification operation are determined to be content modification operations, and the content modification operation and the empty operation are determined to be subatomic operations.
[0138] In one or more embodiments, the first collaborative operation includes a selective copy operation, the atomic operation i includes a content selection operation, the atomic operation j includes a content insertion operation, and the atomic operation corresponding to the second collaborative operation includes a content modification operation;
[0139] The first conflict merging module 12 is specifically configured to:
[0140] If the selective copy operation in the at least two coordinated operations includes a content selection operation on the first editing region and a content insertion operation on the second editing region, performing conflict merge on the content selection operation and the content modification operation, obtaining a first merge result for the first editing region as the modified content;
[0141] The second conflict merging module 13 is used to:
[0142] According to the modified content, the operation content lost in the content selection operation and the content modification operation is determined to be the original operation content, and the original operation content is determined to be a subatomic operation; the original operation content refers to the original content in the first editing area triggered by the content selection operation.
[0143] The specific functional implementation of the first conflict merging module 12 and the second conflict merging module 13 can be found in the above Figure 3 Step S103 in the corresponding embodiment will not be described in detail here.
[0144] In one or more embodiments, the collaborative operation processing device 1 may include: an identification acquisition module 16 , an expected result acquisition module 17 , and a result return module 18 ;
[0145] An identification acquisition module 16 is used to acquire the identification of the target object with which the first editing area has a binding relationship;
[0146] The expected result acquisition module 17 is configured to acquire the expected operation result associated with the target object identifier if the second collaborative operations corresponding to the N object identifiers received include the second collaborative operation corresponding to the target object identifier; N is a positive integer less than the number of at least two collaborative operations;
[0147] The result returning module 18 is used to return both the expected operation result and the second merged result to the user terminal associated with the target object identifier if the second merged result is inconsistent with the expected operation result, so that the user terminal associated with the target object identifier can display the expected operation result and the second merged result in the target document.
[0148] The specific functional implementation of the identification acquisition module 16, the expected result acquisition module 17, and the result return module 18 can be found in the above Figure 3 Step S103 in the corresponding embodiment will not be described in detail here.
[0149] In an embodiment of the present application, for a conflict merging processing scenario of at least two collaborative operations, each collaborative operation can be decomposed into atomic operations, and conflict merging processing can be performed between the atomic operations. If there is lost operation content during the execution of the atomic operation, a sub-atomic operation containing the operation content can be introduced to obtain the final conflict merging processing result. The conflict processing result obtained in this way can simultaneously retain the changes of at least two collaborative operations, so that the output result of the collaborative conflict processing meets the user's expectations, thereby improving the accuracy of the collaborative operation processing results.
[0150] See Figure 9 , Figure 9 FIG is a schematic diagram of the structure of a collaborative operation processing device provided in an embodiment of the present application. It can be understood that the collaborative operation processing device can be applied in a user terminal, such as Figure 1 The user terminal 10a in the corresponding embodiment; Figure 9 As shown, the collaborative operation processing device 2 may include: an operation sending module 21, a merge result receiving module 22;
[0151] An operation sending module 21 is configured to send a first collaborative operation for a target document to a server, so that the server decomposes the first collaborative operation and the second collaborative operation into atomic operations; the first collaborative operation and the second collaborative operation are sent by different user terminals, the first collaborative operation includes an atomic operation i for a first editing area, and an atomic operation j for a second editing area, the second collaborative operation includes an atomic operation for the first editing area, the first editing area and the second editing area both belong to the target document, and i and j are both positive integers less than or equal to the number of atomic operations corresponding to the first collaborative operation;
[0152] The merge result receiving module 22 is used to receive the first merge result and the second merge result returned by the server, and display the first merge result associated with the first editing area and the second merge result associated with the second editing area in the target document; the first merge result refers to the conflicting merge result between the atomic operation i and the atomic operation corresponding to the second collaborative operation, and the second merge result refers to the conflicting merge result between the atomic operation j and the sub-atomic operation, and the sub-atomic operation is determined by the operation content lost in the atomic operation corresponding to the atomic operation i and the second collaborative operation.
[0153] The specific functional implementation of the operation sending module 21 and the merge result receiving module 22 can be found in the above Figure 5 Steps S201 and S202 in the corresponding embodiment will not be described in detail here.
[0154] In one or more embodiments, the merge result receiving module 22 is specifically configured to:
[0155] The first merged result and the second merged result returned by the server are received, the first merged result is inserted into the first editing area of the target document, and the second merged result is inserted into the second editing area.
[0156] In one or more embodiments, the first coordinated operation includes a shear move operation;
[0157] The merge result receiving module 22 includes: a first content inserting unit 221, a first list displaying unit 222, and a second content inserting unit 223;
[0158] A first content inserting unit 221 is configured to receive the first merged result and the second merged result returned by the server, and insert the first merged result into the first editing area of the target document;
[0159] A first list display unit 222 is configured to display a first candidate content list associated with the second editing area; the first candidate content list includes the second merge result and the original operation content triggered by the first collaborative operation;
[0160] The second content inserting unit 223 is configured to respond to a selection operation on the first candidate content list and insert the original operation content triggered by the selection operation into the second editing area.
[0161] In one or more embodiments, the first coordinated operation includes a selective copy operation;
[0162] The merge result receiving module 22 includes: a first content inserting unit 221, a second list displaying unit 224, and a third content inserting unit 225;
[0163] A first content inserting unit 221 is configured to receive the first merged result and the second merged result returned by the server, and insert the first merged result into the first editing area of the target document;
[0164] A second list display unit 224 is configured to display a second candidate content list associated with the second editing area; the second candidate content list includes the first merged result and the second merged result;
[0165] The third content inserting unit 225 is configured to, in response to a selection operation on the second candidate content list, insert the first merged result triggered by the selection operation into the second editing area.
[0166] The specific functional implementation of the first content inserting unit 221, the first list displaying unit 222, the second content inserting unit 223, the second list displaying unit 224, and the third content inserting unit 225 can be found in the above Figure 5 Step S202 in the corresponding embodiment will not be described in detail here.
[0167] In one or more embodiments, the collaborative operation processing device 2 may further include: an object identification display module 23;
[0168] The object identification display module 23 is configured to obtain the editing object identification for the first editing area when detecting that the first editing area is operated, and display the editing object identification in the associated area corresponding to the first editing area.
[0169] The specific function implementation of the object identification display module 23 can be found in the above Figure 5 Step S202 in the corresponding embodiment will not be described in detail here.
[0170] In an embodiment of the present application, for a conflict merge processing scenario of at least two collaborative operations, each collaborative operation can be decomposed into atomic operations, and conflict merge processing can be performed between the atomic operations. If there is lost operation content during the execution of the atomic operation, a sub-atomic operation containing the operation content can be introduced to obtain the final conflict merge processing result. The conflict processing result obtained in this way can simultaneously retain the changes of at least two collaborative operations, so that the output result of the collaborative conflict processing meets the user's expectations, thereby improving the accuracy of the collaborative operation processing results; optional insertion content can be provided to the user in the target document, so that the user can select the correct insertion content according to the user's intention, thereby ensuring the accuracy of the insertion content and enhancing the processing efficiency of the target document.
[0171] See Figure 10 , Figure 10 This is a schematic diagram of the structure of a computer device provided in an embodiment of the present application. Figure 10 As shown, the computer device 1000 may be a user terminal, for example, Figure 1 The user terminal 10a in the corresponding embodiment may also be a server, for example, Figure 1The server 10d in the corresponding embodiment will not be limited here. For ease of understanding, this application takes the computer device as an example of a user terminal. The computer device 1000 may include: a processor 1001, a network interface 1004 and a memory 1005. In addition, the computer device 1000 may also include: a user interface 1003, and at least one communication bus 1002. Among them, the communication bus 1002 is used to realize the connection and communication between these components. Among them, the user interface 1003 may also include a standard wired interface and a wireless interface. The network interface 1004 may optionally include a standard wired interface and a wireless interface (such as a WI-FI interface). The memory 1004 may be a high-speed RAM memory, or it may be a non-volatile memory (non-volatile memory), such as at least one disk storage. The memory 1005 may optionally also be at least one storage device located away from the aforementioned processor 1001. As Figure 10 As shown, the memory 1005 as a computer-readable storage medium may include an operating system, a network communication module, a user interface module, and a device control application.
[0172] The network interface 1004 in the computer device 1000 can also provide a network communication function, and the optional user interface 1003 can also include a display screen and a keyboard. Figure 10 In the computer device 1000 shown, the network interface 1004 can provide network communication functions; the user interface 1003 is mainly used to provide an input interface for the user; and the processor 1001 can be used to call the device control application stored in the memory 1005.
[0173] In one or more embodiments, the computer device 1000 may be Figure 1 The user terminal 10a shown; the computer device can be implemented by the processor 1001:
[0174] A first collaborative operation for a target document is sent to a server, so that the server decomposes the first collaborative operation and the second collaborative operation into atomic operations; the first collaborative operation and the second collaborative operation are sent by different user terminals, the first collaborative operation includes an atomic operation i for a first editing area, and an atomic operation j for a second editing area, the second collaborative operation includes an atomic operation for the first editing area, the first editing area and the second editing area both belong to the target document, and i and j are both positive integers less than or equal to the number of atomic operations corresponding to the first collaborative operation;
[0175] Receive the first merge result and the second merge result returned by the server, and display the first merge result associated with the first editing area and the second merge result associated with the second editing area in the target document; the first merge result refers to the conflicting merge result between the atomic operation i and the atomic operation corresponding to the second collaborative operation, and the second merge result refers to the conflicting merge result between the atomic operation j and the sub-atomic operation, and the sub-atomic operation is determined by the operation content lost in the atomic operation corresponding to the atomic operation i and the second collaborative operation.
[0176] In one or more embodiments, the computer device 1000 may be Figure 1 In the server 10d shown, the user interface 1003 included in the computer device may not include a display screen (Display) and a keyboard (Keyboard); the computer device can be implemented by the processor 1001:
[0177] Acquire at least two collaborative operations associated with the first editing area in the target document, and decompose the at least two collaborative operations to obtain atomic operations corresponding to the at least two collaborative operations;
[0178] If a first collaborative operation among at least two collaborative operations includes an atomic operation i for a first editing region and an atomic operation j for a second editing region, then conflicting merges are performed on the atomic operation i and the atomic operations corresponding to the second collaborative operation to obtain a first merge result for the first editing region; the second editing region belongs to the target document, the second collaborative operation is a collaborative operation among the at least two collaborative operations other than the first collaborative operation, and both i and j are positive integers less than or equal to the number of atomic operations corresponding to the first collaborative operation;
[0179] According to the first merge result, obtain the lost operation content in the atomic operation i and the atomic operation corresponding to the second collaborative operation, generate a sub-atomic operation containing the operation content, perform conflicting merge on the atomic operation j and the sub-atomic operation, and obtain the second merge result for the second editing area.
[0180] It should be understood that the computer device 1000 described in the embodiment of the present application can execute the above Figure 3 and Figure 5 The description of the collaborative operation processing method in any corresponding embodiment can also be performed as described above. Figure 7 The description of the collaborative operation processing device 1 in the corresponding embodiment will not be repeated here. In addition, the description of the beneficial effects of adopting the same method will not be repeated here either.
[0181] In addition, it should be pointed out that the embodiment of the present application also provides a computer-readable storage medium, and the computer-readable storage medium stores a computer program executed by the aforementioned collaborative operation processing device 1, and the computer program includes program instructions. When the processor executes the program instructions, it can execute the aforementioned Figure 3 and Figure 5 The description of the collaborative operation processing method in any corresponding embodiment will not be repeated here. In addition, the description of the beneficial effects of adopting the same method will not be repeated. For technical details not disclosed in the computer-readable storage medium embodiment involved in this application, please refer to the description of the method embodiment of this application. As an example, the program instructions can be deployed on a computing device for execution, or on multiple computing devices located in one location, or on multiple computing devices distributed in multiple locations and interconnected by a communication network. Multiple computing devices distributed in multiple locations and interconnected by a communication network can constitute a blockchain system.
[0182] In addition, it should be noted that: the embodiment of the present application also provides a computer program product or computer program, which may include computer instructions, which may be stored in a computer-readable storage medium. The processor of the computer device reads the computer instructions from the computer-readable storage medium, and the processor may execute the computer instructions, so that the computer device performs the above Figure 3 and Figure 5 The description of the collaborative operation processing method in any corresponding embodiment will not be repeated here. In addition, the description of the beneficial effects of using the same method will not be repeated here. For technical details not disclosed in the computer program product or computer program embodiments involved in this application, please refer to the description of the method embodiments of this application.
[0183] It should be noted that for the aforementioned various method embodiments, for the sake of simplicity, they are all expressed as a series of action combinations, but those skilled in the art should be aware that this application is not limited by the order of the actions described, because according to this application, some steps can be performed in other orders or simultaneously. Secondly, those skilled in the art should also be aware that the embodiments described in the specification are all preferred embodiments, and the actions and modules involved are not necessarily required by this application.
[0184] The steps in the method of the embodiment of the present application can be adjusted in order, combined and deleted according to actual needs.
[0185] The modules in the device of the embodiment of the present application can be merged, divided and deleted according to actual needs.
[0186] Those skilled in the art will appreciate that all or part of the processes in the above-described method embodiments can be implemented by instructing related hardware through a computer program. The computer program can be stored in a computer-readable storage medium. When executed, the program can include the processes in the above-described method embodiments. The storage medium can be a magnetic disk, an optical disk, a read-only memory (ROM), or a random access memory (RAM).
[0187] The above disclosure is only a preferred embodiment of the present application, and certainly cannot be used to limit the scope of rights of the present application. Therefore, equivalent changes made according to the claims of the present application are still within the scope covered by the present application.
Claims
1. A collaborative operation processing method, characterized in that: include: Acquire at least two collaborative operations associated with the target document, and decompose the at least two collaborative operations to obtain atomic operations corresponding to the at least two collaborative operations; Among the atomic operations corresponding to the at least two coordinated operations, conflict merging is performed on the atomic operations belonging to the same editing region to obtain the operation content lost in the atomic operations corresponding to the same editing region, and generating a sub-atomic operation including the operation content; Conflict merging is performed on the subatomic operation and the remaining atomic operations in the at least two collaborative operations to obtain a conflict merging processing result between the at least two collaborative operations.
2. The method according to claim 1, characterized in that The at least two collaborative operations are submitted by at least two user terminals through a target mode, and the target mode includes one or more modes of a browser, an application, and a mini-program.
3. The method according to claim 1, characterized in that The acquiring of at least two collaborative operations associated with the target document includes: Obtaining an object identification set corresponding to the target document, and in the target document, assigning a document control area to each object identification in the object identification set; If original collaborative operations for the first editing area are received from user terminals associated with M object identifiers, the original collaborative operations corresponding to the object identifier of the first editing area in the document control area are determined as the at least two collaborative operations; the first editing area belongs to the target document, and M is a positive integer less than or equal to the number of object identifiers contained in the object identifier set.
4. The method according to claim 1, wherein The disassembling of the at least two coordinated operations to obtain atomic operations corresponding to the at least two coordinated operations includes: Decomposing the at least two coordinated operations respectively to obtain one or more coordinated sub-operations corresponding to each coordinated operation; The one or more collaborative sub-operations are converted into atomic operations according to the execution time sequence of the one or more collaborative sub-operations in the corresponding collaborative operation.
5. The method according to claim 1, wherein The same editing area includes a first editing area; The conflict merging of atomic operations belonging to the same editing region among the atomic operations corresponding to the at least two collaborative operations, obtaining operation contents lost in the atomic operations corresponding to the same editing region, and generating a sub-atomic operation containing the operation contents, includes: If a first collaborative operation among the at least two collaborative operations includes an atomic operation i for the first editing area, and the atomic operation corresponding to a second collaborative operation among the at least two collaborative operations is associated with the first editing area, conflict merging is performed on the atomic operation i and the atomic operation corresponding to the second collaborative operation to obtain a first merge result for the first editing area; i is a positive integer less than or equal to the number of atomic operations corresponding to the first collaborative operation; According to the first merging result, the operation content lost in the atomic operation corresponding to the atomic operation i and the second collaborative operation is obtained, and a sub-atomic operation containing the operation content is generated.
6. The method according to claim 5, characterized in that The first collaborative operation further includes an atomic operation j for a second editing area, the second editing area belongs to the target document, and j is a positive integer less than or equal to the number of atomic operations corresponding to the first collaborative operation; The conflict merging of the subatomic operation and the remaining atomic operations in the at least two coordinated operations to obtain a conflict merging processing result between the at least two coordinated operations includes: The subatomic operation and the atomic operation j are conflict-merged to obtain a second merge result for the second editing area, and the second merge result is determined as a conflict-merge processing result between the at least two collaborative operations.
7. The method according to claim 5, characterized in that Also includes: Obtaining edit area sets triggered by the at least two collaborative operations in the target document, and counting the number of edit areas corresponding to the at least two edit area sets; The collaborative operation to which the editing area set having a number greater than a number threshold belongs is determined as the first collaborative operation, and the collaborative operation other than the first collaborative operation among the at least two collaborative operations is determined as the second collaborative operation.
8. The method according to claim 5, characterized in that The first collaborative operation includes a cut-move operation, the atomic operation i includes a content deletion operation, and the atomic operation corresponding to the second collaborative operation includes a content modification operation; If a first collaborative operation among the at least two collaborative operations includes an atomic operation i for the first editing region, and an atomic operation corresponding to a second collaborative operation among the at least two collaborative operations is associated with the first editing region, conflict-merging the atomic operation i and the atomic operation corresponding to the second collaborative operation to obtain a first merge result for the first editing region includes: If the cut-move operation in the at least two coordinated operations includes the content deletion operation for the first editing region, and the content modification operation corresponding to the second coordinated operation in the at least two coordinated operations is associated with the first editing region, performing a conflict merge on the content deletion operation and the content modification operation, obtaining a first merge result for the first editing region that is a null operation; Then, according to the first merging result, the operation content lost in the atomic operation corresponding to the atomic operation i and the second collaborative operation is obtained, and a sub-atomic operation containing the operation content is generated, including: According to the empty operation, the operation contents lost in the content deletion operation and the content modification operation are determined to be the content modification operation, and the content modification operation and the empty operation are determined to be the subatomic operations.
9. The method according to claim 5, characterized in that The first collaborative operation includes a selective copy operation, the atomic operation i includes a content selection operation, and the atomic operation corresponding to the second collaborative operation includes a content modification operation; If a first collaborative operation among the at least two collaborative operations includes an atomic operation i for the first editing region, and an atomic operation corresponding to a second collaborative operation among the at least two collaborative operations is associated with the first editing region, conflict-merging the atomic operation i and the atomic operation corresponding to the second collaborative operation to obtain a first merge result for the first editing region includes: If the selective copy operation in the at least two collaborative operations includes the content selection operation for the first editing region, and the content modification operation corresponding to the second collaborative operation in the at least two collaborative operations is associated with the first editing region, performing a conflict merge on the content selection operation and the content modification operation to obtain a first merge result for the first editing region as the modified content; Then, according to the first merging result, the operation content lost in the atomic operation corresponding to the atomic operation i and the second collaborative operation is obtained, and a sub-atomic operation containing the operation content is generated, including: Based on the modified content, the operation content lost in the content selection operation and the content modification operation is determined to be the original operation content, and the original operation content is determined to be the subatomic operation; the original operation content refers to the original content in the first editing area triggered by the content selection operation.
10. The method according to claim 6, characterized in that Also includes: Obtaining a target object identifier having a binding relationship with the first editing area; If the second collaborative operations corresponding to the N object identifiers received include the second collaborative operation corresponding to the target object identifier, obtaining the expected operation result associated with the target object identifier; N is a positive integer less than the number of the at least two coordinated operations; If the conflict merge processing result is inconsistent with the expected operation result, both the expected operation result and the conflict merge processing result are returned to the user terminal associated with the target object identifier, so that the user terminal associated with the target object identifier can display the expected operation result and the conflict merge processing result in the target document.
11. The method according to claim 3, characterized in that Also includes: Among the M object identifiers, the object identifier corresponding to the at least two collaborative operations is determined as the editing object identifier, and the editing object identifier is returned to the user terminal associated with the M object identifiers, so that the user terminal associated with the M object identifiers displays the editing object identifier in the associated area of the first editing area.
12. A collaborative operation processing device, characterized in that: include: a disassembly module, configured to obtain at least two collaborative operations associated with a target document, and disassemble the at least two collaborative operations to obtain atomic operations corresponding to the at least two collaborative operations; A first conflict merging module is configured to perform conflict merging on the atomic operations belonging to the same editing region among the atomic operations corresponding to the at least two coordinated operations, obtain the operation content lost in the atomic operations corresponding to the same editing region, and generate a sub-atomic operation containing the operation content; The second conflict merging module is used to perform conflict merging on the sub-atomic operation and the remaining atomic operations in the at least two collaborative operations to obtain a conflict merging processing result between the at least two collaborative operations.
13. A computer device, characterized in that: including memory and processor; The memory is connected to the processor, the memory is used to store a computer program, and the processor is used to call the computer program so that the computer device executes the method according to any one of claims 1 to 11.
14. A computer-readable storage medium, characterized in that The computer-readable storage medium stores a computer program, which is suitable for being loaded and executed by a processor, so that a computer device having the processor executes the method according to any one of claims 1 to 11.
15. A computer program product, characterized in that The method comprises a computer program / instruction, which implements the method according to any one of claims 1 to 11 when the computer program / instruction is executed by a processor.
Citation Information
Patent Citations
Cooperative user equipment control method, user equipment and communication system
CN104506650A
Method and apparatus for achieving data consistency
CN105095254A