Data cooperative processing method, device and system

文档序号:1242912 发布日期:2020-08-18 浏览:10次 中文

阅读说明:本技术 数据协同处理的方法、装置和系统 (Data cooperative processing method, device and system ) 是由 翁泽展 于 2020-04-21 设计创作,主要内容包括:本发明公开了一种数据协同处理的方法、装置和系统。其中,该系统包括:参与目标文件的协同处理的多个客户端;即时通信服务器,用于接收至少一个第一客户端发送的对目标文件的修改数据,生成修改数据对应的序列标识,并将修改数据广播至第二客户端;在将修改数据广播至第二客户端的同时,即时通信服务器还用于向协同编辑服务器发送修改数据和修改数据对应的序列标识;协同编辑服务器,用于按照序列标识记录的顺序根据修改数据生成与序列标识对应的快照数据。本发明解决了现有技术中由于协同编辑文件时由客户端修改文档至文档显示于客户端之间的链路较长,导致客户端容易出现更新不及时的技术问题。(The invention discloses a method, a device and a system for data cooperative processing. Wherein, this system includes: a plurality of clients participating in the cooperative processing of the target file; the instant messaging server is used for receiving modification data of the target file sent by at least one first client, generating a sequence identifier corresponding to the modification data and broadcasting the modification data to a second client; the instant messaging server is also used for sending the modified data and the sequence identification corresponding to the modified data to the collaborative editing server while broadcasting the modified data to the second client; and the collaborative editing server is used for generating snapshot data corresponding to the sequence identifier according to the sequence of the sequence identifier record and the modification data. The invention solves the technical problem that the client is easy to update untimely because the link from the client to the document displayed on the client is long when the document is cooperatively edited in the prior art.)

1. A system for collaborative processing of data, comprising:

a plurality of clients participating in the cooperative processing of the target file;

the instant messaging server is used for receiving modification data of a target file sent by at least one first client, generating a sequence identifier corresponding to the modification data and broadcasting the modification data to a second client, wherein the second client is other clients except the first client in the plurality of clients;

the instant messaging server is further used for sending the modified data and the sequence identification corresponding to the modified data to a collaborative editing server while broadcasting the modified data to the second client;

and the collaborative editing server is communicated with the instant messaging server and is used for generating snapshot data corresponding to the sequence identifier according to the sequence of the sequence identifier record and the modified data.

2. The system of claim 1, wherein the instant messaging server is configured to generate incremental sequence identifications in an order in which the modified data is received.

3. The system of claim 2, further comprising:

the client to be added is used for sending a snapshot data acquisition request to the collaborative editing server;

and the collaborative editing server is also used for acquiring a request according to the snapshot data and returning the latest target snapshot data determined according to the sequence identifier and the target sequence identifier corresponding to the target snapshot data to the client to be added.

4. The system according to claim 3, wherein the to-be-joined client is configured to obtain a file identifier of the target file through sharing information sent by any one of the clients that have participated in the collaborative processing, and send the snapshot data obtaining request to the collaborative editing server based on the file identifier.

5. The system of claim 3,

the instant messaging server is also used for storing modified data in a preset time period and a sequence identifier corresponding to the modified data;

the client to be added is also used for comparing the target sequence identification with the sequence identification in the instant messaging server, acquiring other sequence identifications larger than the target sequence identification, and compensating the target snapshot data based on the modified data corresponding to the other sequence identifications.

6. The system of claim 5, wherein the joining client is further configured to display the compensated target snapshot data.

7. A method for data coprocessing is characterized by comprising the following steps:

the method comprises the steps that an instant messaging server receives modification data of a target file sent by at least one first client and generates a sequence identifier corresponding to the modification data;

the instant messaging server broadcasts the modified data to a second client, wherein the second client is other clients except the first client in the clients participating in the cooperative processing of the target file;

the instant messaging server sends the modified data and a sequence identifier corresponding to the modified data to a collaborative editing server while broadcasting the modified data to a second client, and the collaborative editing server generates snapshot data of the target file according to the sequence recorded by the sequence identifier and the modified data.

