Document collaborative editing method and device, storage medium and terminal

By splitting and synchronizing document data between the terminal and the collaborative server, the problem of collaborative editing of multiple people in the existing technology is solved, real-time collaborative editing of documents is realized, and team collaboration efficiency is improved.

CN119150813AInactive Publication Date: 2024-12-17BEIJING QIHOOD TECHNOLOGY CO LTD

Patent Information

Application Number
CN202411617706.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-11-13
Publication Date
2024-12-17
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

Existing document editing tools are difficult to support multi-person collaborative editing functions, resulting in inefficient team collaboration, especially in remote office and online education scenarios, which are difficult to achieve real-time synchronization and collaboration of documents.

Method used

By splitting and synchronizing document data between the terminal and the collaborative server, the document content on multiple terminals is updated in real time, and the collaborative server is used to transmit and manage editing data, ensuring collaborative editing of documents between multiple users.

Benefits of technology

Real-time collaborative editing of documents is realized, the collaboration efficiency between multiple users is improved, the problems of version confusion and inconsistency are avoided, and the smoothness and efficiency of team collaboration are improved.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119150813A_ABST
    Figure CN119150813A_ABST
Patent Text Reader

Abstract

The invention discloses a document collaborative editing method and device, a storage medium and a terminal, and the method comprises the steps: in response to an editing operation for a target document, determining first document data of the target document before the editing operation and second document data of the target document after the editing operation; splitting the second document data based on the first document data to obtain editing data corresponding to the editing operation; and sending the editing data to a collaboration server, so that the collaboration server issues the editing data to at least one collaboration terminal which is synchronizing the target document, and the collaboration terminal is used for updating local document data of the target document in the collaboration terminal according to the editing data. In the embodiment of the invention, the terminal splits the editing data corresponding to the editing operation according to the change of the overall document data of the target document before and after the editing operation, and then only sends the editing data to other collaborative terminals in real time, so that the collaborative terminals update the target document which is being displayed based on the editing data, and collaborative editing of the document is realized.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of computer technology, and in particular to a document collaborative editing method, device, storage medium and terminal. Background Art

[0002] In today's digital age, although existing document editing tools generally provide basic text creation, editing and reading functions, meeting the basic needs of individual users in daily work, the traditional single-user operation mode, although it can efficiently handle personal document tasks, is difficult to adapt to the complex and ever-changing communication and collaboration needs in team collaboration. Therefore, in order to meet the needs of users in current scenarios such as remote office and online education, it is necessary to develop a tool that can support efficient collaborative document processing to improve document collaboration efficiency. Summary of the invention

[0003] The present application provides a document collaborative editing method, device, storage medium and terminal, which can solve the technical problem that documents cannot be collaboratively edited in the related art.

[0004] In a first aspect, an embodiment of the present application provides a document collaborative editing method, applied to a terminal, the method comprising: In response to an editing operation on a target document, determining first document data of the target document before the editing operation and second document data of the target document after the editing operation; splitting the second document data based on the first document data to obtain editing data corresponding to the editing operation; The edit data is sent to a collaborative server, so that the collaborative server sends the edit data to at least one collaborative terminal that is synchronizing the target document, and the collaborative terminal is used to update the document data of the target document locally in the collaborative terminal according to the edit data.

[0005] In a second aspect, an embodiment of the present application provides a document collaborative editing device, applied to a terminal, the device comprising: An editing operation response module, configured to determine, in response to an editing operation on a target document, first document data of the target document before the editing operation and second document data of the target document after the editing operation; an editing data splitting module, configured to split the second document data based on the first document data to obtain editing data corresponding to the editing operation; The edit data collaboration module is used to send the edit data to the collaboration server, so that the collaboration server sends the edit data to at least one collaboration terminal that is synchronizing the target document. The collaboration terminal is used to update the document data of the target document locally in the collaboration terminal according to the edit data.

[0006] In a third aspect, an embodiment of the present application provides a computer storage medium, which stores a plurality of instructions, and the instructions are suitable for being loaded by a processor and executing the steps of the above-mentioned method.

[0007] In a fourth aspect, an embodiment of the present application provides a terminal, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the computer program is suitable for being loaded by the processor and executing the steps of the above method.

[0008] In a fifth aspect, an embodiment of the present application provides a computer program product, which includes: a computer program code, when the computer program code runs on a computer, enables the computer to execute the method in the above-mentioned first aspect or any possible implementation of the first aspect.

[0009] In a sixth aspect, an embodiment of the present application provides a document collaborative editing system, including: a terminal, a collaborative server, and a collaborative terminal, wherein: The terminal is used to: In response to an editing operation on a target document, determining first document data of the target document before the editing operation and second document data of the target document after the editing operation; Splitting the second document data based on the first document data to obtain editing data corresponding to the editing operation; Sending the edited data to the shrinking collaborative server, so that the collaborative server sends the edited data to at least one collaborative terminal that is synchronizing the target document, and the collaborative terminal is used to update the document data of the target document locally in the collaborative terminal according to the edited data; The companion server is used to: Receiving the editing data sent by the terminal, and determining the target document corresponding to the editing data; Determining at least one collaborative terminal that is synchronizing the target document; Sending the edited data to each collaborative terminal so that each collaborative terminal updates the document data of the target document locally in the collaborative terminal according to the edited data; The collaborative terminal is used for: Receiving editing data sent by the collaborative server; Update the document data of the target document locally on the collaborative terminal according to the edited data.

