Cooperative data operation method and system

By defining and updating the data version number on the client, and using data conflict strategies to handle parallel operations, the problem of data operation conflicts in a multi-person collaboration environment is solved, the efficiency and accuracy of data operations are improved, and decentralized collaboration is achieved. Data management.

CN118590501APending Publication Date: 2024-09-03ZHIYAN GONGSOFT (HANGZHOU) TECH CO LTD +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410763433.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-06-13
Publication Date
2024-09-03

AI Technical Summary

Technical Problem

In a multi-person collaboration environment, conflicts are prone to occur during data operations. Existing technologies are difficult to effectively resolve conflicts in single rows of data or batch data operations, resulting in low data operation efficiency, poor accuracy, and high risk of data loss.

Method used

The client requests the back-end server to load data files, defines the initial version number, updates the local version number after the operation event, synchronizes the event to other remote clients, uses preset data conflict strategies to handle parallel processing scenarios, and supports real-time and offline data communication and transmission to ensure data consistency.

Benefits of technology

It effectively solves data operation conflicts in multi-person collaboration environments, improves the efficiency and accuracy of data operations, reduces the risk of data loss and errors, and achieves decentralized collaborative data management.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118590501A
    Figure CN118590501A
Patent Text Reader

Abstract

The invention belongs to the technical field of data collaboration, and particularly relates to a collaboration data operation method and system. The collaborative data operation method comprises the following steps: a plurality of clients respectively request a back-end server to load a data file, each client respectively defines an initial version number for each row of data, and each client carries out collaborative data operation; after the operation event, the client updates the local version number and synchronizes the local synchronization event to other remote clients; and the client receives remote synchronization events sent by other remote clients, if the operated events are executed in sequence, data synchronization is directly carried out according to the remote synchronization events, and if the operated events are processed in parallel, data synchronization with other remote clients is carried out according to a preset data conflict strategy. According to the method and the device, the conflict problem of single-row data or batch data operation in a multi-user cooperation environment is solved, the efficiency and the accuracy of data operation are improved, and the risk of data loss and errors is reduced.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the technical field of data collaboration, and in particular relates to a collaborative data operation method and system. Background Art

[0002] In some businesses, there are scenarios for collaborative data operations or batch operations, such as selecting or batch selecting a row or several rows, modifying the data of specified fields of the selected row or several rows (not necessarily consecutive), moving or batch moving several rows (not necessarily consecutive) of data to a specified location, or deleting or batch deleting selected data.

[0003] There are generally no problems when operating by one person and one thread, but conflicts are inevitable when multiple people are collaborating at the same time, such as in the following scenarios:

[0004] 1. Two people edit or batch edit a specified field A of a batch of data at the same time, and the data selected by the two people overlap.

[0005] 2. Two people move a batch of data at the same time (assuming the data has business significance in terms of order). The data moved by the two people overlap and the target locations are inconsistent.

[0006] 3. Two people, one is moving data and the other is deleting data. The destination of the moved data belongs to the part where the other person deletes data.

[0007] How to solve this conflict more reasonably? Under the current circumstances, there is no better solution in the existing technology. Summary of the invention

[0008] The present invention aims to solve the above-mentioned technical problems and provides a collaborative data operation method and system.

[0009] A collaborative data operation method, comprising:

[0010] Several clients each request to load a data file from a backend server, each client defines an initial version number for each row of data, and each client performs collaborative data operations;

[0011] After the operation event, the client updates the local version number and synchronizes the local synchronization event to other remote clients;

[0012] The client receives remote synchronization events sent by other remote clients, and if the operation events are executed sequentially, directly synchronizes data according to the remote synchronization events; if the operation events are processed in parallel, synchronizes data with other remote clients according to a preset data conflict strategy.

[0013] Optionally, when the client loads data, information of other remote clients currently operating is displayed;

[0014] When the client selects data, the row where the selected data is located is highlighted, and when the mouse moves to the row, the information of other remote clients being selected is displayed;

[0015] When the client operates one or more rows of data where the event is located, if parallel processing occurs, a conflict message prompt is issued. When the client continues to perform the parallel processing operation, data synchronization is performed with other remote clients according to a preset data conflict strategy.

[0016] Optionally, when the client performs synchronization events with other remote clients, broadcast or point-to-point data communication transmission is adopted, or a relay forwarding mode based on a back-end server is adopted for data communication transmission;

[0017] If the client cannot achieve real-time transmission, it supports sending messages for offline storage and delaying data communication transmission.

[0018] Optionally, the update strategy of the client when updating the local version number after the operation event is:

[0019] Local version number = local version number + H1, where H1 is an integer greater than 0;

[0020] After the client receives the remote synchronization event sent by the remote client, the update strategy for updating the local version number according to the remote version number is:

[0021] Local version number=Max(local version number, remote version number)+H2, where H2 is an integer greater than 0.

[0022] Optionally, the event operated by the client includes an insert event, the client records the selected local target location, generates a local version number of the insert event for the local target location, and synchronizes the local synchronization event including the selected message, the local target location and the local version number of the insert event to other remote clients;

[0023] The client receives a remote synchronization event including a selected message, a remote target position and a remote version number sent by other remote clients, updates the local version number of the insert event according to the remote version number, and if the row where the local target position corresponding to the remote target position is located is also selected after receiving the synchronization event, it is considered that the operation event is parallel processing, and the local version number of the insert event is updated again, and the synchronization event including the selected message, the local target position and the local version number of the insert event is synchronized to other remote clients, otherwise it is considered to be sequential execution, and waits for receiving remote new data;

[0024] The client inserts the local newly added data at the local target location, records the local version number of the insertion event, and synchronizes the local synchronization event including the insertion message, the local target location, the local newly added data and the local version number of the insertion event to other remote clients;

[0025] The client receives remote synchronization events including insert messages, remote target locations, remote newly added data and remote version numbers sent by other remote clients, inserts the remote newly added data into a local target location corresponding to the remote target location, records the remote version number as the local version number of the newly added data, and arranges data at the local target location according to the size of the local version number.

[0026] Optionally, the event operated by the client includes an insert event, the client records the selected local target location, generates a local version number of the insert event for the local target location, and synchronizes the local synchronization event including the selected message, the local target location and the local version number of the insert event to other remote clients;

[0027] The client receives a remote synchronization event including a selected message, a remote target location and a remote version number sent by other remote clients, and updates a local version number of the inserted event according to the remote version number;

[0028] The client inserts the local newly added data at the local target location, records the local version number of the insertion event, and synchronizes the local synchronization event including the insertion message, the local target location, the local newly added data and the local version number of the insertion event to other remote clients;

[0029] The client receives remote synchronization events including insert messages, remote target locations, remote newly added data and remote version numbers sent by other remote clients, inserts the remote newly added data into a local target location corresponding to the remote target location, and records the remote version number as the local version number of the newly added data. If the local version numbers inserted into the local target locations are the same, it is considered that the operation events are parallel processing, and the data is first arranged at the local target location according to the size of the local version numbers. When the local version numbers are the same, the data is arranged in the order in which the clients corresponding to the newly added data load the data. Otherwise, it is considered to be sequential execution, and the data is arranged at the local target location according to the size of the local version numbers.

[0030] Optionally, the event operated by the client includes a modification event, the client modifies local data at a local target location, updates a local version number for the row where the local target location is located, and synchronizes a local synchronization event including a modification message, the local target location, the local modified data of the row where the local target location is located, and the local version number to other remote clients;

