Data processing method and device, equipment, medium and program product

By mapping operation frames on the timeline and introducing insert frame detection conflicts, the problem of multi-user operation conflicts in the collaborative visualization application editor is solved, which improves user experience and system robustness, and avoids resource locking and conflict resolution interface interference.

CN119127819APending Publication Date: 2024-12-13CHINA MOBILE M2M +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411219491.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-09-02
Publication Date
2024-12-13

AI Technical Summary

Technical Problem

In the collaborative visual application editor, multiple users are prone to causing conflicts when operating the same project at the same time. The existing technologies such as resource locking, conflict resolution interface, operation transformation and conflict free copying data types have problems with security and experience balance, and the calculation volume Large and poor user experience.

Method used

By mapping the operation frames on the timeline, using insert frames to assist in detecting conflicts, generating compensation frames to avoid operation conflicts, and viewing the operation data conversion process in real time through the visual interface, avoiding resource locking and conflict resolution interface interfering with users.

Benefits of technology

It realizes the avoidance of operational conflicts during collaborative editing of multiple users, improves user experience and system robustness, and reduces the time cost and calculation amount of conflict handling.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119127819A_ABST
    Figure CN119127819A_ABST
Patent Text Reader

Abstract

The invention discloses a data processing method and device, equipment, a medium and a program product, and the method comprises the steps: obtaining a first operation frame which is transmitted by a first client and is used for operating first operation data in an editor under the condition that a plurality of clients are determined to join a collaborative editing session; inserting the first operation frame into a time axis according to first timestamp information for operating the first operation data, and performing conflict detection on the first operation frame to determine a conflict type of the first operation frame; generating a compensation frame according to the conflict type; and under the condition of merging the operations on the clients, merging the operation data corresponding to all the operation frames on the time axis to obtain a target editor. The operation frame is mapped on the time axis, the operation frame is played back and forth by dragging the time point, so that a user can check the conversion process of the operation data in real time, the insertion frame is introduced to assist in detecting the conflict of the same operation data on the time axis, and the operation conflict of the same operation data is avoided.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of visual collaborative editing technology, and in particular to a data processing method, device, equipment, medium and program product. Background Art

[0002] When using a collaborative visual application editor, some conflicts may arise due to multiple users working on the same project at the same time.

[0003] In order to solve the above-mentioned conflict problem, the methods used in the prior art include the following: resource locking, conflict resolution interface, operational transformation (OT) and conflict-free replicated data types (CRDTs).

[0004] The above resource locking method has a balance problem between security and experience. That is, when the scope of resource locking is too large, the resources that can be edited by users at the same time will decrease. If the scope of locking is too small, deadlock may occur. If the conflict resolution interface synchronizes changes made by multiple users in real time, the reminders of the conflict resolution interface will distract the user's attention, resulting in a fragmented user experience. Scheduled or active synchronization of changes will increase the probability of conflict, and due to the lack of the concept of order, merging conflicts will require the participation of multiple people, increasing the time cost of user use. The method of operation transformation and conflict-free copying of data types requires the implementation of merge operations for different conflict situations, which requires large amounts of calculation and the user can only perceive the results after the conversion. Summary of the invention

[0005] The purpose of the embodiments of the present application is to provide a data processing method, apparatus, device, medium and program product to map operation frames on a timeline, play back operation frames by dragging time points, and enable users to view the process of operation data conversion in real time through a visual interface, while introducing insertion frames to assist in detecting conflicts for the same operation data on the timeline to avoid conflicts in operations on the same operation data.

[0006] The technical solution of this application is as follows:

[0007] In a first aspect, a data processing method is provided, the method comprising:

[0008] In the case where it is determined that multiple clients have joined the collaborative editing session, a first operation frame sent by a first client for operating first operation data in an editor is obtained, wherein, for each of the clients joining the collaborative editing session, the state of the editor in each of the clients is consistent, and each of the clients has mapped the historical operation frames to a timeline according to timestamp information of the historical operation frames of the editor, the timelines on each of the clients are consistent, the first client is any one of the clients, the first operation frame includes first timestamp information for operating the first operation data, and the first operation data is any one of the operation data in the editor;

[0009] inserting the first operation frame into the time axis according to the first timestamp information, and performing conflict detection on the first operation frame to determine a conflict type of the first operation frame;

[0010] Processing the first operation frame according to the conflict type to generate a compensation frame, and inserting the compensation frame into the time axis;

[0011] When it is determined to merge the operations on each of the clients, the operation data corresponding to all the operation frames on the timeline are merged to obtain a target editor.

[0012] In a second aspect, a data processing device is provided, the device comprising:

[0013] A first acquisition module is used to acquire, when it is determined that multiple clients have joined the collaborative editing session, a first operation frame sent by a first client to operate first operation data in an editor, wherein, for each of the clients joining the collaborative editing session, the state of the editor in each of the clients is consistent, and each of the clients has mapped the historical operation frames to a timeline according to the timestamp information of the historical operation frames of the editor, the timelines on each of the clients are consistent, the first client is any one of the clients, the first operation frame includes first timestamp information for operating the first operation data, and the first operation data is any one of the operation data in the editor;

[0014] a first determining module, configured to insert the first operation frame into the time axis according to the first timestamp information, and perform conflict detection on the first operation frame to determine a conflict type of the first operation frame;

[0015] A second determining module, configured to process the first operation frame according to the conflict type, generate a compensation frame, and insert the compensation frame into the time axis;

[0016] The third determination module is used to merge the operation data corresponding to all the operation frames on the timeline to obtain a target editor when it is determined that the operations on each of the clients are to be merged.

[0017] In a third aspect, an embodiment of the present application provides an electronic device, which includes a processor, a memory, and a program or instruction stored in the memory and executable on the processor, wherein the program or instruction, when executed by the processor, implements the steps of the data processing method described in any one of the embodiments of the present application.

[0018] In a fourth aspect, an embodiment of the present application provides a readable storage medium, on which a program or instruction is stored. When the program or instruction is executed by a processor, the steps of the data processing method described in any one of the embodiments of the present application are implemented.

[0019] In a fifth aspect, an embodiment of the present application provides a computer program product. When the instructions in the computer program product are executed by a processor of an electronic device, the electronic device can perform the steps of the data processing method described in any one of the embodiments of the present application.

[0020] The technical solution provided by the embodiments of the present application brings at least the following beneficial effects:

[0021] In an embodiment of the present application, when multiple clients join a collaborative editing session, at this time, the state of the editor in each client is consistent, and each client has mapped the historical operation frame to the timeline according to the timestamp information of the historical operation frame of the editor, that is, the timeline on each client is consistent. At this time, by acquiring the first operation frame sent by the first client to operate the first operation data in the editor, according to the first timestamp information of the first operation data included in the first operation frame, the first operation frame is inserted into the timeline, and conflict detection is performed on the first operation frame to determine the conflict type of the first operation frame, and then the first operation frame is processed according to the conflict type to generate a compensation frame, and the compensation frame is inserted into the timeline. When it is determined that the operations on each client are merged, the operation data corresponding to all operation frames on the timeline are merged to obtain the target editor. The solution of the embodiment of the present application will not lock the resources for executing the operation, but directly perform conflict detection on the first operation frame after generating the first operation frame. When it is determined that there is a conflict, it is processed to generate a compensation frame to compensate for the first operation frame, which will not affect the subsequent operation results. Moreover, the solution of the embodiment of the present application will not generate a conflict resolution interface to interfere with the user. The solution of the embodiment of the present application maps all operation frames on the timeline, and the operation frames can be played back by dragging the time point. In this way, while the results of the operation data conversion can be viewed, the process of each operation data conversion in the editor can be viewed in real time through the visual interface. At the same time, insert frames are introduced to assist in detecting conflicts for the same resource on the timeline, and conflicting operation frames are processed to avoid operation conflicts for the same operation data.

[0022] It should be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the present application. BRIEF DESCRIPTION OF THE DRAWINGS

[0023] The drawings herein are incorporated into the specification and constitute a part of the specification, illustrate embodiments consistent with the present application, and together with the specification are used to explain the principles of the present application, and do not constitute an improper limitation on the present application.

