CN113535434A - Collaborative editing method and device for data nodes, storage medium and equipment - Google Patents

Collaborative editing method and device for data nodes, storage medium and equipment Download PDF

Info

Publication number
CN113535434A
CN113535434A CN202110831291.9A CN202110831291A CN113535434A CN 113535434 A CN113535434 A CN 113535434A CN 202110831291 A CN202110831291 A CN 202110831291A CN 113535434 A CN113535434 A CN 113535434A
Authority
CN
China
Prior art keywords
editing
data node
server
result
client
Prior art date
Legal status (The legal status 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 status listed.)
Pending
Application number
CN202110831291.9A
Other languages
Chinese (zh)
Inventor
刘德财
张琦
刘家俊
刘婷
杨超凡
何闯
哈志辉
金志伟
徐昕媚
夏侯嘉曦
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Zitiao Network Technology Co Ltd
Original Assignee
Beijing Zitiao Network Technology Co Ltd
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 Beijing Zitiao Network Technology Co Ltd filed Critical Beijing Zitiao Network Technology Co Ltd
Priority to CN202110831291.9A priority Critical patent/CN113535434A/en
Publication of CN113535434A publication Critical patent/CN113535434A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/54Interprogram communication
    • G06F9/546Message passing systems or structures, e.g. queues
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F40/00Handling natural language data
    • G06F40/10Text processing
    • G06F40/166Editing, e.g. inserting or deleting
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2209/00Indexing scheme relating to G06F9/00
    • G06F2209/54Indexing scheme relating to G06F9/54
    • G06F2209/541Client-server
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2209/00Indexing scheme relating to G06F9/00
    • G06F2209/54Indexing scheme relating to G06F9/54
    • G06F2209/548Queue

Abstract

The application discloses a collaborative editing method, a collaborative editing device, a storage medium and equipment of data nodes, wherein the method comprises the following steps: the client side sends an editing request for a target data node to the server side, so that the server side pushes the determined editing result and the corresponding processing sequence identifier to the collaborative client side for collaborative editing, the position information of the locally stored data node is updated, and then the client side updates the position information of the locally stored server side data node after receiving the editing result and the corresponding processing sequence identifier returned by the server side. Therefore, each collaborative client participating in collaborative editing in the application updates the locally stored position information of the data node of the server according to the editing result sent by the server and the corresponding processing sequence identifier, so that the positions and the corresponding contents of the same data node in the position information of the data node of the server in each client are ensured to be consistent, and the accuracy of the editing result is improved.

Description