8. The method of claim 7, wherein generating the sequence identifier corresponding to the modification data comprises:

and the instant communication server generates ascending sequence identifications according to the sequence of receiving the modified data.

9. The method of claim 8, further comprising:

the instant communication server returns modified data corresponding to other sequence identifications to the client to be added;

the client to be added acquires the latest target snapshot data and the corresponding target sequence identification in the collaborative editing server from the collaborative editing server, compares the target sequence identification with the sequence identification in the instant messaging server, and determines the sequence identification larger than the target sequence identification as the other sequence identifications.

10. A method for data coprocessing is characterized by comprising the following steps:

adding cooperative processing of a target file according to sharing information, wherein the sharing information comprises a file identifier of the target file;

acquiring the latest target snapshot data of the target file and a target sequence identifier corresponding to the target snapshot data in a collaborative editing server according to the file identifier, wherein the collaborative editing server generates snapshot data corresponding to the sequence identifier according to modified data and a corresponding sequence identifier sent by an instant messaging server;

acquiring modified data with the receiving time later than the target snapshot data generating time in an instant messaging server according to the target sequence identification, wherein the instant messaging server receives the modified data sent by at least one client and generates a corresponding sequence identification, broadcasts the modified data to other clients, and simultaneously sends the modified data and the corresponding sequence identification to the collaborative editing server;

and compensating the target snapshot data according to the acquired modification data.

11. The method according to claim 10, wherein obtaining the modified data in the instant messaging server, which is received later than the target snapshot data generation time, according to the target sequence identifier comprises:

comparing the target sequence identification with the sequence identification in the instant messaging server;

acquiring a sequence identifier which is larger than the target sequence identifier in the instant messaging server, wherein the instant messaging server generates an increasing sequence identifier according to the sequence of receiving the modified data;

and determining the obtained modified data to be modified data later than the generation time of the target snapshot data.

12. An apparatus for data coprocessing, comprising:

the receiving module is used for receiving modification data of the target file sent by at least one first client by the instant messaging server and generating a sequence identifier corresponding to the modification data;

a broadcasting module, configured to broadcast, by the instant messaging server, the modified data to a second client, where the second client is a client other than the first client in the clients participating in the cooperative processing of the target file;

the instant messaging server sends the modified data and a sequence identifier corresponding to the modified data to a collaborative editing server while broadcasting the modified data to a second client, and the collaborative editing server generates snapshot data of the target file according to the sequence recorded by the sequence identifier and the modified data.

13. A computer storage medium, characterized in that it stores a plurality of instructions adapted to be loaded by a processor and to perform the method steps of any of claims 7 to 9.

14. An electronic device, comprising: a processor and a memory; wherein the memory stores a computer program adapted to be loaded by the processor and to perform the method steps of claim 10 or 11.

Technical Field

The present invention relates to the field of data processing, and in particular, to a method, an apparatus, and a system for data cooperative processing.

Background

Collaborative editing is used for showing that multiple persons can edit the same document on line at the same time, and is often applied to scenes such as a multi-person conference. FIG. 1 is a diagram of a collaborative editing of a document in the prior art. Referring to fig. 1, a long link of a websocket is maintained between a client and an instant messaging server, and when the client modifies a document, the implementation manner is as follows: the client reports incremental change information to a collaborative editing server through an HTTP channel; adding a distribution time sequence to the request by the collaborative editing server, and asynchronously processing the document snapshot according to the sequence; the cooperative editing server calls a signaling interface of the instant messaging server to send the change of the document to the instant messaging server; the instant communication server broadcasts the modification to other clients through long links; and fifthly, combining and changing after the other clients receive the message, and displaying new document content.

Therefore, the sequential modification of the document by one client needs five steps to be displayed on the pages of other clients, so that the reaction time is too long, and when a plurality of users collaboratively edit, the network condition of each user is not the same, and the defect is amplified by a longer link, so that the document displayed by a specific client is different from the document displayed by other clients, and further the experience of part of the clients is poor.