[0024] Figure 1 It is a flowchart of a data processing method provided in an embodiment of the present application;

[0025] Figure 2 is a structural schematic diagram of a data processing device provided in an embodiment of the present application;

[0026] Figure 3 It is a structural schematic diagram of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0027] In order to make those of ordinary skill in the art better understand the technical scheme of the present application, the technical scheme in the embodiments of the present application will be clearly and completely described below in conjunction with the accompanying drawings. It should be understood that the specific embodiments described herein are only intended to explain the present application, rather than to limit the present application. For those skilled in the art, the present application can be implemented without the need for some of these specific details. The following description of the embodiments is only to provide a better understanding of the present application by illustrating the examples of the present application.

[0028] It should be noted that the terms "first", "second", etc. in the specification and claims of the present application and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchanged where appropriate, so that the embodiments of the present application described here can be implemented in an order other than those illustrated or described here. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present application. On the contrary, they are only examples consistent with some aspects of the present application as detailed in the attached claims.

[0029] As described in the background technology section, when using a collaborative visual application editor, some conflict problems may arise due to multiple users operating the same project at the same time. For example, there are two users, user A and user B, who are editing the description text of the same component at the same time. The initial content of the document is: "Hello World". First, user A inserts an exclamation mark at position 5 and hopes that the document will become: "Hello! World"; user B deletes the space at position 6 and hopes that the document will become: "Hello World". If the collaborative editor does not adopt any conflict detection and conflict resolution mechanism, the operations of user A and user B may be directly applied to the document, resulting in conflict and inconsistent results. For example, if user A's operation is applied first, the document becomes "Hello! World", and then user B's operation is applied to this changed document, deleting the character at position 6 (now an exclamation mark instead of a space), the final document may become "Hello World", which is not the result that user B wants.

[0030] At present, in order to solve the conflict problem caused by multiple users operating the same project at the same time, there are mainly the following solutions:

[0031] 1. Resource locking: When a user is editing an element, the system can temporarily lock the element to prevent other users from making changes.

[0032] 2. Conflict resolution interface: Provide a user-friendly interface to display conflicts and allow users to negotiate how to resolve these conflicts.

[0033] 3. OT: This is an algorithm that allows users to edit without locking resources. When editing occurs, the OT algorithm transforms subsequent operations to reflect other changes that occurred during the execution of the operation, which means that even if two users make changes to the same document at almost the same time, the system is able to intelligently merge these changes without losing any information.

[0034] 4. CRDTs: This is a data structure that ensures the eventual consistency of data between multiple copies without a central coordinator. With CRDTs, each user's operations are mergeable and will not cause conflicts, making collaborative editing easier and more reliable.

[0035] Among the main methods mentioned above, resource locking is an idea, and there are many specific implementations, such as locks based on Redis and databases; the conflict resolution interface is a fixed method, and different products only differ in the interface; the OT method is a set of algorithm frameworks, which fix the steps of the algorithm operation, but the specific operation method depends on the program implementation; CRDTs are a type of data structure that is designed to easily replicate and synchronize data in distributed systems.

[0036] In order to clearly discuss the application of the idea of ​​"insertion" involved in the subsequent embodiments of this application in the collaborative editor and the difference from other methods, the following is a detailed discussion of OT and CRDTs:

[0037] The core concepts of OT include editing operations, broadcasting operations, conflict detection, and conflict handling. A brief overview of these core steps is as follows:

[0038] Editing operations: Users perform edits on their own clients, and these edits are encapsulated into operations (such as inserting, deleting, etc.).

[0039] Broadcast operations: Edit operations are sent to other clients or servers. In a distributed system, this usually means broadcasting the operation to all other clients, while in a centralized system, the operation is sent to a central server.

[0040] Detecting conflicts: When two or more operations occur concurrently, the system needs to detect whether these operations conflict. A conflict usually means that two operations cannot be applied simultaneously without affecting the eventual consistency of the document.

[0041] Handling conflicts: Once conflicts are detected, the OT system uses transformation functions to handle them. Transformation functions adjust the operations so that they can be applied in different contexts without changing the final document state. This process is called operation transformation, which ensures document consistency and user intent.

[0042] Applying operations: The transformed operations are applied to the document. In a centralized system, the server is usually responsible for applying the operations and sending the results back to the client. In a distributed system, each client applies the operations.

[0043] The design of OT systems requires great care to ensure that the transformations of operations are convergent, that is, all clients eventually reach the same document state regardless of the order in which the operations are applied. This often involves complex algorithmic design to ensure consistency in a variety of concurrent scenarios.

[0044] In order to meet the needs of various scenarios, CRDTs are generally divided into two types. One is operation-based CRDTs (Commutative Replicated Data Types, CmRDTs). CmRDT replicas propagate states by transmitting only update operations. For example, a single integer CmRDT may broadcast operations (+10) or (-20). Replicas receive updates and perform these operations locally. These operations are commutative, but they are not necessarily idempotent. Therefore, the communication infrastructure must ensure that all operations on one replica are transmitted to other replicas, without duplication, but in any order. The other is state-based CRDTs (Convergent Replicated Data Types, CvRDTs). Compared with CmRDT, CvRDTs sends its complete local state to other replicas, where the state is merged by a function that must be commutative, associative, and idempotent. The update function provides a connection for any pair of replica states, and the same partial order rule monotonically increases the internal state.

[0045] The above four solutions all have some problems. For example, the resource locking method has a balance problem between security and experience. That is, when the scope of resource locking is too large, the resources that can be edited by users at the same time will decrease. If the scope of locking is too small, deadlock may occur. If the conflict resolution interface synchronizes changes made by multiple users in real time, the reminders of the conflict resolution interface will distract the user's attention, resulting in a fragmented user experience. Scheduled or active synchronization of changes will increase the probability of conflict, and due to the lack of the concept of order, merging conflicts will require the participation of multiple people, increasing the time cost of user use. The OT and CRDTs methods need to implement merge operations for different conflict situations, which requires large amounts of calculation and users can only perceive the results after the conversion.

[0046] In order to solve the above problems, the embodiments of the present application provide a data processing method, apparatus, device, medium and program product. When multiple clients join a collaborative editing session, at this time, the state of the editor in each client is consistent, and each client has mapped the historical operation frames to the timeline according to the timestamp information of the historical operation frames of the editor, that is, the timelines on each client are consistent. At this time, by obtaining a first operation frame sent by a first client to operate on first operation data in the editor, the first operation frame is inserted into the timeline according to the first timestamp information of the operation on the first operation data included in the first operation frame, and the first operation frame is mapped to the timeline according to the timestamp information of the operation on the first operation data. An operation frame performs conflict detection, determines the conflict type of the first operation frame, and then processes the first operation frame according to the conflict type, generates a compensation frame, and inserts the compensation frame into the timeline. When it is determined that the operations on each client are to be merged, the operation data corresponding to all operation frames on the timeline are merged to obtain the target editor. The scheme of the embodiment of the present application will not lock the resources for performing the operation, but directly perform conflict detection on the first operation frame after generating the first operation frame. When it is determined that there is a conflict, it is processed to generate a compensation frame to compensate for the first operation frame, which will not affect the subsequent operation results. And the scheme of the embodiment of the present application will not generate a conflict resolution interface to interfere with the user. The scheme of the embodiment of the present application maps all the operation frames on the timeline, and the operation frame can be replayed by dragging the time point. In this way, while the results after the operation data conversion can be viewed, the process of the conversion of each operation data in the editor can also be viewed in real time through the visual interface. At the same time, the insertion frame is introduced to assist in detecting the conflict of the same operation data on the timeline, and the conflicting operation frames are processed to avoid the conflict of the operation of the same operation data.

[0047] Before introducing the technical solutions of the embodiments of the present application, the professional terms involved in the embodiments of the present application are first introduced:

[0048] Visual application editor: It is a software tool that allows users to create and edit data visualization applications through a graphical user interface (GUI). These editors usually provide users with a series of visual components, such as charts, maps, and controls, and users can layout their applications by dragging and dropping these components onto a canvas. Visual application editors also provide the ability to customize these components, such as setting the color, shape, size of these components, and binding the components to specific data sources.

