Collaborative editing of mixed documents

By decomposing a hybrid document into multiple collaborative document instances and adopting corresponding collaborative document models, the problem of existing technologies being unable to handle hybrid documents with different collaborative document models is solved, thus achieving efficient collaborative editing.

CN115270731BActive Publication Date: 2026-01-27DINGTALK (CHINA) INFORMATION TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202210771349.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-06-30
Publication Date
2026-01-27
Estimated Expiration
2042-06-30

AI Technical Summary

Technical Problem

Existing collaborative editing technologies cannot effectively handle mixed documents containing different collaborative document models, leading to editing conflicts and inefficiency.

Method used

The hybrid document is decomposed into multiple collaborative document instances, each of which adopts a corresponding collaborative document model. Collaborative editing is achieved through extended atomic operations, ensuring that different types of document content objects can be edited independently.

Benefits of technology

It enables efficient collaborative editing of mixed documents, avoids editing conflicts, and improves work efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115270731B_ABST
    Figure CN115270731B_ABST
Patent Text Reader

Abstract

The one or more embodiments of the specification provide a method for collaborative editing of a mixed document, applied to a client in a document collaborative editing system for collaborative editing of the mixed document, the mixed document including document content objects corresponding to multiple types of document editors; the method includes: creating a corresponding collaborative document instance for each document content object in the mixed document, the collaborative document instance participating in collaborative editing through a collaborative document model; determining a corresponding original atomic operation of a collaborative editing instruction for the collaborative document instance in the mixed document; expanding the original atomic operation into an expanded atomic operation for the mixed document; and sending the expanded atomic operation to a server of the document collaborative editing system for sharing to other clients for collaborative editing of the mixed document.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This specification relates to one or more embodiments in the field of collaborative editing, and more particularly to a collaborative editing method and apparatus for hybrid documents. Background Technology

[0002] In real-world scenarios, multiple people often need to edit the same document. Traditional methods involve repeatedly transferring and updating the document among users, but this can lead to problems such as lost documents or incorrect versions, resulting in low efficiency and failing to meet demands. To address these shortcomings, collaborative document editing has been proposed.

[0003] In related technologies, collaborative document editing enables multiple users to simultaneously edit the same single document containing only one collaborative document model through a collaborative scheduling algorithm. Summary of the Invention

[0004] In view of the above, one or more embodiments of this specification provide a collaborative editing method and apparatus for hybrid documents, which can realize collaborative editing of hybrid documents containing document content corresponding to multiple different editors.

[0005] To achieve the above objectives, one or more embodiments of this specification provide the following technical solutions:

[0006] According to a first aspect of one or more embodiments of this specification, a collaborative editing method for hybrid documents is proposed, applied to a client in a collaborative document editing system for collaboratively editing the hybrid document, wherein the hybrid document contains document content objects corresponding to multiple types of document editors; the method includes:

[0007] For each document content object in the hybrid document, a corresponding collaborative document instance is created, and the collaborative document instance participates in collaborative editing through a collaborative document model; wherein, for multiple document content objects using different types of document editors, the collaborative document models used by the corresponding collaborative document instances are also different;

[0008] Determine the original atomic operations corresponding to the collaborative editing instructions for the collaborative document instances in the hybrid document;

[0009] The original atomic operation is extended to an extended atomic operation for the hybrid document, wherein the extended atomic operation includes an instance identifier of the collaborative document instance that generated the original atomic operation, type information of the collaborative document model used by the collaborative document instance, and the original atomic operation.

[0010] The extended atomic operation is sent to the server of the document collaborative editing system to be shared with other clients that are collaboratively editing the hybrid document.

[0011] According to a second aspect of one or more embodiments of this specification, a method for collaborative editing of hybrid documents is proposed, applied to a client in a document collaborative editing system for collaboratively editing the hybrid document, wherein the hybrid document contains document content objects corresponding to multiple types of document editors; a corresponding collaborative document instance is created for each document content object in the hybrid document, and the collaborative document instance participates in collaborative editing through a collaborative document model; wherein, for multiple document content objects using different types of document editors, the collaborative document model used by the corresponding collaborative document instance is also different; the method includes:

[0012] The system receives extended atomic operations for the hybrid document sent by the server of the document collaborative editing system. The extended atomic operations are derived from the original atomic operations corresponding to the collaborative editing instructions for the collaborative document instances in the hybrid document, and include the instance identifier of the collaborative document instance that generated the original atomic operations, the type information of the collaborative document model used by the collaborative document instance, and the original atomic operations.

[0013] Based on the type information of the collaborative document model contained in the extended atomic operation, the extended atomic operation is parsed;

[0014] The parsed atomic operations are sent to the collaborative document instance corresponding to the instance identifier contained in the extended atomic operations for processing.

[0015] According to a third aspect of one or more embodiments of this specification, a collaborative editing apparatus for hybrid documents is provided, applied to a client in a collaborative document editing system for collaboratively editing the hybrid document, wherein the hybrid document contains document content objects corresponding to multiple types of document editors; the apparatus includes:

[0016] The instance creation unit is used to create a corresponding collaborative document instance for each document content object in the hybrid document. The collaborative document instance participates in collaborative editing through a collaborative document model. For multiple document content objects using different types of document editors, the collaborative document models used by the corresponding collaborative document instances are also different.

[0017] The original atomic operation determination unit is used to determine the original atomic operation corresponding to the collaborative editing instruction for the collaborative document instance in the hybrid document;

[0018] The original atomic operation extension unit is used to extend the original atomic operation into an extended atomic operation for the hybrid document. The extended atomic operation includes an instance identifier of the collaborative document instance that generates the original atomic operation, type information of the collaborative document model adopted by the collaborative document instance, and the original atomic operation.

[0019] An extended atomic operation sending unit is used to send the extended atomic operation to the server of the document collaborative editing system for sharing with other clients that are collaboratively editing the hybrid document.

[0020] According to a fourth aspect of one or more embodiments of this specification, a collaborative editing device for hybrid documents is provided, applied to a client in a collaborative document editing system for collaboratively editing the hybrid document, wherein the hybrid document contains document content objects corresponding to multiple types of document editors; a corresponding collaborative document instance is created for each document content object in the hybrid document, and the collaborative document instance participates in collaborative editing through a collaborative document model; wherein, for multiple document content objects using different types of document editors, the collaborative document model used by the corresponding collaborative document instance is also different; the device includes:

[0021] An extended atomic operation receiving unit is used to receive extended atomic operations for the hybrid document sent by the server of the document collaborative editing system; the extended atomic operation is obtained by extending the original atomic operation corresponding to the collaborative editing instruction for the collaborative document instance in the hybrid document, and includes the instance identifier of the collaborative document instance that generated the original atomic operation, the type information of the collaborative document model adopted by the collaborative document instance, and the original atomic operation.

[0022] An extended atomic operation parsing unit is used to parse the extended atomic operation based on the type information of the collaborative document model contained in the extended atomic operation;

[0023] An atomic operation sending unit is used to send the parsed atomic operation to the collaborative document instance corresponding to the instance identifier contained in the extended atomic operation for processing.

[0024] According to a fifth aspect of one or more embodiments of this specification, an electronic device is provided, comprising:

[0025] processor;

[0026] Memory used to store processor-executable instructions;

[0027] The processor implements the method as described in the first or second aspect by running the executable instructions.

[0028] According to a sixth aspect of one or more embodiments of this specification, a computer-readable storage medium is provided that stores computer instructions thereon, which, when executed by a processor, implement the steps of the method as described in the first or second aspect.