Aiming at the problem that the client is easy to update untimely due to the fact that a link from the client to the document displayed on the client is long when the document is modified in a collaborative editing mode in the prior art, an effective solution is not provided at present.

Disclosure of Invention

The embodiment of the invention provides a method, a device and a system for data collaborative processing, which are used for at least solving the technical problem that a client is easy to update untimely due to a long link from a client modifying document to a document displaying on the client during collaborative file editing in the prior art.

According to an aspect of the embodiments of the present invention, there is provided a system for data cooperative processing, including: a plurality of clients participating in the cooperative processing of the target file; the instant messaging server is communicated with the plurality of clients and is used for receiving modification data of the target file sent by at least one first client, generating a sequence identifier corresponding to the modification data and broadcasting the modification data to a second client, wherein the second client is other clients except the first client in the plurality of clients; the instant messaging server is also used for sending the modified data and the sequence identification corresponding to the modified data to the collaborative editing server while broadcasting the modified data to the second client; and the collaborative editing server is communicated with the instant messaging server and is used for generating snapshot data corresponding to the sequence identifier according to the sequence of the sequence identifier record and the modification data.

Further, the instant messaging server is configured to generate the incremented sequence identifier in the order in which the modification data was received.

Further, the above system further comprises: the client to be added is used for sending a snapshot data acquisition request to the collaborative editing server; and the collaborative editing server is also used for obtaining a request according to the snapshot data and returning the latest target snapshot data determined according to the sequence identifier and the target sequence identifier corresponding to the target snapshot data to the client to be added.

Further, the to-be-added client is configured to obtain a file identifier of the target file through sharing information sent by any one of the clients participating in the collaborative processing, and send a snapshot data obtaining request to the collaborative editing server based on the file identifier.

Further, the instant messaging server is also used for storing the modification data in a preset time period and the sequence identification corresponding to the modification data; the to-be-added client is also used for comparing the target sequence identifier with the sequence identifier in the instant messaging server, acquiring other sequence identifiers larger than the target sequence identifier, and compensating the target snapshot data based on the modified data corresponding to the other sequence identifiers.

And further, the client to be added is also used for displaying the compensated target snapshot data.

According to an aspect of the embodiments of the present invention, there is provided a method for data cooperative processing, including: the instant messaging server receives modification data of a target file sent by at least one first client and generates a sequence identifier corresponding to the modification data; the instant messaging server broadcasts the modified data to a second client, wherein the second client is other clients except the first client in the clients participating in the cooperative processing of the target file; the instant messaging server sends the modified data and the sequence identification corresponding to the modified data to the collaborative editing server while broadcasting the modified data to the second client, and the collaborative editing server generates snapshot data of the target file according to the sequence recorded by the sequence identification according to the modified data.

Further, generating a sequence identifier corresponding to the modification data, including: the instant communication server generates the ascending sequence identification according to the sequence of receiving the modification data.

Further, the method further comprises: the instant communication server returns modified data corresponding to other sequence identifications to the client to be added; the client to be added acquires the latest target snapshot data and the corresponding target sequence identification in the collaborative editing server from the collaborative editing server, compares the target sequence identification with the sequence identification in the instant messaging server, and determines the sequence identification larger than the target sequence identification as other sequence identifications.

According to an aspect of the embodiments of the present invention, there is provided a method for data cooperative processing, including: adding the sharing information into the cooperative processing of the target file, wherein the sharing information comprises a file identifier of the target file; acquiring the latest target snapshot data of a target file in the collaborative editing server and a target sequence identifier corresponding to the target snapshot data according to the file identifier, wherein the collaborative editing server generates snapshot data corresponding to the sequence identifier according to modified data and the corresponding sequence identifier sent by the instant messaging server; acquiring modified data with the receiving time later than the target snapshot data generating time in an instant messaging server according to the target sequence identification, wherein the instant messaging server receives the modified data sent by at least one client and generates a corresponding sequence identification, broadcasts the modified data to other clients, and simultaneously sends the modified data and the corresponding sequence identification to a collaborative editing server; and compensating the target snapshot data according to the acquired modification data.