[0049] The key components of a visual application editor typically include:

[0050] Widget Library: A library of predefined visual elements that users can choose from and add to their applications.

[0051] Data Integration: The tool provides the ability to integrate with various data sources, including real-time data streams, databases, API interfaces, or file imports.

[0052] Custom layout and style: Users can adjust the layout and style of widgets, including position, alignment, size, and color, to suit specific design requirements.

[0053] Preview and deploy: The editor provides a preview function that allows users to see the final effect before publishing, and deploy the completed application to different platforms or devices.

[0054] Responsiveness and adaptability: The editor ensures that the created application can adapt to different screen sizes and resolutions, especially maintaining the consistency of layout and the integrity of functionality on large screen displays.

[0055] These visual application editors enable non-technical users to create complex data visualization applications without having to have a deep understanding of programming or data science. They lower the barrier to entry for creating high-quality data visualization applications by providing an intuitive and visual way to process and display data.

[0056] Collaborative Visual Application Editor: It is a special type of visual editing tool that not only includes the functions of a regular visual application editor, but also supports the ability of multi-user collaborative work. This means that multiple users can work on the same visual project at the same time, share data, views and design elements, see each other's changes in real time, and communicate and coordinate.

[0057] Key features of collaborative visual application editors typically include:

[0058] Real-time collaboration: Users can edit the same visualization application at the same time, and the system will synchronize all users' changes in real time and display the latest results of the changes on the user's terminal.

[0059] Conflict Resolution: Editors provide mechanisms to handle and resolve conflicts when multiple users attempt to change the same element.

[0060] It should be noted that the editor mentioned in the embodiment of the present application is the above-mentioned collaborative visualization application editor.

[0061] Operation frame: abstracts the user's operation, mainly including user identification, operation, operation data and timestamp. "User identification" is used to describe the user-related data generated by this frame, including but not limited to the user's account information, device fingerprint and other information, used to distinguish the source of the frame, and reflected on the timeline to assist users in troubleshooting; "operation" represents the current user's modification, such as addition, modification, etc.; "operation data" is used to describe the operation or data performed by the user, used to update the original data, and reflect the user's specific operation; "timestamp" is an important identifier mapped to the timeline of the operation frame, used to determine the order of multiple operations of multiple users.

[0062] Insert frame: It is a type of operation frame. In addition to all the data of the operation frame, it also includes operations, metadata, modification data, and conflict operation frame lists to describe the operations performed by this modification and the scope of the operations.

[0063] Insertion frames are mainly generated in two situations: First, when the latest operation frame is sent to the timing list, it is found that the time of the latest operation frame is smaller than the time of the last operation frame in the timing list, then it is judged that the latest operation frame may cause a conflict, and it is converted into an insertion frame. The timing is compared from the latest operation frame until the correct position of the timestamp contained in the insertion frame on the timing list is found, and then the insertion frame is inserted into the timing list. After the insertion is completed, conflict detection is performed from the insertion frame, and the conflicting operation frame detected is conflict-marked, and then conflict compensation is performed. Second, when the latest operation frame is sent to the timing list, it is found that the time of the latest operation frame is larger than the time of the last operation frame in the timing list, which means that the latest operation frame is a new operation frame, and it is placed at the end of the timing list and conflict detection is performed. If the conflict detection fails, it is converted into an insertion frame, conflict-marked, and then conflict compensation is performed.

[0064] In addition, there is a special type of insert frame called post-insert frame. Post-insert and insert frames have the same data structure. The main reason is that due to network delay, the insert frame may be sent to the timeline after the compensation frame has been generated. However, according to the scene definition, since the user manually confirms multiple conflicting frames, it means that the user is "satisfied" with the current modification. The subsequent insert frame will only serve as a reference for the user to modify the application when replaying the operation, and should not affect the final merged result.

[0065] Compensation frame: It is also a kind of operation frame. It abstracts how to modify the conflicting data. This modification may be generated by the system's conflict compensation or by a user's compensation operation. When the conflict frame is generated, it means that the modification of the metadata has been confirmed. The operation frame before the metadata can perform garbage collection to release memory space. The compensation frame should contain conflict data, conflict situation, conflict list, compensation source, compensation operation and compensation result. Among them, "conflict data" identifies which metadata has conflicted; "conflict situation" identifies the concurrent operation generated on the conflicting data, which can be a record of the operation action (such as increasing the number of units by 10) or the operation data (such as changing to 10); "conflict list" records the collection of conflicting operation frames and insertion frames; "compensation source" is whether it is automatic compensation performed by the system preset compensation function or a compensation operation performed by a user. The compensation source contains the unique identifier of the compensation function or the compensation user; "compensation operation" determines the type of operation performed by the metadata modification, which can be addition, deletion, modification or custom operation; "compensation result" is the final value of the metadata.

[0066] It should be noted that, unlike ordinary text editors, visual editors use structured data to describe the results of the editing. For example, the x and y attributes can be used to describe the position of the component on the canvas, and width and height can be used to describe the width and height of the component. Similarly, in the editor, the content that can be edited visually is composed of structured data.

[0067] Text editors are unstructured data, where the content and results cannot be pre-set. To ensure idempotence or correct conversion, the text needs to be divided into blocks according to certain rules, and each block needs to be assigned a unique identifier. Operations are performed according to the identifier to ensure the correctness of the operation. Visual editors, on the other hand, do not need to divide resources because they are structured data, and use each attribute as a unique identifier to determine conflicts.

[0068] The frame data structure described above does not limit the specific format of implementation and can be flexibly adjusted according to the needs of the system, for example: JSON, XML, text and other data description formats.

[0069] Timeline: A sequential data list composed of multiple operation frames in chronological order. The operation frames inserted into the timeline should always maintain the same order as the real-world time. In addition, the implementation of the timeline is not fixed, but due to the large number of insertion and sequential search operations, the performance of the timeline sequential search and insertion operations should be maintained.

[0070] The timeline is not only a data structure, but also reflected in the user's operation interface. Users can drag the timeline to select an operation frame at a certain time node, so that the editor client can replay the editing effects of the application on the timeline. In this way, the time concept commonly known to users can be applied to the editor, so that users can view the current multiple modifications and the impact of the modifications, providing a more friendly and easier to understand operation form.

[0071] It should be noted that the timeline not only needs to reflect the operation frame, but also needs to reflect the conflict frame and the position of the conflicting operation frame and the inserted frame on the timeline, so that the user can play back.

[0072] It should be noted that all the following frame operations in the editor are defined as: add, modify, and delete.

[0073] The data processing method provided in the embodiment of the present application is described in detail below through specific embodiments and their application scenarios in conjunction with the accompanying drawings.

[0074] Figure 1 is a flow chart of a data processing method provided in an embodiment of the present application, such as Figure 1 As shown, the data processing method provided in the embodiment of the present application may include steps 110 to 140.

[0075] Step 110: when it is determined that multiple clients have joined the collaborative editing session, obtain a first operation frame sent by a first client to operate first operation data in the editor, wherein the first operation frame includes first timestamp information of the operation on the first operation data.

[0076] The client may be a user terminal operated by each user, and the client here may include but is not limited to a personal computer (PC), a smart phone, a tablet computer or a personal digital assistant (PDA).

[0077] The collaborative editing session may be a session for collaboratively editing resources in an editor. In this session, each client may collaboratively edit each resource in the editor.

[0078] In some embodiments of the present application, for each client joining a collaborative editing session, the state of the editor in each client is consistent, and each client has mapped the historical operation frames to the timeline based on the timestamp information of the editor's historical operation frames, that is, the timeline on each client is also consistent, and the historical operation frames here can be the operation frames for editing before each client joins the collaborative editing session.

[0079] The first client may be any one of the clients, specifically a client that operates the first operation data in the editor. The first operation data here may be any one of the operation data in the editor. The operation data in the editor here may be various controls, text content, etc. in the editor.

[0080] The first timestamp information may be timestamp information when the first client performs an operation on the first operation data.

[0081] In some embodiments of the present application, before each client joins a collaborative editing session, the editor and timeline must first be initialized separately, so that the status of each editor on each client is consistent, and the timeline is consistent. The initialization process is the starting point for the collaborative editor to prepare to process user requests. After the client enters the editor, the editor needs to build the required data structure and be ready to handle various operations from the user.

[0082] Therefore, before step 110, the above method may further include:

[0083] Get the first snapshot and history operation frame of the editor;

[0084] Sending the first snapshot and the historical operation frame to the first client, so that the first client initializes the state of the editor based on the first snapshot, and initializes the timeline based on the historical operation frame, so as to map the historical operation frame to the timeline according to the timestamp information of the historical operation frame of the editor;

[0085] Step 110 may specifically include:

[0086] When it is determined that the editor on the first client has been initialized, a first operation frame sent by the first client for operating first operation data in the editor is obtained.

[0087] The first snapshot may be the latest snapshot of the editor before each client joins the collaborative editing session.

[0088] In some embodiments of the present application, before each client joins the collaborative editing session, a first snapshot and a historical operation frame of the editor can be obtained from a server or a database, and then the first snapshot and the historical operation frame can be sent to the first client, so that the first client initializes the state of the editor based on the first snapshot, and initializes the timeline based on the historical operation frame, so as to map the historical operation frame to the timeline according to the timestamp information of the historical operation frame of the editor. In this way, when it is determined that the initialization of the editor on the first client is completed, the first operation frame sent by the first client to operate the first operation data in the editor is obtained.

[0089] In some embodiments of the present application, during initialization, it is also necessary to initialize the GUI of the editor, where the GUI may include displaying operation frames, conflict frames, and any related source data. In addition, it is also necessary to set listener events so that when a new operation frame is created or an existing operation frame is modified, the timeline and GUI can be updated in real time. In addition, it is also necessary to set user permissions, and the initialization process may adjust the available functions and interface options to ensure that the user has appropriate access rights and a personalized experience.

[0090] In an embodiment of the present application, a first snapshot and a historical operation frame of an editor are obtained, and the first snapshot and the historical operation frame are sent to a first client, so that the first client initializes the state of the editor based on the first snapshot, and initializes the timeline based on the historical operation frame, so that the historical operation frame is mapped to the timeline according to the timestamp information of the historical operation frame of the editor. When it is determined that the initialization of the editor on the first client is complete, the first operation frame sent by the first client to operate the first operation data in the editor is obtained. This ensures that after the first client joins the collaborative editing session, the state of its editor and the timeline are consistent with those of other clients in the collaborative editing session, so as to facilitate collaborative editing between clients.

[0091] Step 120: insert the first operation frame into the time axis according to the first timestamp information, perform conflict detection on the first operation frame, and determine the conflict type of the first operation frame.

[0092] In some embodiments of the present application, the first operation frame may be inserted into the timeline according to the first timestamp information, and then conflict detection may be performed on the first operation frame to determine the conflict type of the first operation frame.

[0093] In some embodiments of the present application, in order to accurately insert the first operation frame into the time axis, inserting the first operation frame into the time axis according to the first timestamp information may specifically include:

[0094] When it is determined that the first timestamp information is greater than the second timestamp information, inserting the first operation frame to the end of the timeline;

[0095] When it is determined that the first timestamp information is less than the second timestamp information, the first operation frame is inserted into the first position in the time axis.

[0096] The second timestamp information may be the maximum timestamp information on the time axis.

[0097] In an example, taking the timestamp information on the time axis as the timestamp information from 10 am to 2 pm as an example, the second timestamp information is 2 pm.

[0098] In some embodiments of the present application, when the first operation frame is inserted into the timeline, if the first timestamp information is greater than the timestamp information of the operation frame currently at the end of the timeline, it indicates that the first operation frame is a normally sent operation frame, and the first operation frame can be directly inserted into the end of the timeline.

[0099] Continuing to refer to the above example, if the first timestamp information is 2:03 pm, and the first timestamp information is greater than the second timestamp information 2:00 pm, then the first operation frame can be directly inserted into the end of the timeline.

[0100] The first position may be a position between the third timestamp information and the fourth timestamp information on the time axis, where the third timestamp information and the fourth timestamp information may be timestamp information respectively adjacent to the first timestamp information, and the first timestamp information is located between the third timestamp information and the fourth timestamp information.

[0101] In some embodiments of the present application, when the first operation frame is inserted into the timeline, if the first timestamp information is greater than the timestamp information of the operation frame currently at the end of the timeline, the first operation frame may not be transmitted in time due to network delays and other reasons, and it is necessary to find the position corresponding to the first operation frame on the timeline and insert it.

[0102] Continuing to refer to the above example, if the first timestamp information is 1:50 p.m., that is, the first timestamp information is less than the second timestamp information 2 p.m., it should be located between the third timestamp information 1:48 p.m. and the fourth timestamp information 1:55 p.m. on the timeline, then the first operation frame is inserted between the third timestamp information and the fourth timestamp information, and this position is the first position.

[0103] In the embodiment of the present application, the insertion position of the first operation frame can be accurately determined according to the relationship between the first timestamp information and the second timestamp information at the end on the time axis.

[0104] In some embodiments of the present application, conflict detection can be started after the first operation frame is inserted into the timeline. It should be noted that, for the case where the first operation frame is inserted into the end of the timeline, conflict detection can be started after the first operation frame is inserted into the timeline, or conflict detection can be performed after a preset time period has passed after the first operation frame is inserted into the timeline. The preset time period here can be, for example, 2.6 seconds. The specific preset time period can be set according to user needs and is not limited in the embodiments of the present application.

[0105] In some embodiments of the present application, conflict types include operation-based conflicts, occupancy-based conflicts, and baseline-based conflicts.

[0106] In order to accurately determine the conflict type of the first operation frame, performing conflict detection on the first operation frame to determine the conflict type of the first operation frame may specifically include:

[0107] When it is determined that there are operation frames adjacent to the first operation frame in the first set and both are operation frames for performing a deletion operation or a modification operation on the first operation data, or, when the first operation frame is an addition operation on the first operation data, and when there is at least one of an operation frame for performing an addition operation on the first operation data, an operation frame for performing a deletion operation on the first operation data, and an operation frame for performing a modification operation on the first operation data in the first set, it is determined that the conflict type of the first operation frame is an operation-based conflict;

[0108] In a case where it is determined that the first timestamp information is located between the fifth timestamp information and the sixth timestamp information, determining that the conflict type of the first operation data is an occupancy-based conflict;

[0109] When it is determined that the first operation frame and the operation frames sent by other clients are operations performed on the first operation data, it is determined that the conflict type of the first operation frame is a baseline-based conflict.

[0110] The first set may be operation frames starting from the first compensation frame and ending at the first operation frame on the time axis, and the first compensation frame here may be a compensation frame located before the first operation frame on the time axis and adjacent to the first operation frame.

[0111] In one example, the first operation frame in the timeline corresponds to 1:50 p.m. on the timeline. If there is a compensation frame adjacent to the first operation frame and before the first operation frame on the timeline, for example, at 1:45 p.m., then the first set is the operation frames between 1:45 p.m. and 1:50 p.m. on the timeline.

[0112] The fifth timestamp information and the sixth timestamp information can be the timestamp information of the second operation frame and the timestamp information of the third operation frame respectively sent by the second client. The second operation frame here can be an operation frame for operating the second operation data, the second operation data can be operation data adjacent to the first operation data and located before the first operation data, the third operation frame can be an operation frame for operating the first operation data, and the second client can be any client among the clients and be different from the first client.

[0113] In an example, the first client is the client corresponding to user A, the second client is the client corresponding to user B, the first operation data is the value "10", and the second operation data is the value "8", then the fifth timestamp information can be the timestamp information sent by the second client in response to user B's operation on the value "8", and the sixth timestamp information is the timestamp information sent by the second client in response to user B's operation on the value "10".