[0029] As can be seen from the above technical solutions, in one or more embodiments of this specification, a client in a document collaborative editing system that performs collaborative editing of a hybrid document creates multiple separate collaborative document instances of the hybrid document, simulating a hybrid collaborative document model that supports multiple collaborative document models. This allows the hybrid document to adapt to collaborative editing scenarios. The protocol editing instructions initiated by the local user for the hybrid document are identified as original atomic operations for the collaborative document instances in the hybrid document, and these original atomic operations are extended into extended atomic operations. This allows the collaborative document instances corresponding to each original atomic operation to be distinguished and their collaborative document models to be specified. The extended atomic operations are then sent to the server in the document collaborative editing system for sharing with other clients performing collaborative editing of the hybrid document. This allows other clients to accurately distribute the corresponding atomic operations to each collaborative document instance based on the received extended atomic operations, thereby completing the collaborative editing instructions initiated by the local user and realizing collaborative editing of the hybrid document. Attached Figure Description

[0030] Figure 1 This is an exemplary embodiment of a document collaborative editing system that supports collaborative editing of mixed documents.

[0031] Figure 2 This is a flowchart illustrating an exemplary embodiment of a method for collaborative editing of a mixed document in a client application of a document collaborative editing system.

[0032] Figure 3 This is a schematic diagram of the structure of a client for collaborative editing of mixed documents, provided as an exemplary embodiment.

[0033] Figure 4 This is a flowchart illustrating an exemplary embodiment of a method for collaborative editing of a mixed document in a client application of a document collaborative editing system.

[0034] Figure 5 This is a schematic diagram of the structure of a device provided in an exemplary embodiment.

[0035] Figure 6 This is a block diagram of a hybrid document collaborative editing device provided in an exemplary embodiment, which is applied to a client in a document collaborative editing system for collaborative editing of hybrid documents.

[0036] Figure 7 This is a block diagram of a hybrid document collaborative editing device provided in an exemplary embodiment, which is applied to a client in a document collaborative editing system for collaborative editing of hybrid documents. Detailed Implementation

[0037] Exemplary embodiments will now be described in detail, examples of which are illustrated in the accompanying drawings. When the following description relates to the drawings, unless otherwise indicated, the same numerals in different drawings denote the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with one or more embodiments of this specification. Rather, they are merely examples of apparatuses and methods consistent with some aspects of one or more embodiments of this specification as detailed in the appended claims.

[0038] It should be noted that the steps of the corresponding methods are not necessarily performed in the order shown and described in this specification in other embodiments. In some other embodiments, the methods may include more or fewer steps than described in this specification. Furthermore, a single step described in this specification may be broken down into multiple steps in other embodiments; and multiple steps described in this specification may be combined into a single step in other embodiments.

[0039] Existing collaborative document editing technologies can enable two or more people to simultaneously edit a single document containing only one collaborative document model. The editing operations of both parties do not interfere with each other and can automatically resolve conflicts. However, because different document types use different collaborative editing models, for example, the atomic operations of a text editor are the addition, deletion, and modification of text and paragraphs, while the atomic operations of a table editor are the editing of cells and tables, and the collaborative editing model can only correspond to one type of collaborative document, existing collaborative editing technologies cannot perform collaborative editing of mixed documents containing content corresponding to different collaborative editing models.

[0040] Therefore, to solve this problem, this specification proposes a collaborative editing scheme for hybrid documents, which enables collaborative editing of hybrid documents and meets the needs of the Internet of Things.

[0041] To further illustrate one or more embodiments of this specification, the following embodiments are provided:

[0042] Figure 1 This is a schematic diagram of the architecture of a document collaborative editing system that supports collaborative editing of mixed documents, provided as an exemplary embodiment. Figure 1 As shown, it may include terminal device 11, terminal device 12, terminal device 13 and server 14.

[0043] Terminal devices 11, 12, and 13 are a type of electronic device that users can use. However, the electronic devices used by users are not limited to these; for example, they may include mobile phones, tablets, laptops, PDAs (Personal Digital Assistants), wearable devices (such as smart glasses, smartwatches, etc.), etc. This specification does not limit this. During operation, terminal devices 11, 12, and 13 run a document collaborative editing client program, configuring them as clients for the document collaborative application. This client program can implement a partitioning function to divide a mixed document containing document content corresponding to multiple different document editors into several collaborative document instances, allowing the client to isolate the mixed document into multiple collaborative document instances corresponding to different collaborative document models based on this partitioning function. The client program can also implement an extension function to extend the original atomic operations on collaborative document instances in the mixed document into extended atomic operations on the mixed document, and a parsing function to parse the extended atomic operations on the mixed document into atomic operations on collaborative document instances in the mixed document, enabling the client to achieve collaborative editing of the mixed document based on these extension and parsing functions.

[0044] Server 14 can be a physical server containing a single host, or it can be a virtual server hosted in a host cluster. A server-side program for collaborative document editing runs on server 14, configuring it as the server for collaborative document editing. This server-side program can work with the aforementioned client; for example, it can receive and store extended atomic operations for mixed documents sent by the client installed on terminal device 11, so as to send these extended atomic operations to the clients installed on terminal devices 12 and 13. Alternatively, it can send stored extended atomic operations for mixed documents generated by the clients installed on terminal devices 12 and 13 to the client installed on terminal device 11, enabling all clients in the collaborative document editing system to execute collaborative editing instructions initiated by each user, thus achieving collaborative editing of mixed documents.

[0045] The interaction methods between terminal devices 11, 12, and 13 and server 14 can include various types of wired or wireless interaction, and this specification does not limit this.

[0046] Figure 2 This is a flowchart illustrating a method for collaborative editing of mixed documents in a client application within a collaborative document editing system, as provided in an exemplary embodiment. Figure 2 As shown, this method is applied to a client in a collaborative document editing system for collaborative editing of the mixed document. The method may include the following steps:

[0047] Step 202: Create a corresponding collaborative document instance for each document content object in the hybrid document. The collaborative document instance participates in collaborative editing through a collaborative document model. For multiple document content objects using different types of document editors, the collaborative document models used by the corresponding collaborative document instances are also different.

[0048] In the technical solutions of this specification, the document content can be edited using a corresponding document editor. Different types of document content use different document editors. For example, text-type document content can be edited by a text editor, table-type document content can be edited by a table editor, mind map-type document content can be edited by a mind map editor, and presentation slide-type document content can be edited by a presentation slide editor. Of course, this specification does not limit the type of document editor.

[0049] A document is called a hybrid document when it contains content corresponding to multiple types of document editors. For example, a hybrid document can simultaneously contain at least two types of document content, such as text, tables, mind maps, and presentation slides. The content in a hybrid document corresponding to the same type of document editor can be considered as a single document content object, or it can be further divided into multiple document content objects. For instance, all the text in a hybrid document can be considered as a single document content object, or each paragraph, line, or section of text divided in other ways can be considered as a separate document content object. Similarly, other types of document content, such as tables, mind maps, and presentation slides, can generate one or more document content objects.

[0050] For each document content object contained in a hybrid document, a corresponding collaborative document instance can be created, ensuring a one-to-one correspondence between document content objects and collaborative document instances. By running the included collaborative document model, each collaborative document instance can participate in collaborative editing based on the processing logic of that model, thereby enabling collaborative editing of the document content corresponding to that instance. For any given collaborative document instance, the collaborative document model it uses is related to the document content object it corresponds to: if a document content object corresponds to text-type document content, then after creating a corresponding collaborative document instance for that document content object, the collaborative document model used by that instance is used for collaborative editing of text-type document content; if a document content object corresponds to table-type document content, then after creating a corresponding collaborative document instance for that document content object, the collaborative document model used by that instance is used for collaborative editing of table-type document content; similarly, for other types of document content, such as mind maps or presentation slides, the collaborative document instances created accordingly use the collaborative document models for collaborative editing of the corresponding type of document content, which will not be elaborated further here.

