Multi-person collaborative document editing method and system

文档序号:1505364 发布日期:2020-02-07 浏览:6次 中文

阅读说明:本技术 多人协同文档编辑方法及系统 (Multi-person collaborative document editing method and system ) 是由 周祥 于 2019-10-22 设计创作,主要内容包括:本发明公开一种多人协同文档编辑方法,应用于服务器端,所述方法包括:接收第一客户端所发送的同步请求,同步请求中包括对文档进行编辑的编辑操作信息和第二客户端确定信息;解析同步请求以确定所述编辑操作信息和第二客户端确定信息;根据第二客户端确定信息确定待同步的第二客户端;将编辑操作信息发送至所述待同步的第二客户端,以实现待同步的第二客户端上的文档的同步编辑。通过服务器端接收客户端所发送的用于进行编辑操作同步的同步请求,并将编辑操作同步到具有协同权限的其它客户端,各个客户端处的工作人员能够及时根据彼此的编辑内容相应的调整或者修改自己的编辑内容,极大的保证了编辑内容的实效性,提升了工作效率。(The invention discloses a multi-person collaborative document editing method, which is applied to a server side and comprises the following steps: receiving a synchronization request sent by a first client, wherein the synchronization request comprises editing operation information for editing a document and second client determination information; analyzing the synchronous request to determine the editing operation information and the second client determining information; determining a second client to be synchronized according to the second client determination information; and sending the editing operation information to the second client to be synchronized so as to realize the synchronous editing of the document on the second client to be synchronized. The server receives the synchronous request sent by the client for synchronizing the editing operation, and synchronizes the editing operation to other clients with cooperative authority, and the staff at each client can adjust or modify own editing content in time according to the editing content, so that the effectiveness of the editing content is greatly ensured, and the working efficiency is improved.)

1. A multi-person collaborative document editing method is applied to a server side, and comprises the following steps:

receiving a synchronization request sent by a first client, wherein the synchronization request comprises editing operation information for editing a document and second client determination information;

analyzing the synchronous request to determine the editing operation information and second client determining information;

determining a second client to be synchronized according to the second client determination information;

and sending the editing operation information to the second client to be synchronized so as to realize the synchronous editing of the document on the second client to be synchronized.

2. The method of claim 1, wherein the server side comprises a plurality of servers; wherein the content of the first and second substances,

the receiving the synchronization request sent by the first client comprises:

a first server of the plurality of servers associated with the first client receiving a synchronization request sent by the first client;

the determining, according to the second client determination information, a second client to be synchronized includes:

and the first server queries other servers in the plurality of servers according to the second client determination information to determine a second client to be synchronized.

3. The method of claim 2, wherein the first server querying other servers of the plurality of servers according to the second client determination information to determine a second client to synchronize comprises:

the first server querying other servers of the plurality of servers according to the second client determination information to determine a second server associated with the second client determination information;

the second server determines the second client to be synchronized according to the second client determination information;

the sending the editing operation information to the second client to be synchronized to realize the synchronous editing of the document on the second client to be synchronized comprises:

and the second server sends the editing operation information to the second client to be synchronized so as to realize the synchronous editing of the document on the second client to be synchronized.

4. The method of claim 2 or 3, wherein each of the plurality of servers has stored therein collaborative document editing group information comprising a plurality of collaborative document editing group name information and a plurality of user identity information corresponding to each system document editing group name information.

5. The method of claim 4, wherein the second client determination information is user identity information of a current user using the second client;

the first server querying other servers of the plurality of servers according to the second client determination information to determine a second server associated with the second client determination information comprises:

the first server inquires other servers in the plurality of servers according to the user identity information of the current user so as to determine associated collaborative document editing group name information stored with the user identity information corresponding to the current user;

and determining a server where the name information of the associated collaborative document editing group is located as a second server.

6. The method according to claim 4, wherein the second client determination information is current collaborative document editing group name information corresponding to current user identity information using the first client;