[0031] The client receives a remote synchronization event including a modification message, a remote target location, remote modification data, and a remote version number sent by a remote client. If a modification event is being performed on the row where the local target location corresponding to the remote target location is located, it is considered that the operation event is processed in parallel, and the user is prompted whether to synchronize the data. If the user chooses to synchronize the data, the local modification data is cleared, the remote modification data is used as the row data, and the local version number of the row is updated according to the remote version number. If the user chooses not to synchronize the data, the local version number of the row is updated according to the remote version number, and the remote modification data is temporarily stored locally;

[0032] After the user chooses not to synchronize data and continues to modify the corresponding row data, if the user cancels the local modification and the remote modification data of the row data is temporarily stored locally, the remote modification data is used as the row data and the temporarily stored remote modification data is cleared; if the user completes the modification and the remote modification data of the row data is temporarily stored locally, the temporarily stored remote modification data is cleared, the local version number of the row is updated, and the local synchronization event including the modification message, the local target location of the row, the local modification data of the row and the local version number is synchronized to other remote clients;

[0033] The client receives a remote synchronization event sent by a remote client, including a modification message, a remote target location, remote modification data, and a remote version number. If there is no ongoing operation event in the row where the local target location corresponding to the remote target location is located, the operation event is considered to be executed sequentially, and the remote modification data is used as the row data, and the local version number of the row is updated according to the remote version number.

[0034] Optionally, if the client receives multiple remote data and remote version numbers of the same line at the same time, only the remote synchronization event with the largest remote version number is processed, and the rest are ignored;

[0035] If the client receives remote synchronization events of different rows in batches, they are processed one by one in the manner of modifying events.

[0036] Optionally, the event operated by the client includes a deletion event, the client deletes local data at a local target location, updates a local version number for a row where the local target location is located, marks the deleted local deleted data with a deletion mark, and synchronizes a local synchronization event including a deletion message, the local target location, the local deleted data and the local version number to other remote clients;

[0037] The client receives a remote synchronization event including a deletion message, a remote target location, remote deletion data and a remote version number sent by a remote client. If a modification event is being performed on the row where the local target location corresponding to the remote target location is located, it is considered that the operation event is processed in parallel. After the local data of the row is modified, the local version number of the row is updated, and the local synchronization event including the modification message, the local target location of the row, the local modification data of the row and the local version number are synchronized to other remote clients. The local version number of the row is updated according to the remote version number, and the local data corresponding to the remote data in the row is marked for deletion. When there is a remote data that is the local data before the modification event of the row is performed, the event of the client with a higher priority is executed;

[0038] The client receives a remote synchronization event including a deletion message, a remote target location, remote deletion data, and a remote version number sent by a remote client. If there is no ongoing operation event in the row where the local target location corresponding to the remote target location is located, it is considered that the operation event is executed sequentially, and the local version number of the row is updated according to the remote version number, and the local data corresponding to the remote data in the row is marked as deleted;

[0039] The client receives a remote synchronization event including a modification message, a remote target location, remote modification data, and a remote version number sent by a remote client. When a deletion event is being performed on a row of a local target location corresponding to the remote target location, the operation event is considered to be parallel processing, the local version number of the row is updated, and other data in the local target location except for data marked with a deletion mark is modified to the remote modification data. When the remote modification data is data marked with a deletion mark, the event of the client with a high priority is executed;

[0040] After all clients have closed the files, the data marked for deletion is deleted.

[0041] Optionally, the event operated by the client includes a deletion event, the client deletes local data at a local target location, updates a local version number for a row where the local target location is located, marks the deleted local deleted data with a deletion mark, and synchronizes a local synchronization event including a deletion message, the local target location, the local deleted data and the local version number to other remote clients;

[0042] The client receives a remote synchronization event including a delete message, a remote target position, remote deleted data, and a remote version number sent by a remote client; if an insert event is being performed at a row where a local target position corresponding to the remote target position is located, it is considered that the operation event is processed in parallel, a local version number of the insert event is generated for the local target position, local new data is inserted at the local target position, the local synchronization event including the insert message, the local target position, the local new data, and the local version number of the insert event is synchronized to other remote clients, the local version number of the row is updated according to the remote version number, and the local data corresponding to the remote data in the row is marked for deletion;

[0043] The client receives a remote synchronization event including a deletion message, a remote target location, remote deletion data, and a remote version number sent by a remote client. If there is no ongoing operation event in the row where the local target location corresponding to the remote target location is located, it is considered that the operation event is executed sequentially, and the local version number of the row is updated according to the remote version number, and the local data corresponding to the remote data in the row is marked as deleted;

[0044] The client receives a remote synchronization event including an insert message, a remote target position, remote newly added data, and a remote version number sent by a remote client. When a delete event is being performed on a row of a local target position corresponding to the remote target position, the event of the operation is considered to be parallel processing, and the remote newly added data is inserted into the local target position, and the remote version number is recorded as the local version number of the newly added data.

[0045] After all clients have closed the files, the data marked for deletion is deleted.

[0046] Optionally, the event operated by the client includes a move event, the client moves the local mobile data of the local first target location to the local second target location, updates the local version number of the row where the local first target location is located and uses it as the local version number of the row where the local second target location is located, marks the local mobile data of the local first target location for deletion, and synchronizes the local synchronization event including the move message, the local first target location, the local second target location, the local mobile data and the local version number to other remote clients;

[0047] The client receives a remote synchronization event including a move message, a remote first target position, a remote second target position, remote mobile data and a remote version number sent by a remote client. When the row where the local first target position corresponding to the remote first target position is located is performing a move event, and the local version number corresponding to the row is the same as the remote version number, it is considered that the operation event is processed in parallel. If the priority of the client is higher than that of the remote client, the remote synchronization event is ignored. If the priority of the client is lower than that of the remote client, the local mobile data moved into the local second target position in the local move event is marked for deletion, the remote mobile data is inserted into a new local second target position corresponding to the remote second target position, the corresponding local version number is updated according to the remote version number and recorded in the new local second target position, and the local synchronization event including the move conflict message, the new local second target position and the local version number is synchronized to other remote clients.

[0048] The client receives a remote synchronization event including a mobile message, a remote first target position, a remote second target position, remote mobile data and a remote version number sent by a remote client; when there is no ongoing operation event in the row where the local first target position corresponding to the remote first target position is located, it is considered that the operation event is executed sequentially, the remote mobile data is inserted into the local target position corresponding to the remote second target position, the local version number of the row is updated according to the remote version number and recorded in the local target position, and the local mobile data corresponding to the remote mobile data in the local first target position is marked for deletion;

[0049] The client receives a mobile conflict message, a remote second target location, and a remote version number sent by a remote client, and updates a local version number corresponding to the local second target location according to the remote second target location;

[0050] After all clients have closed the files, the data marked for deletion is deleted.

[0051] Optionally, the event operated by the client includes a move event, the client moves the local mobile data of the local first target location to the local second target location, updates the local version number of the row where the local first target location is located and uses it as the local version number of the row where the local second target location is located, marks the local mobile data of the local first target location for deletion, and synchronizes the local synchronization event including the move message, the local first target location, the local second target location, the local mobile data and the local version number to other remote clients;

[0052] The client receives a remote synchronization event including a mobile message, a remote first target location, a remote second target location, remote mobile data and a remote version number sent by a remote client, updates the local version numbers of the local target locations corresponding to the remote first target location and the remote second target location, inserts the remote mobile data into the local target location corresponding to the remote second target location and records the corresponding local version number, marks the local data corresponding to the remote first target location with a deletion mark, and executes the client's mobile event if there is still an event that needs to move the local data of the local target location;