[0010] The beneficial effects brought about by the technical solutions provided by some embodiments of the present application include at least: The present application provides a document collaborative editing method, which, in response to an editing operation on a target document, determines the first document data of the target document before the editing operation and the second document data of the target document after the editing operation; splits the second document data based on the first document data to obtain the editing data corresponding to the editing operation; sends the editing data to a collaborative server, so that the collaborative server sends the editing data to at least one collaborative terminal that is synchronizing the target document, and the collaborative terminal is used to update the document data of the target document locally in the collaborative terminal according to the editing data. When a user edits a shared target document, the terminal splits the editing data corresponding to the editing operation according to the changes in the overall document data of the target document before and after the editing operation, and then only sends the editing data to the collaborative server, so that the editing data is sent in real time to other collaborative terminals that are sharing the current target document through the collaborative server, so that the collaborative terminal updates the displayed target document based on the editing data, thereby realizing collaborative editing of documents and improving the efficiency of document editing and the collaboration efficiency between multiple users. BRIEF DESCRIPTION OF THE DRAWINGS

[0011] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For those skilled in the art, other drawings can be obtained based on these drawings without paying any creative work.

[0012] Figure 1 An exemplary system architecture diagram of a document collaborative editing method provided in an embodiment of the present application; Figure 2 A flowchart of a document collaborative editing method provided in an embodiment of the present application; Figure 3 A flowchart of a document collaborative editing method provided in an embodiment of the present application; Figure 4 A data transmission process framework diagram of a document collaborative editing method provided in an embodiment of the present application; Figure 5 A flowchart of a document collaborative editing method provided in an embodiment of the present application; Figure 6 A flowchart of a document collaborative editing method provided in an embodiment of the present application; Figure 7 A structural block diagram of a document collaborative editing device provided in an embodiment of the present application; Figure 8 A schematic diagram of the structure of a terminal provided in an embodiment of the present application. DETAILED DESCRIPTION

[0013] In order to make the features and advantages of the present application more obvious and easy to understand, the technical solutions in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without creative work are within the scope of protection of the present application.

[0014] When the following description refers to the drawings, unless otherwise indicated, the same numbers in different drawings represent the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present application. Instead, they are merely examples of devices and methods consistent with some aspects of the present application as detailed in the appended claims. And in the description of the embodiments of the present application, unless otherwise specified, " / " means or, for example, A / B can mean A or B: "and / or" in the text is only a description of the association relationship of associated objects, indicating that three relationships can exist, for example, A and / or B can mean: A exists alone, A and B exist at the same time, and B exists alone. In addition, in the description of the embodiments of the present application, "multiple" refers to two or more than two.

[0015] In the following, the terms "first" and "second" are used for descriptive purposes only and are not to be understood as suggesting or implying relative importance or implicitly indicating the number of technical features indicated. Thus, a feature defined as "first" or "second" may explicitly or implicitly include one or more of the features.

[0016] In the current wave of digital office, although mind mapping, as an efficient information organization and presentation tool, is widely used in many fields such as project management, study notes, creative planning, etc., existing mind mapping tools are often limited to their single-user editing mode, and most of them do not support multi-person collaborative editing functions, that is, they cannot allow multiple users to view and operate the same mind map file at the same time, which to a certain extent limits the efficiency of instant communication and collaboration between team members. For example, when team members need to draw a complex project planning diagram together, and each member is responsible for different parts and needs to communicate and adjust frequently, if they only rely on traditional mind mapping software, then each modification needs to be synchronized through file transfer or verbal communication, which not only increases time costs, but also easily causes version confusion and information inconsistency.

[0017] Therefore, an embodiment of the present application provides a document collaborative editing method to solve the technical problem that the above-mentioned document cannot be collaboratively edited.

[0018] See also Figure 1 , Figure 1An exemplary system architecture diagram of a document collaborative editing method provided in an embodiment of the present application.

[0019] like Figure 1 As shown, the system architecture may include a terminal 101, a network 102, a server 103, and a cooperative terminal 104. The network 102 is used to provide a medium for a communication link between the terminal 101 and the server 103 and between the cooperative terminal 104 and the server 103. The network 102 may include various types of wired communication links or wireless communication links, for example: the wired communication link includes an optical fiber, a twisted pair, or a coaxial cable, and the wireless communication link includes a Bluetooth communication link, a Wireless-Fidelity (Wi-Fi) communication link, or a microwave communication link.

[0020] The terminal 101 can interact with the server 103 through the network 102 to receive messages from the server 103 or send messages to the server 103, or the terminal 101 can interact with the server 103 through the network 102 to receive messages or data sent by other users to the server 103. The collaborative terminal 104 can interact with the server 103 through the network 102 to receive messages from the server 103 or send messages to the server 103, or the collaborative terminal 104 can interact with the server 103 through the network 102 to receive messages or data sent by other users to the server 103. The terminal 101 can be hardware or software. When the terminal 101 is hardware, it can be various electronic devices, including but not limited to smart phones, tablet computers, laptop portable computers, and desktop computers. When the terminal 101 is software, it can be installed in the electronic devices listed above, which can be implemented as multiple software or software modules (for example: used to provide distributed services), or it can be implemented as a single software or software module, which is not specifically limited here. The collaborative terminal 104 is similar to the terminal 101 and is not repeated here. It should be noted that the cooperative terminal 104 and the terminal 101 may be the same, for example, both are desktop computers; or they may be different, for example, the terminal 101 is a desktop computer and the cooperative terminal 104 is a smart phone, which is not limited in the embodiments of the present application.