Further, according to the target sequence identifier, obtaining modified data in the instant messaging server, the receiving time of which is later than the generation time of the target snapshot data, includes: comparing the target sequence identification with the sequence identification in the instant messaging server; acquiring a sequence identifier which is larger than a target sequence identifier in an instant messaging server, wherein the instant messaging server generates an increasing sequence identifier according to the sequence of receiving modified data; and determining the obtained modified data to be modified data later than the generation time of the target snapshot data.

According to an aspect of the embodiments of the present invention, there is provided an apparatus for data cooperative processing, including: the receiving module is used for receiving modification data of the target file sent by at least one first client by the instant messaging server and generating a sequence identifier corresponding to the modification data; the broadcast module is used for broadcasting the modified data to a second client by the instant messaging server, wherein the second client is other clients except the first client in the clients participating in the cooperative processing of the target file; the instant messaging server sends the modified data and the sequence identification corresponding to the modified data to the collaborative editing server while broadcasting the modified data to the second client, and the collaborative editing server generates snapshot data of the target file according to the sequence recorded by the sequence identification according to the modified data.

According to an aspect of embodiments of the present invention, there is provided a computer storage medium having stored thereon a plurality of instructions adapted to be loaded by a processor and to carry out the above-mentioned method steps.

According to an aspect of an embodiment of the present invention, there is provided an electronic apparatus including: a processor and a memory; wherein the memory stores a computer program adapted to be loaded by the processor and to perform the above-mentioned method steps.

In the embodiment of the invention, modification data of a target file sent by at least one first client is received through an instant messaging server, a sequence identifier corresponding to the modification data is generated, and the modification data is broadcasted to a second client, wherein the second client is other clients except the first client in a plurality of clients; and while broadcasting the modified data to the second client, sending the modified data and the sequence identifier corresponding to the modified data to the collaborative editing server through the instant messaging server, and generating snapshot data corresponding to the sequence identifier according to the sequence recorded by the sequence identifier through the collaborative editing server. According to the scheme, the originally longer synchronous blocked cooperative processing flow is split into two asynchronous short flows, the purpose of improving the real-time performance is achieved, and the technical problem that the client is prone to being updated untimely due to the fact that a link from the client to the document displayed on the client is longer when the document is modified in a cooperative file editing process in the prior art is solved.

Drawings

The accompanying drawings, which are included to provide a further understanding of the invention and are incorporated in and constitute a part of this application, illustrate embodiment(s) of the invention and together with the description serve to explain the invention without limiting the invention. In the drawings:

FIG. 1 is a schematic diagram of a collaborative editing of a document in the prior art;

FIG. 2 is a block diagram of a system for collaborative processing of data according to an embodiment of the present application;

FIG. 3 is a schematic diagram of a data coprocessing according to an embodiment of the application;

FIG. 4 is a schematic diagram of data compensation to be performed by a joining client according to an embodiment of the present application;

FIG. 5 is a method for data co-processing according to an embodiment of the present application;

FIG. 6 is a flow chart of a method of data co-processing according to an embodiment of the present application;

FIG. 7 is a schematic diagram of an apparatus for collaborative processing of data according to an embodiment of the present application; and

fig. 8 is a schematic diagram of an apparatus for data cooperative processing according to an embodiment of the present application.

Detailed Description

In order to make the technical solutions of the present invention better understood, 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 only a part of the embodiments of the present invention, and not all of the embodiments. 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 terms "first," "second," and the like in the description and claims of the present invention and in the drawings described above are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used is interchangeable under appropriate circumstances such that the embodiments of the invention described herein are capable of operation in sequences other than those illustrated or described herein. Furthermore, the terms "comprises," "comprising," and "having," and any variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, system, article, or apparatus that comprises a list of steps or elements is not necessarily limited to those steps or elements expressly listed, but may include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus.

19页详细技术资料下载
上一篇:一种医用注射器针头装配设备
下一篇:报表生成方法、装置、电子设备及存储介质

网友询问留言

已有0条留言

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

精彩留言,会给你点赞!