[0051] As can be seen, this manual addresses the collaborative editing scenario of mixed documents, enabling the creation of corresponding collaborative document instances for different document content objects within the mixed document. This ensures that the collaborative document models used by each instance are independent of each other and do not affect one another, allowing for collaborative editing of different types of document content objects within the mixed document.

[0052] Please see Figure 3 , Figure 3 This is a schematic diagram of the structure of a client for collaborative editing of mixed documents, provided as an exemplary embodiment. Figure 3 As shown, the client for collaborative editing of hybrid documents may include a collaboration engine layer 31, a hybrid collaboration model layer 32, a collaborative document instance 33 in the hybrid document, and external storage 34, and can interact with the server 30. The collaboration engine layer 31 is used to send, receive, and process extended atomic operations. The hybrid collaboration model layer 32 is used to extend the original atomic operations generated by the collaborative document instance 33 in the hybrid document into extended atomic operations, and to parse the extended atomic operations sent by the collaboration engine layer 31 into atomic operations. The external storage 34 is used to implement persistent storage; the specific implementation will be described later and will not be elaborated here.

[0053] exist Figure 3In the collaborative document instance 33 of the hybrid document shown, each collaborative document instance may use a different collaborative document model, that is, one collaborative document model corresponds to one collaborative document instance. For example, in a text document, a table is embedded to obtain a hybrid document A. Taking the original text document as a document content object, a collaborative document instance 1 using the text collaborative document model is created. Taking the embedded table as a document content object, a collaborative document instance 2 using the table collaborative document model is created. Alternatively, multiple collaborative document instances may use the same collaborative document model, that is, one collaborative document model corresponds to multiple collaborative document instances. For example, in a text document, two tables (Table 1 and Table 2) are embedded to obtain a hybrid document B. Taking the original text document as a document content object, a collaborative document instance 1 using the text collaborative document model is created. Taking the embedded Table 1 as a document content object, a collaborative document instance 2 using the table collaborative document model is created. And taking the embedded Table 2 as a document content object, another collaborative document instance 3 using the table collaborative document model is created.

[0054] Step 204: Determine the original atomic operation corresponding to the collaborative editing instruction for the collaborative document instance in the hybrid document.

[0055] The client obtains collaborative editing commands issued by local users for mixed documents through human-computer interaction between local users. For example, the client can provide a corresponding interactive interface to local users, allowing them to input the aforementioned collaborative editing commands through this interface; of course, the above interaction process can also be completed based on other methods such as voice, and this specification does not limit this.

[0056] After creating multiple collaborative document instances for each document content object in the hybrid document, the client can locate a specific collaborative document instance to which the collaborative editing command issued by the local user for the hybrid document in the manner described above is located. The collaborative document instance then generates the original atomic operation corresponding to the collaborative editing command for the hybrid document and the collaborative editing instance in that hybrid document.

[0057] by Figure 1 Taking the architecture of the document collaborative editing system shown below as an example,

[0058] User A initiated a collaborative editing command for hybrid document B using terminal device 11: Enter "Name" in the first cell of Table 1 in hybrid document B, and change the first two characters of the text document in hybrid document B to "Collaborative Editing". Upon receiving the collaborative editing command initiated by user A, the client for collaborative editing of hybrid documents installed on terminal device 11 determines the original atomic operations corresponding to the collaborative editing command initiated by user A generated by the collaborative document instance in the hybrid document, including:

[0059] The original atomic operation a1 generated by collaborative document instance 2 in hybrid document B: insert "Name" into the first cell;

[0060] The original atomic operation a2 generated by the collaborative document instance 1 in mixed document B: deletes the first two characters and inserts "collaborative editing".

[0061] User b initiated a collaborative editing command for hybrid document B using terminal device 12: Enter "hybrid document" after the third character of the text document in hybrid document B. Upon receiving the collaborative editing command initiated by user b, the client for collaborative editing of the hybrid document, mounted on terminal device 12, determines the original atomic operations corresponding to the collaborative editing command initiated by user b, generated by the collaborative document instance in the hybrid document, including:

[0062] The primitive atomic operation b1 generated by the collaborative document instance 1 in hybrid document B: inserts "hybrid document" after the third character.

[0063] User C initiated a collaborative editing command for hybrid document B using terminal device 13: delete the first two characters of the text document in hybrid document B, and enter "gender" in the first cell of Table 2 in hybrid document B. Upon receiving the collaborative editing command initiated by user C, the client for collaborative editing of the hybrid document, mounted on terminal device 13, determines the original atomic operations corresponding to the collaborative editing command initiated by user C generated by the collaborative document instance in the hybrid document, including:

[0064] The original atomic operation c1 generated by collaborative document instance 1 in mixed document B: deletes the first two characters;

[0065] The original atomic operation c2 generated by collaborative document instance 3 in hybrid document B: insert "gender" in the first cell.

[0066] Step 206: Extend the original atomic operation to an extended atomic operation for the hybrid document. The extended atomic operation includes an instance identifier of the collaborative document instance that generated the original atomic operation, type information of the collaborative document model used by the collaborative document instance, and the original atomic operation.

[0067] In the technical solution of this specification, each original atomic operation determined in step 204 is extended by adding an instance identifier of the collaborative document instance corresponding to the original atomic operation, as well as the type information of the collaborative document model used by the collaborative document instance. This makes it possible to distinguish the collaborative document instances corresponding to each original atomic operation and specify the collaborative document model of the collaborative document instance, so as not to interfere with other collaborative document instances.

[0068] In addition, since the cooperative scheduling algorithm corresponds to only one cooperative document model, in order to complete the cooperative editing of mixed documents without modifying the cooperative scheduling algorithm, the format of the extended atomic operations obtained after extending each original atomic operation should be unified so that each extended atomic operation appears to belong to the same cooperative document model.

[0069] The instance identifier of a collaborative document instance corresponds to only one collaborative document instance and is a unique identifier for the collaborative document instance. The instance identifier can be a randomly generated string or a combination of document name and instance number. This specification does not impose any restrictions on this. The type information of the collaborative document model can indicate the collaborative document model used by the collaborative document instance. The type information can be the name of the collaborative document model or the name of the document editor corresponding to the collaborative document model. This specification does not impose any restrictions on this.

[0070] Continuing with the example above, the hybrid collaboration model layer 32 in the client installed on each terminal device extends the original atomic operations generated by each collaborative document instance in hybrid document B corresponding to the collaborative editing instructions initiated by the user, adds the instance identifier of the collaborative document instance corresponding to the original atomic operation, and the type information of the collaborative document model adopted by the collaborative document instance, to obtain the extended atomic operations for hybrid document B.

[0071] The hybrid collaboration model layer 32 in the client installed on the terminal device 11 extends the original atomic operations a1 and a2 to generate extended atomic operation a1 for hybrid document B: {instance identifier: B2; type information of collaboration document model: table collaboration document model; original atomic operation: insert “name” in the first cell}, and extended atomic operation a2 for hybrid document B: {instance identifier: B1; type information of collaboration document model: text collaboration document model; original atomic operation: delete the first two characters and insert “collaborative editing”}.