[0021] The server 103 may be a business server that provides various services. It should be noted that the server 103 may be hardware or software. When the server 103 is hardware, it may be implemented as a distributed server cluster consisting of multiple servers, or as a single server. When the server 103 is software, it may be implemented as multiple software or software modules (for example, for providing distributed services), or as a single software or software module, which is not specifically limited here.

[0022] In the embodiment of the present application, the server 103 may be a collaborative server, which is used to transmit editing data between the terminal 101 and the collaborative terminal 104. Specifically, first, the terminal 101 determines the first document data of the target document before the editing operation and the second document data of the target document after the editing operation in response to the editing operation on the target document; then, the terminal 101 splits the second document data based on the first document data to obtain the editing data corresponding to the editing operation; at this time, the terminal 101 further sends the editing data to the collaborative server 103, and the collaborative server 103 receives the editing data sent by the terminal 101, and determines the target document corresponding to the editing data based on the editing data; next, the collaborative server 103 determines at least one collaborative terminal 104 that is synchronizing the target document, and sends the editing data to each collaborative terminal 104; for the collaborative terminal 104, the collaborative terminal 104 can receive the editing data sent by the collaborative server 103, and update the local document data of the target document according to the editing data.

[0023] It should be understood that Figure 1 The number of terminals, networks and servers in the figure is only for illustration and any number of terminals, networks and servers may be used according to implementation requirements.

[0024] See also Figure 2 , Figure 2 A flowchart of a document collaborative editing method provided for an embodiment of the present application. The execution subject of the embodiment of the present application can be a terminal that executes document collaborative editing, or a processor in a terminal that executes the document collaborative editing method, or a document collaborative editing service in a terminal that executes the document collaborative editing method. For the convenience of description, the specific execution process of the document collaborative editing method is introduced below by taking the execution subject being a processor in a terminal as an example.

[0025] like Figure 2 As shown, the document collaborative editing method, applied to a terminal, may at least include: S202: In response to an editing operation on a target document, determine first document data of the target document before the editing operation and second document data of the target document after the editing operation.

[0026] Alternatively, with the rapid development of computer technology, Internet technology, artificial intelligence, big data and other technologies, the technical foundation of digital office is becoming increasingly solid. The rise of new working modes such as remote office and hybrid office, as well as the urgent need of enterprises to improve office efficiency, reduce costs and enhance competitiveness, have promoted the rapid development of digital office. As an efficient information organization and presentation tool, mind mapping has now been widely used in many fields such as project management, study notes, creative planning, etc., but the existing mind mapping tools cannot allow multiple users to view and operate the same mind map file at the same time, resulting in limited communication and collaboration efficiency between team members. In order to improve the efficiency of collaboration between users, it is necessary to implement a mind mapping tool that supports multi-person collaborative editing, so that each member can view and edit the same mind map in real time.

[0027] Optionally, the specific implementation process of collaborative editing of a document is to synchronize the editing of a document by a user on a terminal to the terminals of other users who are browsing the document. That is to say, when a user edits the target document currently being displayed, the terminal responds to the editing operation and needs to first determine the editing data corresponding to the user's editing operation, and send the editing data to other collaborative terminals that are collaborating on the target document, so that each collaborative terminal can update the document content it is displaying based on the editing data, thereby achieving synchronous editing and display of the target document. It should be noted that the target document can at least be a mind map document. In addition, it can also be other types of documents. Various documents may have slight differences in the way they are edited, but the synchronization process of their editing data is consistent and universal. Therefore, the embodiments of the present application do not limit the specific type of the target document.

[0028] Furthermore, in the terminal, when an editing operation occurs, the terminal will directly make corresponding changes to the document according to the editing operation, that is, the document data in the terminal is an overall change from "the whole document data before editing" to "the document data after editing", rather than first determining the editing data caused by the editing operation on the document and then merging the editing data with the original document data. Then the editing data corresponding to the editing operation also needs to compare the complete document data before and after the editing operation, and then split the editing data generated during the editing based on the two, so as to perform subsequent synchronization. In other words, when the terminal obtains the editing data, it must first determine the first document data of the target document before the editing operation, and the second document data of the target document after the editing operation, and then determine the editing data corresponding to this editing operation based on the first document data and the second document data.

[0029] S204: Split the second document data based on the first document data to obtain editing data corresponding to the editing operation.

[0030] Optionally, after successfully capturing the two key states of the target document before and after the editing operation, namely, the first document data in the original state before editing and the second document data after the editing, the two data are further compared and analyzed. This process is based on the first document data, splits the second document data, and by comparing the two data, it is possible to identify which parts have changed after the editing operation, and extract the data segments that have significant differences compared to the first document data, which are the editing data corresponding to the editing operation.

[0031] S206: Send the edited data to the collaborative server, so that the collaborative server sends the edited data to at least one collaborative terminal that is synchronizing the target document, and the collaborative terminal is used to update the document data of the target document locally in the collaborative terminal according to the edited data.

[0032] Optionally, after clarifying the editing data corresponding to the user's editing operation, this data needs to be sent to other collaborative terminals that are synchronizing the target document, so that the collaborative terminal can update the document data of the target document locally on the collaborative terminal according to the editing data, thereby achieving synchronous display of the target document during the editing process.

