[go: up one dir, main page]
More Web Proxy on the site http://driver.im/

WO2017035961A1 - Document cooperation method, apparatus and device, and nonvolatile computer storage medium - Google Patents

Document cooperation method, apparatus and device, and nonvolatile computer storage medium Download PDF

Info

Publication number
WO2017035961A1
WO2017035961A1 PCT/CN2015/095366 CN2015095366W WO2017035961A1 WO 2017035961 A1 WO2017035961 A1 WO 2017035961A1 CN 2015095366 W CN2015095366 W CN 2015095366W WO 2017035961 A1 WO2017035961 A1 WO 2017035961A1
Authority
WO
WIPO (PCT)
Prior art keywords
document
client
server
mirror
updated
Prior art date
Application number
PCT/CN2015/095366
Other languages
French (fr)
Chinese (zh)
Inventor
张宁
Original Assignee
百度在线网络技术(北京)有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 百度在线网络技术(北京)有限公司 filed Critical 百度在线网络技术(北京)有限公司
Publication of WO2017035961A1 publication Critical patent/WO2017035961A1/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F40/00Handling natural language data
    • G06F40/10Text processing
    • G06F40/166Editing, e.g. inserting or deleting

Definitions

  • the present invention relates to the field of Internet application technologies, and in particular, to a document collaboration method and apparatus.
  • the present invention relates to the field of mobile communications technologies, and in particular, to a document collaboration method, apparatus, device, and non-volatile computer storage medium.
  • an online document collaboration technology is implemented based on a baseline file, a baseline document is maintained between the client and the server, and document collaboration is achieved through version consolidation.
  • the user's input will conflict because they are inconsistent with the baseline document maintained by the server, so the user must edit the document and merge the edit information into the baseline document.
  • another user can be allowed to edit the document, and the same document cannot be edited by multiple users at the same time, resulting in low document collaboration efficiency.
  • the embodiments of the present invention provide a document collaboration method, device, device, and non-volatile computer storage medium, which are used to solve the problem that the same document cannot be edited by multiple users at the same time, resulting in relatively low document collaboration efficiency.
  • An aspect of the embodiments of the present invention provides a document collaboration method, including:
  • the first image document is a mirror document of the first document for the server document
  • the second mirror document is a mirror document of the second document for the server document.
  • the aspect as described above and any possible implementation manner further provide an implementation manner, according to the editing information, the server document, the first mirror document, and the second mirror document of the first document for the first client, Before the second document of the second client is updated, the method further includes: obtaining and storing the first mirror document and the second mirror document.
  • An aspect of the embodiments of the present invention provides a document collaboration apparatus, including:
  • a receiving unit configured to receive, by the first client, edit information of the first document for the first client
  • a collaboration unit configured to update the second document of the second client according to the edit information, the server document, the first image document, and the second image file of the first document for the first client;
  • the first image document is a mirror image of the first document for the server document
  • the second image file is a mirror document of the second document for the server document.
  • collaboration unit further includes:
  • a first update module configured to update the first mirrored document according to edit information of the first document for the first client
  • a second update module configured to update the server document according to the updated first image file
  • a third update module configured to update the second mirror document and the second document of the second client according to the updated server document.
  • the apparatus further includes: a storage unit configured to obtain and store the first mirror document and the second mirror document.
  • an apparatus comprising:
  • One or more processors are One or more processors;
  • One or more programs the one or more programs being stored in the memory, when executed by the one or more processors:
  • the first image document is a mirror document of the first document for the server document
  • the second mirror document is a mirror document of the second document for the server document.
  • a nonvolatile computer storage medium storing one or more programs when the one or more programs are executed by a device causes The device:
  • the first image document is a mirror document of the first document for the server document
  • the second mirror document is a mirror document of the second document for the server document.
  • the technical solution provided by the embodiment of the present invention uses the first image document and the second image file to synchronize the editing information of the first document for the first client to the second document of the second client to implement the document collaboration technology.
  • the embodiment of the present invention can solve the problem that the same document cannot be edited by multiple users at the same time, resulting in a relatively low document collaboration efficiency, and the same document can be implemented by multiple User editing at the same time improves document collaboration efficiency.
  • FIG. 1 is a schematic flowchart of a document collaboration method according to an embodiment of the present invention.
  • FIG. 2 is a flow chart showing an example of an embodiment of a document collaboration method according to an embodiment of the present invention
  • FIG. 3 is a diagram showing an example of an interface for a user to edit a document online according to an embodiment of the present invention
  • FIG. 4 is a functional block diagram of a document collaboration apparatus according to an embodiment of the present invention.
  • first, second, etc. may be used to describe the client in the embodiments of the present invention, these clients should not be limited to these terms. These terms are only used to distinguish clients from each other.
  • first client may also be referred to as a second client without departing from the scope of the embodiments of the present invention.
  • second client may also be referred to as a first client.
  • the word “if” as used herein may be interpreted as “when” or “when” or “in response to determining” or “in response to detecting.”
  • the phrase “if determined” or “if detected (conditions or events stated)” may be interpreted as “when determined” or “in response to determination” or “when detected (stated condition or event) “Time” or “in response to a test (condition or event stated)”.
  • FIG. 1 it is a schematic flowchart of a document collaboration method according to an embodiment of the present invention. As shown in the figure, the method includes the following steps:
  • S101 Receive edit information of a first document sent by the first client for the first client.
  • execution body of S101-S102 may be a document collaboration device, and the device may be located at the server end.
  • the first document and the second document may be web-based documents, such as an online Word document, an online Excel document, and the like.
  • the document maintained in the server is referred to as a server document
  • the server document opened in the first client is referred to as a first document of the first client
  • the same The server document opened in the second client is referred to as a second document of the second client.
  • the first client collects edit information of the first document for the first client. Then, the first client caches the edit information of the first document for the first client. Finally, when the network status between the first client and the server is normal, the first client sends the cached edit information of the first document for the first client to the server.
  • FIG. 2 is a flowchart of an embodiment of a document collaboration method according to an embodiment of the present invention.
  • the first client detects whether the user is editing in the first document using an input method every time interval, and if so, the first The client does not collect the editing information of the first document of the user for the first client, and continues to wait for the next detection. On the other hand, if not, the first client collects editing information of the first document of the user for the first client.
  • the first client can perform a test every 2 seconds.
  • the collecting operation of the first client can trigger the first client to access the server, and therefore, when detecting that the user is editing in the first document by using an input method, the first is not collected. Editing the information, so that the interval between the first client to collect the edit information is not necessarily the same, thereby reducing the frequency of the first client accessing the server and reducing the processing pressure of the server.
  • the first client caches the edit information in a local cache area.
  • the first client may detect the first client.
  • the network status with the server. If the network status is normal, the first client sends the edit information of the first document for the first client cached in the cache area to the server. On the other hand, if the network status is abnormal, such as a network interruption or instability, the first client does not send the edit information of the first document for the first client to the server, but may continue to collect the memory into the cache area.
  • the user's edit information for the first document of the first client that is, the edit information cached in the cache area, may continue to be self-updated until the network state between the first client and the server is normal.
  • the first client is slowing down the cache area After the edit information of the first document for the first client is sent to the server, if the first client receives the confirmation information returned by the server, the first client learns that the server successfully receives And to the edit information of the first document for the first client, the first client clears the edit information cached in the cache area.
  • the editing information of the first document for the first client may include, but is not limited to, input text, deleted text, selected text, and at least one of current cursor positions.
  • the server obtains and stores the first image file and the second image file in advance.
  • the first image document is a mirror document of the first document for the server document, and data synchronization between the server and the first client regarding the first document is required.
  • the second image file is a mirror document of the second document for the server document, and data synchronization between the server and the second client regarding the second document needs to be utilized. The second image document implementation.
  • the server updates the second document of the second client according to the editing information, the server document, the first image document, and the second image document of the first document for the first client.
  • the server updates the first mirror document according to the edit information of the first document for the first client, so as to synchronize the first document with the first mirror document. .
  • the server updates the server document according to the updated first image document to implement adding edit information of the first document for the first client to the server document.
  • the server is based on the updated office a server document, updating the second image document and the second document of the second client to add edit information of the first document for the first client to the second image document, and Synchronizing the second image document with the second document, so that the editing information for the first document of the first client can be presented in the second document of the second client.
  • the method for updating the server document according to the updated first image file may include, but is not limited to:
  • the server compares the updated first image document with the server document to obtain updated first update information of the first image document relative to the server document. Then, the server updates the server document according to the first update information.
  • the method for updating the second image document and the second document of the second client according to the updated server document may include but not The method is first: comparing the updated server document with the second image document to obtain updated update information of the server document relative to the second image document. Then, updating the second mirrored document according to the second update information. Finally, the second update information is sent to the second client, so that the second client updates the second document according to the second update information.
  • a corresponding update module may be configured for the first image file, the server file, and the second image file, so that the corresponding image module may be executed by the corresponding update module. Synchronous operation.
  • the update template corresponding to the server document The block sends a broadcast message to the other update module to inform the server that the document has an update.
  • the update module of the second image document receives the broadcast message, and then compares the updated server document with the second image document to obtain the updated server document relative to the second Mirroring the second update information of the document, and then updating the second image file according to the second update information, and delivering the second update information to the second client, to implement the second image document and the second image Synchronization between the second document of the client.
  • the edit information of the first document from the first client needs to pass through the first image document to be synchronized to the server document.
  • the update information of the server document needs to pass the second image document. Synchronize to the second document of the second client. Therefore, whether it is an update from the client or an update from the server, the mirrored document needs to be synchronized to synchronize the update information to the client, or the edit information sent by the client is synchronized to the server, and the server passes the corresponding
  • the data synchronization between the mirrored document and each client is a separate thread. The threads do not affect each other. Even if a thread has an exception, it will not affect the data synchronization in other threads, and does not affect the data synchronization of the entire system.
  • FIG. 3 is an example of an interface for a user to edit a document online according to an embodiment of the present invention.
  • other users may be displayed in a document being edited by a user.
  • the text selected by "dengyulin” in the document, "this week”, can also display the text selected by other users "Zhang Ning" in the document, namely "plan”.
  • Embodiments of the present invention further provide an apparatus embodiment for implementing the steps and methods in the foregoing method embodiments.
  • FIG. 4 is a functional block diagram of a document collaboration apparatus according to an embodiment of the present invention. As shown, the device includes:
  • the receiving unit 41 is configured to receive, by the first client, edit information of the first document for the first client;
  • the collaboration unit 42 is configured to update the second document of the second client according to the edit information, the server document, the first image file, and the second image file of the first document for the first client;
  • the first image document is a mirror document of the first document for the server document
  • the second mirror document is a mirror document of the second document for the server document.
  • the collaboration unit 42 further includes:
  • the first update module 421 is configured to update the first mirror document according to the edit information of the first document for the first client;
  • a second update module 422, configured to update the server document according to the updated first image file
  • the third update module 423 is configured to update the second mirror document and the second document of the second client according to the updated server document.
  • the second update module 422 is specifically configured to:
  • the third update module 423 is specifically configured to:
  • the apparatus further includes: a storage unit 43 configured to obtain and store the first mirror document and the second mirror document.
  • the editing information of the first document for the first client sent by the first client is received; thereby, according to the editing information of the first document for the first client, the server document, the first Updating the second document of the second client by the mirroring document and the second mirroring document; the first mirroring document is a mirroring document of the first document for the server document, and the second mirroring document is the A mirrored document of the second document for which the server document is directed.
  • the technical solution provided by the embodiment of the present invention uses the first image document and the second image file to synchronize the editing information of the first document for the first client to the second document of the second client to implement the document collaboration technology.
  • Implementing document collaboration technology based on baseline text in the prior art Compared with the solution, the embodiment of the present invention can solve the problem that the same document cannot be edited by multiple users at the same time, resulting in low document collaboration efficiency, and the same document can be edited by multiple users at the same time, thereby improving document collaboration efficiency.
  • the disclosed system, apparatus, and method may be implemented in other manners.
  • the device embodiments described above are merely illustrative.
  • the division of the unit is only a logical function division.
  • multiple units or components may be combined. Or it can be integrated into another system, or some features can be ignored or not executed.
  • the mutual coupling or direct coupling or communication connection shown or discussed may be an indirect coupling or communication connection through some interface, device or unit, and may be in an electrical, mechanical or other form.
  • the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, may be located in one place, or may be distributed to multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of the embodiment.
  • each functional unit in each embodiment of the present invention may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit.
  • the above integrated unit can be implemented in the form of hardware or in the form of hardware plus software functional units.
  • the above integrated unit implemented in the form of a software functional unit can be stored in one meter
  • the computer can be read in the storage medium.
  • the above software functional unit is stored in a storage medium and includes instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) or a processor to perform the methods of the various embodiments of the present invention. Part of the steps.
  • the foregoing storage medium includes: a U disk, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disk, and the like, which can store program codes. .

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Audiology, Speech & Language Pathology (AREA)
  • Health & Medical Sciences (AREA)
  • Computational Linguistics (AREA)
  • General Health & Medical Sciences (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Artificial Intelligence (AREA)
  • Document Processing Apparatus (AREA)
  • Information Transfer Between Computers (AREA)
  • Processing Or Creating Images (AREA)

Abstract

Embodiments of the present invention provide a document cooperation method, apparatus and device, and a nonvolatile computer storage medium. In one aspect, in an embodiment of the present invention, edition information of a first document for a first client, sent by the first client is received; and thus, a second document of a second client is updated according to the edition information of the first document for the first client, a server document, a first mirror document and a second mirror document, the first mirror document being a mirror document of the server document for the first document, and the second mirror document being a mirror document of the server document for the second document. Accordingly, the technical solution provided in the embodiments of the present invention is used for resolving the problem of low document cooperation efficiency caused by the fact that a same document cannot be edited by multiple users at the same time.

Description

文档协同方法、装置、设备及非易失性计算机存储介质Document collaboration method, device, device and non-volatile computer storage medium
本申请要求了申请日为2015年08月28日,申请号为201510542718.8发明名称为“一种文档协同方法及装置”的中国专利申请的优先权。The present application claims priority from Chinese Patent Application No. 201510542718.8, entitled "A Document Collaboration Method and Apparatus", filed on August 28, 2015.
技术领域Technical field
本发明涉及互联网应用技术领域,尤其涉及一种文档协同方法及装置。本发明涉及移动通信技术领域,特别涉及一种文档协同方法、装置、设备及非易失性计算机存储介质。The present invention relates to the field of Internet application technologies, and in particular, to a document collaboration method and apparatus. The present invention relates to the field of mobile communications technologies, and in particular, to a document collaboration method, apparatus, device, and non-volatile computer storage medium.
背景技术Background technique
随着互联网技术的发展,用户越来越多地接触互联网的Web业务。例如,在线实时办公、在线编辑文档等。随着Web业务的不断发展和用户需求的日益增加,出现了多人同时编辑在线文档的需求。然而,实现在线文档协同技术是一项非常复杂且极具挑战性的工作。With the development of Internet technology, users are increasingly exposed to Internet Web services. For example, online real-time office, online editing of documents, and the like. With the continuous development of Web services and the increasing demand of users, there has been a demand for multiple people to edit online documents at the same time. However, implementing online document collaboration technology is a very complex and challenging task.
然而,现有技术中,基于基线文件实现在线文档协同技术,在客户端与服务器之间维护一个基线文档,通过版本合并实现文档协同。这种技术方案中,当多人同时编辑同一个文档时,用户的输入会因为各自与服务器维护的基线文档不一致而出现冲突,因此必须在一个用户编辑该文档,并将编辑信息合并到基线文档后,才能允许另一个用户编辑该文档,无法实现同一个文档由多个用户同时编辑,导致文档协同效率比较低。 However, in the prior art, an online document collaboration technology is implemented based on a baseline file, a baseline document is maintained between the client and the server, and document collaboration is achieved through version consolidation. In this technical solution, when multiple people edit the same document at the same time, the user's input will conflict because they are inconsistent with the baseline document maintained by the server, so the user must edit the document and merge the edit information into the baseline document. After that, another user can be allowed to edit the document, and the same document cannot be edited by multiple users at the same time, resulting in low document collaboration efficiency.
发明内容Summary of the invention
有鉴于此,本发明实施例提供了一种文档协同方法、装置、设备及非易失性计算机存储介质,用以解决同一文档无法由多个用户同时编辑,导致文档协同效率比较低的问题。In view of this, the embodiments of the present invention provide a document collaboration method, device, device, and non-volatile computer storage medium, which are used to solve the problem that the same document cannot be edited by multiple users at the same time, resulting in relatively low document collaboration efficiency.
本发明实施例的一方面,提供一种文档协同方法,包括:An aspect of the embodiments of the present invention provides a document collaboration method, including:
接收第一客户端发送的针对所述第一客户端的第一文档的编辑信息;Receiving edit information of the first document sent by the first client for the first client;
根据针对所述第一客户端的第一文档的编辑信息、服务器文档、第一镜像文档以及第二镜像文档,对第二客户端的第二文档进行更新;Updating the second document of the second client according to the edit information, the server document, the first image file, and the second image file of the first document for the first client;
所述第一镜像文档为所述服务器文档针对的所述第一文档的镜像文档,所述第二镜像文档为所述服务器文档针对的所述第二文档的镜像文档。The first image document is a mirror document of the first document for the server document, and the second mirror document is a mirror document of the second document for the server document.
如上所述的方面和任一可能的实现方式,进一步提供一种实现方式,所述根据针对所述第一客户端的第一文档的编辑信息、服务器文档、第一镜像文档以及第二镜像文档,对第二客户端的第二文档进行更新,包括:The aspect as described above and any possible implementation manner further provide an implementation manner, according to the editing information, the server document, the first mirror document, and the second mirror document of the first document for the first client, Update the second document of the second client, including:
根据针对所述第一客户端的第一文档的编辑信息,对所述第一镜像文档进行更新;Updating the first mirrored document according to edit information of the first document for the first client;
根据经过更新的所述第一镜像文档,对所述服务器文档进行更新;Updating the server document according to the updated first image document;
根据经过更新的所述服务器文档,对所述第二镜像文档以及所述第二客户端的第二文档进行更新。Updating the second mirrored document and the second document of the second client according to the updated server document.
如上所述的方面和任一可能的实现方式,进一步提供一种实现方式,所述根据经过更新的所述第一镜像文档,对所述服务器文档进行更新, 包括:An aspect as described above, and any possible implementation, further providing an implementation, wherein the server document is updated according to the updated first image file, include:
将经过更新的所述第一镜像文档与所述服务器文档进行比较,以获得经过更新的所述第一镜像文档相对于所述服务器文档的第一更新信息;Comparing the updated first image document with the server document to obtain updated first update information of the first image document relative to the server document;
根据所述第一更新信息,对所述服务器文档进行更新。Updating the server document according to the first update information.
如上所述的方面和任一可能的实现方式,进一步提供一种实现方式,所述根据经过更新的所述服务器文档,对所述第二镜像文档以及所述第二客户端的第二文档进行更新,包括:An aspect as described above, and any possible implementation, further providing an implementation, wherein the second mirror document and the second document of the second client are updated according to the updated server document ,include:
将经过更新的所述服务器文档与所述第二镜像文档进行比较,以获得经过更新的所述服务器文档相对于所述第二镜像文档的第二更新信息;Comparing the updated server document with the second mirrored document to obtain updated update information of the server document relative to the second mirrored document;
根据所述第二更新信息,对所述第二镜像文档进行更新;Updating the second mirrored document according to the second update information;
将所述第二更新信息发送给所述第二客户端,以便于所述第二客户端根据所述第二更新信息,对所述第二文档进行更新。And sending the second update information to the second client, so that the second client updates the second document according to the second update information.
如上所述的方面和任一可能的实现方式,进一步提供一种实现方式,所述根据针对第一客户端的第一文档的编辑信息、服务器文档、第一镜像文档以及第二镜像文档,对第二客户端的第二文档进行更新之前,所述方法还包括:获得并存储所述第一镜像文档和所述第二镜像文档。The aspect as described above and any possible implementation manner further provide an implementation manner, according to the editing information, the server document, the first mirror document, and the second mirror document of the first document for the first client, Before the second document of the second client is updated, the method further includes: obtaining and storing the first mirror document and the second mirror document.
本发明实施例的一方面,提供一种文档协同装置,包括:An aspect of the embodiments of the present invention provides a document collaboration apparatus, including:
接收单元,用于接收第一客户端发送的针对所述第一客户端的第一文档的编辑信息;a receiving unit, configured to receive, by the first client, edit information of the first document for the first client;
协同单元,用于根据针对所述第一客户端的第一文档的编辑信息、服务器文档、第一镜像文档以及第二镜像文档,对第二客户端的第二文档进行更新;a collaboration unit, configured to update the second document of the second client according to the edit information, the server document, the first image document, and the second image file of the first document for the first client;
所述第一镜像文档为所述服务器文档针对的所述第一文档的镜像文 档,所述第二镜像文档为所述服务器文档针对的所述第二文档的镜像文档。The first image document is a mirror image of the first document for the server document And the second image file is a mirror document of the second document for the server document.
如上所述的方面和任一可能的实现方式,进一步提供一种实现方式,所述协同单元进一步包括:The aspect as described above and any possible implementation manner further provide an implementation manner, where the collaboration unit further includes:
第一更新模块,用于根据针对所述第一客户端的第一文档的编辑信息,对所述第一镜像文档进行更新;a first update module, configured to update the first mirrored document according to edit information of the first document for the first client;
第二更新模块,用于根据经过更新的所述第一镜像文档,对所述服务器文档进行更新;a second update module, configured to update the server document according to the updated first image file;
第三更新模块,用于根据经过更新的所述服务器文档,对所述第二镜像文档以及所述第二客户端的第二文档进行更新。And a third update module, configured to update the second mirror document and the second document of the second client according to the updated server document.
如上所述的方面和任一可能的实现方式,进一步提供一种实现方式,所述第二更新模块,具体用于:The above-mentioned aspect and any possible implementation manner further provide an implementation manner, where the second update module is specifically configured to:
将经过更新的所述第一镜像文档与所述服务器文档进行比较,以获得经过更新的所述第一镜像文档相对于所述服务器文档的第一更新信息;Comparing the updated first image document with the server document to obtain updated first update information of the first image document relative to the server document;
根据所述第一更新信息,对所述服务器文档进行更新。Updating the server document according to the first update information.
如上所述的方面和任一可能的实现方式,进一步提供一种实现方式,所述第三更新模块,具体用于:The foregoing aspect and any possible implementation manner further provide an implementation manner, where the third update module is specifically configured to:
将经过更新的所述服务器文档与所述第二镜像文档进行比较,以获得经过更新的所述服务器文档相对于所述第二镜像文档的第二更新信息;Comparing the updated server document with the second mirrored document to obtain updated update information of the server document relative to the second mirrored document;
根据所述第二更新信息,对所述第二镜像文档进行更新;Updating the second mirrored document according to the second update information;
将所述第二更新信息发送给所述第二客户端,以便于所述第二客户端根据所述第二更新信息,对所述第二文档进行更新。And sending the second update information to the second client, so that the second client updates the second document according to the second update information.
如上所述的方面和任一可能的实现方式,进一步提供一种实现方式, 所述装置还包括:存储单元,用于获得并存储所述第一镜像文档和所述第二镜像文档。An aspect of the above, and any possible implementation, further providing an implementation manner, The apparatus further includes: a storage unit configured to obtain and store the first mirror document and the second mirror document.
本发明的另一方面,提供一种设备,包括:In another aspect of the invention, an apparatus is provided, comprising:
一个或者多个处理器;One or more processors;
存储器;Memory
一个或者多个程序,所述一个或者多个程序存储在所述存储器中,当被所述一个或者多个处理器执行时:One or more programs, the one or more programs being stored in the memory, when executed by the one or more processors:
接收第一客户端发送的针对所述第一客户端的第一文档的编辑信息;Receiving edit information of the first document sent by the first client for the first client;
根据针对所述第一客户端的第一文档的编辑信息、服务器文档、第一镜像文档以及第二镜像文档,对第二客户端的第二文档进行更新;Updating the second document of the second client according to the edit information, the server document, the first image file, and the second image file of the first document for the first client;
所述第一镜像文档为所述服务器文档针对的所述第一文档的镜像文档,所述第二镜像文档为所述服务器文档针对的所述第二文档的镜像文档。The first image document is a mirror document of the first document for the server document, and the second mirror document is a mirror document of the second document for the server document.
本发明的另一方面,提供一种非易失性计算机存储介质,所述非易失性计算机存储介质存储有一个或者多个程序,当所述一个或者多个程序被一个设备执行时,使得所述设备:In another aspect of the present invention, a nonvolatile computer storage medium storing one or more programs when the one or more programs are executed by a device causes The device:
接收第一客户端发送的针对所述第一客户端的第一文档的编辑信息;Receiving edit information of the first document sent by the first client for the first client;
根据针对所述第一客户端的第一文档的编辑信息、服务器文档、第一镜像文档以及第二镜像文档,对第二客户端的第二文档进行更新;Updating the second document of the second client according to the edit information, the server document, the first image file, and the second image file of the first document for the first client;
所述第一镜像文档为所述服务器文档针对的所述第一文档的镜像文档,所述第二镜像文档为所述服务器文档针对的所述第二文档的镜像文档。The first image document is a mirror document of the first document for the server document, and the second mirror document is a mirror document of the second document for the server document.
由以上技术方案可以看出,本发明实施例具有以下有益效果: It can be seen from the above technical solutions that the embodiments of the present invention have the following beneficial effects:
本发明实施例提供的技术方案,利用第一镜像文档和第二镜像文档,将针对第一客户端的第一文档的编辑信息,同步到第二客户端的第二文档,实现文档协同技术。与现有技术中基于基线文本实现文档协同技术的方案相比,本发明实施例能够解决同一文档无法由多个用户同时编辑,导致文档协同效率比较低的问题,实现了同一文档可以由多个用户同时编辑,提高了文档协同效率。The technical solution provided by the embodiment of the present invention uses the first image document and the second image file to synchronize the editing information of the first document for the first client to the second document of the second client to implement the document collaboration technology. Compared with the solution of implementing the document collaboration technology based on the baseline text in the prior art, the embodiment of the present invention can solve the problem that the same document cannot be edited by multiple users at the same time, resulting in a relatively low document collaboration efficiency, and the same document can be implemented by multiple User editing at the same time improves document collaboration efficiency.
附图说明DRAWINGS
为了更清楚地说明本发明实施例的技术方案,下面将对实施例中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本发明的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动性的前提下,还可以根据这些附图获得其它的附图。In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings used in the embodiments will be briefly described below. It is obvious that the drawings in the following description are only some embodiments of the present invention. One of ordinary skill in the art can also obtain other drawings based on these drawings without paying for inventive labor.
图1是本发明实施例所提供的文档协同方法的流程示意图;1 is a schematic flowchart of a document collaboration method according to an embodiment of the present invention;
图2是本发明实施例所提供的文档协同方法的实施例的流程示例图;2 is a flow chart showing an example of an embodiment of a document collaboration method according to an embodiment of the present invention;
图3是本发明实施例所提供的用户在线编辑文档的界面示例图;3 is a diagram showing an example of an interface for a user to edit a document online according to an embodiment of the present invention;
图4是本发明实施例所提供的文档协同装置的功能方块图。FIG. 4 is a functional block diagram of a document collaboration apparatus according to an embodiment of the present invention.
具体实施方式detailed description
为了更好的理解本发明的技术方案,下面结合附图对本发明实施例进行详细描述。For a better understanding of the technical solutions of the present invention, the embodiments of the present invention are described in detail below with reference to the accompanying drawings.
应当明确,所描述的实施例仅仅是本发明一部分实施例,而不是全部的实施例。基于本发明中的实施例,本领域普通技术人员在没有作出创造性劳动前提下所获得的所有其它实施例,都属于本发明保护的范围。 It should be understood that the described embodiments are only a part of the embodiments of the invention, and not all of the embodiments. All other embodiments obtained by those skilled in the art based on the embodiments of the present invention without creative efforts are within the scope of the present invention.
在本发明实施例中使用的术语是仅仅出于描述特定实施例的目的,而非旨在限制本发明。在本发明实施例和所附权利要求书中所使用的单数形式的“一种”、“所述”和“该”也旨在包括多数形式,除非上下文清楚地表示其他含义。The terms used in the embodiments of the present invention are for the purpose of describing particular embodiments only and are not intended to limit the invention. The singular forms "a", "the" and "the"
应当理解,本文中使用的术语“和/或”仅仅是一种描述关联对象的关联关系,表示可以存在三种关系,例如,A和/或B,可以表示:单独存在A,同时存在A和B,单独存在B这三种情况。另外,本文中字符“/”,一般表示前后关联对象是一种“或”的关系。It should be understood that the term "and/or" as used herein is merely an association describing the associated object, indicating that there may be three relationships, for example, A and/or B, which may indicate that A exists separately, while A and B, there are three cases of B alone. In addition, the character "/" in this article generally indicates that the contextual object is an "or" relationship.
应当理解,尽管在本发明实施例中可能采用术语第一、第二等来描述客户端,但这些客户端不应限于这些术语。这些术语仅用来将客户端彼此区分开。例如,在不脱离本发明实施例范围的情况下,第一客户端也可以被称为第二客户端,类似地,第二客户端也可以被称为第一客户端。It should be understood that although the terms first, second, etc. may be used to describe the client in the embodiments of the present invention, these clients should not be limited to these terms. These terms are only used to distinguish clients from each other. For example, the first client may also be referred to as a second client without departing from the scope of the embodiments of the present invention. Similarly, the second client may also be referred to as a first client.
取决于语境,如在此所使用的词语“如果”可以被解释成为“在……时”或“当……时”或“响应于确定”或“响应于检测”。类似地,取决于语境,短语“如果确定”或“如果检测(陈述的条件或事件)”可以被解释成为“当确定时”或“响应于确定”或“当检测(陈述的条件或事件)时”或“响应于检测(陈述的条件或事件)”。Depending on the context, the word "if" as used herein may be interpreted as "when" or "when" or "in response to determining" or "in response to detecting." Similarly, depending on the context, the phrase "if determined" or "if detected (conditions or events stated)" may be interpreted as "when determined" or "in response to determination" or "when detected (stated condition or event) "Time" or "in response to a test (condition or event stated)".
本发明实施例给出一种文档协同方法,请参考图1,其为本发明实施例所提供的文档协同方法的流程示意图,如图所示,该方法包括以下步骤:An embodiment of the present invention provides a document collaboration method. Referring to FIG. 1 , it is a schematic flowchart of a document collaboration method according to an embodiment of the present invention. As shown in the figure, the method includes the following steps:
S101,接收第一客户端发送的针对所述第一客户端的第一文档的编辑信息。 S101. Receive edit information of a first document sent by the first client for the first client.
S102,根据针对所述第一客户端的第一文档的编辑信息、服务器文档、第一镜像文档以及第二镜像文档,对第二客户端的第二文档进行更新;所述第一镜像文档为所述服务器文档针对的所述第一文档的镜像文档,所述第二镜像文档为所述服务器文档针对的所述第二文档的镜像文档。S102. Update, according to the edit information of the first document for the first client, the server document, the first image file, and the second image file, the second document of the second client is updated; the first image file is the a mirrored document of the first document for the server document, the second mirrored document being a mirrored document of the second document for the server document.
需要说明的是,S101~S102的执行主体可以为文档协同装置,该装置可以位于服务器端。It should be noted that the execution body of S101-S102 may be a document collaboration device, and the device may be located at the server end.
需要说明的是,本发明实施例中,所述第一文档以及所述第二文档可以为基于Web的文档,如在线的Word文档、在线的Excel文档等。It should be noted that, in the embodiment of the present invention, the first document and the second document may be web-based documents, such as an online Word document, an online Excel document, and the like.
需要说明的是,本发明实施例中,所述服务器中维护的文档称为服务器文档,在所述第一客户端中打开的所述服务器文档称为所述第一客户端的第一文档,同理,在所述第二客户端中打开的所述服务器文档称为所述第二客户端的第二文档。It should be noted that, in the embodiment of the present invention, the document maintained in the server is referred to as a server document, and the server document opened in the first client is referred to as a first document of the first client, and the same The server document opened in the second client is referred to as a second document of the second client.
可选地,在本发明实施例的一个可能的实现方式中,若用户当前没有使用输入法,所述第一客户端采集针对所述第一客户端的第一文档的编辑信息。然后,所述第一客户端缓存所述针对所述第一客户端的第一文档的编辑信息。最后,当所述第一客户端与所述服务器之间的网络状态正常时,所述第一客户端向所述服务器发送缓存的所述针对所述第一客户端的第一文档的编辑信息。Optionally, in a possible implementation manner of the embodiment of the present invention, if the user does not currently use the input method, the first client collects edit information of the first document for the first client. Then, the first client caches the edit information of the first document for the first client. Finally, when the network status between the first client and the server is normal, the first client sends the cached edit information of the first document for the first client to the server.
在一个具体的实现过程中,请参考图2,其为本发明实施例所提供的文档协同方法的实施例的流程示例图,如图所示,当用户在第一客户端中编辑所述第一文档时,所述第一客户端每间隔一段时间,就检测用户是否正在使用输入法在所述第一文档中进行编辑,如果是,所述第一 客户端先不采集用户针对所述第一客户端的第一文档的编辑信息,继续等待下一次检测。反之,如果不是,所述第一客户端采集用户针对所述第一客户端的第一文档的编辑信息。In a specific implementation process, please refer to FIG. 2, which is a flowchart of an embodiment of a document collaboration method according to an embodiment of the present invention. As shown in the figure, when a user edits the first client, a document, the first client detects whether the user is editing in the first document using an input method every time interval, and if so, the first The client does not collect the editing information of the first document of the user for the first client, and continues to wait for the next detection. On the other hand, if not, the first client collects editing information of the first document of the user for the first client.
例如,所述第一客户端可以每间隔2秒钟就进行一次检测。For example, the first client can perform a test every 2 seconds.
可以理解的是,所述第一客户端的采集操作能够触发所述第一客户端访问服务器,因此,当检测到用户正在使用输入法在所述第一文档中进行编辑时,先不采集所述编辑信息,使得所述第一客户端每次采集所述编辑信息之间的间隔并不一定是相同的,从而降低了所述第一客户端访问服务器的频率,减少服务器的处理压力。It can be understood that the collecting operation of the first client can trigger the first client to access the server, and therefore, when detecting that the user is editing in the first document by using an input method, the first is not collected. Editing the information, so that the interval between the first client to collect the edit information is not necessarily the same, thereby reducing the frequency of the first client accessing the server and reducing the processing pressure of the server.
在一个具体的实现过程中,如图2所示,所述第一客户端采集用户针对所述第一客户端的第一文档的编辑信息后,先在本地的缓存区域内对该编辑信息进行缓存。In a specific implementation process, as shown in FIG. 2, after the first client collects edit information of the first document of the first client, the first client caches the edit information in a local cache area. .
在一个具体的实现过程中,如图2所示,所述第一客户端在向所述缓存区域内存入用户针对第一客户端的第一文档的编辑信息后,可以检测所述第一客户端与所述服务器之间的网络状态。若网络状态正常,所述第一客户端将所述缓存区域内缓存的所述针对第一客户端的第一文档的编辑信息发送给所述服务器。反之,若网络状态异常,如网络中断或者不稳定,所述第一客户端不向所述服务器发送针对第一客户端的第一文档的编辑信息,但是可以继续向所述缓存区域内存入采集到的用户针对第一客户端的第一文档的编辑信息,即缓存区域内缓存的编辑信息可以持续保持自更新,直到所述第一客户端与所述服务器之间的网络状态正常。In a specific implementation process, as shown in FIG. 2, after the first client stores the edit information of the first document for the first client to the cache area, the first client may detect the first client. The network status with the server. If the network status is normal, the first client sends the edit information of the first document for the first client cached in the cache area to the server. On the other hand, if the network status is abnormal, such as a network interruption or instability, the first client does not send the edit information of the first document for the first client to the server, but may continue to collect the memory into the cache area. The user's edit information for the first document of the first client, that is, the edit information cached in the cache area, may continue to be self-updated until the network state between the first client and the server is normal.
在一个具体的实现过程中,所述第一客户端在将所述缓存区域中缓 存的针对第一客户端的第一文档的编辑信息发送给所述服务器之后,若所述第一客户端接收到所述服务器返回的确认信息,则所述第一客户端获知所述服务器成功收到针对第一客户端的第一文档的编辑信息,则所述第一客户端清空所述缓存区域中缓存的编辑信息。In a specific implementation process, the first client is slowing down the cache area After the edit information of the first document for the first client is sent to the server, if the first client receives the confirmation information returned by the server, the first client learns that the server successfully receives And to the edit information of the first document for the first client, the first client clears the edit information cached in the cache area.
在一个具体的实现过程中,针对所述第一客户端的第一文档的编辑信息可以包括但不限于:输入的文本、删除的文本、选中的文本以及当前光标所在位置中至少一个。In a specific implementation process, the editing information of the first document for the first client may include, but is not limited to, input text, deleted text, selected text, and at least one of current cursor positions.
可选地,在本发明实施例的一个可能的实现方式中,所述服务器预先获得并存储所述第一镜像文档以及所述第二镜像文档。Optionally, in a possible implementation manner of the embodiment of the present invention, the server obtains and stores the first image file and the second image file in advance.
需要说明的是,所述第一镜像文档为所述服务器文档针对的所述第一文档的镜像文档,所述服务器与所述第一客户端之间关于所述第一文档的数据同步都需要利用所述第一镜像文档实现。同理,所述第二镜像文档为所述服务器文档针对的所述第二文档的镜像文档,所述服务器与所述第二客户端之间关于所述第二文档的数据同步都需要利用所述第二镜像文档实现。It should be noted that the first image document is a mirror document of the first document for the server document, and data synchronization between the server and the first client regarding the first document is required. Implemented with the first image document. Similarly, the second image file is a mirror document of the second document for the server document, and data synchronization between the server and the second client regarding the second document needs to be utilized. The second image document implementation.
举例说明,本发明实施例中,服务器根据针对所述第一客户端的第一文档的编辑信息、服务器文档、第一镜像文档以及第二镜像文档,对第二客户端的第二文档进行更新的方法可以包括但不限于:For example, in the embodiment of the present invention, the server updates the second document of the second client according to the editing information, the server document, the first image document, and the second image document of the first document for the first client. Can include but is not limited to:
如图2所示,首先,服务器根据针对所述第一客户端的第一文档的编辑信息,对所述第一镜像文档进行更新,以实现所述第一文档与所述第一镜像文档的同步。然后,服务器根据经过更新的所述第一镜像文档,对所述服务器文档进行更新,以实现将针对所述第一客户端的第一文档的编辑信息添加到所述服务器文档中。最后,服务器根据经过更新的所 述服务器文档,对所述第二镜像文档以及所述第二客户端的第二文档进行更新,以实现将针对所述第一客户端的第一文档的编辑信息添加到所述第二镜像文档,以及实现所述第二镜像文档与所述第二文档的同步,这样,针对所述第一客户端的第一文档的编辑信息就可以在所述第二客户端的第二文档中展现。As shown in FIG. 2, first, the server updates the first mirror document according to the edit information of the first document for the first client, so as to synchronize the first document with the first mirror document. . Then, the server updates the server document according to the updated first image document to implement adding edit information of the first document for the first client to the server document. Finally, the server is based on the updated office a server document, updating the second image document and the second document of the second client to add edit information of the first document for the first client to the second image document, and Synchronizing the second image document with the second document, so that the editing information for the first document of the first client can be presented in the second document of the second client.
在一个具体的实现过程中,所述根据经过更新的所述第一镜像文档,对所述服务器文档进行更新的方法可以包括但不限于:In a specific implementation process, the method for updating the server document according to the updated first image file may include, but is not limited to:
服务器将经过更新的所述第一镜像文档与所述服务器文档进行比较,以获得经过更新的所述第一镜像文档相对于所述服务器文档的第一更新信息。然后,服务器根据所述第一更新信息,对所述服务器文档进行更新。The server compares the updated first image document with the server document to obtain updated first update information of the first image document relative to the server document. Then, the server updates the server document according to the first update information.
如图2所示,在一个具体的实现过程中,所述根据经过更新的所述服务器文档,对所述第二镜像文档以及所述第二客户端的第二文档进行更新的方法可以包括但不限于:首先,将经过更新的所述服务器文档与所述第二镜像文档进行比较,以获得经过更新的所述服务器文档相对于所述第二镜像文档的第二更新信息。然后,根据所述第二更新信息,对所述第二镜像文档进行更新。最后,将所述第二更新信息发送给所述第二客户端,以便于所述第二客户端根据所述第二更新信息,对所述第二文档进行更新。As shown in FIG. 2, in a specific implementation process, the method for updating the second image document and the second document of the second client according to the updated server document may include but not The method is first: comparing the updated server document with the second image document to obtain updated update information of the server document relative to the second image document. Then, updating the second mirrored document according to the second update information. Finally, the second update information is sent to the second client, so that the second client updates the second document according to the second update information.
在一个具体的实现过程中,可以为所述第一镜像文档、所述服务器文档以及所述第二镜像文档分别配置对应的更新模块,这样,可以由相应的更新模块执行自身对应的镜像文档的同步操作。In a specific implementation process, a corresponding update module may be configured for the first image file, the server file, and the second image file, so that the corresponding image module may be executed by the corresponding update module. Synchronous operation.
例如,当所述服务器文档更新之后,所述服务器文档对应的更新模 块向其他更新模块发送广播消息,用于告知所述服务器文档有更新。这样,第二镜像文档的更新模块就会收到该广播消息,然后将经过更新的所述服务器文档与所述第二镜像文档进行比较,获得经过更新的所述服务器文档相对于所述第二镜像文档的第二更新信息,进而根据所述第二更新信息,对第二镜像文档进行更新,并下发该第二更新信息给第二客户端,以实现第二镜像文档与所述第二客户端的第二文档之间的同步。For example, after the server document is updated, the update template corresponding to the server document The block sends a broadcast message to the other update module to inform the server that the document has an update. In this way, the update module of the second image document receives the broadcast message, and then compares the updated server document with the second image document to obtain the updated server document relative to the second Mirroring the second update information of the document, and then updating the second image file according to the second update information, and delivering the second update information to the second client, to implement the second image document and the second image Synchronization between the second document of the client.
可以理解的是,本发明实施例中,来自第一客户端的第一文档的编辑信息,需要经过第一镜像文档才能同步到服务器文档,同理,服务器文档的更新信息需要经过第二镜像文档才能同步到第二客户端的第二文档。因此,不管是来自客户端的更新,还是来自服务器的更新,都需要经过镜像文档才能实现同步,实现将更新信息同步到客户端,或者将客户端发来的编辑信息同步到服务器,服务器通过相应的镜像文档与每个客户端之间的数据同步都是独立线程,线程之间不互相影响,即使某线程出现异常,也不会影响其他线程中的数据同步,不影响整个系统的数据同步。It can be understood that, in the embodiment of the present invention, the edit information of the first document from the first client needs to pass through the first image document to be synchronized to the server document. Similarly, the update information of the server document needs to pass the second image document. Synchronize to the second document of the second client. Therefore, whether it is an update from the client or an update from the server, the mirrored document needs to be synchronized to synchronize the update information to the client, or the edit information sent by the client is synchronized to the server, and the server passes the corresponding The data synchronization between the mirrored document and each client is a separate thread. The threads do not affect each other. Even if a thread has an exception, it will not affect the data synchronization in other threads, and does not affect the data synchronization of the entire system.
现有技术中基于基线文档的在线文档协同技术中,如果正在编辑文档的用户的客户端与服务器之间的网络出现异常,将无法把编辑信息合并到基线文档,导致其他用户也不能编辑文档,需要等待网络恢复正常,将编辑信息合并到基线文档后,才能允许其他用户编辑文档。与该现有技术相比,本发明实施例所提供的上述技术方案,可以解决现有技术中无法同一个文档由多个用户同时编辑的问题,提高了文档协同效率。In the prior art online document collaboration technology based on the baseline document, if the network between the client and the server of the user who is editing the document is abnormal, the editing information cannot be merged into the baseline document, and the other users cannot edit the document. You need to wait for the network to return to normal, and merge the edit information into the baseline document before allowing other users to edit the document. Compared with the prior art, the foregoing technical solution provided by the embodiment of the present invention can solve the problem that the same document cannot be edited by multiple users at the same time in the prior art, and the document collaboration efficiency is improved.
例如,请参考图3,其为本发明实施例所提供的用户在线编辑文档的界面示例图,如图所示,可以在用户正在编辑的文档中展现其他用户 “dengyulin”在该文档中选中的文本,即“本周”,还可以展现其他用户“张宁”在该文档中选中的文本,即“计划”。For example, please refer to FIG. 3 , which is an example of an interface for a user to edit a document online according to an embodiment of the present invention. As shown in the figure, other users may be displayed in a document being edited by a user. The text selected by "dengyulin" in the document, "this week", can also display the text selected by other users "Zhang Ning" in the document, namely "plan".
本发明实施例进一步给出实现上述方法实施例中各步骤及方法的装置实施例。Embodiments of the present invention further provide an apparatus embodiment for implementing the steps and methods in the foregoing method embodiments.
请参考图4,其为本发明实施例所提供的文档协同装置的功能方块图。如图所示,该装置包括:Please refer to FIG. 4 , which is a functional block diagram of a document collaboration apparatus according to an embodiment of the present invention. As shown, the device includes:
接收单元41,用于接收第一客户端发送的针对所述第一客户端的第一文档的编辑信息;The receiving unit 41 is configured to receive, by the first client, edit information of the first document for the first client;
协同单元42,用于根据针对所述第一客户端的第一文档的编辑信息、服务器文档、第一镜像文档以及第二镜像文档,对第二客户端的第二文档进行更新;The collaboration unit 42 is configured to update the second document of the second client according to the edit information, the server document, the first image file, and the second image file of the first document for the first client;
所述第一镜像文档为所述服务器文档针对的所述第一文档的镜像文档,所述第二镜像文档为所述服务器文档针对的所述第二文档的镜像文档。The first image document is a mirror document of the first document for the server document, and the second mirror document is a mirror document of the second document for the server document.
在一个具体的实现过程中,所述协同单元42进一步包括:In a specific implementation process, the collaboration unit 42 further includes:
第一更新模块421,用于根据针对所述第一客户端的第一文档的编辑信息,对所述第一镜像文档进行更新;The first update module 421 is configured to update the first mirror document according to the edit information of the first document for the first client;
第二更新模块422,用于根据经过更新的所述第一镜像文档,对所述服务器文档进行更新;a second update module 422, configured to update the server document according to the updated first image file;
第三更新模块423,用于根据经过更新的所述服务器文档,对所述第二镜像文档以及所述第二客户端的第二文档进行更新。The third update module 423 is configured to update the second mirror document and the second document of the second client according to the updated server document.
在一个具体的实现过程中,所述第二更新模块422,具体用于:In a specific implementation process, the second update module 422 is specifically configured to:
将经过更新的所述第一镜像文档与所述服务器文档进行比较,以获 得经过更新的所述第一镜像文档相对于所述服务器文档的第一更新信息;Comparing the updated first image document with the server document to obtain Corresponding to the first update information of the first image document relative to the server document;
根据所述第一更新信息,对所述服务器文档进行更新。Updating the server document according to the first update information.
在一个具体的实现过程中,所述第三更新模块423,具体用于:In a specific implementation process, the third update module 423 is specifically configured to:
将经过更新的所述服务器文档与所述第二镜像文档进行比较,以获得经过更新的所述服务器文档相对于所述第二镜像文档的第二更新信息;Comparing the updated server document with the second mirrored document to obtain updated update information of the server document relative to the second mirrored document;
根据所述第二更新信息,对所述第二镜像文档进行更新;Updating the second mirrored document according to the second update information;
将所述第二更新信息发送给所述第二客户端,以便于所述第二客户端根据所述第二更新信息,对所述第二文档进行更新。And sending the second update information to the second client, so that the second client updates the second document according to the second update information.
可选的,在本发明实施例的一个可能的实现方式中,所述装置还包括:存储单元43,用于获得并存储所述第一镜像文档和所述第二镜像文档。Optionally, in a possible implementation manner of the embodiment of the present invention, the apparatus further includes: a storage unit 43 configured to obtain and store the first mirror document and the second mirror document.
由于本实施例中的各单元能够执行图1所示的方法,本实施例未详细描述的部分,可参考对图1的相关说明。Since the units in this embodiment can perform the method shown in FIG. 1, and the parts not described in detail in this embodiment, reference may be made to the related description of FIG.
本发明实施例的技术方案具有以下有益效果:The technical solution of the embodiment of the invention has the following beneficial effects:
本发明实施例中,通过接收第一客户端发送的针对所述第一客户端的第一文档的编辑信息;从而,根据针对所述第一客户端的第一文档的编辑信息、服务器文档、第一镜像文档以及第二镜像文档,对第二客户端的第二文档进行更新;所述第一镜像文档为所述服务器文档针对的所述第一文档的镜像文档,所述第二镜像文档为所述服务器文档针对的所述第二文档的镜像文档。In the embodiment of the present invention, the editing information of the first document for the first client sent by the first client is received; thereby, according to the editing information of the first document for the first client, the server document, the first Updating the second document of the second client by the mirroring document and the second mirroring document; the first mirroring document is a mirroring document of the first document for the server document, and the second mirroring document is the A mirrored document of the second document for which the server document is directed.
本发明实施例提供的技术方案,利用第一镜像文档和第二镜像文档,将针对第一客户端的第一文档的编辑信息,同步到第二客户端的第二文档,实现文档协同技术。与现有技术中基于基线文本实现文档协同技术 的方案相比,本发明实施例能够解决同一文档无法由多个用户同时编辑,导致文档协同效率比较低的问题,实现了同一文档可以由多个用户同时编辑,提高了文档协同效率。The technical solution provided by the embodiment of the present invention uses the first image document and the second image file to synchronize the editing information of the first document for the first client to the second document of the second client to implement the document collaboration technology. Implementing document collaboration technology based on baseline text in the prior art Compared with the solution, the embodiment of the present invention can solve the problem that the same document cannot be edited by multiple users at the same time, resulting in low document collaboration efficiency, and the same document can be edited by multiple users at the same time, thereby improving document collaboration efficiency.
所属领域的技术人员可以清楚地了解到,为描述的方便和简洁,上述描述的系统,装置和单元的具体工作过程,可以参考前述方法实施例中的对应过程,在此不再赘述。A person skilled in the art can clearly understand that for the convenience and brevity of the description, the specific working process of the system, the device and the unit described above can refer to the corresponding process in the foregoing method embodiment, and details are not described herein again.
在本发明所提供的几个实施例中,应该理解到,所揭露的系统,装置和方法,可以通过其它的方式实现。例如,以上所描述的装置实施例仅仅是示意性的,例如,所述单元的划分,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式,例如,多个单元或组件可以结合或者可以集成到另一个系统,或一些特征可以忽略,或不执行。另一点,所显示或讨论的相互之间的耦合或直接耦合或通信连接可以是通过一些接口,装置或单元的间接耦合或通信连接,可以是电性,机械或其它的形式。In the several embodiments provided by the present invention, it should be understood that the disclosed system, apparatus, and method may be implemented in other manners. For example, the device embodiments described above are merely illustrative. For example, the division of the unit is only a logical function division. In actual implementation, there may be another division manner. For example, multiple units or components may be combined. Or it can be integrated into another system, or some features can be ignored or not executed. In addition, the mutual coupling or direct coupling or communication connection shown or discussed may be an indirect coupling or communication connection through some interface, device or unit, and may be in an electrical, mechanical or other form.
所述作为分离部件说明的单元可以是或者也可以不是物理上分开的,作为单元显示的部件可以是或者也可以不是物理单元,即可以位于一个地方,或者也可以分布到多个网络单元上。可以根据实际的需要选择其中的部分或者全部单元来实现本实施例方案的目的。The units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, may be located in one place, or may be distributed to multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of the embodiment.
另外,在本发明各个实施例中的各功能单元可以集成在一个处理单元中,也可以是各个单元单独物理存在,也可以两个或两个以上单元集成在一个单元中。上述集成的单元既可以采用硬件的形式实现,也可以采用硬件加软件功能单元的形式实现。In addition, each functional unit in each embodiment of the present invention may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above integrated unit can be implemented in the form of hardware or in the form of hardware plus software functional units.
上述以软件功能单元的形式实现的集成的单元,可以存储在一个计 算机可读取存储介质中。上述软件功能单元存储在一个存储介质中,包括若干指令用以使得一台计算机装置(可以是个人计算机,服务器,或者网络装置等)或处理器(Processor)执行本发明各个实施例所述方法的部分步骤。而前述的存储介质包括:U盘、移动硬盘、只读存储器(Read-Only Memory,ROM)、随机存取存储器(Random Access Memory,RAM)、磁碟或者光盘等各种可以存储程序代码的介质。The above integrated unit implemented in the form of a software functional unit can be stored in one meter The computer can be read in the storage medium. The above software functional unit is stored in a storage medium and includes instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) or a processor to perform the methods of the various embodiments of the present invention. Part of the steps. The foregoing storage medium includes: a U disk, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disk, and the like, which can store program codes. .
以上所述仅为本发明的较佳实施例而已,并不用以限制本发明,凡在本发明的精神和原则之内,所做的任何修改、等同替换、改进等,均应包含在本发明保护的范围之内。 The above are only the preferred embodiments of the present invention, and are not intended to limit the present invention. Any modifications, equivalents, improvements, etc., which are made within the spirit and principles of the present invention, should be included in the present invention. Within the scope of protection.

Claims (12)

  1. 一种文档协同方法,其特征在于,所述方法包括:A document collaboration method, the method comprising:
    接收第一客户端发送的针对所述第一客户端的第一文档的编辑信息;Receiving edit information of the first document sent by the first client for the first client;
    根据针对所述第一客户端的第一文档的编辑信息、服务器文档、第一镜像文档以及第二镜像文档,对第二客户端的第二文档进行更新;Updating the second document of the second client according to the edit information, the server document, the first image file, and the second image file of the first document for the first client;
    所述第一镜像文档为所述服务器文档针对的所述第一文档的镜像文档,所述第二镜像文档为所述服务器文档针对的所述第二文档的镜像文档。The first image document is a mirror document of the first document for the server document, and the second mirror document is a mirror document of the second document for the server document.
  2. 根据权利要求1所述的方法,其特征在于,所述根据针对所述第一客户端的第一文档的编辑信息、服务器文档、第一镜像文档以及第二镜像文档,对第二客户端的第二文档进行更新,包括:The method according to claim 1, wherein the second information is used according to the edit information of the first document for the first client, the server document, the first mirror document, and the second mirror document. The documentation is updated to include:
    根据针对所述第一客户端的第一文档的编辑信息,对所述第一镜像文档进行更新;Updating the first mirrored document according to edit information of the first document for the first client;
    根据经过更新的所述第一镜像文档,对所述服务器文档进行更新;Updating the server document according to the updated first image document;
    根据经过更新的所述服务器文档,对所述第二镜像文档以及所述第二客户端的第二文档进行更新。Updating the second mirrored document and the second document of the second client according to the updated server document.
  3. 根据权利要求2所述的方法,其特征在于,所述根据经过更新的所述第一镜像文档,对所述服务器文档进行更新,包括:The method according to claim 2, wherein the updating the server document according to the updated first image file comprises:
    将经过更新的所述第一镜像文档与所述服务器文档进行比较,以获得经过更新的所述第一镜像文档相对于所述服务器文档的第一更新信息;Comparing the updated first image document with the server document to obtain updated first update information of the first image document relative to the server document;
    根据所述第一更新信息,对所述服务器文档进行更新。Updating the server document according to the first update information.
  4. 根据权利要求2或3所述的方法,其特征在于,所述根据经过更新的所述服务器文档,对所述第二镜像文档以及所述第二客户端的第 二文档进行更新,包括:The method according to claim 2 or 3, wherein said second mirror document and said second client are based on said updated server document The second document is updated to include:
    将经过更新的所述服务器文档与所述第二镜像文档进行比较,以获得经过更新的所述服务器文档相对于所述第二镜像文档的第二更新信息;Comparing the updated server document with the second mirrored document to obtain updated update information of the server document relative to the second mirrored document;
    根据所述第二更新信息,对所述第二镜像文档进行更新;Updating the second mirrored document according to the second update information;
    将所述第二更新信息发送给所述第二客户端,以便于所述第二客户端根据所述第二更新信息,对所述第二文档进行更新。And sending the second update information to the second client, so that the second client updates the second document according to the second update information.
  5. 根据权利要求1至4中任一项所述的方法,其特征在于,所述根据针对第一客户端的第一文档的编辑信息、服务器文档、第一镜像文档以及第二镜像文档,对第二客户端的第二文档进行更新之前,所述方法还包括:获得并存储所述第一镜像文档和所述第二镜像文档。The method according to any one of claims 1 to 4, wherein the second information is based on edit information of the first document for the first client, the server document, the first mirror document, and the second mirror document. Before the second document of the client is updated, the method further includes: obtaining and storing the first mirror document and the second mirror document.
  6. 一种文档协同装置,其特征在于,所述装置包括:A document collaboration device, characterized in that the device comprises:
    接收单元,用于接收第一客户端发送的针对所述第一客户端的第一文档的编辑信息;a receiving unit, configured to receive, by the first client, edit information of the first document for the first client;
    协同单元,用于根据针对所述第一客户端的第一文档的编辑信息、服务器文档、第一镜像文档以及第二镜像文档,对第二客户端的第二文档进行更新;a collaboration unit, configured to update the second document of the second client according to the edit information, the server document, the first image document, and the second image file of the first document for the first client;
    所述第一镜像文档为所述服务器文档针对的所述第一文档的镜像文档,所述第二镜像文档为所述服务器文档针对的所述第二文档的镜像文档。The first image document is a mirror document of the first document for the server document, and the second mirror document is a mirror document of the second document for the server document.
  7. 根据权利要求6所述的装置,其特征在于,所述协同单元进一步包括:The device according to claim 6, wherein the cooperation unit further comprises:
    第一更新模块,用于根据针对所述第一客户端的第一文档的编辑信息,对所述第一镜像文档进行更新; a first update module, configured to update the first mirrored document according to edit information of the first document for the first client;
    第二更新模块,用于根据经过更新的所述第一镜像文档,对所述服务器文档进行更新;a second update module, configured to update the server document according to the updated first image file;
    第三更新模块,用于根据经过更新的所述服务器文档,对所述第二镜像文档以及所述第二客户端的第二文档进行更新。And a third update module, configured to update the second mirror document and the second document of the second client according to the updated server document.
  8. 根据权利要求7所述的装置,其特征在于,所述第二更新模块,具体用于:The device according to claim 7, wherein the second update module is specifically configured to:
    将经过更新的所述第一镜像文档与所述服务器文档进行比较,以获得经过更新的所述第一镜像文档相对于所述服务器文档的第一更新信息;Comparing the updated first image document with the server document to obtain updated first update information of the first image document relative to the server document;
    根据所述第一更新信息,对所述服务器文档进行更新。Updating the server document according to the first update information.
  9. 根据权利要求7或8所述的装置,其特征在于,所述第三更新模块,具体用于:The device according to claim 7 or 8, wherein the third update module is specifically configured to:
    将经过更新的所述服务器文档与所述第二镜像文档进行比较,以获得经过更新的所述服务器文档相对于所述第二镜像文档的第二更新信息;Comparing the updated server document with the second mirrored document to obtain updated update information of the server document relative to the second mirrored document;
    根据所述第二更新信息,对所述第二镜像文档进行更新;Updating the second mirrored document according to the second update information;
    将所述第二更新信息发送给所述第二客户端,以便于所述第二客户端根据所述第二更新信息,对所述第二文档进行更新。And sending the second update information to the second client, so that the second client updates the second document according to the second update information.
  10. 根据权利要求6至9中任一项所述的装置,其特征在于,所述装置还包括:存储单元,用于获得并存储所述第一镜像文档和所述第二镜像文档。The apparatus according to any one of claims 6 to 9, characterized in that the apparatus further comprises: a storage unit for obtaining and storing the first mirror document and the second mirror document.
  11. 一种设备,包括:A device that includes:
    一个或者多个处理器;One or more processors;
    存储器;Memory
    一个或者多个程序,所述一个或者多个程序存储在所述存储器中, 当被所述一个或者多个处理器执行时:One or more programs, the one or more programs being stored in the memory, When executed by the one or more processors:
    接收第一客户端发送的针对所述第一客户端的第一文档的编辑信息;Receiving edit information of the first document sent by the first client for the first client;
    根据针对所述第一客户端的第一文档的编辑信息、服务器文档、第一镜像文档以及第二镜像文档,对第二客户端的第二文档进行更新;Updating the second document of the second client according to the edit information, the server document, the first image file, and the second image file of the first document for the first client;
    所述第一镜像文档为所述服务器文档针对的所述第一文档的镜像文档,所述第二镜像文档为所述服务器文档针对的所述第二文档的镜像文档。The first image document is a mirror document of the first document for the server document, and the second mirror document is a mirror document of the second document for the server document.
  12. 一种非易失性计算机存储介质,所述非易失性计算机存储介质存储有一个或者多个程序,当所述一个或者多个程序被一个设备执行时,使得所述设备:A non-volatile computer storage medium storing one or more programs, when the one or more programs are executed by a device, causing the device to:
    接收第一客户端发送的针对所述第一客户端的第一文档的编辑信息;Receiving edit information of the first document sent by the first client for the first client;
    根据针对所述第一客户端的第一文档的编辑信息、服务器文档、第一镜像文档以及第二镜像文档,对第二客户端的第二文档进行更新;Updating the second document of the second client according to the edit information, the server document, the first image file, and the second image file of the first document for the first client;
    所述第一镜像文档为所述服务器文档针对的所述第一文档的镜像文档,所述第二镜像文档为所述服务器文档针对的所述第二文档的镜像文档。 The first image document is a mirror document of the first document for the server document, and the second mirror document is a mirror document of the second document for the server document.
PCT/CN2015/095366 2015-08-28 2015-11-24 Document cooperation method, apparatus and device, and nonvolatile computer storage medium WO2017035961A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201510542718.8 2015-08-28
CN201510542718.8A CN105117382B (en) 2015-08-28 2015-08-28 Document cooperation method and device

Publications (1)

Publication Number Publication Date
WO2017035961A1 true WO2017035961A1 (en) 2017-03-09

Family

ID=54665376

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2015/095366 WO2017035961A1 (en) 2015-08-28 2015-11-24 Document cooperation method, apparatus and device, and nonvolatile computer storage medium

Country Status (2)

Country Link
CN (1) CN105117382B (en)
WO (1) WO2017035961A1 (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110968994A (en) * 2019-10-20 2020-04-07 武汉烽火信息集成技术有限公司 Document online editing method and server
CN113468858A (en) * 2021-07-21 2021-10-01 山谷网安科技股份有限公司 On-line editing method of office file independent of client environment

Families Citing this family (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106022721A (en) * 2016-05-18 2016-10-12 吉林工程技术师范学院 Editing system
CN106953924B (en) * 2017-03-30 2021-05-07 腾讯科技(深圳)有限公司 Processing method of shared information and shared client
CN108156239A (en) * 2017-12-25 2018-06-12 青岛海信电器股份有限公司 The method and device that a kind of collaborative synchronizing white is shown
CN110019279B (en) * 2019-04-11 2020-12-04 北京字节跳动网络技术有限公司 Online document collaborative updating method, device, equipment and storage medium
CN112257391A (en) * 2020-10-26 2021-01-22 苏宁云计算有限公司 Online document submission method and device, computer equipment and storage medium
CN114997114B (en) * 2021-03-01 2024-07-19 北京字跳网络技术有限公司 Document updating method, device, equipment and medium
CN114172890B (en) * 2021-11-03 2024-02-27 阿里巴巴(中国)有限公司 File second transmission processing method and device, storage medium and electronic equipment

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6983416B1 (en) * 2000-04-04 2006-01-03 Electronics And Telecommunications Research Institute System and method for cooperative editing of web document
CN101315621A (en) * 2007-05-29 2008-12-03 北京书生国际信息技术有限公司 Method for implementing document sharing editting
CN102257523A (en) * 2008-10-29 2011-11-23 库罗斯有限公司 Online collaboration
CN102262620A (en) * 2011-08-04 2011-11-30 无锡永中软件有限公司 Document cooperation method
CN103238150A (en) * 2010-11-02 2013-08-07 谷歌公司 Realtime synchronized document editing by multiple users for blogging

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2007328489A (en) * 2006-06-07 2007-12-20 Fuji Xerox Co Ltd Document management device and program

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6983416B1 (en) * 2000-04-04 2006-01-03 Electronics And Telecommunications Research Institute System and method for cooperative editing of web document
CN101315621A (en) * 2007-05-29 2008-12-03 北京书生国际信息技术有限公司 Method for implementing document sharing editting
CN102257523A (en) * 2008-10-29 2011-11-23 库罗斯有限公司 Online collaboration
CN103238150A (en) * 2010-11-02 2013-08-07 谷歌公司 Realtime synchronized document editing by multiple users for blogging
CN102262620A (en) * 2011-08-04 2011-11-30 无锡永中软件有限公司 Document cooperation method

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110968994A (en) * 2019-10-20 2020-04-07 武汉烽火信息集成技术有限公司 Document online editing method and server
CN110968994B (en) * 2019-10-20 2024-02-27 武汉烽火信息集成技术有限公司 Document online editing method and server
CN113468858A (en) * 2021-07-21 2021-10-01 山谷网安科技股份有限公司 On-line editing method of office file independent of client environment
CN113468858B (en) * 2021-07-21 2023-12-19 山谷网安科技股份有限公司 Method for online editing of office file independent of client environment

Also Published As

Publication number Publication date
CN105117382A (en) 2015-12-02
CN105117382B (en) 2020-04-28

Similar Documents

Publication Publication Date Title
WO2017035961A1 (en) Document cooperation method, apparatus and device, and nonvolatile computer storage medium
US11943264B2 (en) Change comments for synchronized content items
US10637896B2 (en) User notification for interaction information
US10860185B2 (en) Content item activity feed for presenting events associated with content items
US11789590B2 (en) User interface for content sharing client in a desktop file system context
US11132107B2 (en) Native application collaboration
US10594788B2 (en) Determining presence in an application accessing shared and synchronized content
US10887388B2 (en) Managing presence among devices accessing shared and synchronized content
US10791186B2 (en) Displaying presence in an application accessing shared and synchronized content
TWI535327B (en) Apparatus, server and method of data synchronization between clients of communication account
KR20100095583A (en) Collaborative authoring modes
KR20150081250A (en) Bidirectional synchronization of communications and crm applications
CN104463014B (en) A kind of oracle database guard method based on snapshot
US20160321226A1 (en) Insertion of unsaved content via content channel

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 15902768

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 15902768

Country of ref document: EP

Kind code of ref document: A1