Collaborative editing method and device for data nodes, storage medium and equipment
Technical Field
The present application relates to the field of data processing technologies, and in particular, to a collaborative editing method and apparatus for data nodes, a storage medium, and a device.
Background
With the rapid development of artificial intelligence and big data technology, the amount of data that needs to be processed exhibits an increase in the geometric level. At present, the situation that a plurality of clients simultaneously edit the same data node (such as operations of adding, deleting, updating, moving and the like) often occurs, and the collaborative editing mode can be used for a plurality of users to collaboratively work at high efficiency through the clients, so that the speed of editing the data node is obviously improved, and the collaborative editing method is widely applied to the field of data processing.
An Operation Transformation (OT) algorithm is generally used in the conventional collaborative editing method. However, the core of the collaborative editing method is to perform conversion operation, and the position of the data node is focused in the processing process, but the content corresponding to the data node has no recognition degree, so that an editing result may be wrong, especially for collaborative editing of each data node with a unique identifier and a precedence relationship, if the collaborative editing method is still adopted, the collaborative editing is performed on the data node of this type, and a wrong editing result occurs. For example, as shown in the data node list shown in fig. 1, four data nodes S1, S2, S3, and S4 each have a unique identifier and have unique corresponding contents, if a user a and a user B move the data node S2 through a client at the same time, and the user a moves S2 to the front of S1 and the user B moves S2 to the back of S3, after performing collaborative editing by using the OT algorithm, the obtained editing result is S2S 1S 3S 2S 4, which contains two S2, and obviously, the editing result is incorrect because the S2 is unique, and no matter how the editing is performed, at most one S2 should exist in the finally obtained data node list.
Therefore, how to improve the accuracy of the editing result is a technical problem to be solved urgently at present for the collaborative editing of each data node which has a unique identifier and has a precedence relationship.
Disclosure of Invention
The embodiment of the application mainly aims to provide a collaborative editing method, a collaborative editing device, a storage medium and a device for data nodes, which can effectively improve the accuracy of an editing result when each data node with a unique identifier and a precedence relationship is collaboratively edited.
The embodiment of the application provides a collaborative editing method for data nodes, which comprises the following steps:
the client sends an editing request for the target data node to the server; the server side pushes the editing result determined according to the editing request and the processing sequence identifier corresponding to the editing result to a collaborative client side of collaborative editing, and updates the position information of the locally stored data node;
the client receives an editing result determined according to the editing request and a processing sequence identifier corresponding to the editing result, which are returned by the server;
and the client updates the locally stored position information of the server data node according to the editing result and the processing sequence identifier of the editing result.
In one possible implementation, the edit request includes at least one of the following edit requests:
when all data nodes stored by the server side contain a first target data node, updating the content contained in the position corresponding to the first target data node in the positions of all data nodes stored by the server side;
when all data nodes stored by the server side comprise a second target data node, deleting the corresponding position of the second target data node from the positions of all data nodes stored by the server side;
when all data nodes stored by the server do not contain a third target data node, inserting the third target data node into a specific position of all data nodes stored by the server;
when a fourth target data node is included in all data nodes stored by the server, moving the fourth target data node from a first position to a second position in the positions of all data nodes stored by the server; the first position and the second position are different positions.
In one possible implementation, when the data node closest to the second location after the second location is taken as the first neighboring node; the moving the fourth target data node from the first location to the second location among the locations of all data nodes stored by the server includes:
moving the fourth target data node from a first position of the positions of all the data nodes stored by the server to a position which is closest to the first adjacent node before the first adjacent node;
when the data node preceding the second location that is closest to the second location is considered a second neighboring node; the moving the fourth target data node from the first location to the second location among the locations of all data nodes stored by the server includes:
and moving the fourth target data node from the first position in the positions of all the data nodes stored by the server to the position which is closest to the second adjacent node after the second adjacent node.
In a possible implementation manner, the processing sequence identifier corresponding to the editing result is a processing sequence number corresponding to the editing result; the position information of the server data node is stored in a server data node list; the client updates the locally stored position information of the server data node according to the editing result and the processing sequence identifier of the editing result, and the method comprises the following steps:
and the client updates a locally stored server data node list according to the editing result and the processing sequence number of the editing result.
In a possible implementation manner, the updating, by the client, a locally stored server data node list according to the edit result and the processing sequence number of the edit result includes:
the client judges whether the processing sequence number of the editing result is larger than the latest processing sequence number in a locally stored server data node list or not;
if so, acquiring a lost editing result and a processing sequence number corresponding to the lost editing result from the server according to a difference value between the processing sequence number of the editing result and the latest processing sequence number in the locally stored server data node list, and updating the locally stored server data node list according to the lost editing result and the processing sequence number corresponding to the lost editing result;
and if not, not updating the locally stored server data node list.
In a possible implementation manner, when a difference between the processing sequence number of the edit result and the latest processing sequence number in the locally stored server data node list is greater than a preset threshold, the method further includes:
the client sends a request for acquiring the whole data node list of the server to the server;
and the client receives the whole data node list returned by the server and updates the locally stored server data node list according to the whole data node list.
In a possible implementation manner, after the client updates the locally stored server data node list according to the edit result and the processing sequence number of the edit result, the method further includes:
and the client updates the locally stored client data node list according to the locally stored updated server data node list.
In a possible implementation, the method further includes:
and displaying the locally stored updated client data node list and/or rendering results obtained after rendering according to the updated client data node list.
The embodiment of the application provides another collaborative editing method for data nodes, which comprises the following steps:
the server receives an editing request for a target data node sent by a client and stores the editing request into a queue;
the server side sequentially carries out editing operation on the target data nodes according to the editing request to obtain an editing result and a processing sequence identifier corresponding to the editing result;
and the server side sends the editing result and the processing sequence identifier corresponding to the editing result to a collaborative client side of collaborative editing, and updates the position information of the locally stored data node.
In a possible implementation manner, after the server receives an edit request sent by a client to a target data node and stores the edit request in a queue, the method further includes:
and when the editing operation on the target data node fails according to the editing request, returning a prompt of the editing failure to the client.
The embodiment of the present application further provides a collaborative editing apparatus for a data node, where the apparatus includes:
the sending unit is used for sending an editing request for the target data node to the server; the server side pushes the editing result determined according to the editing request and the processing sequence identifier corresponding to the editing result to a collaborative client side of collaborative editing, and updates the position information of the locally stored data node;
a receiving unit, configured to receive an edit result determined according to the edit request and a processing sequence identifier corresponding to the edit result, where the edit result is returned by the server;
and the updating unit is used for updating the locally stored position information of the server data node according to the editing result and the processing sequence identifier of the editing result.
In one possible implementation, the edit request includes at least one of the following edit requests:
when all data nodes stored by the server side contain a first target data node, updating the content contained in the position corresponding to the first target data node in the positions of all data nodes stored by the server side;
when all data nodes stored by the server side comprise a second target data node, deleting the corresponding position of the second target data node from the positions of all data nodes stored by the server side;
when all data nodes stored by the server do not contain a third target data node, inserting the third target data node into a specific position of all data nodes stored by the server;
when a fourth target data node is included in all data nodes stored by the server, moving the fourth target data node from a first position to a second position in the positions of all data nodes stored by the server; the first position and the second position are different positions.
In a possible implementation manner, the apparatus further includes:
a first mobile unit configured to, when a data node closest to a second location following the second location is taken as a first neighboring node; moving the fourth target data node from a first position of the positions of all the data nodes stored by the server to a position which is closest to the first adjacent node before the first adjacent node;
a second mobile unit for when a data node closest to the second location ahead of the second location is taken as a second neighboring node; and moving the fourth target data node from the first position in the positions of all the data nodes stored by the server to the position which is closest to the second adjacent node after the second adjacent node.
In a possible implementation manner, the processing sequence identifier corresponding to the editing result is a processing sequence number corresponding to the editing result; the position information of the server data node is stored in a server data node list; the update unit includes:
and the first updating subunit is used for updating the locally stored server data node list according to the editing result and the processing sequence number of the editing result.
In a possible implementation manner, the first updating subunit is specifically configured to:
judging whether the processing sequence number of the editing result is larger than the latest processing sequence number in a locally stored server data node list or not;
if so, acquiring a lost editing result and a processing sequence number corresponding to the lost editing result from the server according to a difference value between the processing sequence number of the editing result and the latest processing sequence number in the locally stored server data node list, and updating the locally stored server data node list according to the lost editing result and the processing sequence number corresponding to the lost editing result;
and if not, not updating the locally stored server data node list.
In a possible implementation manner, when a difference between the processing sequence number of the edit result and the latest processing sequence number in the locally stored server data node list is greater than a preset threshold, the first updating subunit is further configured to:
sending a request for acquiring the whole data node list of the server to the server;
and receiving the whole data node list returned by the server, and updating the locally stored server data node list according to the whole data node list.
In a possible implementation manner, the updating unit further includes:
and the second updating subunit is used for updating the locally stored server data node list according to the editing result and the processing sequence number of the editing result, and then updating the locally stored client data node list according to the locally stored updated server data node list.
In a possible implementation manner, the apparatus further includes:
and the display unit is used for displaying the locally stored updated client data node list and/or a rendering result obtained after rendering according to the updated client data node list.
The embodiment of the present application further provides another collaborative editing apparatus for a data node, where the apparatus includes:
the receiving unit is used for receiving an editing request for a target data node sent by a client and storing the editing request into a queue;
the editing unit is used for sequentially carrying out editing operation on the target data nodes according to the editing request to obtain an editing result and a processing sequence identifier corresponding to the editing result;
and the sending unit is used for sending the editing result and the processing sequence identifier corresponding to the editing result to the collaborative client of the collaborative editing and updating the position information of the locally stored data node.
In a possible implementation manner, the apparatus further includes:
and the returning unit is used for returning a prompt of editing failure to the client when the editing operation on the target data node fails according to the editing request after receiving the editing request sent by the client for the target data node and storing the editing request into the queue.
The embodiment of the present application further provides a collaborative editing apparatus for a data node, including: a processor, a memory, a system bus;
the processor and the memory are connected through the system bus;
the memory is used for storing one or more programs, and the one or more programs comprise instructions which, when executed by the processor, cause the processor to execute any one implementation manner of the collaborative editing method of the data node.
An embodiment of the present application further provides a computer-readable storage medium, where instructions are stored in the computer-readable storage medium, and when the instructions are run on a terminal device, the terminal device is enabled to execute any implementation manner of the collaborative editing method for a data node.
According to the collaborative editing method, the device, the storage medium and the equipment for the data nodes, any client participating in collaborative editing firstly sends an editing request for a target data node to a server, so that the server pushes an editing result determined according to the editing request and a processing sequence identifier corresponding to the editing result to the collaborative editing client, and updates the position information of the locally stored data nodes; and then after receiving the editing result determined according to the editing request and the processing sequence identifier corresponding to the editing result returned by the server, the client can update the locally stored position information of the server data node according to the editing result and the processing sequence identifier of the editing result. Therefore, in the embodiment of the application, the basis for updating the position information of the locally stored server data node by each collaborative client participating in collaborative editing is the edit result sent by the server and the processing sequence identifier of the edit result, so that the positions and corresponding contents of the same data node in the position information of the server data node stored by each client are ensured to be consistent, and thus, when each data node with the unique identifier and the precedence relationship is collaboratively edited, the situation that the same data node appears for many times in the edit result is avoided, and the accuracy of the edit result is further improved.
Drawings
In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings needed to be used in the description of the embodiments or the prior art will be briefly introduced below, and it is obvious that the drawings in the following description are some embodiments of the present application, and it is obvious for those skilled in the art to obtain other drawings based on these drawings without creative efforts.
Fig. 1 is an exemplary diagram of a data node list provided in an embodiment of the present application;
fig. 2 is a schematic flowchart of a collaborative editing method for a data node according to an embodiment of the present application;
fig. 3 is a schematic structural diagram of collaborative editing of a target data node according to an embodiment of the present application;
fig. 4 is a schematic flowchart of another collaborative editing method for a data node according to an embodiment of the present application;
fig. 5 is an interaction flowchart of a collaborative editing method for a data node according to an embodiment of the present application;
fig. 6 is a block diagram of a collaborative editing apparatus for a data node according to an embodiment of the present application;
fig. 7 is a block diagram of another collaborative editing apparatus for a data node according to an embodiment of the present application.
Detailed Description
With the rapid development of big data technology, the amount of data to be processed increases rapidly, and a situation that a plurality of clients edit the same data node at the same time often occurs. For example, there may be a case where multiple users process the same presentation (PowerPoint, PPT), the presentation may include multiple slides (i.e., may be regarded as multiple data nodes), and the content included in each slide (i.e., each data node) is unique. Or, taking a currently popular live broadcast scene as an example, in the live broadcast scene, each data node may correspond to a unique live broadcast function content, for example, some nodes correspond to a function of "sharing a screen", some nodes correspond to a function of "displaying a PPT", some nodes correspond to a function of "displaying an image", and the like, and at this time, a situation that a plurality of users update the function content of the same node at the same time occurs.
At present, when collaborative editing is performed on each data node which has a unique identifier and has a precedence relationship like the above, a commonly used collaborative editing method is an OT algorithm, but the core of the OT algorithm is to perform a conversion operation, and in a processing process, attention is paid to the position of the data node, and the content corresponding to the data node itself has no recognition degree, so that an error in an editing result may be caused, for example, after the collaborative editing is performed on a data node list shown in fig. 1 by using the OT algorithm, an error editing result such as "S2S 1S 3S 2S 4" may occur. Therefore, when performing collaborative editing on each data node which has a unique identifier and a precedence relationship, how to improve the accuracy of an editing result is a technical problem to be solved urgently at present.
In order to solve the above defects, the present application provides a collaborative editing method for a data node, where any client participating in collaborative editing first sends an editing request for a target data node to a server, so that the server pushes an editing result determined according to the editing request and a processing sequence identifier corresponding to the editing result to a collaborative client for collaborative editing, and updates location information of the locally stored data node, and then, after receiving the editing result determined according to the editing request and the processing sequence identifier corresponding to the editing result returned by the server, the client can update the location information of the locally stored data node of the server according to the editing result and the processing sequence identifier of the editing result. Therefore, in the embodiment of the application, the basis for updating the position information of the locally stored server data node by each collaborative client participating in collaborative editing is the edit result sent by the server and the processing sequence identifier of the edit result, so that the positions and corresponding contents of the same data node in the position information of the server data node stored by each client are ensured to be consistent, and thus, when each data node with the unique identifier and the precedence relationship is collaboratively edited, the situation that the same data node appears for many times in the edit result is avoided, and the accuracy of the edit result is further improved.
In order to make the objects, technical solutions and advantages of the embodiments of the present application clearer, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are some embodiments of the present application, but not all 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 application.
First embodiment
Referring to fig. 1, a flow diagram of a collaborative editing method for a data node provided in this embodiment is shown, where the method is applied to any client connected to the same server and participating in collaborative editing, and the server is connected to at least two clients, and specifically includes the following steps:
s201: the client sends an editing request for the target data node to the server; and the server side pushes the editing result determined according to the editing request and the processing sequence identifier corresponding to the editing result to the collaborative client side of collaborative editing, and updates the position information of the locally stored data node.
In this embodiment, any data node that is subjected to collaborative editing by the present embodiment is defined as a target data node. In addition, the present embodiment does not limit the type of the data list where the target data node is located, for example, the data list where the target data node is located may be a data list where each node has a unique identifier and has a precedence relationship, as shown in fig. 1.
It is understood that the target data node may be determined according to actual situations, for example, the target data node may be a node corresponding to a "shared screen" function in a live scene, or a node corresponding to a slide of a page (e.g., a first page) in the PPT.
In practical application, a plurality of clients may perform collaborative editing on a target data node, specifically, the client first sends an editing request for the target data node to the server, so that the server determines an editing result and a processing sequence identifier (such as a number) corresponding to the editing result according to the editing request, pushes the obtained editing result and the processing sequence identifier corresponding to the editing result to other collaborative clients participating in collaborative editing, and updates location information of a locally stored data node. For example, as shown in fig. 3, both the client a and the client B may send an edit request for the target data node to the server, so as to implement collaborative editing on the target data node. The editing request comprises an instruction for editing the target data node.
In a possible implementation manner of the embodiment of the present application, the editing request mentioned in step S201 may include at least one of the following four editing requests:
1. and when all the data nodes stored by the server side contain the first target data node, updating the content contained in the first target data node in the positions of all the data nodes stored by the server side.
In this implementation, the edit request refers to updating at least one target data node (defined herein as a first target data node) stored by the server. It should be noted that all data nodes stored by the server are data nodes confirmed by the server, and are defined as serveretmes herein. And the server will usually store all the data nodes in a data node list, where the list includes the location information and content information of all the data nodes. The data node confirmed by the server side means that the data node has the unique identification ID generated by the server side.
Thus, when the first target data node is included in all the data nodes stored by the server, for example, when the first target data node is included in the data node list stored by the server, the editing operation performed on the first target data node may be to update (defined as update herein) the content included in the first target data node.
For example, the following steps are carried out: assuming that the data node list stored by the server is the node list shown in fig. 1 and the first target data node is the node S2, the client may send an edit request for updating the content corresponding to S2 to the server, as shown in fig. 3, where the client B sends an "update" edit request to the server, and the edit request may include an operation instruction for updating the content corresponding to the node S2.
2. And when all the data nodes stored by the server side comprise the second target data node, deleting the corresponding position of the second target data node from the positions of all the data nodes stored by the server side.
In this implementation, the edit request refers to deletion of at least one target data node (defined herein as a second target data node) stored by the server. Specifically, when all the data nodes stored in the server include the second target data node, for example, when the data node list stored in the server includes the second target data node, the editing operation performed on the second target data node may also be to delete the corresponding position of the second target data node from the positions of all the data nodes stored in the server (where this is defined as delete), for example, the second target data node may be deleted from the data node list stored in the server.
For example, the following steps are carried out: still assuming that the data node list stored by the server is the node list shown in fig. 1 and the second target data node is the node S2, the client may send an edit request to delete the node S2 to the server, as shown in fig. 3, where the client a sends a "delete" edit request to the server, and the edit request may include an operation instruction to delete the node S2.
3. And when the third target data node is not contained in all the data nodes stored by the server, inserting the third target data node into a specific position in all the data nodes stored by the server.
In this implementation, the edit request refers to newly inserting at least one target data node (defined herein as a third target data node) into a specific location among all data nodes stored by the server. Specifically, when the third target data node is not included in all the data nodes stored by the server, for example, the data node list stored by the server does not include the third target data node, the editing operation performed on the third target data node may be to add (define it as insert, i.e., insert) the third target data node to a specific position in all the data nodes stored by the server, for example, the third target data node may be inserted to a specific position in the data node list stored by the server.
For example, the following steps are carried out: still assuming that the data node list stored by the server is the node list shown in fig. 1 and the third target data node is node S6, it can be seen that this node S6 is not included in the node list shown in fig. 1, the client may send an edit request to the server to add node S6 to a specific location in the list, as shown in fig. 3, in which client a sends an "insert" edit request to the server, and this edit request may include an operation instruction to add node S6 to the specific location in the list.
The adding of the third target data node to a specific position in the data node list stored in the server may be before adding the third target data node to a certain data node in the data node list stored in the server, where the editing operation is defined as "insert before". For example, S2 may be inserted before node S1. Alternatively, the adding of the third target data node to the specific position in the data node list stored in the server may be after the adding of the third target data node to a certain data node in the data node list stored in the server, where the editing operation is defined as "insert after. For example, S2 may be inserted after node S3.
4. And when the fourth target data node is contained in all the data nodes stored by the server, moving the fourth target data node from a first position to a second position in the positions of all the data nodes stored by the server, wherein the first position and the second position are different positions.
In this implementation, the edit request refers to moving the location of a target data node (defined as a fourth target data node herein) stored by the server. Specifically, when the server stores all data nodes including the fourth target data node, for example, the server stores a data node list including the fourth target data node, the editing operation on the fourth target data node may also be to move the fourth target data node from a first position (defined as move) to a second position among the positions of all data nodes stored by the server, for example, to move the fourth target data node from the first position to the second position in the data node list stored by the server, where the first position and the second position are different positions.
For example, the following steps are carried out: still assuming that the data node list stored by the server is the node list shown in fig. 1 and the fourth target data node is the node S2, the client may send an edit request to the server after moving the node S2 to S3, as shown in fig. 3, in which the client B sends an "moveToAfter" edit request to the server, and the edit request may include an operation instruction after moving the node S2 to S3.
The step of moving the fourth target data node from the first position to the second position in the positions of all the data nodes stored in the server may be to move the fourth target data node from the position in the data node list currently stored in the server to the position closest to a certain data node before the certain data node. For example, it may be that S2 in the data node list shown in FIG. 1 was moved to the position closest to S1 before node S1. Alternatively, the moving of the fourth target data node from the first location to the second location among the locations of all the data nodes stored in the server may be moving the fourth target data node from a location in a data node list currently stored in the server to a location closest to a certain data node after the certain data node. For example, it may be that S2 in the data node list shown in FIG. 1 is moved to the position closest to S3 after node S3.
Specifically, in this implementation manner, the data node closest to the second location after the second location may be taken as the first neighboring node (the neighboring node is defined as a relatedItem in the present application), and at this time, the implementation process of moving the fourth target data node from the first location to the second location among the locations of all the data nodes stored by the server may include: and moving the fourth target data node from the first position in the positions of all the data nodes stored by the server to the position which is closest to the first adjacent node before the first adjacent node, wherein the editing operation is defined as 'moveToBefore'.
For example, the following steps are carried out: still assuming that the data node list stored by the server is the node list shown in fig. 1, and the fourth target data node is node S2, the first location is the current location of S2, and the second location is the closest location to S1 before S1, at this time, S1 may be defined as the first neighboring node, and then moving the fourth target data node from the first location to the second location among the locations of all data nodes stored by the server refers to moving S2 from the current location in table 1 to the closest location to S before S1.
Or, the data node closest to the second location before the second location may also be taken as the second neighboring node, and at this time, the implementation process of moving the fourth target data node from the first location to the second location among the locations of all the data nodes stored by the server may include: and moving the fourth target data node from the first position in the positions of all the data nodes stored by the server to the position which is closest to the second adjacent node after the second adjacent node, wherein the editing operation is defined as 'movetoaafter'.
For example, the following steps are carried out: still assuming that the data node list stored by the server is the node list shown in fig. 1, and the fourth target data node is node S2, the first location is the current location of S2, and the second location is the closest location after S3 to S3, at this time, S3 may be defined as the second neighboring node, and moving the fourth target data node from the first location to the second location among the locations of all data nodes stored by the server refers to moving S2 from the current location in table 1 to the closest location after S3 to S3.
S202: and the client receives an editing result determined according to the editing request and a processing sequence identifier corresponding to the editing result, which are returned by the server.
In this embodiment, after the client sends the edit request for the target data node to the server in step S201, the server may first store the edit request in a queue. As shown in fig. 3, after the client a and the client B respectively send four editing requests for performing "insert before", "moveToAfter", "delete", and "update" editing operations on a target data node to the server in sequence, the server may store the four editing requests in a queue in sequence. Then, the server may sequentially perform editing operations on the target data nodes according to the instructions to obtain an editing result and a processing sequence identifier corresponding to the editing result (where the identifier is used to indicate a processing sequence of the editing operations, and may use a number as an identifier, and define the number as an sid, where sid is an increasing count), and send the editing result and the processing sequence identifier corresponding to the editing result to each collaborative client participating in collaborative editing. As shown in fig. 3, after performing four editing operations, namely "insert before", "moveToAfter", "delete", and "update", on a target data node in sequence, the server obtains an editing result of "insert before" and an editing result corresponding to the edit result of "moveToAfter" and a site corresponding to the edit result of "moveToAfter" are 10002, "delete" and an editing result corresponding to the edit result of "update" and a site corresponding to the edit result of "moveToAfter" are 10004, and sends the editing results and the sites corresponding to the editing results to the client a and the client B.
And after receiving the editing result determined according to the editing request and the processing sequence identifier corresponding to the editing result returned by the server, the client may continue to execute the subsequent step S203 to implement collaborative editing of the target data node.
S203: and the client updates the locally stored position information of the server data node according to the editing result and the processing sequence identifier of the editing result.
It should be noted that, the client locally stores the location information of the server data node, and usually stores the location information in the form of a list (here, the stored server data node list is defined as a ServerList), and is a list for performing server data node processing synchronously with the server, and the content of the list is consistent with the content of the data node list stored by the server itself; meanwhile, the client locally stores a client data node list (defined as ClientList here) for locally displaying contents corresponding to the data nodes and contents corresponding to the data nodes operated locally, and then, rendering can be performed according to the list contents, and rendering results (such as different obtained functional effects) obtained after rendering are displayed to the user.
Therefore, in this embodiment, after receiving the edit result determined according to the edit request and the sid corresponding to the edit result returned by the server in step S202, the client may further update the server data node list ServerList stored locally according to the edit result and the sid corresponding to the edit result, that is, update the content of the target data node in the ServerList and the latest sid in the ServerList, so as to ensure that the content of the data node in the list is consistent with the content of the corresponding data node stored by the server, so that the situation that the same data node appears many times in the edited data node list does not occur, and the accuracy of the edit result is further improved.
Specifically, an optional implementation manner is that the processing sequence identifier corresponding to the editing result obtained by the server is the processing sequence number corresponding to the editing result, and the location information of the server data node is stored in the server data node list, so that the specific implementation manner of this step S203 may be that the client updates the locally stored server data node list according to the editing result and the processing sequence number of the editing result, and specifically may include the following steps a to C:
step A: and the client judges whether the processing sequence number of the editing result is larger than the latest processing sequence number in the locally stored server data node list.
In this implementation manner, after receiving the edit result determined according to the edit request and the sid corresponding to the edit result returned by the server through step S202, the client may further determine whether the sid is greater than the latest sid stored in the server data node list ServerList locally stored in the client, if so, it indicates that the edit result and the sid corresponding to the edit result are lost, and the subsequent step B needs to be continuously executed, and if not, the subsequent step C may be continuously executed.
And B: and acquiring the lost editing result and the processing sequence number corresponding to the lost editing result from the server according to the difference value between the processing sequence number of the editing result and the latest processing sequence number in the locally stored server data node list, and updating the locally stored server data node list according to the lost editing result and the processing sequence number corresponding to the lost editing result.
In this implementation manner, if it is determined through step a that the sid of the edit result is greater than the latest sid in the server data node list ServerList stored locally, it indicates that data is lost when the server pushes the edit result and the sid of the edit result to the client, for example, the server may not push the edit result and the sid of the edit result to the client in time due to network interruption, and the data is lost in the transmission process. At this time, in order to improve the accuracy of the editing result, the client needs to obtain the lost editing result and the sid corresponding to the lost editing result from the server according to the difference between the sid of the received editing result and the latest sid in the server data node list ServerList stored locally, and perform incremental update on the server data node list ServerList stored locally according to the lost editing result and the sid corresponding to the lost editing result.
And C: the locally stored server data node list is not updated.
In this implementation manner, if it is determined through step a that the sid of the edit result is not greater than the latest sid in the server data node list ServerList stored locally, it is described that when the server pushes the edit result and the sid of the edit result to the client, a situation of data repeat transmission occurs, for example, a situation that the server pushes the edit result and the sid of the edit result to the client repeatedly due to network delay and the like may occur. At this time, it is not necessary for the client to update the server data node list ServerList stored locally.
In addition, a possible implementation manner is that, if it is determined through step a that the sid of the edit result is greater than the latest sid in the server data node list ServerList stored locally, and a difference between the sid of the edit result and the latest sid in the server data node list ServerList stored locally at the client is greater than a preset threshold, the client further needs to send a request for obtaining the entire data node list of the server to the server, and then, after receiving the entire data node list returned by the server, update the server data node list ServerList stored locally according to the entire data node list.
The preset threshold refers to a critical value used for distinguishing whether incremental update or full update is performed on a server data node list ServerList locally stored in the client, and a specific value may be set according to an actual situation, which is not limited in the embodiment of the present application, for example, the preset threshold may be set to 30. When the difference value between the sid of the editing result received by the client and the latest sid in the ServerList stored locally is greater than the critical value, it is described that when the server pushes the sid of the editing result and the editing result to the client, excessive data loss occurs, and the ServerList stored locally at the client needs to be updated in a full amount to ensure the accuracy of the data node list; on the contrary, when the difference value between the sid of the editing result received by the client and the latest sid in the ServerList stored locally is not greater than the critical value, it indicates that less data loss occurs when the server pushes the editing result and the sid of the editing result to the client, and at this time, only the ServerList stored locally at the client needs to be updated incrementally, so that the resource waste in the editing process can be reduced.
On this basis, an optional implementation manner is that, after the server data node list ServerList stored locally is updated by the client, the client data node list ClientList stored locally may be further updated according to the updated ServerList, so as to ensure that the content of the data node list stored locally at the client is consistent with the content of the data node list stored at the server.
Further, an optional implementation manner is that, after the ClientList is updated, the client may also show the updated ClientList to the user, and/or simultaneously show a rendering result (i.e., a corresponding functional effect) obtained after rendering according to the updated ClientList to the user, so as to improve user experience. Or, after sending the editing request for the target data node to the server, the client may immediately display the rendering function effect that may be generated after the editing operation is performed on the target data node to the user, so as to improve the user experience.
Thus, by executing the steps S201 to S203, the accuracy of the editing result can be effectively improved when the plurality of clients perform collaborative editing on each data node having a unique identifier and having a precedence relationship.
For example, the following steps are carried out: for the data node list shown in fig. 1, four data nodes S1, S2, S3, and S4 each have a unique identifier and have unique corresponding contents, if the user a and the user B move the data node S2 through the client a and the client B, respectively, and the editing request of the user a is to move S2 to the front of S1, and the editing request of the user B is to move S2 to the back of S3, after performing collaborative editing by using the execution processes of the above steps S201-S203, the obtained editing result is S1S 3S 2S 4, instead of the erroneous editing result S2S 1S 3S 2S 4 obtained by the existing editing method, thereby improving the accuracy of the editing result.
In summary, in the collaborative editing method for a data node provided in this embodiment, any client participating in collaborative editing first sends an editing request for a target data node to a server, so that the server pushes an editing result determined according to the editing request and a processing sequence identifier corresponding to the editing result to a collaborative client for collaborative editing, and updates location information of a locally stored data node, and then after receiving an editing result determined according to the editing request and a processing sequence number identifier corresponding to the editing result returned by the server, the client may update location information of locally stored server data according to the editing result and the processing sequence identifier of the editing result. Therefore, in the embodiment of the application, the basis for updating the position information of the locally stored server data node by each collaborative client participating in collaborative editing is the edit result sent by the server and the processing sequence identifier of the edit result, so that the positions and corresponding contents of the same data node in the position information of the server data node stored by each client are ensured to be consistent, and thus, when each data node with the unique identifier and the precedence relationship is collaboratively edited, the situation that the same data node appears for many times in the edit result is avoided, and the accuracy of the edit result is further improved.
Second embodiment
Referring to fig. 4, this figure is a flowchart of another collaborative editing method for a data node according to an embodiment of the present application. The method is applied to a server side, the server side is connected with at least two clients participating in collaborative editing, and the method specifically comprises the following steps:
s401: and the server receives the editing request of the target data node sent by the client and stores the editing request into the queue.
In the embodiment of the present application, in order to improve the accuracy of the editing result, after receiving an editing request for a target data node sent by a client, a server first needs to store the editing request into a queue to execute a subsequent step S402, where the editing request includes an instruction for performing an editing operation on the target data node. As shown in fig. 3, after receiving four editing requests for performing "insert before", "moveToAfter", "delete", and "update" editing operations on a target data node, which are respectively sent by a client a and a client B, the server may store the four editing requests in a queue in sequence according to a receiving order, so as to perform a subsequent step S402.
S402: and the server side carries out editing operation on the target data nodes in sequence according to the editing request to obtain an editing result and a processing sequence identifier corresponding to the editing result.
In this embodiment of the application, after receiving, through step S401, an editing request for a target data node sent by a client, a server may further perform an editing operation on the target data node in sequence according to an instruction included in the editing request, so as to obtain an editing result and a processing sequence identifier (such as a number) corresponding to the editing result. As shown in fig. 3, after receiving four editing requests for performing "insert before", "moveToAfter", "delete", and "update" editing operations on a target data node, which are sent by a client a and a client B, respectively, the server may store the four editing requests in a queue in sequence according to a receiving order. Then, four editing operations of "insert before", "moveToAfter", "delete", and "update" may be sequentially performed on the target data node in order, so as to obtain an editing result of "insert before" and an editing result of "moveToAfter" and a corresponding sid thereof being 10001, an editing result of "moveToAfter" and a corresponding sid thereof being 10002, an editing result of "delete" and a corresponding sid thereof being 10003, and an editing result of "update" and a corresponding sid thereof being 10004, respectively.
S403: and the server side sends the editing result and the processing sequence identifier corresponding to the editing result to the collaborative client side of the collaborative editing, and updates the position information of the locally stored data node.
In this embodiment of the application, after obtaining the editing result and the processing sequence identifier (such as a number) corresponding to the editing result through step S402, the server may further send the editing result and the processing sequence identifier corresponding to the editing result to each collaborative client participating in the collaborative editing, and update the position information of the locally stored data node, so that each collaborative client performs collaborative editing on the target data node according to the editing result and the processing sequence identifier corresponding to the editing result, and obtains the editing result. For a specific implementation process of the client performing collaborative editing on the target data node, please refer to the descriptions of steps S201 to S203, which are not described herein again.
In a possible implementation manner of this embodiment, after receiving an edit request sent by a client for a target data node and storing the edit request in a queue, when the server fails to perform an edit operation on the target data node according to an instruction, the server also needs to return a prompt of an edit failure to the client, where the prompt may include a reason, time, and other contents of the edit failure.
Specifically, in the present embodiment, even after the server receives an edit request for the target data node sent by any client participating in the collaborative editing and stores the edit request in the queue, the server may not perform an editing operation according to an instruction included in the edit request. For example, when the first neighboring node or the second neighboring node does not exist, or the second target data node that needs to be deleted does not exist, the corresponding editing operation cannot be completed, and at this time, the server may return a prompt of an editing failure to the client. For example, assume that the server has deleted the node S1 according to the edit request sent by the client a, and synchronizes the edit result to the locally stored data node list, but the client B has not received the edit result pushed by the server. At this time, if the client B sends an edit request for performing an edit operation on the node S1 to the server, or sends an edit request for performing an edit operation on the node S1 as the first neighboring node (or the second neighboring node) to the server, the server cannot perform a specified edit operation according to the instruction included in the edit request, and needs to return a prompt indicating that the edit has failed to the client B.
Third embodiment
To facilitate understanding of the collaborative editing method for a data node provided by the present application, referring to fig. 5, an interaction process diagram of the collaborative editing method for a data node provided by the present application is shown, and the interaction process diagram may include the following steps:
s501: and the client sends an editing request for the target data node to the server.
The editing request comprises an instruction for editing the target data node.
It should be noted that step S501 is the same as step S201, and please refer to the description of step S201 above, which is not repeated herein.
S502: and the server stores the editing request into a queue.
S503: and the server side carries out editing operation on the target data nodes in sequence according to the editing request to obtain an editing result and a processing sequence identifier corresponding to the editing result, and updates the position information of the locally stored data nodes.
S504: and the server side sends the editing result and the processing sequence identifier corresponding to the editing result to each collaborative client side of the collaborative editing.
It should be noted that steps S502 to S504 are the same as steps S401 to S403, and please refer to the description of steps S401 to S403, which is not repeated herein.
S505: and the client updates the locally stored position information of the server data node according to the editing result and the processing sequence identifier of the editing result.
It should be noted that step S505 is the same as step S203, and please refer to the description of step S201, which is not repeated herein.
In this way, when the target data node is collaboratively edited, any client participating in collaborative editing first sends an editing request for the target data node to the server; the editing request comprises an instruction for editing the target data node. And then after storing the editing request into the queue, the server side sequentially carries out editing operation on the target data nodes according to the editing request to obtain an editing result and a processing sequence identifier corresponding to the editing result, and sends the editing result and the processing sequence identifier corresponding to the editing result to each collaborative client side participating in collaborative editing. Then, each cooperative client can update the locally stored location information of the server data node according to the edit result and the processing sequence number of the edit result. Therefore, in the embodiment of the application, the basis for updating the position information of the locally stored server data node by each collaborative client participating in collaborative editing is the edit result sent by the server and the processing sequence identifier of the edit result, so that the positions and corresponding contents of the same data node in the position information of the server data node stored by each client are ensured to be consistent, and thus, when each data node with the unique identifier and the precedence relationship is collaboratively edited, the situation that the same data node appears for many times in the edit result is avoided, and the accuracy of the edit result is further improved.
Fourth embodiment
In this embodiment, a collaborative editing apparatus for a data node will be described, and please refer to the first embodiment for related contents.
Referring to fig. 6, a schematic composition diagram of a collaborative editing apparatus for a data node provided in this embodiment is shown, where the apparatus 600 includes:
a sending unit 601, configured to send an edit request for a target data node to a server; the server side pushes the editing result determined according to the editing request and the processing sequence identifier corresponding to the editing result to a collaborative client side of collaborative editing, and updates the position information of the locally stored data node;
a receiving unit 602, configured to receive an edit result determined according to the edit request and a processing sequence identifier corresponding to the edit result, where the edit result is returned by the server;
an updating unit 603, configured to update the locally stored location information of the server data node according to the edit result and the processing sequence identifier of the edit result.
In one implementation manner of this embodiment, the edit request includes at least one of the following edit requests:
when all data nodes stored by the server side contain a first target data node, updating the content contained in the position corresponding to the first target data node in the positions of all data nodes stored by the server side;
when all data nodes stored by the server side comprise a second target data node, deleting the corresponding position of the second target data node from the positions of all data nodes stored by the server side;
when all data nodes stored by the server do not contain a third target data node, inserting the third target data node into a specific position of all data nodes stored by the server;
when a fourth target data node is included in all data nodes stored by the server, moving the fourth target data node from a first position to a second position in the positions of all data nodes stored by the server; the first position and the second position are different positions.
In an implementation manner of this embodiment, the apparatus further includes:
a first mobile unit configured to, when a data node closest to a second location following the second location is taken as a first neighboring node; moving the fourth target data node from a first position of the positions of all the data nodes stored by the server to a position which is closest to the first adjacent node before the first adjacent node;
a second mobile unit for when a data node closest to the second location ahead of the second location is taken as a second neighboring node; and moving the fourth target data node from the first position in the positions of all the data nodes stored by the server to the position which is closest to the second adjacent node after the second adjacent node.
In an implementation manner of this embodiment, the processing sequence identifier corresponding to the editing result is a processing sequence number corresponding to the editing result; the position information of the server data node is stored in a server data node list; the update unit 603 includes:
and the first updating subunit is used for updating the locally stored server data node list according to the editing result and the processing sequence number of the editing result.
In an implementation manner of this embodiment, the first updating subunit is specifically configured to:
judging whether the processing sequence number of the editing result is larger than the latest processing sequence number in a locally stored server data node list or not;
if so, acquiring a lost editing result and a processing sequence number corresponding to the lost editing result from the server according to a difference value between the processing sequence number of the editing result and the latest processing sequence number in the locally stored server data node list, and updating the locally stored server data node list according to the lost editing result and the processing sequence number corresponding to the lost editing result;
and if not, not updating the locally stored server data node list.
In an implementation manner of this embodiment, when a difference between the processing sequence number of the edit result and the latest processing sequence number in the locally stored server data node list is greater than a preset threshold, the first updating subunit is further configured to:
sending a request for acquiring the whole data node list of the server to the server;
and receiving the whole data node list returned by the server, and updating the locally stored server data node list according to the whole data node list.
In an implementation manner of this embodiment, the updating unit 603 further includes:
and the second updating subunit is used for updating the locally stored server data node list according to the editing result and the processing sequence number of the editing result, and then updating the locally stored client data node list according to the locally stored updated server data node list.
In an implementation manner of this embodiment, the apparatus further includes:
and the display unit is used for displaying the locally stored updated client data node list and/or a rendering result obtained after rendering according to the updated client data node list.
Fifth embodiment
In this embodiment, another collaborative editing apparatus for a data node will be described, and please refer to the second embodiment for related contents.
Referring to fig. 7, a schematic composition diagram of another collaborative editing apparatus for data nodes provided in this embodiment is shown, where the apparatus 700 includes:
a receiving unit 701, configured to receive an edit request for a target data node sent by a client, and store the edit request in a queue;
an editing unit 702, configured to sequentially perform an editing operation on the target data node according to the editing request, so as to obtain an editing result and a processing sequence identifier corresponding to the editing result;
a sending unit 702, configured to send the editing result and the processing sequence identifier corresponding to the editing result to a collaborative client of collaborative editing, and update the location information of the locally stored data node.
In an implementation manner of this embodiment, the apparatus further includes:
and the returning unit is used for returning a prompt of editing failure to the client when the editing operation on the target data node fails according to the editing request after receiving the editing request sent by the client for the target data node and storing the editing request into the queue.
Further, an embodiment of the present application further provides a collaborative editing apparatus for a data node, including: a processor, a memory, a system bus;
the processor and the memory are connected through the system bus;
the memory is used for storing one or more programs, and the one or more programs comprise instructions which, when executed by the processor, cause the processor to execute any implementation method of the collaborative editing method of the data node.
Further, an embodiment of the present application further provides a computer-readable storage medium, where instructions are stored in the computer-readable storage medium, and when the instructions are run on a terminal device, the terminal device is caused to execute any implementation method of the collaborative editing method for a data node.
As can be seen from the above description of the embodiments, those skilled in the art can clearly understand that all or part of the steps in the above embodiment methods can be implemented by software plus a necessary general hardware platform. Based on such understanding, the technical solution of the present application may be essentially or partially implemented in the form of a software product, which may be stored in a storage medium, such as a ROM/RAM, a magnetic disk, an optical disk, etc., and includes several instructions for enabling a computer device (which may be a personal computer, a server, or a network communication device such as a media gateway, etc.) to execute the method according to the embodiments or some parts of the embodiments of the present application.
It should be noted that, in the present specification, the embodiments are described in a progressive manner, each embodiment focuses on differences from other embodiments, and the same and similar parts among the embodiments may be referred to each other. The device disclosed by the embodiment corresponds to the method disclosed by the embodiment, so that the description is simple, and the relevant points can be referred to the method part for description.
It is further noted that, herein, relational terms such as first and second, and the like may be used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Also, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other identical elements in a process, method, article, or apparatus that comprises the element.
The previous description of the disclosed embodiments is provided to enable any person skilled in the art to make or use the present application. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the generic principles defined herein may be applied to other embodiments without departing from the spirit or scope of the application. Thus, the present application is not intended to be limited to the embodiments shown herein but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.