the first server querying other servers of the plurality of servers according to the second client determination information to determine a second server associated with the second client determination information comprises:

the first server inquires other servers in the multiple servers according to the user identity information of the current user so as to determine an associated server in which the name information of the current collaborative document editing group is stored;

determining that the associated server is the second server.

7. A multi-user collaborative document editing system is applied to a server side, and the system comprises:

the request receiving module is used for receiving a synchronization request sent by a first client, wherein the synchronization request comprises editing operation information for editing a document and second client determination information;

the request analysis module is used for analyzing the synchronous request to determine the editing operation information and the second client determining information;

the information determining module is used for determining a second client to be synchronized according to the second client determining information;

and the information synchronization module is used for sending the editing operation information to the second client to be synchronized so as to realize the synchronous editing of the document on the second client to be synchronized.

8. The system of claim 7, wherein the server side comprises a plurality of servers; wherein the content of the first and second substances,

the receiving the synchronization request sent by the first client comprises:

a first server of the plurality of servers associated with the first client receiving a synchronization request sent by the first client;

the determining, according to the second client determination information, a second client to be synchronized includes:

and the first server queries other servers in the plurality of servers according to the second client determination information to determine a second client to be synchronized.

9. An electronic device, comprising: at least one processor, and a memory communicatively coupled to the at least one processor, wherein the memory stores instructions executable by the at least one processor to enable the at least one processor to perform the steps of the method of any one of claims 1-6.

10. A storage medium on which a computer program is stored which, when being executed by a processor, carries out the steps of the method of any one of claims 1 to 6.

Technical Field

The invention relates to the technical field of computers, in particular to a multi-person collaborative document editing method and system.

Background

In the existing work project, when multiple persons need to collaboratively edit the same document, only respective parts are often completed, and then the edited parts are combined together to form a final file, and then the final file is distributed to each worker to review or process the whole file. Obviously, the editing efficiency is low, contents edited by other workers cannot be known during editing by different workers, and the contents can work independently, so that the editing work cannot be adjusted in time and globally, only unified adjustment can be performed finally, and the situation that multiple people repeatedly edit the same contents can occur, thereby causing repeated labor.

Disclosure of Invention

The embodiment of the invention provides a multi-person collaborative document editing method and a multi-person collaborative document editing system, which are used for solving at least one of the technical problems.

In a first aspect, an embodiment of the present invention provides a multi-user collaborative document editing method, which is applied to a server, and the method includes:

receiving a synchronization request sent by a first client, wherein the synchronization request comprises editing operation information for editing a document and second client determination information;

analyzing the synchronous request to determine the editing operation information and second client determining information;

determining a second client to be synchronized according to the second client determination information;

and sending the editing operation information to the second client to be synchronized so as to realize the synchronous editing of the document on the second client to be synchronized.

In a second aspect, an embodiment of the present invention provides a multi-user collaborative document editing system, which is applied to a server side, and the system includes:

the request receiving module is used for receiving a synchronization request sent by a first client, wherein the synchronization request comprises editing operation information for editing a document and second client determination information;

the request analysis module is used for analyzing the synchronous request to determine the editing operation information and the second client determining information;

the information determining module is used for determining a second client to be synchronized according to the second client determining information;

and the information synchronization module is used for sending the editing operation information to the second client to be synchronized so as to realize the synchronous editing of the document on the second client to be synchronized.

In a third aspect, an embodiment of the present invention provides a storage medium, where one or more programs including execution instructions are stored, where the execution instructions can be read and executed by an electronic device (including but not limited to a computer, a server, or a network device, etc.) to perform any one of the above-described multi-person collaborative document editing methods of the present invention.

In a fourth aspect, an electronic device is provided, comprising: the document editing apparatus comprises at least one processor and a memory communicatively connected to the at least one processor, wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to execute any one of the multi-person collaborative document editing methods of the present invention.