[0053] After all clients have closed the files, the data marked for deletion is deleted.

[0054] A collaborative data operating system, comprising a backend server and a plurality of clients;

[0055] The client comprises:

[0056] The version controller is used to update the local version number after operating events and receiving remote synchronization events;

[0057] Data synchronizer, used to broadcast the synchronization events of the client to the remote client or back-end server of file collaboration in real time, and to support offline storage of messages and delayed data communication transmission;

[0058] Data and conflict processor, used to request the backend server to load data files, define the initial version number for each row of data, and operate events and synchronize data;

[0059] Renderer, used to display data based on messages.

[0060] Beneficial effects: The present invention has at least one or more of the following advantages:

[0061] 1. The present invention solves the conflict problem of single-row data or batch data operations in a multi-person collaborative environment, improves the efficiency and accuracy of data operations, and reduces the risk of data loss and errors.

[0062] 2. The present invention can be decentralized, without the need for server-side coordination, and most problems can be solved on the client side, while also ensuring a certain degree of consistency in offline scenarios. BRIEF DESCRIPTION OF THE DRAWINGS

[0063] Figure 1 and Figure 2 Two synchronization modes of the present invention;

[0064] Figures 3 to 5 A schematic diagram of a method embodiment of the present invention;

[0065] Figure 6 A schematic diagram of a system of the present invention. DETAILED DESCRIPTION

[0066] The preferred embodiments of the present invention will be described in detail below in conjunction with the accompanying drawings so that the purpose, features and advantages of the present invention can be more clearly understood. It should be understood that the embodiments shown in the accompanying drawings are not intended to limit the scope of the present invention, but are only intended to illustrate the essential spirit of the technical solution of the present invention.

[0067] In the following description, certain specific details are set forth for the purpose of illustrating the various disclosed embodiments to provide a thorough understanding of the various disclosed embodiments. However, those skilled in the relevant art will recognize that the embodiments may be practiced without one or more of these specific details. In other cases, well-known devices, structures, and techniques associated with the present application may not be shown or described in detail to avoid unnecessarily obscuring the description of the embodiments.

[0068] References throughout the specification to "one embodiment" or "an embodiment" indicate that a particular feature, structure, or characteristic described in connection with the embodiment is included in at least one embodiment. Thus, the appearances of "in one embodiment" or "in an embodiment" in various places throughout the specification are not necessarily all referring to the same embodiment. Furthermore, the particular features, structures, or characteristics may be combined in any manner in one or more embodiments.

[0069] In the following description, in order to clearly show the structure and working mode of the present invention, many directional words will be used for description, but the words "front", "back", "left", "right", "outside", "inside", "outward", "inward", "up", "down", etc. should be understood as convenient terms and should not be understood as restrictive terms.

[0070] An embodiment of the present invention provides a collaborative data operation method, which is used in a scenario where multiple users perform collaborative data operations. The method includes the following time-series interaction process:

[0071] Several clients each request the backend server to load a data file, each client defines an initial version number for each row of data, and each client performs collaborative data operations.

[0072] Specifically, the data file is preferably a table data file, and may also be other types of data files with several rows. When the client requests the backend server to load the data file and defines the initial version number for each row of data, it can be implemented using the data and conflict processor pre-built into the client. The data and conflict processor can create a unique version number for each row of data, and each operation event of the user on the client is recorded, including what kind of modification, move or delete operation events are performed on which rows and fields. In specific implementation, the version number is preferably an integer starting from 0, that is, the initial version number is 0.

[0073] After operating the event, the client updates the local version number and synchronizes the local synchronization event to other remote clients.

[0074] Specifically, the operation event includes but is not limited to at least one of an insert event, a modify event, a delete event, and a move event. After a client performs an operation event on one or more rows of data and increases the version number of the row, the version numbers of the rows of data on each client do not need to be consistent. The version number only indicates the order of data operations on the same client.

[0075] In one embodiment, the update strategy when the client updates the local version number after an operation event is:

[0076] Local version number = local version number + H2, where H2 is an integer greater than 0.

[0077] H1 is preferably 1, that is, when the user modifies, moves, deletes, etc. the data, the version number of the row is increased by one.

[0078] For example, suppose there are two clients, Client A and Client B, and the data file has two rows of data, A and B:

[0079] 1) Client A loads the data file and adds version number 0 to A and B respectively, recording them as A(0) and B(0).

[0080] 2) Client A modifies data A and changes the version number of A to 1, which is recorded as A(1), B(0).

[0081] 3) Client A modifies data B and changes the version number of B to 1, which is recorded as A(1), B(1).

[0082] 4) Client A modifies data A and changes its version number to 2, which is recorded as A(2), B(1).

[0083] 5) Client B loads the data file and adds version number 0 to A and B respectively, recording them as A(0) and B(0).

[0084] At this time, the same data is stored in each client. The version number stored in Client A is A(2)B(1), while that in Client B is A(0),B(0).

[0085] After the client receives the remote synchronization event sent by the remote client, the update strategy for updating the local version number according to the remote version number is:

[0086] Local version number=Max(local version number, remote version number)+H2, where H2 is an integer greater than 0.

[0087] H2 is preferably 1, that is, the update version number when synchronizing remote data is the larger version number selected between the local version number and the remote version number and then incremented by one.

[0088] For example, suppose there are three clients, namely Client A, Client B, and Client C, and the initial version number of data A is 1:

[0089] 1) Client A operates on data A. After the operation is completed, the local version number of client A's data A becomes 2. Client A's operation on the data will be synchronized to client B and client C (for example, using the function of a data synchronizer). After receiving the synchronization event, client B and client C will each update the version of data A. The algorithm is Max (local version number, remote version number) + 1, so the local version number of client B's data A and client C's data A both become Max (1, 2) + 1 = 3.

[0090] 2) Client B operates on data A. After the operation is completed, the local version number of data A of client B becomes 3+1=4. Client B synchronizes the data operation to client A and client C. Then the local version number of data A of client A becomes Max(2,4)+1=5, and the local version number of data A of client C becomes Max(3,4)+1=5.

[0091] And so on, ensuring that all client operations are ordered in physical space and time.

[0092] The above-mentioned update strategies can be implemented by using a version controller pre-stored in the client.

[0093] After operating an event, each client of the present invention will execute a local synchronization event, and the local synchronization event is sent to the remote client. Correspondingly, each client receives the remote synchronization event sent by the remote client and performs data synchronization according to the remote synchronization event. Of course, the remote synchronization event is the local synchronization event, which is just a different name from a different sending and receiving perspective.

[0094] In one embodiment, the present invention can realize a real-time data synchronization function, ensuring that the data viewed by the user is the latest, and reducing operational conflicts caused by data delays.

[0095] There are two ways to synchronize local synchronization events to other remote clients:

[0096] Reference Figure 1 One way is the P2P mode, which uses broadcast or point-to-point data communication transmission.

[0097] This method can be implemented using a data synchronizer preset in the client. After the client requests the backend server to load the data file, the backend server will create a group for users who open the same data file. All users in this group can broadcast data or conduct point-to-point data communication transmission. The data synchronizer can implement a point-to-point communication mechanism based on webrtc. When data synchronization is required, each client can directly send and receive data without going through the backend server.

[0098] Reference Figure 2 ,Another way is the relay forwarding mode, the data will be first sent to the backend server, such as a websocket server, which will broadcast it to all other collaborative data operators.

[0099] If the client cannot achieve real-time transmission, it supports sending messages for offline storage and delaying data communication transmission. For example, when data cannot be transmitted in real time due to network fluctuations or other reasons, it supports sending messages for offline storage and broadcasting them in sequence after the network is restored.

[0100] The client receives remote synchronization events sent by other remote clients. If the operation events are executed sequentially, data synchronization is performed directly according to the remote synchronization events. If the operation events are processed in parallel, data synchronization is performed with other remote clients according to the preset data conflict strategy.

[0101] This data conflict strategy really exists in parallel processing scenarios (conflict scenarios). For example, when several clients modify the data of a row at the same time, a strict comparison is performed based on the client version number to ensure that if there is a conflict between your version and the remote version, a prompt message will pop up to inform you to cancel the modification or force an update.

[0102] In one embodiment, when the client loads data, the information of other remote clients currently operating is displayed;

[0103] When the client selects data, the row where the selected data is located is highlighted, and when the mouse moves to the row, the information of other remote clients being selected is displayed;

[0104] When the client operates one or more rows of data where the event is located, if parallel processing occurs, a conflict message prompt will be given. When the client continues to perform parallel processing operations, data synchronization will be performed with other remote clients according to the preset data conflict strategy.

[0105] This embodiment can be implemented using a renderer preset in the client. For example, when a user loads a table file, the current operating user will be displayed in the upper right corner of the client interface. When a user selects certain rows of data, the selected rows will be highlighted, and the user being selected will be displayed when the mouse moves on the row. When operating the selected row, there will be relevant conflict prompts. For example, if you want to move the selected row and the row is selected by other users, a warning prompt will be issued. If the warning is ignored, the data and conflict processor will perform relevant processing or resolve relevant conflicts.

[0106] The renderer preferably receives relevant messages in real time based on the webrtc or websocket mechanism, and responds to page changes according to the messages.

[0107] In one embodiment, in a newly added scenario, the following information needs to be obtained:

[0108] 1) The location of the newly added data, such as the front or back of a row. In this case, the user needs to select a row of data and use the previous or next row of the selected row as the target location.

[0109] 2) Add new data, usually one row of data, or several rows of data.

[0110] Therefore, the new scenarios can be decomposed into:

[0111] 1) The user selects the target location to be inserted.

[0112] When the user selects a target location, a dependent (temporary) version number is generated for the target location. This version number will be used as the version number of the next inserted event message, so it can also be called the local version number of the inserted event. This version number can be an initial version number or the version number of the target location + 1. After selection, it will be synchronized to other remote clients.

[0113] 2) Insert new data above or below the target position.

[0114] Insert data, and synchronize data with other collaborative data operators (i.e., remote clients) by carrying the local version number of the insert event obtained in the previous step.

[0115] Based on the above ideas, in this embodiment, when the event operated by the client includes an insert event, there are two operation methods for the following new scenarios:

[0116] Scenario 1:

[0117] The events operated by the client include insert events. The client records the selected local target location, generates a local version number of the insert event for the local target location, and synchronizes the local synchronization events including the selected message, local target location and local version number to other remote clients.

[0118] The client receives remote synchronization events including the selected message, remote target location and remote version number sent by other remote clients, and updates the local version number of the inserted event according to the remote version number. If the row where the local target location corresponding to the remote target location is located is also selected after receiving the synchronization event, it is considered that the operation event is parallel processing, and the local version number of the inserted event is updated again. The synchronization event including the selected message, local target location and local version number is synchronized to other remote clients. Otherwise, it is considered to be sequential execution and waits for receiving remote new data.

[0119] The client inserts the local new data at the local target location, records the local version number of the insertion event, and synchronizes the local synchronization event including the insertion message, local target location, local new data and local version number to other remote clients;

[0120] The client receives remote synchronization events including insert messages, remote target locations, remote newly added data, and remote version numbers sent by other remote clients, inserts the remote newly added data into the local target location corresponding to the remote target location, records the remote version number as the local version number of the newly added data, and arranges the data in the local target location according to the size of the local version number.

[0121] Scenario 2:

[0122] The events operated by the client include insert events. The client records the selected local target location, generates a local version number of the insert event for the local target location, and synchronizes the local synchronization events including the selected message, the local target location and the local version number of the insert event to other remote clients.

[0123] The client receives remote synchronization events including the selected message, remote target location and remote version number sent by other remote clients, and updates the local version number of the inserted event according to the remote version number;

[0124] The client inserts the local new data at the local target location, records the local version number of the insertion event, and synchronizes the local synchronization event including the insertion message, the local target location, the local new data and the local version number of the insertion event to other remote clients;

[0125] The client receives a remote synchronization event sent by another remote client, which includes an insertion message, a remote target location, remote new data, and a remote version number. It inserts the remote new data at the corresponding local target location of the remote target location, records the remote version number as the local version number of the new data. If there are identical local version numbers inserted at the local target location, it is considered that the operation events are processed in parallel. First, the data is arranged at the local target location according to the size of the local version number. When the local version numbers are the same, the data is arranged according to the order of the corresponding clients of the new data when loading the data. Otherwise, it is considered to be executed sequentially, and the data is arranged at the local target location according to the size of the local version number.

[0126] For example, Client A and Client B simultaneously insert data "A for A" and "B for A" respectively below the data line A. Assume the initial version number of A is 1. When Client A and Client B operate simultaneously, Client A has a higher priority than Client B (the specific strategy can be determined by who among the operators loads the data first. The one who loads the data first has a higher priority. In a normal scenario, there will be no absolute parallelism. If there is absolute parallelism, then the one that sends the synchronization event first or operates on the data first has a higher priority).

[0127] In Scenario 1, when the operation events are processed in parallel:

[0128] 1) Client A selects A, generates a dependent version number 2, and synchronizes 2 to Client B.

[0129] 2) Client B receives the synchronization event sent by A, generates a version number Max(1, 2)+1 = 3. Client B selects A, generates a version number 3+1 = 4, and synchronizes 4 to Client A.

[0130] 3) Client A receives the synchronization event sent by B, and generates a version number of Max(2, 4)+1 = 5.

[0131] 4) Client A inserts data A for A, synchronizes A for A to Client B, and records the version number of the insertion event as 5.

[0132] 5) Client B inserts data B for A, synchronizes B for A to Client A, and records the version number of the insertion event as 4.

[0133] 6) In descending order of version number, the final data of Client A is

A(1), A for A(5), B for A(4)

A(1), A for A(5), B for A(4)

[0134] In Scenario 2, when the operation events are processed in parallel:

[0135] 1) Client A selects A, generates a dependent version number 2, and synchronizes 2 to Client B.

[0136] 2) Client B selects A to generate version number 2, sends version number 2 to Client A, receives the message sent by Client A, and generates version number Max(2,2)+1=3.

[0137] 3) Client A receives the synchronization event sent by Client B and generates a version number of Max(2,2)+1=3.

[0138] 4) Client A inserts data A, synchronizes A to Client B, and records the insertion event version number as 3.

[0139] 5) Client B inserts data BA, synchronizes BA to Client A, and records the insertion event version number as 3.

[0140] 6) In descending order of version numbers, if the version numbers are the same, client A takes precedence. The final data of client A is [A(1), A(3), B(3)], and the final data of client B is [A(1), A(3), B(3)]

[0141] In scenario 1 or scenario 2, when the operation events are executed sequentially:

[0142] 1) Client A selects A, generates dependency version number 2, and synchronizes 2 to client B.

[0143] 2) Client B receives the synchronization event sent by Client A and generates version number Max(1,2)+1=3.

[0144] 3) Client A inserts data A, synchronizes A to client B, and records the insertion event version number as 2.

[0145] 4) Then the final data of client A is [A(1), A(2)], and the final data of client B is [A(1), A(2)].

[0146] In one embodiment, in a modification scenario, when modifying the time of a row of data, a conflict will occur if the same row of data is modified at the same time.

[0147] Based on the above ideas, in this embodiment, when the event operated by the client includes a modification event, the following operation method is provided:

[0148] The client modifies the local data at the local target location, updates the local version number of the row where the local target location is located, and synchronizes the local synchronization events including the modification message, the local target location, the local modification data of the row where the local target location is located, and the local version number to other remote clients;

[0149] The client receives a remote synchronization event including a modification message, a remote target location, remote modification data, and a remote version number sent by a remote client. If a modification event is being performed on the row where the local target location corresponds to the remote target location, the client considers that the operation event is processed in parallel and reminds the user whether to synchronize the data. If the user chooses to synchronize the data, the local modification data is cleared, the remote modification data is used as the row data, and the local version number of the row is updated according to the remote version number. If the user chooses not to synchronize the data, the local version number of the row is updated according to the remote version number, and the remote modification data is temporarily stored locally.

[0150] After the user chooses not to synchronize data and continues to modify the corresponding row data, if the user cancels the local modification and the remote modification data of the row data is temporarily stored locally, the remote modification data is used as the row data and the temporarily stored remote modification data is cleared; if the user completes the modification and the remote modification data of the row data is temporarily stored locally, the temporarily stored remote modification data is cleared, the local version number of the row is updated, and the local synchronization events including the modification message, the local target location of the row, the local modification data of the row and the local version number are synchronized to other remote clients;

[0151] The client receives remote synchronization events sent by the remote client, including modification messages, remote target locations, remote modification data, and remote version numbers. If there is no ongoing operation event for the row where the local target location corresponds to the remote target location, the operation events are considered to be executed sequentially, and the remote modification data is used as the row data, and the local version number of the row is updated according to the remote version number.

[0152] Preferably, if the client receives multiple remote data and remote version numbers of the same peer at the same time, only the remote synchronization event with the largest remote version number is processed, and the rest are ignored.

[0153] Preferably, if the client receives remote synchronization events of different rows in a batch, they are processed one by one in a modification event manner.

[0154] For example, client A and client B edit data row A at the same time. Assuming that the initial version number of A is 1, when client A and client B operate at the same time, client A has a higher priority than client B (the specific strategy can be determined by which operator loads data first. The one that loads data first has a higher priority. Absolute parallelism will not occur in normal scenarios. If absolute parallelism occurs, the one that sends the synchronization event first or operates the data first has a higher priority).

[0155] The processing method is as follows:

[0156] 1) Client A modifies A, generates version number 2, and synchronizes data to Client B.

[0157] 2) Client B receives the synchronization event and determines whether the same row of data is being edited locally. If so, it chooses whether to synchronize the data. If it chooses to synchronize the data, it clears the local changes and uses the synchronized data, and modifies the version number to Max(1,2)+1=3. If it does not choose to synchronize the data, it modifies the version number to Max(1,2)+1=3 and temporarily stores the synchronization event locally.

[0158] 3) There are two situations when client B modifies the data.

[0159] Cancel modification: If there is a temporary synchronization event in the previous step, perform the synchronization operation, update the local data to the remote synchronization data, and clear the temporary synchronization event.

[0160] Complete the modification: If there is a temporary synchronization event in the previous step, clear the temporary synchronization event, change the local version number to 3+1=4, and synchronize the data to Client A.

[0161] 4) Client A receives the synchronization event and processes it according to steps 2) and 3).

[0162] In one embodiment, in a deletion scenario, data will not be actually deleted before the entire data file is completely closed. That is, assuming that three client users A, B, and C open and operate a table file at the same time, before the three users completely close the table operations, all deletion operations on the table records will not be actually deleted from the table data set, but will only be marked as deleted.

[0163] When a user deletes a data row, the record will be marked as deleted and the related version number will be modified. The deletion scenario will conflict with the modification and insertion scenarios.

[0164] Based on the above idea, in this embodiment, when the event operated by the client includes a deletion event, there are the following two operation methods for deletion scenarios:

[0165] Scenario 1:

[0166] The events operated by the client include deletion events. The client deletes local data at the local target location, updates the local version number of the row where the local target location is located, marks the deleted local deleted data with a deletion mark, and synchronizes the local synchronization events including the deletion message, local target location, local deleted data and local version number to other remote clients.

[0167] The client receives a remote synchronization event including a deletion message, a remote target location, remote deletion data, and a remote version number sent by a remote client. If a modification event is being performed on the row where the local target location corresponding to the remote target location is located, the operation event is considered to be processed in parallel. After the local data of the row is modified, the local version number of the row is updated, and the local synchronization event including the modification message, the local target location of the row, the local modification data of the row, and the local version number are synchronized to other remote clients. The local version number of the row is updated according to the remote version number, and the local data corresponding to the remote data in the row is marked for deletion. When there is remote data that is the local data before the modification event of the row, the event of the client with a higher priority is executed;

[0168] The client receives a remote synchronization event including a delete message, a remote target location, remote deleted data, and a remote version number sent by a remote client. If there is no ongoing operation event in the row where the local target location corresponding to the remote target location is located, the operation event is considered to be executed sequentially, and the local version number of the row is updated according to the remote version number, and the local data corresponding to the remote data in the row is marked as deleted;

[0169] The client receives the remote synchronization event including the modification message, the remote target location, the remote modification data and the remote version number sent by the remote client. When the row of the local target location corresponding to the remote target location is performing a deletion event, the operation event is considered to be parallel processing, the local version number of the row is updated, and the data other than the data marked with the deletion mark in the local target location is modified as the remote modification data. When there is remote modification data marked with the deletion mark, the event of the client with the higher priority is executed;

[0170] After all clients have closed the files, the data marked for deletion is deleted.

[0171] Scenario 2:

[0172] The events operated by the client include deletion events. The client deletes local data at the local target location, updates the local version number of the row where the local target location is located, marks the deleted local deleted data with a deletion mark, and synchronizes the local synchronization events including the deletion message, local target location, local deleted data and local version number to other remote clients.

[0173] The client receives a remote synchronization event including a delete message, a remote target position, remote deleted data, and a remote version number sent by a remote client. If an insert event is being performed on the row where the local target position corresponding to the remote target position is located, the event of the operation is considered to be processed in parallel, a local version number of the insert event is generated for the local target position, local new data is inserted into the local target position, the local synchronization event including the insert message, the local target position, the local new data, and the local version number of the insert event are synchronized to other remote clients, the local version number of the row is updated according to the remote version number, and the local data corresponding to the remote data in the row is marked for deletion;

[0174] The client receives a remote synchronization event including a delete message, a remote target location, remote deleted data, and a remote version number sent by a remote client. If there is no ongoing operation event in the row where the local target location corresponding to the remote target location is located, the operation event is considered to be executed sequentially, and the local version number of the row is updated according to the remote version number, and the local data corresponding to the remote data in the row is marked as deleted;

[0175] The client receives the remote synchronization event including the insert message, the remote target position, the remote newly added data and the remote version number sent by the remote client. When the row at the local target position corresponding to the remote target position is performing a delete event, the operation event is considered to be processed in parallel, and the remote newly added data is inserted into the local target position, and the remote version number is recorded as the local version number of the newly added data.

[0176] After all clients have closed the files, the data marked for deletion is deleted.

[0177] For example, assuming that the initial version number of data A is 1, when client A and client B operate at the same time, client A has a higher priority than client B (the specific strategy can be determined by who loads the data first. The one that loads the data first has a higher priority. Absolute parallelism will not occur in normal scenarios. If absolute parallelism occurs, the one that sends the synchronization event first or operates the data first has a higher priority).

[0178] Scenario 1: Client A deletes data A, and Client B modifies data A. When the operation events are processed in parallel:

[0179] 1) Client A deletes data A, changes the version number of data A to 2, marks A as deleted, and sends a message to client B.

[0180] 2) Client B modifies data A, changes the version number of data A to 2, and sends a synchronization event to client A.

[0181] 3) Client B receives the synchronization event, modifies the version number to Max(2,2)+1=3, and marks A as deleted.

[0182] 4) Client A receives the message and modifies the version number to Max(2,2)+1=3. Since Client A has a higher priority than Client B, the other data of A is modified to the version modified by Client B.

[0183] 5) After Client A and Client B are completely closed, data A is completely deleted.

[0184] Scenario 2: Client A deletes data A, and client B inserts data A below A. When the operation events are processed in parallel:

[0185] 1) Client A deletes data A, changes the version number of data A to 2, marks A as deleted, and sends a message to client B.

[0186] 2) Client B selects A and generates dependency version number 2 based on the insertion scenario description as the local version number of the insertion event.

[0187] 3) Client B adds new data A, inserts it below A, and synchronizes the event to Client A.

[0188] 4) Client B receives the synchronization event, modifies the version number of A to max(1,2)=3, and marks A as deleted.

[0189] 5) Client A receives the synchronization event and inserts client B A below client A (since client A is not actually deleted).

[0190] 6) After Client A and Client B are completely closed, data A is completely deleted.

[0191] In one embodiment, in the moving scenario, the moving scenario can be regarded as a combination of the inserting scenario and the deleting scenario. What needs special treatment is that the data moved in the entire data set has two copies in the data set, one is moved to the new position as an inserting behavior, and the other is left in the original position but marked as deleted.

[0192] Based on the above ideas, in this embodiment, when the event operated by the client includes a mobile event, there are the following two mobile scenario operation methods:

[0193] Scenario 1:

[0194] The events operated by the client include move events. The client moves the local mobile data of the local first target location to the local second target location, updates the local version number of the row where the local first target location is located and uses it as the local version number of the row where the local second target location is located, marks the local mobile data of the local first target location for deletion, and synchronizes the local synchronization events including the move message, the local first target location, the local second target location, the local mobile data and the local version number to other remote clients.

[0195] The client receives a remote synchronization event including a move message, a remote first target position, a remote second target position, remote mobile data and a remote version number sent by a remote client. When the row where the local first target position corresponding to the remote first target position is located is performing a move event, and the local version number corresponding to the row is the same as the remote version number, it is considered that the operation event is processed in parallel. If the priority of the client is higher than that of the remote client, the remote synchronization event is ignored. If the priority of the client is lower than that of the remote client, the local mobile data moved into the local second target position in the local move event is marked for deletion, and the remote mobile data is inserted into a new local second target position corresponding to the remote second target position. The corresponding local version number is updated according to the remote version number and recorded in the new local second target position. The local synchronization event including the move conflict message, the new local second target position and the local version number is synchronized to other remote clients.

[0196] The client receives a remote synchronization event including a mobile message, a remote first target position, a remote second target position, remote mobile data and a remote version number sent by a remote client. When there is no ongoing operation event in the row where the local first target position corresponding to the remote first target position is located, it is considered that the operation event is executed sequentially, and the remote mobile data is inserted into the local target position corresponding to the remote second target position. The local version number of the row is updated according to the remote version number and recorded in the local target position, and the local mobile data corresponding to the remote mobile data in the local first target position is marked for deletion.

[0197] The client receives the mobile conflict message, the remote second target position and the remote version number sent by the remote client, and updates the local version number corresponding to the local second target position according to the remote second target position;

[0198] After all clients have closed the files, the data marked for deletion is deleted.

[0199] Scenario 2:

[0200] The events operated by the client include move events. The client moves the local mobile data of the local first target location to the local second target location, updates the local version number of the row where the local first target location is located and uses it as the local version number of the row where the local second target location is located, marks the local mobile data of the local first target location for deletion, and synchronizes the local synchronization events including the move message, the local first target location, the local second target location, the local mobile data and the local version number to other remote clients.

[0201] The client receives a remote synchronization event including a move message, a remote first target location, a remote second target location, remote mobile data, and a remote version number sent by a remote client, updates the local version number of the local target location corresponding to the remote first target location and the remote second target location, inserts the remote mobile data into the local target location and records the corresponding local version number, marks the local data corresponding to the remote first target location as deleted, and executes the move event of the client if there is still an event that needs to move the local data of the local target location;

[0202] After all clients have closed the files, the data marked for deletion is deleted.

[0203] For example, suppose there is data [A, B, C, D, E, F], client A and client B move data E, client A moves to the back of A, and client B moves to the back of B. Assuming the initial version number of E is 1, when client A and client B operate at the same time, A has a higher priority than B (the specific strategy can be determined by who loads the data first. The one that loads the data first has a higher priority. Absolute parallelism will not occur in normal scenarios. If absolute parallelism occurs, the one that sends the synchronization event first or operates the data first has a higher priority).

[0204] Scenario 1: When the operation events are processed in parallel:

[0205] 1) Client A moves E to behind A, changes the version number of E to 2, and sends a synchronization event to Client B. After the modification, the data of Client A is [A, E(2), B, C, D, F].

[0206] 2) Client B moves E to behind B, changes the version number of E to 2, and sends a synchronization event to Client A. After the modification, the data of Client B is [A, B, E(2), C, D, F].

[0207] 3) Client B receives the synchronization event from Client A and determines that the version number of E in the synchronization event is 2. The current version number is also 2. Since the priority of Client A is higher than that of Client B, the version number of E is modified to max(2,2)+1=3. The E after B moved in step 2) is deleted and inserted into the new position. After the processing is completed, the data of Client B is [A, E(3), B, C, D, F], send synchronization events to client A.

[0208] 4) Client A receives the synchronization event sent in step 2), and determines that the version number of E in the synchronization event is 2. The current version number is also 2. Since the priority of Client A is higher than that of Client B, it is not processed. The data of Client A is [A, E(2), B, C, D, F].

[0209] 5) Client A receives the synchronization event sent in step 3) and modifies the version number to max(2,3)+1=4. The data of Client A is [A, E(4), B, C, D, F].

[0210] 6) After Client A and Client B completely exit, the deleted data is cleaned up. The final data of Client A is [A, E(4), B, C, D, F], and the final data of Client B is [A, E(3), B, C, D, F].

[0211] Scenario 2: When the operation events are processed in parallel:

[0212] 1) Client A moves E to behind A, changes the version number of E to 2, and sends a synchronization event to Client B. After the modification, the data of A is [A, E(2), B, C, D, F].

[0213] 2) Client B receives the synchronization event and changes the version number of E to max(2,1)+1=3. After the modification, the data of Client B is [A, E(3), B, C, D, F].

[0214] 3) Client B moves E to behind B, changes the version number of E to 4, and sends a synchronization event to Client A. After the modification, the data of Client B is [A, B, E(4), C, D, E F].

[0215] 4) Client A receives the synchronization event sent by B and changes the version number of E to max(4,2)=5. After the modification, the data of A is [A, B, E(5), C, D, F].

[0216] 5) After Client A and Client B completely exit, the deleted data is cleaned up. The final data of Client A is [A, B, E(5), C, D, F], and the final data of Client B is [A, B, E(4), C, D, F].

[0217] In batch data operation scenarios, each piece of data is broken down into the above cases and processed in a loop in sequence.

[0218] Embodiment 1:

[0219] The three clients are Client A, Client B and Client C. They load data at the same time. If point-to-point communication can be established between the three clients, then Figure 1As shown, point-to-point technology is used to synchronize synchronization events. Otherwise, Figure 2 As shown. Degraded to a transit service, coordinating their respective data communications through websocket communication.

[0220] Reference Figure 3 , the version numbers of the initial data loaded by the three clients are all 0.

[0221] The users of the three clients perform collaborative data processing, such as Figure 4 As shown, client A modifies data B, client B deletes E, and client C adds H below E. If the three clients execute sequentially, they can synchronize the related information after each processing.

[0222] If three clients are processing in parallel, each client will perform conflict detection. For example, when client B deletes E, it will be prompted that client C is operating data E. When client C adds H, it will be prompted that client B is operating data E.

[0223] If the client ignores the warning and relies on the parallel processing scheme of the present invention, the following can be obtained: Figure 4 The correct synchronization data is shown.

[0224] When performing a move event, assuming the priority is client A>client B>client C, client A moves F to below A, and client B moves F to below B, the final result after synchronization is as follows: Figure 5 shown.

[0225] Reference Figure 6 The embodiment of the present invention provides a collaborative data operating system, which includes a backend server and several clients. The client includes:

[0226] The version controller is used to update the local version number after operating events and receiving remote synchronization events;

[0227] Data synchronizer, used to broadcast the client's synchronization events to the remote client or backend server of file collaboration in real time;

[0228] Data and conflict processor, used to request the backend server to load data files, define the initial version number for each row of data, and operate events and synchronize data;

[0229] Renderer, used to display data according to messages, and to support offline storage of sent messages and delayed data communication transmission.

[0230] The preferred embodiments of the present invention have been described in detail above, but it should be understood that after reading the above teachings of the present invention, those skilled in the art may make various changes or modifications to the present invention. These equivalent forms also fall within the scope defined by the claims attached to this application.

Claims

1. A collaborative data operation method, characterized in that: include: Several clients each request to load a data file from a backend server, each client defines an initial version number for each row of data, and each client performs collaborative data operations; After the operation event, the client updates the local version number and synchronizes the local synchronization event to other remote clients; The client receives remote synchronization events sent by other remote clients, and if the operation events are executed sequentially, directly synchronizes data according to the remote synchronization events; if the operation events are processed in parallel, synchronizes data with other remote clients according to a preset data conflict strategy.

2. A collaborative data operation method according to claim 1, characterized in that: When the client loads data, it displays information about other remote clients currently operating; When the client selects data, the row where the selected data is located is highlighted, and when the mouse moves to the row, the information of other remote clients being selected is displayed; When the client operates one or more rows of data where the event is located, if parallel processing occurs, a conflict message prompt is issued. When the client continues to perform the parallel processing operation, data synchronization is performed with other remote clients according to a preset data conflict strategy.

3. A collaborative data operation method as claimed in claim 1, characterized in that: When the client performs synchronization events with other remote clients, data communication transmission is performed by broadcast or point-to-point, or data communication transmission is performed by a relay forwarding mode based on a back-end server; If the client cannot achieve real-time transmission, it supports sending messages for offline storage and delaying data communication transmission.

4. A collaborative data operation method according to claim 1, characterized in that: The update strategy of the client when updating the local version number after an operation event is: Local version number = local version number + H1, where H1 is an integer greater than 0; After the client receives the remote synchronization event sent by the remote client, the update strategy for updating the local version number according to the remote version number is: Local version number=Max(local version number, remote version number)+H2, where H2 is an integer greater than 0.

5. A collaborative data operation method as claimed in claim 1, characterized in that: The event operated by the client includes an insert event, the client records the selected local target location, generates a local version number of the insert event for the local target location, and synchronizes the local synchronization event including the selected message, the local target location and the local version number of the insert event to other remote clients; The client receives a remote synchronization event including a selected message, a remote target position and a remote version number sent by other remote clients, updates the local version number of the insert event according to the remote version number, and if the row where the local target position corresponding to the remote target position is located is also selected after receiving the synchronization event, it is considered that the operation event is parallel processing, and the local version number of the insert event is updated again, and the synchronization event including the selected message, the local target position and the local version number of the insert event is synchronized to other remote clients, otherwise it is considered to be sequential execution, and waits for receiving remote new data; The client inserts the local newly added data at the local target location, records the local version number of the insertion event, and synchronizes the local synchronization event including the insertion message, the local target location, the local newly added data and the local version number of the insertion event to other remote clients; The client receives a remote synchronization event including an insert message, a remote target location, remote newly added data, and a remote version number sent by other remote clients, inserts the remote newly added data into a local target location corresponding to the remote target location, records the remote version number as the local version number of the newly added data, and arranges the data in the local target location according to the size of the local version number; or, The event operated by the client includes an insert event, the client records the selected local target location, generates a local version number of the insert event for the local target location, and synchronizes the local synchronization event including the selected message, the local target location and the local version number of the insert event to other remote clients; The client receives a remote synchronization event including a selected message, a remote target location and a remote version number sent by other remote clients, and updates a local version number of the inserted event according to the remote version number; The client inserts the local newly added data at the local target location, records the local version number of the insertion event, and synchronizes the local synchronization event including the insertion message, the local target location, the local newly added data and the local version number of the insertion event to other remote clients; The client receives remote synchronization events including insert messages, remote target locations, remote newly added data and remote version numbers sent by other remote clients, inserts the remote newly added data into a local target location corresponding to the remote target location, and records the remote version number as the local version number of the newly added data. If the local version numbers inserted into the local target locations are the same, it is considered that the operation events are parallel processing, and the data is first arranged at the local target location according to the size of the local version numbers. When the local version numbers are the same, the data is arranged in the order in which the clients corresponding to the newly added data load the data. Otherwise, it is considered to be sequential execution, and the data is arranged at the local target location according to the size of the local version numbers.

6. A collaborative data operation method according to claim 1, characterized in that: The events operated by the client include modification events, the client modifies local data at a local target location, updates a local version number for the row where the local target location is located, and synchronizes a local synchronization event including a modification message, the local target location, the local modified data of the row where the local target location is located, and the local version number to other remote clients; The client receives a remote synchronization event including a modification message, a remote target location, remote modification data, and a remote version number sent by a remote client. If a modification event is being performed on the row where the local target location corresponding to the remote target location is located, it is considered that the operation event is processed in parallel, and the user is prompted whether to synchronize the data. If the user chooses to synchronize the data, the local modification data is cleared, the remote modification data is used as the row data, and the local version number of the row is updated according to the remote version number. If the user chooses not to synchronize the data, the local version number of the row is updated according to the remote version number, and the remote modification data is temporarily stored locally; After the user chooses not to synchronize data and continues to modify the corresponding row data, if the user cancels the local modification and the remote modification data of the row data is temporarily stored locally, the remote modification data is used as the row data and the temporarily stored remote modification data is cleared; if the user completes the modification and the remote modification data of the row data is temporarily stored locally, the temporarily stored remote modification data is cleared, the local version number of the row is updated, and the local synchronization event including the modification message, the local target location of the row, the local modification data of the row and the local version number is synchronized to other remote clients; The client receives a remote synchronization event sent by a remote client, including a modification message, a remote target location, remote modification data, and a remote version number. If there is no ongoing operation event in the row where the local target location corresponding to the remote target location is located, the operation event is considered to be executed sequentially, and the remote modification data is used as the row data, and the local version number of the row is updated according to the remote version number.

7. A collaborative data operation method as claimed in claim 6, characterized in that: If the client receives multiple remote data and remote version numbers of the same peer at the same time, only the remote synchronization event with the largest remote version number is processed, and the rest are ignored; If the client receives remote synchronization events of different rows in batches, they are processed one by one in the manner of modifying events.

8. A collaborative data operation method according to any one of claims 1 to 7, characterized in that: The events operated by the client include deletion events, the client deletes local data at the local target location, updates the local version number of the row where the local target location is located, marks the deleted local deletion data with a deletion mark, and synchronizes the local synchronization event including the deletion message, the local target location, the local deletion data and the local version number to other remote clients; The client receives a remote synchronization event including a deletion message, a remote target location, remote deletion data and a remote version number sent by a remote client. If a modification event is being performed on the row where the local target location corresponding to the remote target location is located, it is considered that the operation event is processed in parallel. After the local data of the row is modified, the local version number of the row is updated, and the local synchronization event including the modification message, the local target location of the row, the local modification data of the row and the local version number are synchronized to other remote clients. The local version number of the row is updated according to the remote version number, and the local data corresponding to the remote data in the row is marked for deletion. When there is a remote data that is the local data before the modification event of the row is performed, the event of the client with a higher priority is executed; The client receives a remote synchronization event including a deletion message, a remote target location, remote deletion data, and a remote version number sent by a remote client. If there is no ongoing operation event in the row where the local target location corresponding to the remote target location is located, it is considered that the operation event is executed sequentially, and the local version number of the row is updated according to the remote version number, and the local data corresponding to the remote data in the row is marked as deleted; The client receives a remote synchronization event including a modification message, a remote target location, remote modification data, and a remote version number sent by a remote client. When a deletion event is being performed on a row of a local target location corresponding to the remote target location, the operation event is considered to be parallel processing, the local version number of the row is updated, and other data in the local target location except for data marked with a deletion mark is modified to the remote modification data. When the remote modification data is data marked with a deletion mark, the event of the client with a high priority is executed; After all clients have closed the files, delete the data marked for deletion; or, The events operated by the client include deletion events, the client deletes local data at the local target location, updates the local version number of the row where the local target location is located, marks the deleted local deletion data with a deletion mark, and synchronizes the local synchronization event including the deletion message, the local target location, the local deletion data and the local version number to other remote clients; The client receives a remote synchronization event including a delete message, a remote target position, remote deleted data, and a remote version number sent by a remote client; if an insert event is being performed at a row where a local target position corresponding to the remote target position is located, it is considered that the operation event is processed in parallel, a local version number of the insert event is generated for the local target position, local new data is inserted at the local target position, the local synchronization event including the insert message, the local target position, the local new data, and the local version number of the insert event is synchronized to other remote clients, the local version number of the row is updated according to the remote version number, and the local data corresponding to the remote data in the row is marked for deletion; The client receives a remote synchronization event including a deletion message, a remote target location, remote deletion data, and a remote version number sent by a remote client. If there is no ongoing operation event in the row where the local target location corresponding to the remote target location is located, it is considered that the operation event is executed sequentially, and the local version number of the row is updated according to the remote version number, and the local data corresponding to the remote data in the row is marked as deleted; The client receives a remote synchronization event including an insert message, a remote target position, remote newly added data, and a remote version number sent by a remote client. When a delete event is being performed on a row of a local target position corresponding to the remote target position, the event of the operation is considered to be parallel processing, and the remote newly added data is inserted into the local target position, and the remote version number is recorded as the local version number of the newly added data. After all clients have closed the files, the data marked for deletion is deleted.

9. A collaborative data operation method as claimed in claim 8, characterized in that: The events operated by the client include move events, the client moves the local mobile data of the local first target location to the local second target location, updates the local version number of the row where the local first target location is located and uses it as the local version number of the row where the local second target location is located, marks the local mobile data of the local first target location with a deletion mark, and synchronizes the local synchronization events including the move message, the local first target location, the local second target location, the local mobile data and the local version number to other remote clients; The client receives a remote synchronization event including a move message, a remote first target position, a remote second target position, remote mobile data and a remote version number sent by a remote client. When the row where the local first target position corresponding to the remote first target position is located is performing a move event, and the local version number corresponding to the row is the same as the remote version number, it is considered that the operation event is processed in parallel. If the priority of the client is higher than that of the remote client, the remote synchronization event is ignored. If the priority of the client is lower than that of the remote client, the local mobile data moved into the local second target position in the local move event is marked for deletion, the remote mobile data is inserted into a new local second target position corresponding to the remote second target position, the corresponding local version number is updated according to the remote version number and recorded in the new local second target position, and the local synchronization event including the move conflict message, the new local second target position and the local version number is synchronized to other remote clients. The client receives a remote synchronization event including a mobile message, a remote first target position, a remote second target position, remote mobile data and a remote version number sent by a remote client; when there is no ongoing operation event in the row where the local first target position corresponding to the remote first target position is located, it is considered that the operation event is executed sequentially, the remote mobile data is inserted into the local target position corresponding to the remote second target position, the local version number of the row is updated according to the remote version number and recorded in the local target position, and the local mobile data corresponding to the remote mobile data in the local first target position is marked for deletion; The client receives a mobile conflict message, a remote second target location, and a remote version number sent by a remote client, and updates a local version number corresponding to the local second target location according to the remote second target location; After all clients have closed the files, delete the data marked for deletion; or, The events operated by the client include move events, the client moves the local mobile data of the local first target location to the local second target location, updates the local version number of the row where the local first target location is located and uses it as the local version number of the row where the local second target location is located, marks the local mobile data of the local first target location with a deletion mark, and synchronizes the local synchronization events including the move message, the local first target location, the local second target location, the local mobile data and the local version number to other remote clients; The client receives a remote synchronization event including a mobile message, a remote first target location, a remote second target location, remote mobile data and a remote version number sent by a remote client, updates the local version numbers of the local target locations corresponding to the remote first target location and the remote second target location, inserts the remote mobile data into the local target location corresponding to the remote second target location and records the corresponding local version number, marks the local data corresponding to the remote first target location with a deletion mark, and executes the client's mobile event if there is still an event that needs to move the local data of the local target location; After all clients have closed the files, the data marked for deletion is deleted.

10. A collaborative data operating system, comprising a backend server and several clients; It is characterized in that The client comprises: The version controller is used to update the local version number after operating events and receiving remote synchronization events; Data synchronizer, used to broadcast the synchronization events of the client to the remote client or back-end server of file collaboration in real time, and to support offline storage of messages and delayed data communication transmission; Data and conflict processor, used to request the backend server to load data files, define the initial version number for each row of data, and operate events and synchronize data; Renderer, used to display data based on messages.