Claims (14)

1. A collaborative editing method for data nodes is characterized in that the method comprises the following steps:
the client sends an editing request for the target data node to the server; the server side pushes the editing result determined according to the editing request and the processing sequence identifier corresponding to the editing result to a collaborative client side of collaborative editing, and updates the position information of the locally stored data node;
the client receives an editing result determined according to the editing request and a processing sequence identifier corresponding to the editing result, which are returned by the server;
and the client updates the locally stored position information of the server data node according to the editing result and the processing sequence identifier of the editing result.
2. The method of claim 1, wherein the edit request comprises at least one of:
when all data nodes stored by the server side contain a first target data node, updating the content contained in the position corresponding to the first target data node in the positions of all data nodes stored by the server side;
when all data nodes stored by the server side comprise a second target data node, deleting the corresponding position of the second target data node from the positions of all data nodes stored by the server side;
when all data nodes stored by the server do not contain a third target data node, inserting the third target data node into a specific position of all data nodes stored by the server;
when a fourth target data node is included in all data nodes stored by the server, moving the fourth target data node from a first position to a second position in the positions of all data nodes stored by the server; the first position and the second position are different positions.
3. The method according to claim 2, wherein when the data node closest to the second location following the second location is taken as the first neighboring node; the moving the fourth target data node from the first location to the second location among the locations of all data nodes stored by the server includes:
moving the fourth target data node from a first position of the positions of all the data nodes stored by the server to a position which is closest to the first adjacent node before the first adjacent node;
when the data node preceding the second location that is closest to the second location is considered a second neighboring node; the moving the fourth target data node from the first location to the second location among the locations of all data nodes stored by the server includes:
and moving the fourth target data node from the first position in the positions of all the data nodes stored by the server to the position which is closest to the second adjacent node after the second adjacent node.
4. The method according to claim 1, wherein the processing sequence identifier corresponding to the editing result is a processing sequence number corresponding to the editing result; the position information of the server data node is stored in a server data node list; the client updates the locally stored position information of the server data node according to the editing result and the processing sequence identifier of the editing result, and the method comprises the following steps:
and the client updates a locally stored server data node list according to the editing result and the processing sequence number of the editing result.
5. The method of claim 4, wherein the client updates a locally stored server data node list according to the edit result and the processing sequence number of the edit result, and comprises:
the client judges whether the processing sequence number of the editing result is larger than the latest processing sequence number in a locally stored server data node list or not;
if so, acquiring a lost editing result and a processing sequence number corresponding to the lost editing result from the server according to a difference value between the processing sequence number of the editing result and the latest processing sequence number in the locally stored server data node list, and updating the locally stored server data node list according to the lost editing result and the processing sequence number corresponding to the lost editing result;
and if not, not updating the locally stored server data node list.
6. The method according to claim 5, wherein when the difference between the processing sequence number of the edit result and the latest processing sequence number in the locally stored server data node list is greater than a preset threshold, the method further comprises:
the client sends a request for acquiring the whole data node list of the server to the server;
and the client receives the whole data node list returned by the server and updates the locally stored server data node list according to the whole data node list.
7. The method according to any one of claims 4-6, wherein after the client updates the locally stored server data node list according to the edit result and the processing sequence number of the edit result, the method further comprises:
and the client updates the locally stored client data node list according to the locally stored updated server data node list.
8. The method of claim 1, further comprising:
and displaying the locally stored updated client data node list and/or rendering results obtained after rendering according to the updated client data node list.
9. A collaborative editing method for data nodes is characterized in that the method comprises the following steps:
the server receives an editing request for a target data node sent by a client and stores the editing request into a queue;
the server side sequentially carries out editing operation on the target data nodes according to the editing request to obtain an editing result and a processing sequence identifier corresponding to the editing result;
and the server side sends the editing result and the processing sequence identifier corresponding to the editing result to a collaborative client side of collaborative editing, and updates the position information of the locally stored data node.
10. The method of claim 9, wherein after the server receives an edit request sent by a client for a target data node and stores the edit request in a queue, the method further comprises:
and when the editing operation on the target data node fails according to the editing request, returning a prompt of the editing failure to the client.
11. An apparatus for collaborative editing of data nodes, the apparatus comprising:
the sending unit is used for sending an editing request for the target data node to the server; the server side pushes the editing result determined according to the editing request and the processing sequence identifier corresponding to the editing result to a collaborative client side of collaborative editing, and updates the position information of the locally stored data node;
a receiving unit, configured to receive an edit result determined according to the edit request and a processing sequence identifier corresponding to the edit result, where the edit result is returned by the server;
and the updating unit is used for updating the locally stored position information of the server data node according to the editing result and the processing sequence identifier of the editing result.
12. An apparatus for collaborative editing of data nodes, the apparatus comprising:
the receiving unit is used for receiving an editing request for a target data node sent by a client and storing the editing request into a queue;
the editing unit is used for sequentially carrying out editing operation on the target data nodes according to the editing request to obtain an editing result and a processing sequence identifier corresponding to the editing result;
and the sending unit is used for sending the editing result and the processing sequence identifier corresponding to the editing result to the collaborative client of the collaborative editing and updating the position information of the locally stored data node.
13. A collaborative editing apparatus of a data node, comprising: a processor, a memory, a system bus;
the processor and the memory are connected through the system bus;
the memory is for storing one or more programs, the one or more programs comprising instructions, which when executed by the processor, cause the processor to perform the method of any of claims 1-8 or perform the method of any of claims 9-10.
14. A computer-readable storage medium having stored therein instructions which, when run on a terminal device, cause the terminal device to perform the method of any one of claims 1-20 or to perform the method of any one of claims 9-10.
CN202110831291.9A 2021-07-22 2021-07-22 Collaborative editing method and device for data nodes, storage medium and equipment Pending CN113535434A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110831291.9A CN113535434A (en) 2021-07-22 2021-07-22 Collaborative editing method and device for data nodes, storage medium and equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110831291.9A CN113535434A (en) 2021-07-22 2021-07-22 Collaborative editing method and device for data nodes, storage medium and equipment