[0072] The hybrid collaboration model layer 32 in the client loaded on the terminal device 12 extends the original atomic operation b1 to produce an extended atomic operation b1 for the hybrid document B: {instance identifier: B1; type information of the collaboration document model: text collaboration document model; original atomic operation: insert "hybrid document" after the third character}.

[0073] The hybrid collaboration model layer 32 in the client loaded on the terminal device 13 extends the original atomic operations c1 and c2 to generate extended atomic operation c1 for hybrid document B: {instance identifier: B1; type information of collaboration document model: text collaboration document model; original atomic operation: delete the first two characters}, and extended atomic operation c2 for hybrid document B: {instance identifier: B3; type information of collaboration document model: table collaboration document model; original atomic operation: insert "gender" in the first cell}.

[0074] Step 208: Send the extended atomic operation to the server of the document collaborative editing system to share it with other clients that are collaboratively editing the hybrid document.

[0075] After expansion, the extended atomic operations corresponding to each original atomic operation are sent to the server in the document collaborative editing system. This allows other clients that are collaboratively editing the hybrid document to receive the extended atomic operations corresponding to the collaborative editing instructions initiated by the local user for the hybrid document through the server. They can then accurately distribute the corresponding atomic operations to each collaborative document instance based on the extended atomic operations, thereby completing the collaborative editing instructions initiated by the local user and realizing collaborative editing of the hybrid document.

[0076] It should be noted that the client can send each extended atomic operation to the server as it is generated, or it can aggregate multiple extended atomic operations generated within a preset time period into an extended atomic operation sequence and send the sequence to the server. Alternatively, the client can send the generated extended atomic operations to the server when a preset number of extended atomic operations are generated. This specification does not restrict the way the client sends extended atomic operations to the server.

[0077] Continuing with the example above, the collaboration engine layer 31 in the client installed on terminal device 11 sends the generated extended atomic operations a1, a2 to the server 14 as an extended atomic operation sequence, so that the server 14 can send the extended atomic operations generated by the local device to terminal device 12 and the client installed on terminal device 13 for collaborative editing of the mixed document B.

[0078] The collaborative engine layer 31 in the client installed on terminal device 12 sends the generated extended atomic operation b1 to server 14, so that server 14 can send the extended atomic operation generated by the local device to terminal device 11 and the client installed on terminal device 13 for collaborative editing of the hybrid document B.

[0079] The collaborative engine layer 31 in the client installed on terminal device 13 aggregates the generated extended atomic operations c1 and c2 into an extended atomic operation sequence and sends it to server 14, so that server 14 can send the extended atomic operations generated by the local device to terminal device 11 and the client installed on terminal device 12 for collaborative editing of the mixed document B.

[0080] In the above embodiments, in addition to instantiating the hybrid document to simulate a hybrid document model that supports multiple collaborative document models, making the hybrid document adaptable to collaborative editing scenarios, the original atomic operations corresponding to the collaborative editing instructions initiated by the user are also extended to extended atomic operations. This allows the collaborative document instance corresponding to each original atomic operation to be distinguished and the collaborative document model of that collaborative document instance to be specified. This enables other clients to accurately send the corresponding atomic operations to each collaborative document instance based on the received extended atomic operations, thereby completing the collaborative editing instructions initiated by the local user and realizing collaborative editing of the hybrid document.

[0081] Optionally, in the technical solution of this specification, to ensure the integrity and transitivity of the hybrid document and to distinguish the execution object, if the original hybrid document (i.e., the hybrid document that has not yet been edited by the user) has been persistently stored, after the collaborative document instance that generated the original atomic operation executes the original atomic operation, the original update data generated by the collaborative document instance and marked as related to the collaborative document instance that generated the original atomic operation can be persistently stored; specifically, the original update data can be expanded into corresponding extended update data containing the original update data and the instance identifier of the collaborative document instance that generated the original update data, and the extended update data can be persistently stored.

[0082] If the original hybrid document has not yet been persistently stored, it can be persisted before the original atomic operation is performed on the collaborative document instance of the hybrid document. Then, the original update data generated by the collaborative document instance, marked as being related to the collaborative document instance that generated the original atomic operation, can be persisted. Furthermore, the original update data can be expanded into corresponding extended update data containing the original update data and the instance identifier of the collaborative document instance that generated the original update data, and this extended update data can be persisted. Alternatively, the updated hybrid document can be persisted after the original atomic operation is performed on the collaborative document instance of the hybrid document, and the generated original update data and the instance identifier of the collaborative document instance that generated the original update data can be recorded.

[0083] The original update data generated by the collaborative document instance in the hybrid document is expanded so that the expanded update data includes the original update data and the instance identifier of the collaborative document instance that generated the original update data. This makes it easier to select a serialization or deserialization strategy based on the instance identifier to complete the persistent storage of the data.

[0084] Continuing with the example above, after each collaborative document instance in the hybrid document B on each terminal device executes the corresponding original atomic operation generated by the collaborative editing command initiated by the local user, each collaborative document instance generates original update data that specifies the specific operation and the operation object, and this original update data is persistently stored. For example, after collaborative document instance 1 in the hybrid document B on terminal device 11 executes the original atomic operation a2, collaborative document instance 1 generates original update data that specifies "modify the first two characters of collaborative document instance 1 to 'collaborative editing'", and this original update data is persistently stored; furthermore, this original update data can be expanded into corresponding extended update data that includes the original update data and the instance identifier of the collaborative document instance that generated the original update data, i.e., "modify the first two characters of collaborative document instance 1 to 'collaborative editing'-B1", and this extended update data is persistently stored.

[0085] Figure 4 This is a flowchart illustrating a method for collaborative editing of mixed documents in a client application within a collaborative document editing system, as provided in an exemplary embodiment. Figure 4 As shown, this method is applied to a client in a collaborative document editing system for collaborative editing of the hybrid document. The client is as follows: Figure 3 As shown, the method may include the following steps:

[0086] Step 402: Receive extended atomic operations for the hybrid document sent by the server of the document collaborative editing system; the extended atomic operations are derived by extending the original atomic operations corresponding to the collaborative editing instructions for the collaborative document instances in the hybrid document, and include the instance identifier of the collaborative document instance that generated the original atomic operations, the type information of the collaborative document model used by the collaborative document instance, and the original atomic operations.

[0087] In the technical solution of this specification, as described above, the hybrid document contains document content objects corresponding to multiple types of document editors; each document content object in the hybrid document creates a corresponding collaborative document instance, which participates in collaborative editing through a collaborative document model; wherein, for multiple document content objects using different types of document editors, the collaborative document models used by the corresponding collaborative document instances are also different.

[0088] For the same hybrid document, multiple users can initiate collaborative editing commands on multiple terminal devices. To enable local terminal devices to synchronize collaborative editing commands initiated by other users on the hybrid document, the client on the local terminal device can receive remote operations sent by the server in the document collaborative editing system. That is, extended atomic operations that other clients generate in response to collaborative editing commands initiated by other users on the hybrid document, including instance identifiers, type information of the collaborative document model, and original atomic operations.

[0089] exist Figure 1 In the document collaborative editing system architecture shown, the collaboration engine layer 31 in the client installed on terminal device 11 can receive remote operations generated on other terminal devices sent by the server, namely, extended atomic operations on hybrid document B generated by the clients installed on terminal devices 12 and 13; the collaboration engine layer 31 in the client installed on terminal device 12 can receive remote operations generated on other terminal devices sent by the server, namely, extended atomic operations on hybrid document B generated by the clients installed on terminal devices 11 and 13; the collaboration engine layer 31 in the client installed on terminal device 13 can receive remote operations generated on other terminal devices sent by the server, namely, extended atomic operations on hybrid document B generated by the clients installed on terminal devices 11 and 12.