[0114] In some embodiments of the present application, the core idea of ​​operation-based conflicts is to determine whether data conflicts may occur based on different types of operations performed on the same metadata.

[0115] Therefore, if there are operation frames adjacent to the first operation frame in the first set, and both are operation frames that perform a deletion operation or a modification operation on the first operation data, the conflict type of the first operation frame is determined to be an operation-based conflict. That is, if there are operation frames that perform a deletion operation or a modification operation consecutive to the first operation frame in the first set, then the conflict is an operation-based conflict.

[0116] In one example, in the first set, multiple modification operations are performed consecutively, or multiple deletion operations are performed consecutively, such as modify-modify, modify-modify-modify, delete-delete, delete-delete-delete, then it is determined that a conflict occurs in the first operation frame, and the conflict type is an operation-based conflict.

[0117] In some embodiments of the present application, when there is a target operation frame in the first set, and the target operation frame and the first operation frame are at least two of an operation frame for performing a new operation on the first operation data, an operation frame for performing a deletion operation on the first operation data, and an operation frame for performing a modification operation on the first operation data, the conflict type of the first operation frame is determined to be an operation-based conflict. In other words, when the first operation frame and the target operation frame are different types of operations performed on the first operation data, it is indicated that a conflict occurs in the first operation frame, and the conflict type is an operation-based conflict.

[0118] That is, as shown below:

[0119] In the first set, if the first operation frame is a new operation, there is no deletion operation within a certain interval, and new operations are not allowed, such as: add-add; add-modify-add. At this time, the first operation frame is determined to be conflicting, and the conflict type is an operation-based conflict.

[0120] In the first set, after the modification operation, there is no deletion operation within a certain interval, and no new operations are allowed, such as: modification-add.

[0121] In the first set, after the deletion operation, there is no new operation within a certain interval, and modification operations are not allowed, such as: delete-modify.

[0122] In the first set, after the add operation, if the delete operation occurs, then the add operation can occur, such as: add-delete-add.

[0123] In the first set, after the modification operation, if the deletion operation occurs, the addition operation can occur, such as: modification-deletion-addition.

[0124] In the first set, after the delete operation, if a new operation occurs, a modification operation may occur, such as: delete-add-modify.

[0125] It should be noted that, when there is a target operation frame in the first set, and the target operation frame and the first operation frame are at least two of an operation frame for performing a new operation on the first operation data, an operation frame for performing a deletion operation on the first operation data, and an operation frame for performing a modification operation on the first operation data, the conflict type of the first operation frame is determined to be an operation-based conflict, and the first operation frame here is an insert frame, that is, the first operation frame is the operation frame inserted into the first position of the timeline.

[0126] In some embodiments of the present application, since the core idea of ​​occupancy-based conflicts is to detect whether multiple users have modified the same data source at the same time, the criterion for detecting simultaneous modifications is whether multiple users have occupied the metadata and made modifications.

[0127] Therefore, in some embodiments of the present application, when it is determined that the first timestamp information is between the fifth timestamp information and the sixth timestamp information, that is, the timestamp information of the first operation frame is after the second client completes the operation on the second operation data and before the first operation data is completed, it means that the first client and the second client both occupy the first operation data at the same time and modify the first operation data, so the first operation data is occupied, that is, the conflict type of the first operation data is determined to be an occupancy-based conflict.

[0128] In some embodiments of the present application, the source data modified by the user is usually called a baseline. When users modify the same baseline data, a conflict will occur. For example, there is a data called "Hello". User A adds the character "World". The baseline of this operation is "Hello", the operation is addition, and the operation data is "World". User B deletes "Hello". The baseline of this operation is "Hello" and the operation is deletion. If the two generate operation frames based on the same baseline, it is determined to be a conflict, that is, a conflict based on the baseline.

[0129] On the contrary, if all operation frames within a certain range of the timeline are not modified based on the same baseline, it is represented as a safe operation.

[0130] Therefore, in some embodiments of the present application, when it is determined that the first operation frame and the operation frames sent by other clients are operations performed on the first operation data, that is, each client performs operations on the same operation data, then the conflict type of the first operation frame is determined to be a baseline-based conflict.

[0131] In the embodiment of the present application, the conflict type of the first operation frame can be accurately determined by detecting the conflict of the first operation frame.

[0132] It should be noted that during conflict detection, occupancy-based conflict detection can be performed first, followed by baseline-based conflict detection and operation-based conflict detection. However, in order to meet the needs of various scenarios, users can be allowed to customize combined detection methods in the project settings, and conflict detection and compensation can be performed based on the combined detection methods.

[0133] In some embodiments of the present application, when the number of concurrent users increases, in order to reduce the frequency of conflict processing and provide users with a better user experience, before processing the insertion frame, the user role and timestamp of the operation frame are first checked, and then the priority of the operation frame is determined according to the priority rules. The priority rules are as follows:

[0134] Administrator priority: Operations by project owners have the highest priority.

[0135] Time priority: If the user role of two operations is the same, the operation issued first takes precedence.

[0136] In some embodiments of the present application, the first operation frame may also include identification information of the first client, which may be, but not limited to, coding information, serial number information, etc. of the first client, and the identification may also be identity information of a user logging into the first client.

[0137] Before performing conflict detection on the first operation frame, the above method may further include:

[0138] Determining the priority of the first operation frame according to the identification information and the first timestamp information;

[0139] The performing conflict detection on the first operation frame may specifically include:

[0140] When it is determined that the priority of the first operation frame is the first priority, conflict detection is performed on the first operation frame.

[0141] Among them, the first priority may be the highest priority.

[0142] In some embodiments of the present application, before performing conflict detection, the priority of the first operation frame can be determined based on the identification information and the first timestamp information, and then the first operation frame with the determined priority can be inserted into a priority queue, in which there are multiple operation frames to be conflict detected, and then the front operation frame is selected from the priority queue for conflict detection, that is, the first operation frame can be taken out for conflict detection only when it is at the frontmost position of the priority queue.

[0143] In an embodiment of the present application, before performing conflict detection on the first operation frame, the priority of the first operation frame may be determined first, thereby ensuring that the operation frame with a high priority is first subjected to conflict detection, thereby improving the efficiency of conflict detection.

[0144] Step 130: Process the first operation frame according to the conflict type, generate a compensation frame, and insert the compensation frame into the time axis.

[0145] In some embodiments of the present application, after determining the conflict type of the first operation frame, the first operation frame can be processed according to the conflict type of the first operation frame to generate a compensation frame, and then the compensation frame is inserted into the timeline (the timeline here is the timeline after the first operation frame has been inserted).

[0146] It should be noted that the time axes involved in the embodiments of the present application are all new time axes formed on the basis of the aforementioned time axes, that is, the compensation frames are inserted into the time axes. The time axis here is the time axis after the first operation frame is inserted.

[0147] In some embodiments of the present application, in order to accurately generate a compensation frame, the processing of the first operation frame according to the conflict type to generate the compensation frame may specifically include:

[0148] generating a compensation frame in response to user processing of the first operation data in the case where the conflict type is determined to be a baseline-based conflict and an occupancy-based conflict;

[0149] In the case where the conflict type is determined to be an operation-based conflict, a compensation frame is generated in response to a user's processing of the first operation data or a receiving processor's processing of the first operation data.

[0150] In some embodiments of the present application, in the case where the conflict type is a baseline-based conflict and an occupancy-based conflict, a compensation frame can be generated in response to the user's processing of the first operation data, that is, in the case where the conflict type is a baseline-based conflict and an occupancy-based conflict, the user can intervene to perform compensation.

[0151] In the case where the conflict type is an operation-based conflict, a compensation frame may be generated in response to the user's processing of the first operation data, or the receiving processor's processing of the first operation data. That is, in the case where the conflict type is an operation-based conflict, compensation may be performed by the system or by user intervention. Specifically, in which case the compensation is performed by the system and in which case the compensation is performed by the user intervention is described in detail below:

[0152] In the first set, if add-add or add-modify-add occurs, the conflict cannot be merged by the system and user intervention is required.

[0153] In the first set, if modification-addition occurs, the conflict cannot be merged by the system and user intervention is required.

[0154] In the first set, if a delete-modify occurs, the conflict cannot be merged by the system and user intervention is required.

[0155] In the first set, if add-delete-add-renew occurs, the conflict is allowed to be merged by the system. Specifically, a compensation frame may be generated with the last addition as the result, or the user may intervene.

[0156] In the first set, if modification-deletion-addition occurs, the conflict is allowed to be merged by the system. Specifically, a compensation frame may be generated with the last addition as the result, or the user may intervene.

[0157] In the first set, if deletion-addition-modification occurs, the conflict is allowed to be merged by the system. Specifically, a compensation frame may be generated based on the last modification, or the user may intervene.

[0158] In the first set, modification-modification; modification-modification-modification occurs. This conflict is allowed to be merged by the system. The compensation functions corresponding to the modification operations are executed in sequence according to the timestamp order, and the compensation frame is generated based on the modification result. User intervention is also allowed.

[0159] In the first set, delete-delete; delete-delete-delete occur. This conflict is allowed to be merged by the system, and a compensation frame is generated based on the last delete operation. The user can also intervene.

[0160] In the embodiment of the present application, different compensation methods can be performed according to different conflict types, thereby accurately determining the compensation frame.

[0161] Step 140: When it is determined to merge the operations on each client, merge the operation data corresponding to all the operation frames on the timeline to obtain a target editor.

[0162] In some embodiments of the present application, when it is determined to merge the operations on each client, the operation data corresponding to all operation frames on the timeline can be merged to obtain the target editor, and then the merged data corresponding to the target editor is saved in a database, which can be broadcast to each client when needed.

[0163] In some embodiments of the present application, before step 140, the above method may further include:

[0164] When it is determined that a merge request sent by the first client is received, or when it is determined that each client has closed the connection with the server, it is determined to merge the operations on each client.

[0165] In some embodiments of the present application, the merge can be a user request merge or an exit merge. The user request merge here can refer to the user corresponding to any of the clients executing a merge request on the operation interface of the client. The exit merge here refers to all clients actively closing the connection to the server, and the server will automatically merge the operations on the timeline when no one is editing.

[0166] That is, when it is determined that a merge request sent by the first client is received, or when it is determined that each client has closed the connection with the server, it is determined to merge the operations on each client.

[0167] In an embodiment of the present application, when it is determined that a merge request sent by the first client is received, or when it is determined that each client has closed the connection with the server, it is determined to merge the operations on each client, so that it can be accurately determined whether to merge the operations on each client.

[0168] It should be noted that the executor of the above data processing method can be the server or the clients. When the executor is the server, when executing the user merge operation, the server, upon receiving the merge request sent by the first client, broadcasts to all clients that the merge is about to begin and starts waiting; then each client starts to clear the cache list and upload all saved operations; after receiving the operation frame, the server performs an insert operation and performs conflict detection and conflict compensation according to the rules. If the conflict cannot be compensated automatically, the request initiator resolves the conflict and generates a compensation frame; after receiving the end response, the connection of the corresponding client is closed; after waiting for a period of time, all connections are closed; the timeline operation frame and the compensation frame are merged to generate the final data, and the version number and snapshot are compiled and stored in the database; after saving, the client connection is reopened and the merge result is sent.

[0169] The specific steps to exit the merge are as follows: 1. Copy the current timeline copy, start processing the operation frame and compensation frame of the timeline copy, and generate the final data; 2. If no new connection is opened during the period, compile the version number and store the database; 3. If a new connection is opened during the period, terminate the exit merge and clear the copy data.

[0170] In the case where the execution subject is the client, the client that performs the operation can send its corresponding operation frame to other clients. After receiving the operation frame, other clients perform insertion operations respectively, perform conflict detection and conflict compensation according to the rules, and if automatic conflict compensation is not possible, request the initiator to resolve the conflict and generate a compensation frame.

[0171] The embodiment of the present application adopts the concepts of operation frames and timelines to intuitively associate user operations with time, thereby providing users with a more intuitive and friendly user operation interface, abstracting the operations of multiple users into operation frames, and mapping these operation frames on the timeline. Users can review the operation frames by dragging time points. In addition, by introducing the concepts of insertion frames and compensation frames, conflicts of the same resource on the timeline can be effectively detected and resolved, and because insertion frames and compensation frames can record and process conflicts, conflict resolution is more orderly and controllable. In addition, through conflict detection based on operations, occupancy, and baselines, a variety of possible conflict situations can be fully handled, thereby improving the robustness and reliability of the system.

[0172] It should be noted that the data processing method provided in the embodiments of the present application may be executed by a data processing device, or a control module in the data processing device for executing the data processing method.

[0173] Based on the same inventive concept as the above-mentioned data processing method, the present application also provides a data processing device. Figure 2 The data processing device provided in the embodiment of the present application is described in detail.

[0174] Figure 2 It is a schematic structural diagram of a data processing device according to an exemplary embodiment.

[0175] like Figure 2 As shown, the data processing device 200 may include:

[0176] A first acquisition module 210 is used to acquire, when it is determined that multiple clients have joined the collaborative editing session, a first operation frame sent by a first client to operate first operation data in an editor, wherein, for each of the clients joining the collaborative editing session, the state of the editor in each of the clients is consistent, and each of the clients has mapped the historical operation frames to a timeline according to the timestamp information of the historical operation frames of the editor, the timelines on each of the clients are consistent, the first client is any one of the clients, the first operation frame includes first timestamp information for operating the first operation data, and the first operation data is any one of the operation data in the editor;

[0177] A first determining module 220, configured to insert the first operation frame into the time axis according to the first timestamp information, and perform conflict detection on the first operation frame to determine a conflict type of the first operation frame;

[0178] A second determination module 230 is used to process the first operation frame according to the conflict type, generate a compensation frame, and insert the compensation frame into the time axis;

[0179] The third determination module 240 is used to merge the operation data corresponding to all the operation frames on the timeline to obtain a target editor when it is determined that the operations on each of the clients are to be merged.

[0180] In an embodiment of the present application, when multiple clients join a collaborative editing session, at this time, the state of the editor in each client is consistent, and each client has mapped the historical operation frame to the timeline according to the timestamp information of the historical operation frame of the editor, that is, the timeline on each client is consistent. At this time, by acquiring the first operation frame sent by the first client to operate the first operation data in the editor, according to the first timestamp information of the first operation data included in the first operation frame, the first operation frame is inserted into the timeline, and conflict detection is performed on the first operation frame to determine the conflict type of the first operation frame, and then the first operation frame is processed according to the conflict type to generate a compensation frame, and the compensation frame is inserted into the timeline. When it is determined that the operations on each client are merged, the operation data corresponding to all operation frames on the timeline are merged to obtain the target editor. The solution of the embodiment of the present application will not lock the resources for executing the operation, but directly perform conflict detection on the first operation frame after generating the first operation frame. When it is determined that there is a conflict, it is processed to generate a compensation frame to compensate for the first operation frame, which will not affect the subsequent operation results. Moreover, the solution of the embodiment of the present application will not generate a conflict resolution interface to interfere with the user. The solution of the embodiment of the present application maps all operation frames on the timeline, and the operation frames can be played back by dragging the time point. In this way, while the results of the operation data conversion can be viewed, the process of each operation data conversion in the editor can be viewed in real time through the visual interface. At the same time, insert frames are introduced to assist in detecting conflicts with the same operation data on the timeline, and conflicting operation frames are processed to avoid operation conflicts on the same operation data.

[0181] In some embodiments of the present application, the above-mentioned device may further include:

[0182] A second acquisition module is used to acquire a first snapshot and a historical operation frame of the editor, wherein the first snapshot is the latest snapshot of the editor;

[0183] a first sending module, configured to send the first snapshot and the historical operation frame to the first client, so that the first client initializes the state of the editor based on the first snapshot, and initializes the timeline based on the historical operation frame, so as to map the historical operation frame to the timeline according to the timestamp information of the historical operation frame of the editor;

[0184] The first acquisition module 210 can be specifically used for:

[0185] When it is determined that the editor on the first client has been initialized, a first operation frame sent by the first client for operating first operation data in the editor is obtained.

[0186] In some embodiments of the present application, the first determining module 220 may specifically include:

[0187] A first determining unit, configured to insert the first operation frame into the end of the time axis if it is determined that the first timestamp information is greater than second timestamp information, wherein the second timestamp information is the largest timestamp information on the time axis;

[0188] A second determination unit is used to insert the first operation frame into a first position in the timeline when it is determined that the first timestamp information is less than the second timestamp information, wherein the first position is a position between third timestamp information and fourth timestamp information on the timeline, the third timestamp information and the fourth timestamp information are adjacent to the first timestamp information respectively, and the first timestamp information is located between the third timestamp information and the fourth timestamp information.

[0189] In some embodiments of the present application, the first determining module 220 may further include:

[0190] a third determining unit, configured to determine that the conflict type of the first operation frame is an operation-based conflict when it is determined that there are operation frames adjacent to the first operation frame in the first set and both are operation frames that perform a deletion operation or a modification operation on the first operation data, or when there is a target operation frame in the first set and the target operation frame and the first operation frame are at least two of an operation frame that performs an addition operation on the first operation data, an operation frame that performs a deletion operation on the first operation data, and an operation frame that performs a modification operation on the first operation data, respectively, wherein the first set is operation frames starting from a first compensation frame and ending at the first operation frame on the timeline, and the first compensation frame is a compensation frame that is located before the first operation frame on the timeline and adjacent to the first operation frame;

[0191] a fourth determining unit, configured to determine that the conflict type of the first operation data is an occupation-based conflict when it is determined that the first timestamp information is between the fifth timestamp information and the sixth timestamp information; wherein the fifth timestamp information and the sixth timestamp information are respectively timestamp information of a second operation frame and timestamp information of a third operation frame respectively sent by the second client, the second operation frame is an operation frame for operating the second operation data, the second operation data is operation data adjacent to the first operation data and located before the first operation data, the third operation frame is an operation frame for operating the first operation data, and the second client is any one of the clients and is different from the first client;

[0192] A fifth determining unit is configured to determine that the conflict type of the first operation frame is a baseline-based conflict when it is determined that the first operation frame and the operation frames sent by other clients are operations performed on the first operation data.

[0193] In some embodiments of the present application, the second determining module 230 may specifically include:

[0194] a sixth determining unit, configured to generate a compensation frame in response to a user's processing of the first operation data, if it is determined that the conflict type is a baseline-based conflict and an occupancy-based conflict;

[0195] A seventh determination unit is configured to generate a compensation frame in response to a user's processing of the first operation data or a receiving processor's processing of the first operation data when it is determined that the conflict type is an operation-based conflict.

[0196] In some embodiments of the present application, the above-mentioned device may further include:

[0197] The fourth determining module is used to determine to merge the operations on each of the clients when it is determined that a merge request sent by the first client is received, or when it is determined that each of the clients has closed the connection with the server.

[0198] In some embodiments of the present application, the first operation frame further includes identification information of the first client; the above-mentioned apparatus may further include:

[0199] a fifth determining module, configured to determine a priority of the first operation frame according to the identification information and the first timestamp information;

[0200] The performing conflict detection on the first operation frame includes:

[0201] When it is determined that the priority of the first operation frame is the first priority, conflict detection is performed on the first operation frame.

[0202] The data processing device provided in the embodiment of the present application can be used to execute the data processing methods provided in the above-mentioned method embodiments. The implementation principles and technical effects are similar and will not be described here for the sake of brevity.

[0203] Based on the same inventive concept, an embodiment of the present application also provides an electronic device.

[0204] Figure 3 Schematic diagram of the structure of an electronic device provided in an embodiment of the present application. Figure 3 As shown, the electronic device may include a processor 301 and a memory 302 storing computer programs or instructions.

[0205] Specifically, the processor 301 may include a central processing unit (CPU), or an application specific integrated circuit (ASIC), or may be configured to implement one or more integrated circuits of the embodiment of the present invention.

[0206] The memory 302 may include a large capacity memory for data or instructions. By way of example and not limitation, the memory 302 may include a hard disk drive (HDD), a floppy disk drive, a flash memory, an optical disk, a magneto-optical disk, a magnetic tape, or a universal serial bus (USB) drive or a combination of two or more of these. In appropriate cases, the memory 302 may include a removable or non-removable (or fixed) medium. In appropriate cases, the memory 302 may be inside or outside the integrated gateway disaster recovery device. In a specific embodiment, the memory 302 is a non-volatile solid-state memory. The memory may include a read-only memory (ROM), a random access memory (RAM), a disk storage medium device, an optical storage medium device, a flash memory device, an electrical, optical or other physical / tangible memory storage device. Therefore, typically, the memory includes one or more tangible (non-transitory) computer-readable storage media (e.g., memory devices) encoded with software including computer-executable instructions, and when the software is executed (e.g., by one or more processors), it is operable to perform the operations described in the data processing methods provided in the above-mentioned embodiments.

[0207] The processor 301 implements any one of the data processing methods in the above embodiments by reading and executing computer program instructions stored in the memory 302 .

[0208] In one example, the electronic device may further include a communication interface 303 and a bus 310. Figure 3 As shown, the processor 301, the memory 302, and the communication interface 303 are connected via a bus 310 and communicate with each other.

[0209] The communication interface 303 is mainly used to implement the communication between the modules, devices, units and / or devices in the embodiment of the present invention.

[0210] Bus 310 includes hardware, software or both, and the parts of electronic equipment are coupled to each other. For example, but not limitation, bus may include accelerated graphics port (AGP) or other graphics bus, enhanced industrial standard architecture (EISA) bus, front side bus (FSB), hypertransport (HT) interconnection, industrial standard architecture (ISA) bus, infinite bandwidth interconnection, low pin count (LPC) bus, memory bus, micro channel architecture (MCA) bus, peripheral component interconnection (PCI) bus, PCI-Express (PCI-X) bus, serial advanced technology attachment (SATA) bus, video electronics standard association local (VLB) bus or other suitable bus or two or more of these combinations. In appropriate cases, bus 310 may include one or more buses. Although the embodiment of the present invention describes and shows a specific bus, the present invention considers any suitable bus or interconnection.

[0211] The electronic device can execute the data processing method in the embodiment of the present invention, thereby realizing Figure 1 Describe the data processing methods.

[0212] In addition, in combination with the data processing method in the above embodiments, the present invention can provide a readable storage medium to implement the data processing method in the above embodiments. The readable storage medium stores program instructions, and when the program instructions are executed by a processor, any one of the data processing methods in the above embodiments is implemented.

[0213] In addition, in combination with the data processing method in the above embodiments, an embodiment of the present invention may provide a computer program product. When the instructions in the computer program product are executed by a processor of an electronic device, the electronic device executes any one of the data processing methods in the above embodiments.

[0214] It should be clear that the present invention is not limited to the specific configuration and processing described above and shown in the figures. For the sake of simplicity, a detailed description of the known method is omitted here. In the above embodiments, several specific steps are described and shown as examples. However, the method process of the present invention is not limited to the specific steps described and shown, and those skilled in the art can make various changes, modifications and additions, or change the order between the steps after understanding the spirit of the present invention.

[0215] The functional blocks shown in the above-described block diagram can be implemented as hardware, software, firmware or a combination thereof. When implemented in hardware, it can be, for example, an electronic circuit, an application specific integrated circuit (ASIC), appropriate firmware, a plug-in, a function card, etc. When implemented in software, the elements of the present invention are programs or code segments that are used to perform the required tasks. The program or code segment can be stored in a machine-readable medium, or transmitted on a transmission medium or a communication link by a data signal carried in a carrier wave. "Machine-readable medium" can include any medium capable of storing or transmitting information. Examples of machine-readable media include electronic circuits, semiconductor memory devices, ROM, flash memory, erasable ROM (EROM), floppy disks, CD-ROMs, optical disks, hard disks, optical fiber media, radio frequency (RF) links, etc. The code segment can be downloaded via a computer network such as the Internet, an intranet, etc.

[0216] It should also be noted that the exemplary embodiments mentioned in the present invention describe some methods or systems based on a series of steps or devices. However, the present invention is not limited to the order of the above steps, that is, the steps can be performed in the order mentioned in the embodiments, or in a different order from the embodiments, or several steps can be performed simultaneously.

[0217] The above reference is according to the method of the embodiment of the present application, the flow chart of the device (system) and the computer program product and / or the block diagram described various aspects of the present application.It should be understood that each square box in the flow chart and / or the block diagram and the combination of each square box in the flow chart and / or the block diagram can be realized by computer program instructions.These computer program instructions can be provided to the processor of a general-purpose computer, a special-purpose computer or other programmable data processing device to produce a machine so that these instructions executed by the processor of the computer or other programmable data processing device enable the realization of the function / action specified in one or more square boxes of the flow chart and / or the block diagram.Such a processor can be but is not limited to a general-purpose processor, a special-purpose processor, a special application processor or a field programmable logic circuit.It can also be understood that each square box in the block diagram and / or the flow chart and the combination of the square boxes in the block diagram and / or the flow chart can also be realized by the dedicated hardware that performs the specified function or action, or can be realized by the combination of dedicated hardware and computer instructions.

[0218] The above is only a specific implementation of the present invention. Those skilled in the art can clearly understand that for the convenience and simplicity of description, the specific working process of the system, module and unit described above can refer to the corresponding process in the aforementioned method embodiment, and will not be repeated here. It should be understood that the protection scope of the present invention is not limited to this. Any technician familiar with the technical field can easily think of various equivalent modifications or replacements within the technical scope disclosed by the present invention, and these modifications or replacements should be covered within the protection scope of the present invention.

Claims

1. A data processing method, characterized in that: The method comprises: In the case where it is determined that multiple clients have joined the collaborative editing session, a first operation frame sent by a first client for operating first operation data in an editor is obtained, wherein, for each of the clients joining the collaborative editing session, the state of the editor in each of the clients is consistent, and each of the clients has mapped the historical operation frames to a timeline according to timestamp information of the historical operation frames of the editor, the timelines on each of the clients are consistent, the first client is any one of the clients, the first operation frame includes first timestamp information for operating the first operation data, and the first operation data is any one of the operation data in the editor; inserting the first operation frame into the time axis according to the first timestamp information, and performing conflict detection on the first operation frame to determine a conflict type of the first operation frame; Processing the first operation frame according to the conflict type to generate a compensation frame, and inserting the compensation frame into the time axis; When it is determined to merge the operations on each of the clients, the operation data corresponding to all the operation frames on the timeline are merged to obtain a target editor.

2. The method according to claim 1, characterized in that Before acquiring the first operation frame sent by the first client for operating the first operation data in the editor, the method further includes: Acquire a first snapshot and a historical operation frame of an editor, wherein the first snapshot is the latest snapshot of the editor; Sending the first snapshot and the historical operation frame to the first client, so that the first client initializes the state of the editor based on the first snapshot, and initializes the timeline based on the historical operation frame, so as to map the historical operation frame to the timeline according to the timestamp information of the historical operation frame of the editor; The obtaining of a first operation frame sent by the first client for operating first operation data in the editor includes: When it is determined that the editor on the first client has been initialized, a first operation frame sent by the first client for operating first operation data in the editor is obtained.

3. The method according to claim 1, characterized in that The inserting the first operation frame into the time axis according to the first timestamp information includes: In the case where it is determined that the first timestamp information is greater than the second timestamp information, inserting the first operation frame to the end of the time axis, wherein the second timestamp information is the largest timestamp information on the time axis; When it is determined that the first timestamp information is less than the second timestamp information, the first operation frame is inserted into a first position in the timeline, wherein the first position is a position between third timestamp information and fourth timestamp information on the timeline, the third timestamp information and the fourth timestamp information are adjacent to the first timestamp information respectively, and the first timestamp information is located between the third timestamp information and the fourth timestamp information.

4. The method according to claim 1, characterized in that: The performing conflict detection on the first operation frame to determine the conflict type of the first operation frame includes: When it is determined that there are operation frames adjacent to the first operation frame in the first set and both are operation frames for deleting or modifying the first operation data, or when there is a target operation frame in the first set and the target operation frame and the first operation frame are at least two of an operation frame for adding a new operation to the first operation data, an operation frame for deleting the first operation data, and an operation frame for modifying the first operation data, it is determined that the conflict type of the first operation frame is an operation-based conflict, wherein the first set is operation frames starting from a first compensation frame to ending at the first operation frame on the timeline, and the first compensation frame is a compensation frame located before the first operation frame on the timeline and adjacent to the first operation frame; In the case where it is determined that the first timestamp information is located between the fifth timestamp information and the sixth timestamp information, it is determined that the conflict type of the first operation data is an occupation-based conflict; wherein the fifth timestamp information and the sixth timestamp information are respectively timestamp information of a second operation frame and timestamp information of a third operation frame respectively sent by a second client, the second operation frame is an operation frame for operating second operation data, the second operation data is operation data adjacent to the first operation data and located before the first operation data, the third operation frame is an operation frame for operating the first operation data, and the second client is any one of the clients and is different from the first client; When it is determined that the first operation frame and the operation frames sent by other clients are operations performed on the first operation data, it is determined that the conflict type of the first operation frame is a baseline-based conflict.

5. The method according to claim 4, characterized in that The step of processing the first operation frame according to the conflict type to generate a compensation frame includes: In a case where the conflict type is determined to be a baseline-based conflict and an occupancy-based conflict, generating a compensation frame in response to user processing of the first operation data; In the case where the conflict type is determined to be an operation-based conflict, a compensation frame is generated in response to a user's processing of the first operation data or a receiving processor's processing of the first operation data.

6. The method according to claim 1, characterized in that In the case where it is determined to merge the operations on each of the clients, before merging the operation data corresponding to all the operation frames on the timeline to obtain the target editor, the method further includes: When it is determined that a merge request sent by the first client is received, or when it is determined that each of the clients has closed the connection with the server, it is determined to merge the operations on each of the clients.

7. The method according to claim 1, characterized in that The first operation frame also includes identification information of the first client; Before performing conflict detection on the first operation frame, the method further includes: Determining a priority of the first operation frame according to the identification information and the first timestamp information; The performing conflict detection on the first operation frame includes: When it is determined that the priority of the first operation frame is the first priority, conflict detection is performed on the first operation frame.

8. A data processing device, characterized in that: The device comprises: A first acquisition module is used to acquire, when it is determined that multiple clients have joined the collaborative editing session, a first operation frame sent by a first client to operate first operation data in an editor, wherein, for each of the clients joining the collaborative editing session, the state of the editor in each of the clients is consistent, and each of the clients has mapped the historical operation frames to a timeline according to the timestamp information of the historical operation frames of the editor, the timelines on each of the clients are consistent, the first client is any one of the clients, the first operation frame includes first timestamp information for operating the first operation data, and the first operation data is any one of the operation data in the editor; a first determining module, configured to insert the first operation frame into the time axis according to the first timestamp information, and perform conflict detection on the first operation frame to determine a conflict type of the first operation frame; A second determining module, configured to process the first operation frame according to the conflict type, generate a compensation frame, and insert the compensation frame into the time axis; The third determination module is used to merge the operation data corresponding to all the operation frames on the timeline to obtain a target editor when it is determined that the operations on each of the clients are to be merged.

9. An electronic device, characterized in that: It comprises a processor, a memory and a program or instruction stored in the memory and executable on the processor, wherein the program or instruction, when executed by the processor, implements the steps of the data processing method as described in any one of claims 1 to 7.

10. A readable storage medium, characterized in that: The readable storage medium stores programs or instructions, and when the programs or instructions are executed by the processor, the steps of the data processing method according to any one of claims 1 to 7 are implemented.

11. A computer program product, characterized in that When the instructions in the computer program product are executed by a processor of an electronic device, the electronic device executes the steps of the data processing method as described in any one of claims 1 to 7.