In a fifth aspect, an embodiment of the present invention further provides a computer program product, where the computer program product includes a computer program stored on a storage medium, and the computer program includes program instructions, which, when executed by a computer, cause the computer to execute any one of the above-mentioned multi-person collaborative document editing methods.

The embodiment of the invention has the beneficial effects that: the server receives the synchronization request sent by the client for synchronizing the editing operation, and synchronizes the editing operation to other clients with cooperative authority, so that the editing operation generated by each client can be synchronized to other clients in time among a plurality of clients which cooperate with each other, and workers at each client can correspondingly adjust or modify own editing content in time according to the editing content, thereby greatly ensuring the effectiveness of the editing content and improving the working efficiency.

Drawings

In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings needed to be used in the description of the embodiments are briefly introduced below, and it is obvious that the drawings in the following description are some embodiments of the present invention, and it is obvious for those skilled in the art to obtain other drawings based on these drawings without creative efforts.

FIG. 1 is a flowchart of an embodiment of a multi-user collaborative document editing method according to the present invention;

FIG. 2 is an architecture diagram of an embodiment of a multi-person collaborative document editing system of the present invention;

FIG. 3 is a functional block diagram of an embodiment of a multi-person collaborative document editing system of the present invention;

fig. 4 is a schematic structural diagram of an embodiment of an electronic device according to the invention.

Detailed Description

In order to make the objects, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are some, but not all, embodiments of the present invention. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention. It should be noted that the embodiments and features of the embodiments in the present application may be combined with each other without conflict.

As shown in fig. 1, an embodiment of the present invention provides a multi-user collaborative document editing method, which is applied to a server, where a client may be one server or multiple servers or one server cluster or multiple server clusters, the server is configured to implement collaborative document editing among multiple clients, and the clients may be computer devices such as a smart phone, a notebook computer, and a desktop computer, and the method includes:

and S10, receiving a synchronization request sent by the first client, wherein the synchronization request comprises editing operation information for editing the document and second client determination information.

Illustratively, a worker performs document editing processing on a first client, and the first client automatically detects editing operation of the worker and generates editing operation information after the editing operation is digitalized; further, second client determination information for determining other clients cooperating with the first client is acquired; and then generating a synchronous request based on the editing operation information and the second client determining information and sending the synchronous request to the server.

And S20, analyzing the synchronous request to determine the editing operation information and the second client determining information.

Illustratively, the server analyzes the synchronization request, and obtains editing operation information and second client determination information corresponding to the document editing processing performed by the staff member at the first client.

And S30, determining a second client to be synchronized according to the second client determination information.

Illustratively, the server side inquires whether an information client corresponding to the second client-side determination information exists according to the locally stored related information, and if so, the client is determined to be the second client-side.

Illustratively, the server side includes a plurality of servers; wherein the receiving the synchronization request sent by the first client comprises: a first server of the plurality of servers associated with the first client receiving a synchronization request sent by the first client;

the determining, according to the second client determination information, a second client to be synchronized includes: and the first server queries other servers in the plurality of servers according to the second client determination information to determine a second client to be synchronized.

S40, sending the editing operation information to the second client to be synchronized, so as to realize the synchronous editing of the document on the second client to be synchronized.

Illustratively, each of the plurality of servers has stored therein collaborative document editing group information including a plurality of collaborative document editing group name information and a plurality of user identity information corresponding to each system document editing group name information.

In the embodiment, the server receives the synchronization request sent by the client for synchronizing the editing operation, and synchronizes the editing operation to other clients with cooperative rights, so that the editing operation generated at each client can be synchronized to other clients in time among a plurality of clients in cooperation with each other, and workers at each client can correspondingly adjust or modify own editing content in time according to the editing content, thereby greatly ensuring the effectiveness of the editing content and improving the working efficiency.

In some embodiments, the first server querying other servers of the plurality of servers according to the second client determination information to determine a second client to be synchronized comprises:

the first server querying other servers of the plurality of servers according to the second client determination information to determine a second server associated with the second client determination information;

the second server determines the second client to be synchronized according to the second client determination information;

the sending the editing operation information to the second client to be synchronized to realize the synchronous editing of the document on the second client to be synchronized comprises:

and the second server sends the editing operation information to the second client to be synchronized so as to realize the synchronous editing of the document on the second client to be synchronized.

In some embodiments, the second client determines that the information is user identity information of a current user using the second client;

the first server querying other servers of the plurality of servers according to the second client determination information to determine a second server associated with the second client determination information comprises:

the first server inquires other servers in the plurality of servers according to the user identity information of the current user so as to determine associated collaborative document editing group name information stored with the user identity information corresponding to the current user;

and determining a server where the name information of the associated collaborative document editing group is located as a second server.

In some embodiments, the second client determines that the information is current collaborative document editing group name information corresponding to current user identity information of the first client;

the first server querying other servers of the plurality of servers according to the second client determination information to determine a second server associated with the second client determination information comprises:

the first server inquires other servers in the multiple servers according to the user identity information of the current user so as to determine an associated server in which the name information of the current collaborative document editing group is stored;

determining that the associated server is the second server.

Illustratively, the data synchronization scheme involved in the embodiments of the present invention is: the operation of the document (including adding and deleting) of the user at the client is converted into data in a special format. And synchronizing to each cluster server by using MQTT, and after the server takes the data, sending the data to a corresponding client (maintaining long links).

Illustratively, the text technical solution involved in the embodiment of the present invention is: after the client obtains the data, the client caches the operation data. And merging the cached data at intervals of a certain time period and converting the merged data into the modification of the document. The method has the advantages of small transmitted data volume, good performance and accurate operation sequence of the document.

FIG. 2 is a block diagram of an embodiment of the multi-user collaborative document editing system of the present application, which includes devices 1, 2, and 3, server A, B, C, and server A communicatively coupled to servers B and C via MQTT; illustratively, the user may perform an editing operation on the device 1, whereby the device 1 transmits operation data to the server a; on one hand, the server A pushes the operation data to the servers B and C through the MQTT, and further the servers B and C send the received operation data to other equipment connected with the servers B and C in the current cooperative task; on the other hand, the server a synchronizes the operation data directly to the other devices (device 2 and device 3) to which it is communicatively connected.

The following method steps are performed, exemplarily, under the architecture shown in fig. 2:

and 1, after the text application of each client side is edited (added/deleted/changed) by a user, the operation is digitalized, cached and uploaded to a server at regular time.

2, server

2.1) first sending the data to the client which keeps the connection.

2.2) pushing the data to MQTT and synchronizing the data to other servers.

And 3, pushing other servers to the client connected with the servers.

And 4, the client side takes the operation data, modifies the rich text and displays the rich text to the user.

The server is responsible for receiving the operation data of the client and the synchronous data among the operation data and the synchronous data, and then pushing the operation data to the client needing to be pushed.

The client is responsible for pushing user behavior operation data to the client, keeping connection with the server at the same time, receiving other operation data pushed by the server, converting the operation data and refreshing rich text application of the client. MQTT is responsible for synchronization behavior between servers.

It should be noted that for simplicity of explanation, the foregoing method embodiments are described as a series of acts or combination of acts, but those skilled in the art will appreciate that the present invention is not limited by the order of acts, as some steps may occur in other orders or concurrently in accordance with the invention. Further, those skilled in the art should also appreciate that the embodiments described in the specification are preferred embodiments and that the acts and modules referred to are not necessarily required by the invention. In the foregoing embodiments, the descriptions of the respective embodiments have respective emphasis, and for parts that are not described in detail in a certain embodiment, reference may be made to related descriptions of other embodiments.

As shown in fig. 3, an embodiment of the present invention further provides a multi-user collaborative document editing system 300, applied to a server side, where the system includes:

a request receiving module 310, configured to receive a synchronization request sent by a first client, where the synchronization request includes editing operation information for editing a document and second client determination information;

a request parsing module 320, configured to parse the synchronization request to determine the editing operation information and second client determination information;

an information determining module 330, configured to determine, according to the second client determination information, a second client to be synchronized;

the information synchronization module 340 is configured to send the editing operation information to the second client to be synchronized, so as to implement synchronous editing of the document on the second client to be synchronized.

In some embodiments, the server side comprises a plurality of servers; wherein the receiving the synchronization request sent by the first client comprises: a first server of the plurality of servers associated with the first client receiving a synchronization request sent by the first client;

the determining, according to the second client determination information, a second client to be synchronized includes: and the first server queries other servers in the plurality of servers according to the second client determination information to determine a second client to be synchronized.

In some embodiments, the first server querying other servers of the plurality of servers according to the second client determination information to determine a second client to be synchronized comprises:

the first server querying other servers of the plurality of servers according to the second client determination information to determine a second server associated with the second client determination information;

the second server determines the second client to be synchronized according to the second client determination information;

the sending the editing operation information to the second client to be synchronized to realize the synchronous editing of the document on the second client to be synchronized comprises:

and the second server sends the editing operation information to the second client to be synchronized so as to realize the synchronous editing of the document on the second client to be synchronized.

In some embodiments, each of the plurality of servers has stored therein collaborative document editing group information including a plurality of collaborative document editing group name information and a plurality of user identity information corresponding to each system document editing group name information.

In some embodiments, the second client determines that the information is user identity information of a current user using the second client;

the first server querying other servers of the plurality of servers according to the second client determination information to determine a second server associated with the second client determination information comprises:

the first server inquires other servers in the plurality of servers according to the user identity information of the current user so as to determine associated collaborative document editing group name information stored with the user identity information corresponding to the current user;

and determining a server where the name information of the associated collaborative document editing group is located as a second server.

In some embodiments, the second client determines that the information is current collaborative document editing group name information corresponding to current user identity information of the first client;

the first server querying other servers of the plurality of servers according to the second client determination information to determine a second server associated with the second client determination information comprises:

the first server inquires other servers in the multiple servers according to the user identity information of the current user so as to determine an associated server in which the name information of the current collaborative document editing group is stored;

determining that the associated server is the second server.

In some embodiments, the present invention provides a non-transitory computer-readable storage medium, in which one or more programs including executable instructions are stored, where the executable instructions can be read and executed by an electronic device (including but not limited to a computer, a server, or a network device, etc.) to perform any one of the above-described multi-person collaborative document editing methods of the present invention.

In some embodiments, the present invention further provides a computer program product comprising a computer program stored on a non-volatile computer-readable storage medium, the computer program comprising program instructions that, when executed by a computer, cause the computer to perform any one of the above-described multi-person collaborative document editing methods.

In some embodiments, an embodiment of the present invention further provides an electronic device, which includes: the document editing system comprises at least one processor and a memory communicatively coupled to the at least one processor, wherein the memory stores instructions executable by the at least one processor to enable the at least one processor to perform a multi-person collaborative document editing method.

In some embodiments, an embodiment of the present invention further provides a storage medium on which a computer program is stored, where the program is executed by a processor to implement a multi-person collaborative document editing method.

The multi-person collaborative document editing system of the embodiment of the invention can be used for executing the multi-person collaborative document editing method of the embodiment of the invention, and accordingly achieves the technical effect achieved by the multi-person collaborative document editing method of the embodiment of the invention, and is not described again here. In the embodiment of the present invention, the relevant functional module may be implemented by a hardware processor (hardware processor).

Fig. 4 is a schematic diagram of a hardware structure of an electronic device for performing a multi-person collaborative document editing method according to another embodiment of the present application, where as shown in fig. 4, the electronic device includes: one or more processors 410 and a memory 420, with one processor 410 being an example in fig. 4.