[0090] Next Figure 2 The illustrated embodiment continues to illustrate this example. The client installed on the terminal device 11 can receive the following extended atomic operations sent by the server for the hybrid document B: b1: {instance identifier: B1; type information of collaborative document model: text collaborative document model; original atomic operation: insert "hybrid document" after the third character}, c1: {instance identifier: B1; type information of collaborative document model: text collaborative document model; original atomic operation: delete the first two characters}, and c2: {instance identifier: B3; type information of collaborative document model: table collaborative document model; original atomic operation: insert "gender" in the first cell}.

[0091] The client installed on terminal device 12 can receive the following extended atomic operations sent by the server for hybrid document B: a1: {instance identifier: B2; type information of collaborative document model: table collaborative document model; original atomic operation: insert “name” in the first cell}, a2: {instance identifier: B1; type information of collaborative document model: text collaborative document model; original atomic operation: delete the first two characters and insert “collaborative editing”}, c1: {instance identifier: B1; type information of collaborative document model: text collaborative document model; original atomic operation: delete the first two characters}, and c2: {instance identifier: B3; type information of collaborative document model: table collaborative document model; original atomic operation: insert “gender” in the first cell}.

[0092] The client installed on terminal device 13 can receive extended atomic operations a1 for hybrid document B sent by the server: {instance identifier: B2; type information of collaborative document model: table collaborative document model; original atomic operation: insert “name” in the first cell}, extended atomic operations a2 for hybrid document B: {instance identifier: B1; type information of collaborative document model: text collaborative document model; original atomic operation: delete the first two characters and insert “collaborative editing”}, and extended atomic operations b1 for hybrid document B: {instance identifier: B1; type information of collaborative document model: text collaborative document model; original atomic operation: insert “hybrid document” after the third character}.

[0093] Step 404: Based on the type information of the collaborative document model contained in the extended atomic operation, parse the extended atomic operation.

[0094] Step 406: Send the parsed atomic operation to the collaborative document instance corresponding to the instance identifier contained in the extended atomic operation for processing.

[0095] Extended atomic operations include instance identifiers and collaborative document model type information. This allows the client to receive extended atomic operations from the server and, for each extended atomic operation, invoke the correct algorithm based on the collaborative document model type information to parse the extended atomic operation, thereby obtaining the accurate atomic operation. Then, based on the instance identifier, the accurate atomic operation is sent to the correct collaborative document instance for processing without affecting other collaborative document instances, thus completing the data synchronization of hybrid documents and realizing collaborative editing of hybrid documents.

[0096] Optionally, in this specification, for extended atomic operations that require operation transformation or operation inversion, after receiving the extended atomic operation, the extended atomic operation can be transformed or inverted. Then, based on the type information of the collaborative document model contained in the extended atomic operation, the extended atomic operation after the operation transformation or operation inversion is parsed to obtain the atomic operation. The atomic operation is then sent to the collaborative document instance corresponding to the instance identifier, so that each client that performs collaborative editing of the hybrid document obtains a hybrid document with consistent document content after executing each atomic operation.

[0097] If two or more users initiate non-exclusive collaborative editing commands on the same collaborative document instance, each user needs to perform an operation transformation on the received remote operation (i.e., the extended original operation corresponding to the collaborative editing command initiated by the user, generated by other clients). For example, given a collaborative document instance "1246", user A uses terminal device 1 to input the character 3 after the second character, resulting in the string "12346". User B uses terminal device 2 to input the character 5 after the third character, resulting in the string "123456". When the client installed on terminal device 1 receives the remote operation triggered by user B, it performs an operation transformation on the operation, resulting in the transformed operation: inputting the character 5 after the fourth character, i.e., inputting the character 5 after the fourth character of the string "12346", resulting in the string "123456". When the client installed on terminal device 2 receives the remote operation triggered by user A, it performs an operation transformation on the operation, resulting in the transformed operation: inputting the character 3 after the second character, i.e., inputting the character 3 after the second character of the string "12456", resulting in the string "123456".

[0098] If two or more users initiate mutually exclusive collaborative editing commands on the same collaborative document instance, each user needs to inverse the received remote operation (i.e., the extended original operation corresponding to the collaborative editing command initiated by the user) by performing an operation inverse. For example, given a collaborative document instance "1246", user A uses terminal device 1 to delete the last two characters "46" to obtain the string "12", and user B uses terminal device 2 to modify the last two characters to "34" to obtain the string "1234". If user A triggers the operation first, when the client installed on terminal device 1 receives the remote operation triggered by user B, it transforms the remote operation into a null operation, performing no operation on the string, ultimately obtaining the string "12". When the client installed on terminal device 2 receives the remote operation triggered by user A, it cancels the local operation triggered by user B, obtaining the string "1246", and then executes the remote operation triggered by user A, ultimately obtaining the string "12". If user b triggers the operation first, when the client installed on terminal device 1 receives the remote operation triggered by user b, it cancels the local operation triggered by user a, obtains the string "1246", and then executes the remote operation triggered by user b, finally obtaining the string "1234". When the client installed on terminal device 2 receives the remote operation triggered by user a, it transforms the remote operation into a null operation, does not perform any operation on the string, and finally obtains the string "1234".

[0099] Continuing with the example above, suppose user a initiates a collaborative editing command first, then user b initiates a collaborative editing command, and finally user c initiates a collaborative editing command. The order in which the extended atomic operations are generated is: extended atomic operation a1, extended atomic operation a2, extended atomic operation b1, extended atomic operation c1, and extended atomic operation c2.

[0100] After receiving extended atomic operations b1, c1, and c2 from the server for hybrid document B, the collaboration engine layer 31 in the client installed on terminal device 11 performs an operation transformation on extended atomic operation b1, which is to transform it into {instance identifier: B1; type information of collaboration document model: text collaboration document model; original atomic operation: insert "hybrid document" after the fifth character}, since extended atomic operations a2 and c1 are mutually exclusive and extended atomic operations a2 are first combined with extended atomic operations c1, the operation is inverted on extended atomic operations c1, which is to transform extended atomic operations c1 into a no-operation (i.e., no operation is performed). Then, the extended atomic operations b1 after the operation expansion, c1 after the operation inversion, and c2 after the operation inversion are sent to the hybrid collaboration model layer 32 to complete the parsing of the extended atomic operations. After receiving the extended atomic operation, the hybrid collaborative model layer 32, based on the instance identifier contained in the extended atomic operation b1 and the type information of the collaborative document model, calls the algorithm of the text collaborative document model to parse the extended atomic operation b1, obtaining the atomic operation: insert "hybrid document" after the fifth character, and sends this atomic operation to the collaborative document instance 1 in hybrid document B for processing; based on the instance identifier contained in the extended atomic operation c1 after the operation is inverted and the type information of the collaborative document model, calls the algorithm of the text collaborative document model to parse the extended atomic operation c1, obtaining the atomic operation: no operation, and sends this atomic operation to the collaborative document instance 1 in hybrid document B for processing; based on the instance identifier contained in the extended atomic operation c2 and the type information of the collaborative document model, calls the algorithm of the table collaborative document model to parse the extended atomic operation c2, obtaining the atomic operation: insert "gender" in the first cell, and sends this atomic operation to the collaborative document instance 3 in hybrid document B for processing.