Publications (1)

Publication Number Publication Date
CN113535434A true CN113535434A (en) 2021-10-22

Family

ID=78088672

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110831291.9A Pending CN113535434A (en) 2021-07-22 2021-07-22 Collaborative editing method and device for data nodes, storage medium and equipment

Country Status (1)

Country Link
CN (1) CN113535434A (en)

Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20020065848A1 (en) * 2000-08-21 2002-05-30 Richard Walker Simultaneous multi-user document editing system
CN103761407A (en) * 2014-02-21 2014-04-30 武汉大学 Multiple-user selection Undo and Redo method in duplication type synergy CAD system
CN105184469A (en) * 2015-08-26 2015-12-23 百度在线网络技术(北京)有限公司 Method and device for collaborative editing of documents
US20160357720A1 (en) * 2015-06-07 2016-12-08 Apple Inc. Device, Method, and Graphical User Interface for Collaborative Editing in Documents
CN109710905A (en) * 2018-09-30 2019-05-03 天津字节跳动科技有限公司 Document synergic editing method, device, storage medium and electronic equipment
CN110019279A (en) * 2019-04-11 2019-07-16 北京字节跳动网络技术有限公司 Collaboration update method, device, equipment and the storage medium of online document
CN112039929A (en) * 2019-05-15 2020-12-04 阿里巴巴集团控股有限公司 File editing method and device and electronic equipment
CN112241865A (en) * 2019-07-16 2021-01-19 腾讯科技(深圳)有限公司 Method and related device for document cooperative processing
CN112395836A (en) * 2019-08-01 2021-02-23 珠海金山办公软件有限公司 Method and device for editing document, computer storage medium and terminal
US20220050961A1 (en) * 2019-04-08 2022-02-17 Google Llc Tracking attribution of content in an online collaborative electronic document