[0033] Furthermore, considering that the terminals for collaborative document editing are not fixed, for example, when the user opens the document at terminal A, the user edits it, and during this process, terminal B also opens the document. When terminal B opens and displays the document, terminal A and terminal B begin to establish synchronous editing and display of the document; and when terminal A and terminal B collaborate, terminal C opens the document, and then terminal A, terminal B and terminal C establish a synchronization relationship; during the synchronization process, as the document is closed in each terminal, it exits the document synchronization. If the editing data for synchronization is directly sent and received between the terminals, each terminal needs to continuously establish and disconnect communication according to the joining and exiting of the collaborative terminal, and the entire communication process will change a lot with the change of the terminal collaborative state. In order to facilitate the transmission of editing data between terminals, a specially designed collaborative server can be used to realize the reception and forwarding of editing data. When the terminal joins the collaborative relationship, it only needs to establish a communication link with the collaborative server, and when exiting the collaborative relationship, it can directly disconnect from the collaborative server. In this way, there is no need to establish or disconnect communication with multiple terminals in sequence. The collaborative server can also well support communication and data transmission and reception with multiple terminals based on its excellent computing power.

[0034] Specifically, in the process of receiving and forwarding the edit data, the collaborative server will intelligently identify which collaborative terminals are synchronizing or monitoring the same target document to ensure the accurate distribution of the edit data. That is, in an embodiment of the present application, the edit data can be sent to the collaborative server after it is determined, so that the collaborative server can send the edit data to at least one collaborative terminal that is synchronizing the target document through the communication link between other collaborative terminals. When forwarding the edit data, the collaborative server can not only ensure the immediacy of the data, but also ensure the security and integrity of the data during the transmission process by means such as encrypted transmission to prevent data information leakage. When the edit data is successfully sent to the collaborative terminal, these terminals will respond immediately and update the target document data being displayed locally according to the received edit data. This update process is based on the edit data, and may include but is not limited to text replacement, picture insertion, format adjustment, layout optimization, and even formula calculation, etc., to ensure that the latest and most accurate document version can be displayed on each collaborative terminal. Through such a collaborative mechanism, users who view documents on each mutually collaborative terminal can see each other's editing results in real time no matter where they are, greatly improving the efficiency and effect of collaboration between users. In actual application scenarios, it can also avoid some problems caused by data asynchrony, making team collaboration smoother and more efficient.

[0035] In a feasible implementation, the collaborative server can implement communication and data transmission based on the WebSocket protocol. WebSocket is a protocol for full-duplex communication on a single TCP connection. WebSocket makes data exchange between the client and the server simpler, allowing the server to actively push data to the client. In the WebSocket API, the browser and the server only need to complete a handshake, and a persistent connection can be directly created between the two, and two-way data transmission can be performed. In order to implement push technology, many existing websites use polling technology. Polling is that at a specific time interval (such as every 1 second), the client sends an HTTP request to the server, and then the server returns the latest data to the client. This traditional model brings obvious disadvantages, that is, the client needs to continuously send requests to the server, but the HTTP request may contain a long header, in which the truly valid data may be only a small part, which obviously wastes a lot of bandwidth resources. In this case, since the WebSocket protocol is full-duplex, the server can actively send data to the client at any time instead of having to wait for the client to initiate an inquiry and request to the server before sending data. Therefore, the collaborative server based on the WebSocket protocol can obviously save server resources and bandwidth better, and can communicate in more real time.

[0036] In an embodiment of the present application, a document collaborative editing method is provided. In response to an editing operation on a target document, the first document data of the target document before the editing operation and the second document data of the target document after the editing operation are determined; the second document data is split based on the first document data to obtain the editing data corresponding to the editing operation; the editing data is sent to a collaborative server so that the collaborative server sends the editing data to at least one collaborative terminal that is synchronizing the target document, and the collaborative terminal is used to update the document data of the target document locally in the collaborative terminal according to the editing data. When a user edits a shared target document, the terminal splits the editing data corresponding to the editing operation according to the changes in the overall document data of the target document before and after the editing operation, and then only sends the editing data to the collaborative server, so that the editing data is sent in real time to other collaborative terminals that are sharing the current target document through the collaborative server, so that the collaborative terminal updates the displayed target document based on the editing data, thereby realizing collaborative editing of documents and improving the efficiency of document editing and the collaboration efficiency between multiple users.

[0037] See also Figure 3 , Figure 3 A flowchart of a document collaborative editing method provided in an embodiment of the present application.

[0038] like Figure 3 As shown, the document collaborative editing method, applied to a terminal, may at least include: S302: In response to an editing operation on a target document, determine first document data of the target document before the editing operation and second document data of the target document after the editing operation.

[0039] Regarding step S302, please refer to the detailed description in step S202, which will not be repeated here.

[0040] S304: Split the second document data based on the first document data to obtain incremental data of the target document.

[0041] Optionally, in a feasible implementation provided by the present application, when dealing with collaborative problems, it can be implemented based on Yjs technology. Yjs is an open source framework for implementing real-time collaborative editing. It is based on the CRDT (Conflict-free Replicated Data Type) algorithm and supports multiple users to perform collaborative operations when editing a document or data structure at the same time without conflicts or data loss. Yjs can realize collaborative editing between different users by providing a series of CRDT data types, such as YArray, YMap, YText, etc., to ensure that they eventually converge to a consistent state. When a user edits a document, Yjs can convert the editing operation into a series of editing data and use network transmission protocols (such as WebSockets or WebRTC) to propagate these updates to other users participating in the collaborative editing. Based on this, the Yjs collaborative plug-in can be pre-deployed in the terminal, and the collaborative plug-in can be used to split, transmit, and receive and merge data during document synchronous editing, that is, the collaborative plug-in has at least one of the data splitting function, data transmission function, and data merging function.

[0042] Optionally, see Figure 4 , Figure 4 This is a data transmission process framework diagram of a document collaborative editing method provided in an embodiment of the present application. Figure 4 As shown, when the edit data is split from the overall data of the document, the second document data is split according to the first document data by calling the Yjs-based collaborative plug-in, and the user's editing behavior is separated from the overall data in an incremental form to obtain the incremental data of the target document.

[0043] S306: Identify and remove display adjustment data for document display effects in the incremental data to obtain editing data corresponding to the editing operation.

[0044] Optionally, all incremental data may also include data corresponding to the user's display adjustment operations on the document display effect, such as display adjustment data caused by folding, moving, and other operations on the mind map. These data are generated by the user adjusting the display effect of the document on the page. If these data are directly synchronized to other collaborative terminals, it will directly cause the document display effect in the collaborative terminal to change. For example, user 1 may be editing a part of the document in the terminal, but suddenly fold the part being edited because of the synchronization of the display adjustment data of user 2 folding and retracting this part, which greatly affects the normal editing operation of the user in the collaborative terminal. Based on this, the collaborative plug-in needs to identify and remove the display adjustment data for the document display effect in the incremental data, so as to obtain the editing data corresponding to the editing operation, so as to avoid the adjustment behavior for the document display effect affecting the interface operation of other users.

[0045] Optionally, in order to distinguish the different editing operations performed on the target document by the terminals that are collaboratively editing the target document, the editing data may include at least the document content data and user information corresponding to the editing operation, wherein the document content data is used to update the content of the target document, and the user information is used to display the updated content corresponding to the editing operation in the target document in association. After receiving the editing data forwarded by the collaborative server, the collaborative plug-in in the collaborative terminal can clearly mark the editing user corresponding to the editing data on the display interface according to the user information therein. In addition, each terminal can monitor the user's editing intention and synchronize the editing intention information to other collaborative terminals when monitoring the editing intention (such as the resting position of the editing cursor, clicking on a column, etc.). Other collaborative terminals can synchronously display the currently editing area and the editor's name in the document according to the received editing intention information, and can even preview the modifications that other members are about to make (such as through highlighting or preview boxes), thereby avoiding editing conflicts and ensuring the accuracy and consistency of information.

[0046] S308: Send the edited data to the collaborative server, so that the collaborative server sends the edited data to at least one collaborative terminal that is synchronizing the target document, and the collaborative terminal is used to update the document data of the target document locally in the collaborative terminal according to the edited data.

[0047] Regarding step S308, please refer to the detailed description in step S206, which will not be repeated here.

[0048] In an embodiment of the present application, a document collaborative editing method is provided. A collaborative plug-in is deployed in the terminal, and the collaborative plug-in can be used for data splitting, data transmission, and data merging. Therefore, in the process of collaborative document editing, the second document data can be split based on the first document data through the collaborative plug-in; after the splitting, the incremental data of the target document is first obtained, and for these incremental data, the display adjustment data for the document display effect in the incremental data is further identified and removed to obtain the editing data corresponding to the editing operation, so as to avoid the adjustment behavior for the document display effect affecting the interface operation of other users, avoid editing conflicts, and ensure the accuracy and consistency of information.

[0049] See also Figure 5 , Figure 5 A flowchart of a document collaborative editing method provided in an embodiment of the present application.

[0050] like Figure 5 As shown, the document collaborative editing method, applied to a terminal, may at least include: S502: Receive collaborative editing data sent by the collaborative server, where the collaborative editing data is data sent to the collaborative server by the collaborative terminal that is synchronizing the target document based on a collaborative editing operation.

[0051] Optionally, see Figure 4 , the editing data in the terminal is sent to the collaborative server through the collaborative plug-in, so that the collaborative server sends the editing data to at least one collaborative terminal that is synchronizing the target document, so that other collaborative terminals can update the document data of the target document locally in the collaborative terminal based on the editing data. In addition, when the user of the collaborative terminal performs a collaborative editing operation on the target document, the collaborative editing data corresponding to the collaborative editing operation is also sent to the collaborative server via the collaborative plug-in in the collaborative terminal, and the local terminal also receives the collaborative editing data sent by the collaborative server based on the collaborative plug-in, thereby realizing mutual editing synchronization between multiple terminals.

[0052] S504: updating the current document data of the target document based on the collaborative editing data, and displaying the target document in the display interface based on the updated current document data.

[0053] Optionally, see Figure 4 When the collaborative editing data synchronized from the collaborative terminal is obtained, the collaborative plug-in will merge the collaborative editing data into the corresponding target document. During the merging process, the collaborative plug-in will ensure the accurate mapping and positioning of the data, and insert the collected data into the corresponding position of the target document according to the established structure or rules through document parsing and construction technology. After the merge is completed, the target document needs to be presented to the user in an intuitive and friendly way, so the collaborative plug-in will also load and render the merged document data in the display interface.

[0054] In an embodiment of the present application, a document collaborative editing method is provided. After other users edit the target document on the collaborative terminal, they can also send the collaborative editing data to the collaborative server, and the collaborative server can also send the collaborative editing data to the terminal. Then the terminal can update the current document data of the target document based on the collaborative editing data, and display the target document based on the updated current document data in the display interface. In other words, all terminals that synchronously and collaboratively edit the target document can edit it and synchronize the editing data with each other, realizing mutual editing synchronization between multiple terminals.

[0055] See also Figure 6 , Figure 6 A flowchart of a document collaborative editing method provided in an embodiment of the present application.

[0056] like Figure 6 As shown, the document collaborative editing method, applied to a terminal, may at least include: S602: Update and store the second document data as current document data corresponding to the target document in a database corresponding to the target document.

[0057] Optionally, see Figure 4 Whenever the target document is edited, the edited second document data should be updated and stored in the database corresponding to the target document as the current document data via the management server, so that when a terminal pulls the current document data of the target document in the database, the latest document data can be pulled.

[0058] S604: In response to a load request for a target document, current document data corresponding to the target document is determined from a database, and the target document is displayed in a display interface based on the current document data.

[0059] Optionally, see Figure 4 When the terminal needs to load and display the target document without opening the target document, the terminal responds to the loading request for the target document, that is, determines the current document data corresponding to the target document from the database, and after pulling the current document data, the target document can be displayed in the display interface based on the current document data.

[0060] In an embodiment of the present application, a document collaborative editing method is provided, in which the second document data of the edited document is updated and stored in a database corresponding to the target document as the latest current document data via a management server; after editing, if the terminal needs to open the target document, it can determine the current document data corresponding to the target document from the database, and display the target document based on the current document data in a display interface, so that when a terminal pulls the current document data of the target document in the database, it can pull the latest document data.

[0061] See also Figure 7 , Figure 7 This is a structural block diagram of a document collaborative editing device provided in an embodiment of the present application. Figure 7 As shown, the document collaborative editing device 700, applied to a terminal, includes: An editing operation response module 710, configured to determine, in response to an editing operation on a target document, first document data of the target document before the editing operation and second document data of the target document after the editing operation; An edit data splitting module 720, configured to split the second document data based on the first document data to obtain edit data corresponding to the edit operation; The edit data collaboration module 730 is used to send the edit data to the collaboration server, so that the collaboration server sends the edit data to at least one collaboration terminal that is synchronizing the target document. The collaboration terminal is used to update the document data of the target document locally in the collaboration terminal according to the edit data.

[0062] Optionally, the editing data splitting module 720 is further used to split the second document data based on the first document data to obtain incremental data of the target document; identify and remove display adjustment data for the document display effect in the incremental data to obtain editing data corresponding to the editing operation.

[0063] Optionally, the editing data includes at least document content data and user information corresponding to the editing operation, the document content data is used to update the content of the target document, and the user information is used to associate and display the updated content corresponding to the editing operation in the target document.

[0064] Optionally, the document collaborative editing apparatus 700 further includes: a document data storage module, configured to update and store the second document data as current document data corresponding to the target document in a database corresponding to the target document.

[0065] Optionally, the document collaborative editing apparatus 700 further includes: a document initialization module, configured to determine current document data corresponding to the target document from a database in response to a loading request for the target document, and display the target document in a display interface based on the current document data.

[0066] Optionally, the document collaborative editing device 700 also includes: a document data merging module, which is used to receive collaborative editing data sent by the collaborative server, the collaborative editing data is data sent to the collaborative server based on a collaborative editing operation by the collaborative terminal that is synchronizing the target document; updating the current document data of the target document based on the collaborative editing data, and displaying the target document in a display interface based on the updated current document data.

[0067] Optionally, the terminal includes at least a collaborative plug-in, and the collaborative plug-in has at least one function of a data splitting function, a data transmission function, and a data merging function.

[0068] Optionally, the target document is a mind map document.

[0069] In an embodiment of the present application, a document collaborative editing device is provided, which is applied to a terminal, wherein an editing operation response module is used to determine the first document data of the target document before the editing operation and the second document data of the target document after the editing operation in response to the editing operation on the target document; an editing data splitting module is used to split the second document data based on the first document data to obtain the editing data corresponding to the editing operation; an editing data collaborative module is used to send the editing data to the collaborative server, so that the collaborative server sends the editing data to at least one collaborative terminal that is synchronizing the target document, and the collaborative terminal is used to update the document data of the target document locally in the collaborative terminal according to the editing data. When a user edits a shared target document, the terminal splits the editing data corresponding to the editing operation according to the changes in the overall document data of the target document before and after the editing operation, and then only sends the editing data to the collaborative server, so that the editing data is sent in real time to other collaborative terminals that are sharing the current target document through the collaborative server, so that the collaborative terminal updates the displayed target document based on the editing data, thereby realizing the collaborative editing of the document, and improving the efficiency of document editing and the collaboration efficiency between multiple users.

[0070] An embodiment of the present application further provides a computer storage medium, which can store multiple instructions, and the instructions are suitable for being loaded by a processor and executing the steps of any method in the above embodiments.

[0071] See also Figure 8 , Figure 8 A schematic diagram of the structure of a terminal provided in an embodiment of the present application. Figure 8 As shown, the terminal 800 may include: at least one terminal processor 801 , at least one network interface 804 , a user interface 803 , a memory 805 , and at least one communication bus 802 .

[0072] The communication bus 802 is used to realize the connection and communication between these components.

[0073] The user interface 803 may include a display screen (Display) and a camera (Camera). The optional user interface 803 may also include a standard wired interface and a wireless interface.

[0074] The network interface 804 may optionally include a standard wired interface or a wireless interface (such as a WI-FI interface).

[0075] Among them, the terminal processor 801 may include one or more processing cores. The terminal processor 801 uses various interfaces and lines to connect various parts in the entire terminal 800, and executes various functions and processes data of the terminal 800 by running or executing instructions, programs, code sets or instruction sets stored in the memory 805, and calling data stored in the memory 805. Optionally, the terminal processor 801 can be implemented in at least one hardware form of digital signal processing (Digital Signal Processing, DSP), field programmable gate array (Field-Programmable Gate Array, FPGA), and programmable logic array (Programmable Logic Array, PLA). The terminal processor 801 can integrate one or a combination of a central processing unit (Central Processing Unit, CPU), a graphics processing unit (Graphics Processing Unit, GPU) and a modem. Among them, the CPU mainly processes the operating system, user interface and application programs; the GPU is responsible for rendering and drawing the content to be displayed on the display screen; the modem is used to process wireless communications. It can be understood that the above-mentioned modem may not be integrated into the terminal processor 801, and it can be implemented separately through a chip.

[0076] Among them, the memory 805 may include a random access memory (Random Access Memory, RAM) and may also include a read-only memory (Read-Only Memory, ROM). Optionally, the memory 805 includes a non-transitory computer-readable storage medium. The memory 805 can be used to store instructions, programs, codes, code sets or instruction sets. The memory 805 may include a program storage area and a data storage area, wherein the program storage area may store instructions for implementing an operating system, instructions for at least one function (such as a touch function, a sound playback function, an image playback function, etc.), instructions for implementing the above-mentioned various method embodiments, etc.; the data storage area may store data involved in the above-mentioned various method embodiments, etc. The memory 805 may also be optionally at least one storage device located away from the aforementioned terminal processor 801. As Figure 8 As shown, the memory 805 as a computer storage medium may include an operating system, a network communication module, a user interface module, and a document collaborative editing program.

[0077] exist Figure 8In the terminal 800 shown, the user interface 803 is mainly used to provide an input interface for the user and obtain the data input by the user; and the terminal processor 801 can be used to call the document collaborative editing program stored in the memory 805 and specifically perform the following operations: In response to an editing operation on a target document, determining first document data of the target document before the editing operation and second document data of the target document after the editing operation; Splitting the second document data based on the first document data to obtain editing data corresponding to the editing operation; The edit data is sent to the collaborative server, so that the collaborative server sends the edit data to at least one collaborative terminal that is synchronizing the target document, and the collaborative terminal is used to update the document data of the target document locally in the collaborative terminal according to the edit data.

[0078] In some embodiments, when the terminal processor 801 executes the splitting of the second document data based on the first document data to obtain the editing data corresponding to the editing operation, it specifically performs the following steps: splitting the second document data based on the first document data to obtain the incremental data of the target document; identifying and removing the display adjustment data for the document display effect in the incremental data to obtain the editing data corresponding to the editing operation.

[0079] In some embodiments, the editing data includes at least document content data and user information corresponding to the editing operation, the document content data is used to update the content of the target document, and the user information is used to associate and display the updated content corresponding to the editing operation in the target document.

[0080] In some embodiments, the terminal processor 801 further specifically performs the following steps: updating and storing the second document data as current document data corresponding to the target document in a database corresponding to the target document.

[0081] In some embodiments, the terminal processor 801 further specifically performs the following steps: in response to a load request for a target document, determining current document data corresponding to the target document from a database, and displaying the target document in a display interface based on the current document data.

[0082] In some embodiments, the terminal processor 801 also specifically performs the following steps: receiving collaborative editing data sent by the collaborative server, the collaborative editing data being data sent to the collaborative server by the collaborative terminal that is synchronizing the target document based on a collaborative editing operation; updating the current document data of the target document based on the collaborative editing data, and displaying the target document in a display interface based on the updated current document data.

[0083] In some embodiments, the terminal includes at least a collaborative plug-in, and the collaborative plug-in has at least one function of a data splitting function, a data transmission function, and a data merging function.

[0084] In some embodiments, the target document is a mind map document.

[0085] In the several embodiments provided in the present application, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of modules is only a logical function division. There may be other division methods in actual implementation, such as multiple modules or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or modules, which can be electrical, mechanical or other forms.