[0101] After receiving extended atomic operations a1, a2, c1, and c2 from the server for hybrid document B, the collaboration engine layer 31 in the client installed on terminal device 12 performs an operation transformation on extended atomic operation a2, which is to transform extended atomic operation a2 into {instance identifier: B1; type information of collaboration document model: text collaboration document model; original atomic operation: delete the first two characters and insert "collaborative editing"}, since extended atomic operation a2 and extended atomic operation c1 are mutually exclusive and extended atomic operation a2 is first combined with extended atomic operation c1, the operation inverse of extended atomic operation c1 is performed, which is to transform extended atomic operation c1 into a no-operation (i.e., no operation is performed). Then, extended atomic operation a1, the transformed extended atomic operation a2, the inverse extended atomic operation c1, and extended atomic operation c2 are sent to hybrid collaboration model layer 32 to complete the parsing of extended atomic operations. After receiving the extended atomic operation, the hybrid collaborative model layer 32, based on the instance identifier contained in the extended atomic operation a1 and the type information of the collaborative document model, calls the algorithm of the table collaborative document model to parse the extended atomic operation a1, obtaining the atomic operation: insert "Name" into the first cell, and sends this atomic operation to the collaborative document instance 2 in the hybrid document B for processing; based on the instance identifier contained in the transformed extended atomic operation a2 and the type information of the collaborative document model, it calls the algorithm of the text collaborative document model to parse the extended atomic operation a2, obtaining the atomic operation: delete the first two characters and insert "Collaborative Editing". The algorithm for the extended atomic operation c1 (after inverting the operation) is called to parse the extended atomic operation c1 based on the instance identifier and the type information of the collaborative document model. The resulting atomic operation is an empty operation, which is then sent to collaborative document instance 1 in the hybrid document B for processing. Based on the instance identifier and the type information of the collaborative document model, the algorithm for the extended atomic operation c2 is called to parse the extended atomic operation c2 based on the type information of the collaborative document model. The resulting atomic operation is an insertion of "gender" into the first cell, which is then sent to collaborative document instance 3 in the hybrid document B for processing.

[0102] The collaboration engine layer 31 in the client installed on terminal device 13 receives extended atomic operations a1, a2, and b1 sent by the server for the hybrid document B. Since extended atomic operations a2 and b1 target the same collaborative document instance and a2 is performed before b1, the extended atomic operation b1 is transformed into {instance identifier: B1; collaborative document model type information: text collaborative document model; original atomic operation: insert "hybrid document" after the fifth character}. Since extended atomic operations a2 and c1 are mutually exclusive and a2 is performed before c1, the extended atomic operation a2 is inverted into {instance identifier: B1; collaborative document model type information: text collaborative document model; original atomic operation: undo delete the first two characters, then delete the first two characters and insert "collaborative editing"} (i.e., undo the original atomic operation c1 and then execute the original atomic operation a2). The extended atomic operation a1, the inverse extended atomic operation a2, and the transformed extended atomic operation b1 are then sent to the hybrid collaborative model layer 32 to complete the parsing of the extended atomic operations. Upon receiving the extended atomic operation, the hybrid collaborative model layer 32, based on the instance identifier contained in extended atomic operation a1 and the type information of the collaborative document model, calls the algorithm of the table collaborative document model to parse extended atomic operation a1, obtaining the atomic operation: insert "Name" into the first cell, and sends this atomic operation to collaborative document instance 2 in hybrid document B for processing; based on the instance identifier contained in the inverse extended atomic operation a2 and the type information of the collaborative document model, it calls the algorithm of the text collaborative document model to parse extended atomic operation a2, obtaining the atomic operation: undo the deletion of the first two characters, then delete the first two characters and insert "Collaborative Editing"; based on the instance identifier contained in the transformed extended atomic operation b1 and the type information of the collaborative document model, it calls the algorithm of the text collaborative document model to parse extended atomic operation c1, obtaining the atomic operation: insert "Hybrid Document" after the fifth character, and sends this atomic operation to collaborative document instance 1 in hybrid document B for processing.

[0103] It should be noted that the server can send each received extended atomic operation to the client, or it can aggregate multiple received extended atomic operations within a preset time period into an extended atomic operation sequence and send the extended atomic operation sequence to the client. Alternatively, it can send the received extended atomic operations to the client when a preset number of extended atomic operations are received. This specification does not limit the way the server sends extended atomic operations to the client.

[0104] In the above embodiments, in addition to determining multiple extended atomic operations for the same collaborative document instance based on the instance identifier contained in the extended atomic operations, and then performing operation transformations or inversions on these extended atomic operations according to the order in which they were generated to ensure that each client can obtain a mixed document with consistent document content, the type information of the collaborative document model contained in the extended atomic operations (extended atomic operations after operation transformation or inversion, and unprocessed extended atomic operations) can be used to call the corresponding collaborative document model algorithm to parse the extended atomic operations, obtain accurate atomic operations, and then accurately send the parsed atomic operations to the corresponding collaborative document instance according to the instance identifier contained in the extended atomic operations, without affecting other collaborative document instances, thereby completing the data synchronization of the mixed document and realizing the collaborative editing of the mixed document.

[0105] Optionally, when the client receives multiple extended atomic operations for the hybrid document sent by the server of the document collaborative editing system, the multiple extended atomic operations that are adjacent and contain the instance identifier of the same collaborative document instance are grouped into the same group; the multiple extended atomic operations in the same group are uniformly processed using the methods described in steps 404 and 406 above, so that atomic operations are not sent to the same collaborative document instance multiple times in a row, thereby improving the efficiency of hybrid document collaborative editing.

[0106] Continuing with the example above, after the collaboration engine layer 31 in the client loaded on the terminal device 11 receives the extended atomic operation b1, extended atomic operation c1, and extended atomic operation c2, since extended atomic operations b1 and c1 are adjacent and both target the collaboration document instance 1 in the mixed document B, the extended atomic operations b1 and c1 are grouped into the same group.

[0107] After receiving extended atomic operations a1, a2, c1, and c2 from the collaborative engine layer 31 in the client loaded on terminal device 12, since extended atomic operations a2, b1, and c1 are adjacent and all target collaborative document instance 1 in hybrid document B, extended atomic operations a2, b1, and c2 are grouped into the same group.

[0108] After receiving extended atomic operations a1, a2, and b1, the collaboration engine layer 31 in the client loaded on the terminal device 13, since extended atomic operations a2 and b1 are adjacent and both target the collaboration document instance 1 in the hybrid document B, divides extended atomic operations a2 and b1 into the same group.

[0109] Optionally, in this specification, to ensure the integrity and transitivity of the hybrid document and to distinguish the execution object, if the original hybrid document (i.e., the hybrid document that has not yet been edited by the user) has been persistently stored, after the parsed atomic operation is executed on the collaborative document instance corresponding to the extended atomic operation, the original update data generated by the collaborative document instance and marked as being related to the collaborative document instance that executed the parsed atomic operation can be persistently stored; specifically, the original update data can be extended into corresponding extended update data containing the original update data and the instance identifier of the collaborative document instance that generated the original update data, and the extended update data can be persistently stored.

[0110] If the original hybrid document has not yet been persistently stored, it can be persisted before the original atomic operation is performed on the collaborative document instance of the hybrid document. Then, the original update data generated by the collaborative document instance, marked as being related to the collaborative document instance that generated the original atomic operation, can be persisted. Furthermore, the original update data can be expanded into corresponding extended update data containing the original update data and the instance identifier of the collaborative document instance that generated the original update data, and this extended update data can be persisted. Alternatively, the updated hybrid document can be persisted after the original atomic operation is performed on the collaborative document instance of the hybrid document, and the generated original update data and the instance identifier of the collaborative document instance that generated the original update data can be recorded.

[0111] Continuing with the example above, after each collaborative document instance in the hybrid document B on each terminal device executes the original atomic operation corresponding to the extended atomic operation received from other clients, each collaborative document instance generates original update data that specifies the specific operation and the object of the operation, and this original update data is persistently stored. For example, after collaborative document instance 1 in the hybrid document B on terminal device 11 executes the original atomic operation b1, collaborative document instance 1 generates original update data that specifies "insert 'hybrid document' after the fifth character of collaborative document instance 1", and this original update data is persistently stored; furthermore, this original update data can be expanded into corresponding extended update data that includes the original update data and the instance identifier of the collaborative document instance that generated the original update data, i.e., "insert 'hybrid document'-B1 after the fifth character of collaborative document instance 1", and this extended update data is persistently stored.

[0112] The original update data generated by the collaborative document instance in the hybrid document is expanded so that the expanded update data includes the original update data and the instance identifier of the collaborative document instance that generated the original update data. This makes it easier to select a serialization or deserialization strategy based on the instance identifier to complete the persistent storage of the data.

[0113] Figure 5 This is a schematic structural diagram of a device provided in an exemplary embodiment. Please refer to... Figure 5 At the hardware level, the device includes a processor 502, an internal bus 504, a network interface 506, memory 508, and non-volatile memory 510, and may also include other hardware required for its functions. One or more embodiments of this specification can be implemented in software, for example, the processor 502 reads the corresponding computer program from the non-volatile memory 510 into memory 508 and then runs it. Of course, in addition to software implementation, one or more embodiments of this specification do not exclude other implementation methods, such as logic devices or a combination of hardware and software, etc. That is to say, the execution subject of the following processing flow is not limited to each logic unit, but can also be hardware or logic devices.

[0114] Please refer to Figure 6 Collaborative editing devices for hybrid documents can be applied to, for example... Figure 5 The device shown implements the technical solution of this specification. The collaborative editing device for hybrid documents is used in a client application of a collaborative document editing system for collaboratively editing the hybrid document. The collaborative editing device for hybrid documents may include:

[0115] The instance creation unit 601 is used to create a corresponding collaborative document instance for each document content object in the hybrid document. The collaborative document instance participates in collaborative editing through a collaborative document model. For multiple document content objects using different types of document editors, the collaborative document models used by the corresponding collaborative document instances are also different.

[0116] The original atomic operation determination unit 602 is used to determine the original atomic operation corresponding to the collaborative editing instruction for the collaborative document instance in the hybrid document.

[0117] The original atomic operation extension unit 603 is used to extend the original atomic operation into an extended atomic operation for the hybrid document. The extended atomic operation includes an instance identifier of the collaborative document instance that generated the original atomic operation, type information of the collaborative document model used by the collaborative document instance, and the original atomic operation.

[0118] The extended atomic operation sending unit 604 is used to send the extended atomic operation to the server of the document collaborative editing system for sharing with other clients that are collaboratively editing the hybrid document.

[0119] Optional, also includes:

[0120] The first persistence unit 605 is used to persistently store the original update data generated by the collaborative document instance after the original atomic operation is executed.

[0121] The original update data, which is persistently stored, is tagged as being associated with the collaborative document instance that generated the original atomic operation.

[0122] Optionally, the first persistence unit 605 is specifically used for:

[0123] The original update data is expanded into corresponding expanded update data, which includes the original update data and an instance identifier of the collaborative document instance that generated the original update data;

[0124] The extended update data is persistently stored.

[0125] Please refer to Figure 7 Collaborative editing devices for hybrid documents can be applied to, for example... Figure 5 The device shown implements the technical solution of this specification. The collaborative editing device for hybrid documents is used in a client application of a collaborative document editing system for collaboratively editing the hybrid document. The collaborative editing device for hybrid documents may include:

[0126] The extended atomic operation receiving unit 701 is used to receive extended atomic operations for the hybrid document sent by the server of the document collaborative editing system; the extended atomic operation is derived from the original atomic operation corresponding to the collaborative editing instruction for the collaborative document instance in the hybrid document, and includes the instance identifier of the collaborative document instance that generated the original atomic operation, the type information of the collaborative document model adopted by the collaborative document instance, and the original atomic operation.

[0127] The extended atomic operation parsing unit 702 is used to parse the extended atomic operation based on the type information of the collaborative document model contained in the extended atomic operation.

[0128] The atomic operation sending unit 703 is used to send the parsed atomic operation to the collaborative document instance corresponding to the instance identifier contained in the extended atomic operation for processing.

[0129] Optional, also includes:

[0130] The extended atomic operation processing unit 704 is configured to perform operation transformation or operation inversion on the extended atomic operation after receiving it; the step of parsing the extended atomic operation based on the type information of the collaborative document model contained in the extended atomic operation includes:

[0131] Based on the type information of the collaborative document model contained in the extended atomic operations, the extended atomic operations after operation transformation or operation inversion are parsed.

[0132] Optional, also includes:

[0133] The extended atomic operation grouping unit 705 is used to group multiple extended atomic operations that are adjacent and contain the same instance identifier of the collaborative document instance into the same group when multiple extended atomic operations for the mixed document are sent by the server of the document collaborative editing system; and to perform unified processing on multiple extended atomic operations within the same group.

[0134] Optional, also includes:

[0135] The second persistence unit 706 is used to persistently store the original update data generated by the collaborative document instance after the parsed atomic operation is executed on the collaborative document instance corresponding to the extended atomic operation; wherein the persistently stored original update data is marked as being related to the collaborative document instance that executed the parsed atomic operation.

[0136] Optionally, the second persistence unit 706 is specifically used for:

[0137] The original update data is expanded into corresponding expanded update data, which includes the original update data and an instance identifier of the collaborative document instance that generated the original update data;

[0138] The extended update data is persistently stored.

[0139] The systems, devices, modules, or units described in the above embodiments can be implemented by computer chips or entities, or by products with certain functions. A typical implementation device is a computer, which can take the form of a personal computer, laptop computer, cellular phone, camera phone, smartphone, personal digital assistant, media player, navigation device, email sending and receiving device, game console, tablet computer, wearable device, or any combination of these devices.

[0140] In a typical configuration, a computer includes one or more processors (CPU), input / output interfaces, network interfaces, and memory.

[0141] Memory may include non-persistent storage in computer-readable media, such as random access memory (RAM) and / or non-volatile memory, such as read-only memory (ROM) or flash RAM. Memory is an example of computer-readable media.

[0142] Computer-readable media, including both permanent and non-permanent, removable and non-removable media, can store information using any method or technology. Information can be computer-readable instructions, data structures, modules of programs, or other data. Examples of computer storage media include, but are not limited to, phase-change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technologies, CD-ROM, digital versatile optical disc (DVD) or other optical storage, magnetic tape, disk storage, quantum memory, graphene-based storage media or other magnetic storage devices, or any other non-transferable medium that can be used to store information accessible by a computing device. As defined herein, computer-readable media does not include transient computer-readable media, such as modulated data signals and carrier waves.

[0143] It should also be noted that the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element.

[0144] The foregoing has described specific embodiments of this specification. Other embodiments are within the scope of the appended claims. In some cases, the actions or steps recited in the claims may be performed in a different order than that shown in the embodiments and may still achieve the desired result. Furthermore, the processes depicted in the drawings do not necessarily require the specific or sequential order shown to achieve the desired result. In some embodiments, multitasking and parallel processing are possible or may be advantageous.

[0145] The terminology used in one or more embodiments of this specification is for the purpose of describing particular embodiments only and is not intended to limit the scope of one or more embodiments of this specification. The singular forms “a,” “described,” and “the” used in one or more embodiments of this specification and in the appended claims are also intended to include the plural forms unless the context clearly indicates otherwise. It should also be understood that the term “and / or” as used herein refers to and includes any or all possible combinations of one or more associated listed items.

[0146] It should be understood that although the terms first, second, third, etc., may be used to describe various information in one or more embodiments of this specification, such information should not be limited to these terms. These terms are only used to distinguish information of the same type from one another. For example, first information may also be referred to as second information without departing from the scope of one or more embodiments of this specification, and similarly, second information may also be referred to as first information. Depending on the context, the word "if" as used herein may be interpreted as "when," "in response to a determination," or "when," or "in the event of a determination."

[0147] The above description is merely a preferred embodiment of one or more embodiments of this specification and is not intended to limit the scope of one or more embodiments of this specification. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of one or more embodiments of this specification should be included within the protection scope of one or more embodiments of this specification.

Claims

1. A collaborative editing method for hybrid documents, characterized in that, A client application used in a collaborative document editing system for collaboratively editing a hybrid document, wherein the hybrid document contains multiple types of document content objects, and different types of document content objects are edited using different document editors; the method includes: For each document content object in the hybrid document, a corresponding collaborative document instance is created to obtain multiple collaborative document instances. Different types of document content objects correspond to different collaborative document instances, and the collaborative document instances participate in collaborative editing through a collaborative document model. For multiple document content objects using different types of document editors, the collaborative document models used by the corresponding collaborative document instances are also different. Determine the original atomic operations corresponding to the collaborative editing instructions for the collaborative document instances in the hybrid document; The original atomic operation is extended to an extended atomic operation for the hybrid document, wherein the extended atomic operation includes an instance identifier of the collaborative document instance that generated the original atomic operation, type information of the collaborative document model used by the collaborative document instance, and the original atomic operation. The extended atomic operation is sent to the server of the document collaborative editing system to be shared with other clients that are collaboratively editing the hybrid document.

2. The method according to claim 1, characterized in that, The method further includes: After the original atomic operation is executed by the collaborative document instance that generated the original atomic operation, the original update data generated by the collaborative document instance is persisted. The original update data, which is persistently stored, is tagged as being associated with the collaborative document instance that generated the original atomic operation.

3. The method according to claim 2, characterized in that, The persistence of the hybrid document includes: The original update data is expanded into corresponding expanded update data, which includes the original update data and an instance identifier of the collaborative document instance that generated the original update data; The extended update data is persistently stored.

4. A collaborative editing method for hybrid documents, characterized in that, A client application for collaborative editing of a hybrid document in a collaborative document editing system, wherein the hybrid document contains multiple types of document content objects, and different types of document content objects are edited using different document editors; each document content object in the hybrid document creates a corresponding collaborative document instance, wherein different types of document content objects correspond to different collaborative document instances, and the collaborative document instances participate in collaborative editing through a collaborative document model; wherein, for multiple document content objects using different types of document editors, the corresponding collaborative document instances also use different collaborative document models; the method includes: The system receives extended atomic operations for the hybrid document sent by the server of the document collaborative editing system. The extended atomic operations are derived from the original atomic operations corresponding to the collaborative editing instructions for the collaborative document instances in the hybrid document, and include the instance identifier of the collaborative document instance that generated the original atomic operations, the type information of the collaborative document model used by the collaborative document instance, and the original atomic operations. Based on the type information of the collaborative document model contained in the extended atomic operation, the extended atomic operation is parsed; The parsed atomic operations are sent to the collaborative document instance corresponding to the instance identifier contained in the extended atomic operations for processing.

5. The method according to claim 4, characterized in that, The method further includes: after receiving the extended atomic operation, performing an operation transformation or an operation inversion on the extended atomic operation; The parsing of the extended atomic operations based on the type information of the collaborative document model contained in the extended atomic operations includes: Based on the type information of the collaborative document model contained in the extended atomic operations, the extended atomic operations after operation transformation or operation inversion are parsed.

6. The method according to claim 4, characterized in that, The method further includes: When multiple extended atomic operations for the hybrid document are received from the server of the document collaborative editing system, multiple extended atomic operations that are adjacent and contain the instance identifier of the same collaborative document instance are grouped into the same group. A unified approach is used to handle multiple extended atomic operations within the same group.

7. The method according to claim 4, characterized in that, The method further includes: After the parsed atomic operation is executed on the collaborative document instance corresponding to the extended atomic operation, the original update data generated by the collaborative document instance is persistently stored. The original updated data, which is persistently stored, is tagged as being associated with a collaborative document instance that performs the atomic operations obtained from the parsing.

8. The method according to claim 7, characterized in that, The persistence of the original update data generated by the collaborative document instance includes: The original update data is expanded into corresponding expanded update data, which includes the original update data and an instance identifier of the collaborative document instance that generated the original update data; The extended update data is persistently stored.

9. A collaborative editing device for hybrid documents, characterized in that, A client application for collaborative editing of a hybrid document in a collaborative document editing system, wherein the hybrid document contains multiple types of document content objects, and different types of document content objects are edited using different document editors; the device includes: The instance creation unit is used to create a corresponding collaborative document instance for each document content object in the hybrid document, resulting in multiple collaborative document instances. Different types of document content objects correspond to different collaborative document instances, and the collaborative document instances participate in collaborative editing through a collaborative document model. For multiple document content objects using different types of document editors, the collaborative document models used by the corresponding collaborative document instances are also different. The original atomic operation determination unit is used to determine the original atomic operation corresponding to the collaborative editing instruction for the collaborative document instance in the hybrid document; The original atomic operation extension unit is used to extend the original atomic operation into an extended atomic operation for the hybrid document. The extended atomic operation includes an instance identifier of the collaborative document instance that generates the original atomic operation, type information of the collaborative document model adopted by the collaborative document instance, and the original atomic operation. An extended atomic operation sending unit is used to send the extended atomic operation to the server of the document collaborative editing system for sharing with other clients that are collaboratively editing the hybrid document.

10. A collaborative editing device for hybrid documents, characterized in that, A client application for collaborative editing of a hybrid document in a collaborative document editing system, wherein the hybrid document contains multiple types of document content objects, and different types of document content objects are edited using different document editors; each document content object in the hybrid document creates a corresponding collaborative document instance, wherein different types of document content objects correspond to different collaborative document instances, and the collaborative document instances participate in collaborative editing through a collaborative document model; wherein, for multiple document content objects using different types of document editors, the corresponding collaborative document instances also use different collaborative document models; the device includes: An extended atomic operation receiving unit is used to receive extended atomic operations for the hybrid document sent by the server of the document collaborative editing system; the extended atomic operation is obtained by extending the original atomic operation corresponding to the collaborative editing instruction for the collaborative document instance in the hybrid document, and includes the instance identifier of the collaborative document instance that generated the original atomic operation, the type information of the collaborative document model adopted by the collaborative document instance, and the original atomic operation. An extended atomic operation parsing unit is used to parse the extended atomic operation based on the type information of the collaborative document model contained in the extended atomic operation; An atomic operation sending unit is used to send the parsed atomic operation to the collaborative document instance corresponding to the instance identifier contained in the extended atomic operation for processing.

11. An electronic device, characterized in that, include: processor; Memory used to store processor-executable instructions; The processor implements the method as described in any one of claims 1-3 or 4-8 by executing the executable instructions.

12. A computer-readable storage medium storing computer instructions thereon, characterized in that, When executed by the processor, this instruction implements the steps of the method as described in any one of claims 1-3 or 4-8.