Patent Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20020065848A1 (en) * 2000-08-21 2002-05-30 Richard Walker Simultaneous multi-user document editing system
CN103761407A (en) * 2014-02-21 2014-04-30 武汉大学 Multiple-user selection Undo and Redo method in duplication type synergy CAD system
US20160357720A1 (en) * 2015-06-07 2016-12-08 Apple Inc. Device, Method, and Graphical User Interface for Collaborative Editing in Documents
CN105184469A (en) * 2015-08-26 2015-12-23 百度在线网络技术(北京)有限公司 Method and device for collaborative editing of documents
CN109710905A (en) * 2018-09-30 2019-05-03 天津字节跳动科技有限公司 Document synergic editing method, device, storage medium and electronic equipment
US20220050961A1 (en) * 2019-04-08 2022-02-17 Google Llc Tracking attribution of content in an online collaborative electronic document
CN110019279A (en) * 2019-04-11 2019-07-16 北京字节跳动网络技术有限公司 Collaboration update method, device, equipment and the storage medium of online document
CN112039929A (en) * 2019-05-15 2020-12-04 阿里巴巴集团控股有限公司 File editing method and device and electronic equipment
CN112241865A (en) * 2019-07-16 2021-01-19 腾讯科技(深圳)有限公司 Method and related device for document cooperative processing
CN112395836A (en) * 2019-08-01 2021-02-23 珠海金山办公软件有限公司 Method and device for editing document, computer storage medium and terminal