[0086] The modules described as separate components may or may not be physically separated, and the components shown as modules may or may not be physical modules, that is, they may be located in one place or distributed on multiple network modules. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0087] In the above embodiments, it can be implemented in whole or in part by software, hardware, firmware or any combination thereof. When implemented using software, it can be implemented in whole or in part in the form of a computer program product. The above computer program product includes one or more computer instructions. When the above computer program instructions are loaded and executed on a computer, the above process or function according to the embodiment of this specification is generated in whole or in part. The above computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The above computer instructions can be stored in a computer-readable storage medium or transmitted through the above computer-readable storage medium. The above computer instructions can be transmitted from a website site, computer, server or data center to another website site, computer, server or data center by wired (e.g., coaxial cable, optical fiber, digital subscriber line (Digital Subscriber Line, DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) mode. The above computer-readable storage medium can be any available medium that can be accessed by a computer or a data storage device such as a server or data center that includes one or more available media integrated. The above-mentioned available media can be magnetic media (for example, floppy disks, hard disks, tapes), optical media (for example, digital versatile discs (DVD)), or semiconductor media (for example, solid state drives (SSD)), etc.

[0088] It should be noted that, for the above-mentioned method embodiments, for the sake of simplicity of description, they are all expressed as a series of action combinations, but those skilled in the art should be aware that the present application is not limited by the described action sequence, because according to the present application, certain steps can be performed in other sequences 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 the present application.

[0089] In the above embodiments, the description of each embodiment has its own emphasis. For parts that are not described in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.

[0090] The above is a description of a document collaborative editing method, device, storage medium and terminal provided by the present application. For technical personnel in this field, according to the ideas of the embodiments of the present application, there may be changes in the specific implementation methods and application scopes. In summary, the content of this specification should not be understood as a limitation on the present application.

Claims

1. A document collaborative editing method, characterized in that: Applied to a terminal, the method comprises: In response to an editing operation on a target document, determining first document data of the target document before the editing operation and second document data of the target document after the editing operation; splitting the second document data based on the first document data to obtain editing data corresponding to the editing operation; The edit data is sent to a collaborative server, so that the collaborative server sends the edit data to at least one collaborative terminal that is synchronizing the target document, and the collaborative terminal is used to update the document data of the target document locally in the collaborative terminal according to the edit data.

2. The method according to claim 1, characterized in that: The splitting of the second document data based on the first document data to obtain the editing data corresponding to the editing operation includes: Splitting the second document data based on the first document data to obtain incremental data of the target document; Display adjustment data for the document display effect in the incremental data is identified and removed to obtain editing data corresponding to the editing operation.

3. The method according to claim 1, characterized in that The editing data includes at least document content data and user information corresponding to the editing operation, wherein the document content data is used to update the content of the target document, and the user information is used to associate and display the updated content corresponding to the editing operation in the target document.

4. The method according to claim 1, characterized in that: The method further comprises: updating and storing the second document data as current document data corresponding to the target document in a database corresponding to the target document; In response to a load request for the target document, current document data corresponding to the target document is determined from the database, and the target document is displayed in a display interface based on the current document data.

5. The method according to claim 1, characterized in that The method further comprises: Receiving collaborative editing data sent by the collaborative server, wherein the collaborative editing data is data sent to the collaborative server based on a collaborative editing operation by a collaborative terminal that is synchronizing the target document; The current document data of the target document is updated based on the collaborative editing data, and the target document is displayed in a display interface based on the updated current document data.

6. The method according to claim 1, characterized in that The terminal at least includes a collaborative plug-in, and the collaborative plug-in has at least one function of a data splitting function, a data transmission function, and a data merging function.

7. A document collaborative editing device, characterized in that: Applied to a terminal, the device comprises: An editing operation response module, configured to determine, in response to an editing operation on a target document, first document data of the target document before the editing operation and second document data of the target document after the editing operation; an editing data splitting module, configured to split the second document data based on the first document data to obtain editing data corresponding to the editing operation; The editing data collaboration module is used to send the editing data to the collaboration server, so that the collaboration server sends the editing data to at least one collaboration terminal that is synchronizing the target document. The collaboration terminal is used to update the document data of the target document locally in the collaboration terminal according to the editing data.

8. A computer storage medium, characterized in that: The computer storage medium stores a plurality of instructions, and the instructions are suitable for being loaded by a processor and executing the steps of the method according to any one of claims 1 to 6.

9. A terminal, characterized in that: The method comprises a memory, a processor and a computer program stored in the memory and executable on the processor, wherein the processor implements the steps of the method according to any one of claims 1 to 6 when executing the program.

10. A document collaborative editing system, characterized in that: include: Terminal, collaborative server and collaborative terminal, where: The terminal is used for: In response to an editing operation on a target document, determining first document data of the target document before the editing operation and second document data of the target document after the editing operation; splitting the second document data based on the first document data to obtain editing data corresponding to the editing operation; Sending the edited data to the shrinking collaborative server, so that the collaborative server sends the edited data to at least one collaborative terminal that is synchronizing the target document, and the collaborative terminal is used to update the document data of the target document locally in the collaborative terminal according to the edited data; The collaborative server is used for: receiving the editing data sent by the terminal, and determining a target document corresponding to the editing data; determining at least one collaborative terminal that is synchronizing the target document; Sending the edited data to each collaborative terminal, so that each collaborative terminal updates the document data of the target document locally in the collaborative terminal according to the edited data; The collaborative terminal is used for: receiving the editing data sent by the collaborative server; The document data of the target document locally in the collaborative terminal is updated according to the edit data.

Citation Information

Patent Citations

  • Document collaborative editing method and device, computer equipment and storage medium

    CN113869009A

  • Enterprise knowledge management system

    CN114860935A

  • Document collaboration method and computer readable storage medium

    CN115221847A

  • High-speed and high-fault-tolerance Markdown document collaborative algorithm

    CN115345137A

  • Document editing system and method for collaborative editing

    KR101750429B1

Cited By

  • Document editing method and device, electronic equipment, medium and program product

    CN119962494A

  • Managing Document Editing Permissions During Conferences

    US20250298926A1