The apparatus for performing the multi-person collaborative document editing method may further include: an input device 430 and an output device 440.

The processor 410, the memory 420, the input device 430, and the output device 440 may be connected by a bus or other means, such as the bus connection in fig. 4.

The memory 420 is a non-volatile computer-readable storage medium, and can be used to store non-volatile software programs, non-volatile computer-executable programs, and modules, such as program instructions/modules corresponding to the multi-user collaborative document editing method in the embodiment of the present application. The processor 410 executes various functional applications of the server and data processing by running the nonvolatile software programs, instructions and modules stored in the memory 420, that is, the multi-person collaborative document editing method of the above-described method embodiment is implemented.

The memory 420 may include a storage program area and a storage data area, wherein the storage program area may store an operating system, an application program required for at least one function; the storage data area may store data created according to use of the multiple-person collaborative document editing apparatus, and the like. Further, the memory 420 may include high speed random access memory, and may also include non-volatile memory, such as at least one magnetic disk storage device, flash memory device, or other non-volatile solid state storage device. In some embodiments, the memory 420 may optionally include memory located remotely from the processor 410, which may be connected to the multi-person collaborative document editing apparatus via a network. Examples of such networks include, but are not limited to, the internet, intranets, local area networks, mobile communication networks, and combinations thereof.

The input device 430 may receive input numeric or character information and generate signals related to user settings and function control of the multi-person collaborative document editing apparatus. The output device 440 may include a display device such as a display screen.

The one or more modules are stored in the memory 420 and, when executed by the one or more processors 410, perform the multi-person collaborative document editing method in any of the method embodiments described above.

The product can execute the method provided by the embodiment of the application, and has the corresponding functional modules and beneficial effects of the execution method. For technical details that are not described in detail in this embodiment, reference may be made to the methods provided in the embodiments of the present application.

The electronic device of the embodiments of the present application exists in various forms, including but not limited to:

(1) mobile communication devices, which are characterized by mobile communication capabilities and are primarily targeted at providing voice and data communications. Such terminals include smart phones (e.g., iphones), multimedia phones, functional phones, and low-end phones, among others.

(2) The ultra-mobile personal computer equipment belongs to the category of personal computers, has calculation and processing functions and generally has the characteristic of mobile internet access. Such terminals include PDA, MID, and UMPC devices, such as ipads.

(3) Portable entertainment devices such devices may display and play multimedia content. Such devices include audio and video players (e.g., ipods), handheld game consoles, electronic books, as well as smart toys and portable car navigation devices.

(4) The server is similar to a general computer architecture, but has higher requirements on processing capability, stability, reliability, safety, expandability, manageability and the like because of the need of providing highly reliable services.

(5) And other electronic devices with data interaction functions.

The above-described embodiments of the apparatus are merely illustrative, and the units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of the present embodiment.

Through the above description of the embodiments, those skilled in the art will clearly understand that each embodiment can be implemented by software plus a general hardware platform, and certainly can also be implemented by hardware. Based on such understanding, the above technical solutions substantially or contributing to the related art may be embodied in the form of a software product, which may be stored in a computer-readable storage medium, such as ROM/RAM, magnetic disk, optical disk, etc., and includes instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) to execute the method according to the embodiments or some parts of the embodiments.

Finally, it should be noted that: the above embodiments are only used to illustrate the technical solutions of the present application, and not to limit the same; although the present application has been described in detail with reference to the foregoing embodiments, it should be understood by those of ordinary skill in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some technical features may be equivalently replaced; and such modifications or substitutions do not depart from the spirit and scope of the corresponding technical solutions in the embodiments of the present application.

12页详细技术资料下载
上一篇:一种医用注射器针头装配设备
下一篇:一种家庭地址编码的方法及系统

网友询问留言

已有0条留言

还没有人留言评论。精彩留言会获得点赞!

精彩留言,会给你点赞!