Non-Patent Citations (5)

* Cited by examiner, † Cited by third party
Title
MARTIN KLEPPMANN: "《数据密集型应用系统设计》", 30 September 2018, 中国电力出版社, pages: 145 - 349 *
NEIL FRASER: "Differential Synchronization", 《HTTPS://NEIL.FRASER.NAME/WRITING/SYNC/》 *
NEIL FRASER: "Differential Synchronization", 《HTTPS://NEIL.FRASER.NAME/WRITING/SYNC/》, 31 January 2009 (2009-01-31) *
NWIND: "实时协同编辑的实现", 《HTTPS://FEX.BAIDU.COM/BLOG/2014/04/REALTIME-COLLABORATION》 *
NWIND: "实时协同编辑的实现", 《HTTPS://FEX.BAIDU.COM/BLOG/2014/04/REALTIME-COLLABORATION》, 21 April 2014 (2014-04-21) *

Similar Documents

Publication Publication Date Title
US9294421B2 (en) System and method for merging edits for a conversation in a hosted conversation system
US10129264B2 (en) Method and apparatus for implementing document sharing between user groups
CN112445579B (en) Zero terminal data processing system and file copying method and device thereof
US11265182B2 (en) Messaging to enforce operation serialization for consistency of a distributed data structure
CN110493122B (en) Session information synchronization method and device, computing equipment and storage medium
CN109474512B (en) Background updating method for instant messaging, terminal equipment and storage medium
CN110413413A (en) A kind of method for writing data, device, equipment and storage medium
CN111736950A (en) Accelerator resource adding method of virtual machine and related device
CN115079872B (en) Document processing method, device, equipment and medium
CN106599323A (en) Method and apparatus for realizing distributed pipeline in distributed file system
CN108111598B (en) Cloud disk data issuing method and device and storage medium
CN113535434A (en) Collaborative editing method and device for data nodes, storage medium and equipment
CN111125142B (en) Data updating method and system
CN107332679B (en) Centerless information synchronization method and device
CN103916426A (en) Paxos example updating method, device and system
CN110691025A (en) Message segmentation method and device
CN113626134B (en) Resource replication method, device, equipment and computer readable storage medium
CN112800185B (en) Method and device for generating and matching text of interface node in mobile terminal
CN117271089A (en) Editing method, editing device, electronic equipment and storage medium
CN117094289A (en) Method, device, system, electronic equipment and storage medium for controlling data block
CN117113935A (en) Text editing method and device, electronic equipment and readable storage medium
CN116341495A (en) Method and device for processing data of shared document, related equipment and program product
CN116701449A (en) Data processing method, device, electronic equipment and storage medium
CN115766239A (en) Edge tampering detection method and device, electronic equipment and storage medium
CN116309004A (en) Image storage method, device, computer equipment and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination