CN114896960A - Document processing method, apparatus, computer device, readable storage medium and product - Google Patents
Document processing method, apparatus, computer device, readable storage medium and product Download PDFInfo
- Publication number
- CN114896960A CN114896960A CN202210564751.0A CN202210564751A CN114896960A CN 114896960 A CN114896960 A CN 114896960A CN 202210564751 A CN202210564751 A CN 202210564751A CN 114896960 A CN114896960 A CN 114896960A
- Authority
- CN
- China
- Prior art keywords
- operation data
- client
- data
- document
- collaborative editing
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F40/00—Handling natural language data
- G06F40/10—Text processing
- G06F40/197—Version control
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F40/00—Handling natural language data
- G06F40/10—Text processing
- G06F40/166—Editing, e.g. inserting or deleting
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06Q—INFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
- G06Q10/00—Administration; Management
- G06Q10/10—Office automation; Time management
- G06Q10/101—Collaborative creation, e.g. joint development of products or services
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Business, Economics & Management (AREA)
- Physics & Mathematics (AREA)
- Entrepreneurship & Innovation (AREA)
- Human Resources & Organizations (AREA)
- General Physics & Mathematics (AREA)
- Health & Medical Sciences (AREA)
- Audiology, Speech & Language Pathology (AREA)
- General Engineering & Computer Science (AREA)
- General Health & Medical Sciences (AREA)
- Computational Linguistics (AREA)
- Artificial Intelligence (AREA)
- Strategic Management (AREA)
- Economics (AREA)
- Data Mining & Analysis (AREA)
- General Business, Economics & Management (AREA)
- Operations Research (AREA)
- Marketing (AREA)
- Tourism & Hospitality (AREA)
- Quality & Reliability (AREA)
- Document Processing Apparatus (AREA)
- Information Transfer Between Computers (AREA)
Abstract
The embodiment of the application discloses a document processing method, a document processing device, computer equipment, a readable storage medium and a product, wherein a version identifier of a multi-person collaborative editing document currently edited by a client is obtained; generating a query cursor according to the version identification; if the operation data is not queried locally at the client through the query cursors, a data retransmission request is sent to the server based on the version identification; and acquiring operation data returned by the server in response to the data retransmission request, and applying the operation data to the multi-user collaborative editing document edited by the client at present. According to the scheme, the query vernier is generated according to the version identification of the multi-user collaborative editing document edited by the client at present, and the corresponding operation data is obtained through the query vernier, so that the client can obtain the operation data with the correct version, the version identification of the multi-user collaborative editing document on the client can be increased in an accurate mode, and the synchronization effect of the editing operation of different clients for the multi-user collaborative editing document is improved.
Description
Technical Field
The present application relates to the field of communications technologies, and in particular, to a document processing method, an apparatus, a computer device, a readable storage medium, and a product, where the readable storage medium is a computer readable storage medium, and the product is a computer program product.
Background
The multi-user collaborative editing of the document can support a plurality of users to edit through the clients, and synchronize editing operations executed by the users to other clients editing together through the server, and generally, an Operation Transformation algorithm (ot) can be used to solve the problem of conflict between editing operations of the plurality of clients, so as to synchronize the editing operations between different clients. The version number of a multi-user collaborative editing document on a client is related to the number of data packets receiving editing operation from a server, the existing ot algorithm has the problem of disordered data packet receiving, the ot algorithm is used for processing the editing operation of the multi-user collaborative editing document of the same version, the disordered data packet receiving can cause errors of the version number of the multi-user collaborative editing document on the client, when the packet loss of the client is serious, the difference between the version numbers of the client and the server is large, the ot algorithm can be caused to be invalid, so that the editing operation executed in the multi-user collaborative editing documents on different clients is asynchronous, and the data in the multi-user collaborative editing document on the same client are inconsistent.
Disclosure of Invention
The embodiment of the application provides a document processing method, a document processing device, a computer device, a readable storage medium and a product, which can improve the synchronization effect of editing operation of different clients for cooperatively editing a document by multiple persons.
The document processing method provided by the embodiment of the application comprises the following steps:
acquiring a version identifier of a multi-user collaborative editing document currently edited by a client;
generating a query vernier according to the version identification, wherein the query vernier is used for querying operation data generated by editing the multi-person collaborative editing document;
if the operation data is not queried locally at the client through the query cursor, a data retransmission request is initiated to a server based on the version identification;
and acquiring the operation data returned by the server in response to the data retransmission request, and applying the operation data to the multi-user collaborative editing document currently edited by the client.
Correspondingly, an embodiment of the present application further provides a document processing apparatus, including:
the identification acquisition unit is used for acquiring the version identification of the multi-person collaborative editing document currently edited by the client;
the vernier generating unit is used for generating a query vernier according to the version identification, and the query vernier is used for querying operation data generated by editing the multi-person collaborative editing document;
the query unit is used for initiating a data retransmission request to a server based on the version identification if the operation data is not queried locally at the client through the query cursor;
and the application unit is used for acquiring the operation data returned by the server in response to the data retransmission request and applying the operation data to the multi-user collaborative editing document currently edited by the client.
In an embodiment, the operation data carries an operation type, and the application unit includes:
the decomposition subunit is used for performing operation decomposition on the operation data to obtain at least one sub-operation data if the operation type of the operation data is a target type;
and the first data application subunit is used for sequentially applying the at least one piece of sub-operation data to the multi-person collaborative editing document currently edited by the client.
In one embodiment, the operation data is stored in a message queue, and the application unit includes:
the first data acquisition subunit is used for acquiring current operation data of a multi-user collaborative editing document currently edited by the client, wherein the current operation data carries an operation type;
a second data obtaining subunit, configured to obtain the operation data from the message alignment if the operation type of the current operation data meets a preset condition;
and the second data application subunit is used for applying the operation data to the multi-person collaborative editing document currently edited by the client.
In one embodiment, the current operation data includes a plurality of data, and the document processing apparatus further includes:
the acquisition unit is used for acquiring the operation object and the operation type of the current operation data;
the operation merging unit is used for performing operation merging on a plurality of current operation data matched with the operation objects and the operation types to obtain merged operation data;
and the sending unit is used for sending the merged operation data to the server so that a cooperative client acquires the merged operation data from the server to synchronize the current operation data of the client, and the cooperative client is a client which collaboratively edits the multi-person collaborative editing document with the client.
In one embodiment, the sending unit includes:
the data segmentation subunit is used for performing data segmentation on the merged data to obtain first segmentation data and second segmentation data if the number of the merged operation data meets a preset threshold;
a first data transmitting subunit, configured to transmit the first division data to the server;
and the second data sending subunit is used for sending the second segmentation data to the server when receiving the confirmation information returned by the server based on the first segmentation data.
In one embodiment, the query unit includes:
the updating subunit is configured to update the version identifier if the operation data is not queried by the query cursor and is generated by the client, use the updated version identifier as the version identifier, and return to execute the query cursor generated according to the version identifier;
and the data retransmission subunit is used for initiating a data retransmission request to the server based on the version identifier if the operation data is not inquired and is not generated by the client.
In one embodiment, the document processing apparatus further comprises:
a copy obtaining unit, configured to obtain, from the server, a copy of the multi-person collaborative editing document corresponding to the version identifier;
the difference comparison unit is used for carrying out difference comparison on the multi-person collaborative editing document copy and the multi-person collaborative editing document currently edited by the client to obtain difference information;
the operation conversion unit is used for carrying out operation conversion according to the difference information to obtain difference operation data;
and the correcting unit is used for correcting the multi-person collaborative editing document currently edited by the client based on the operation difference data.
Correspondingly, the embodiment of the application also provides computer equipment, which comprises a memory and a processor; the memory stores a computer program, and the processor is used for operating the computer program in the memory to execute any document processing method provided by the embodiment of the application.
Accordingly, embodiments of the present application further provide a computer-readable storage medium, where the computer-readable storage medium is used to store a computer program, and the computer program is loaded by a processor to execute any one of the document processing methods provided in the embodiments of the present application.
Correspondingly, the embodiment of the present application further provides a computer program product, which includes a computer program, and the computer program, when executed by a processor, implements any one of the document processing methods provided by the embodiment of the present application.
The method comprises the steps of acquiring a version identifier of a multi-person collaborative editing document currently edited by a client; generating a query vernier according to the version identification, wherein the query vernier is used for querying operation data generated by editing the multi-person collaborative editing document; if the operation data is not queried locally at the client through the query cursors, a data retransmission request is sent to the server based on the version identification; and acquiring operation data returned by the server in response to the data retransmission request, and applying the operation data to the multi-user collaborative editing document currently edited by the client.
According to the scheme, the query vernier is generated according to the version identification of the multi-user collaborative editing document edited at the current time by the client, and the corresponding operation data is obtained through the query vernier, so that the client can obtain the operation data with the correct version, the version identification of the multi-user collaborative editing document on the client can be accurately increased in an increasing mode, the version identification of the multi-user collaborative editing document on the server is kept consistent with the version identification of the multi-user collaborative editing document on the server, and the synchronous operation effect of the multi-user collaborative editing document on different clients is improved.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings needed to be used in the description of the embodiments are briefly introduced below, and it is obvious that the drawings in the following description are only some embodiments of the present application, and it is obvious for those skilled in the art to obtain other drawings based on these drawings without creative efforts.
FIG. 1 is a diagram of a document processing method provided in an embodiment of the present application;
FIG. 2 is a flowchart of a document processing method provided by an embodiment of the present application;
FIG. 3 is a communication diagram of a document processing method provided by an embodiment of the present application;
FIG. 4 is another flowchart of a document processing method provided by an embodiment of the present application;
FIG. 5 is a server thread diagram of a document processing method according to an embodiment of the present application;
FIG. 6 is an overall architecture diagram of a document processing method provided by an embodiment of the present application;
FIG. 7 is a schematic diagram of a document processing apparatus provided by an embodiment of the present application;
fig. 8 is a schematic structural diagram of a computer device provided in an embodiment of the present application.
Detailed Description
The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are only a part of the embodiments of the present application, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
The embodiment of the application provides a document processing method, a document processing device, computer equipment and a computer readable storage medium. The document processing device may be integrated in a computer device, and the computer device may be a server or a terminal.
The terminal may include a mobile phone, a wearable smart device, a tablet Computer, a notebook Computer, a Personal Computer (PC), a vehicle-mounted Computer, and the like.
The server may be an independent physical server, a server cluster or a distributed system formed by a plurality of physical servers, or a cloud server providing basic cloud computing services such as cloud service, a cloud database, cloud computing, a cloud function, cloud storage, network service, cloud communication, middleware service, domain name service, security service, CDN, big data and artificial intelligence platform.
For example, as shown in fig. 1, a computer device obtains a version identifier of a multi-person collaborative editing document currently edited by a client; generating a query cursor according to the version identification; locally inquiring operation data generated by editing a multi-person collaborative editing document at a client through an inquiry vernier; if the operation data is not inquired, a data retransmission request is sent to the server based on the version identification; and acquiring operation data returned by the server in response to the data retransmission request, and applying the operation data to the multi-user collaborative editing document currently edited by the client.
According to the scheme, the query vernier is generated according to the version identification of the multi-user collaborative editing document edited at the current time by the client, and the corresponding operation data is obtained through the query vernier, so that the client can obtain the operation data with the correct version, the version identification of the multi-user collaborative editing document on the client can be accurately increased in an increasing mode, the version identification of the multi-user collaborative editing document on the server is kept consistent with the version identification of the multi-user collaborative editing document on the server, and the synchronous operation effect of the multi-user collaborative editing document on different clients is improved.
The following are detailed below. It should be noted that the following description of the embodiments is not intended to limit the preferred order of the embodiments.
The embodiment will be described from the perspective of a document processing apparatus, which may be specifically integrated in a computer device, and the computer device may be a server, or may be a terminal or other devices.
As shown in fig. 2, a specific flow of the document processing method provided in the embodiment of the present application may be as follows:
101. and acquiring the version identification of the multi-person collaborative editing document currently edited by the client.
The client can be a client supporting different users to edit a multi-user collaborative editing document on line at the same time, and the user can start the client to edit the multi-user collaborative editing document through the link of the multi-user collaborative document.
The multi-person collaborative editing document may include one or more types of content, for example, content such as text, images, video, audio, and the like, the multi-person collaborative editing document may be a document in a format such as doc, docx, xls, txt, and the like, and the multi-person collaborative editing document may also be a mind map.
The version identifier may represent a version of a multi-user collaborative editing document (hereinafter, referred to as a multi-user document) currently edited by the client, for example, the version identifier may be a version number, when different users edit the multi-user collaborative editing document of the same version, an operation conflict may exist, and the editing needs to be performed with a conflict process, so that the contents of the multi-user collaborative editing versions on the clients of the different users are consistent.
The conflict processing defines a conversion rule, and converts an editing action into a conflict-free editing action when editing conflicts. Assuming that a and B are edits made by multiple persons collaboratively editing a document S from different clients and based on the same version, and a 'and B' are outputs obtained by performing OT processing on a and B, respectively, the core of OT is to ensure that application (S, a), B ') is established as application (S, B), a'), otherwise, data consistency of each client cannot be ensured.
When multiple persons collaboratively edit a document into a thinking guide graph, the thinking guide graph supports editing operations including adding nodes, deleting nodes, updating nodes and moving nodes, the relationship among the nodes can include a parent node, a child node, a sibling node and the same node, and the operation combination of inputting an ot algorithm for operation conversion is 4x4x 4-64. For example, the operation data a is one of four editing operations performed on the node a, and the operation data b is one of the 4-relationship nodes on the node a.
For example, the multi-user collaborative editing document may specifically carry a version identifier, and the version identifier of the multi-user collaborative editing document edited by the client is obtained, optionally, when the multi-user collaborative editing document is just started, the version identifier may be obtained based on document data returned by the server, or the version identifier may be obtained according to locally stored document data of the multi-user collaborative editing document, and then the version identifier may be obtained by querying a Cursor, where the querying Cursor may include a Cursor (Cursor) for querying operation data, and the Cursor is a method for processing data, and provides a capability of advancing or browsing data backward one or more lines at a time in the result set.
In this embodiment of the application, the result set viewed by the query cursor may include operation data generated by editing the multi-user collaborative editing document of different versions, and the operation data that the query cursor needs to extract is the operation data generated by editing the multi-user collaborative editing document of the version currently edited by the client, so that the client obtains the operation data to update the multi-user collaborative editing document. Before the query cursor points to the operation data of the multi-person collaborative editing document of the current editing version of the client, the operation data pointed by the query cursor is the previous version of the current editing version, so that the version identification of the multi-person document of the current editing can be determined according to the query cursor.
For example, if the multi-user collaborative editing document currently edited by the client is the 1.0 version, the operation data required to be extracted by the query cursor is the data generated by editing the multi-user collaborative editing document of the 1.0 version, and when the operation data is applied to the multi-user collaborative editing document by the client and is updated to the 2.0 version, the query cursor is required to be extracted to edit the multi-user collaborative editing document of the 2.0 version, and the generated operation data is generated, so that the version identifier of the multi-user collaborative editing document currently edited by the client can be determined according to the cursor, and before the query cursor points to the multi-user document of the 2.0 version, the query cursor points to the multi-user document of the 1.0 version.
In an embodiment, the multi-user document on the client may be corrected according to a difference between the multi-user collaborative editing document copy (hereinafter, referred to as a copy) on the server and the multi-user collaborative editing document on the client, so that the multi-user collaborative editing documents of the same version displayed by different clients contain the same content, that is, the document processing method provided by the embodiment of the present application may further include:
acquiring a multi-person collaborative editing document copy corresponding to the version identification from a server;
carrying out difference comparison on the multi-person collaborative editing document copy and the multi-person collaborative editing document currently edited by the client to obtain difference information;
performing operation conversion according to the difference information to obtain difference operation data;
and correcting the multi-person collaborative editing document currently edited by the client based on the operation difference data.
The multi-person collaborative editing document copy is a multi-person collaborative editing document of which the version is corresponding to the version identification stored by the server.
For example, the method specifically includes that the terminal acquires a copy corresponding to the version identifier from the server periodically or aperiodically, performs difference comparison between the multi-user document and the copy to obtain difference information, the difference information includes differences between the multi-user document and the copy, converts the difference information into difference operation data indicating editing operation, and then applies the difference operation data to the multi-user document currently edited by the client to correct the multi-user document and keep the multi-user document consistent with the client.
Optionally, the difference comparison between the multi-person document and the copy may be performed through Web Workers, and the client may run a script operation in a background thread independent from the main thread. This has the advantage that time consuming processing tasks can be performed in separate threads, allowing the main thread (e.g. the UI thread) not to be blocked/slowed down accordingly.
Optionally, the process may be completed by a server, the server acquires the differential operation data based on the similar steps, and sends the differential operation data to the client, and the client applies the received operation data to the multi-user document to keep consistent with the copy of the server.
102. And generating a query vernier according to the version identification, wherein the query vernier is used for querying operation data generated by editing the multi-person collaborative editing document.
For example, the client may specifically receive operation data, which is sent by the server and generated by editing at least one client (for example, the client and the collaboration client) for multiple people documents of different versions, use the version identifier as a query object of the cursor, generate a query cursor, and the query cursor may query, in a local storage space (for example, a cache) of the terminal, the operation data generated by editing for the version identifier.
The collaboration client is a client which edits the multi-person document together with the client.
In an embodiment, operation data generated by editing multi-user documents of different versions is mapped according to a version identifier, a storage position of the operation data is determined and the operation data corresponding to the version identifier is stored, the storage position of the operation data of the multi-user document corresponding to the version identifier can be obtained by mapping through the version identifier, the storage position is used as a query object of a query cursor, the query cursor is generated and inquired to the storage position, and data on the storage position is obtained.
103. And if the operation data is not queried locally at the client through the query cursors, initiating a data retransmission request to the server based on the version identification.
The client locally may include a corresponding storage space on the terminal where the client is installed.
For example, if the operation data is not queried locally at the client, for example, the operation data does not exist in the storage location corresponding to the version identifier, a data retransmission request is sent to the server according to the version identifier, so as to obtain the operation data from the server.
And if the response of the server is not received within the preset time after the data retransmission request is sent to the server, the data retransmission request is sent again.
In order to reduce the number of times of initiating data retransmission requests by the client, when the operation data to be retransmitted is data generated at the client, the data retransmission requests may not be initiated to the server because the operation data exists at the client, that is, in an embodiment, the step "initiating a data retransmission request to the server based on the version identifier if the operation data is not queried locally at the client by the query cursor" includes:
if the operation data is not inquired through the inquiry vernier and is generated by the client, updating the version identification, taking the updated version identification as the version identification, and returning to execute the inquiry vernier generated according to the version identification;
and if the operation data is not inquired and is not generated by the client, initiating a data retransmission request to the server based on the version identification.
For example, the server may specifically send the current number of people collaboratively editing the document for multiple people to the terminal, if only the client performs editing operation on the multiple people document currently, it indicates that all the operation data are from the client itself, if the operation data is not queried, a data retransmission request is not initiated, and the query cursor is updated, that is, the query object of the query cursor is updated, for example, the query object of the query cursor is the operation data with a version number of 1.0, and is updated to the operation data with a version number of 2.0, so that the query object obtains the operation data corresponding to the next version, and if other collaboration clients operate on the multiple people document currently and do not query the operation data, a data retransmission request is initiated to the server based on the version identifier.
104. And acquiring operation data returned by the server in response to the data retransmission request, and applying the operation data to the multi-user collaborative editing document currently edited by the client.
For example, after a data retransmission request is sent to the server, receiving operation data returned by the server in response to the data retransmission request, and after the operation data corresponding to the version identifier is obtained, applying the operation data to the multi-person document currently edited by the client, for example, the operation data represents that a node a is added at the position a of the multi-person document, and then after the terminal obtains the operation data, applying the operation data to the multi-person document, that is, the node a is added at the position a of the multi-person document.
The multi-person document is a table document, and the multi-person document can include operations of deleting rows and copying columns, and some editing operations affect not only an operated object but also a corresponding related object, for example, deleting a first-level node, deleting all child nodes of the first-level node, copying the root node, copying the child nodes of the root node, and if the operation data is directly applied to the multi-person document, the page cannot respond to excessive editing operations in time, and is stuck or even crashed.
In an embodiment, the operation decomposition may be performed on the editing operation, and the editing operation is divided into a plurality of sub-operations, so that the load of the terminal may be reduced to avoid page jamming and even collapse, that is, the operation data carries the operation type, and the step "applying the operation data to the multi-user collaborative editing document currently edited by the client" includes:
if the operation type of the operation data is the target type, performing operation decomposition on the operation data to obtain at least one sub-operation data;
and sequentially applying at least one piece of sub-operation data to the multi-person collaborative editing document currently edited by the client.
Wherein the target type may characterize an operation type that may involve operation data of more other objects.
For example, the operation data may specifically carry an operation type, if the operation type of the operation data is a target type, the operation data is operated and decomposed to obtain at least one piece of sub-operation data, and the sub-operation data obtained by the operation decomposition operation is sequentially applied to the multi-user document to implement an editing operation corresponding to the operation data.
Optionally, the sub-operation data obtained by decomposing the operation may be stored in a message queue, the speed at which the terminal consumes the sub-operation data is controlled by the message queue, a time interval (for example, 300s) and a number (for example, 300 pieces) of data to be pulled from the message queue may also be set, and the terminal acquires the sub-operation data of a certain data at the set time interval, so as to prevent the page from failing to respond due to an excessively long time occupied by the operation data.
Besides the sub-operation data obtained by the operation decomposition can be stored in the message queue, the operation data of the non-target type can also be stored in the message queue so as to control whether the operation data is consumed or not through the message queue.
When a multi-user document currently edited by a user at a client operates on an editing object a, the same operation is also performed on the editing object a by other users at the collaboration client, and the operation of the user at the client may be interrupted. For example, in the process that the user a moves the node a to the location a, the user B moves the node a to the location B, the editing operation of the user a is interrupted, and the node a is moved to the location B, so that the user thinks that the client response error causes the node moving location error, which affects the user experience.
The method can control, through the message queue, that the editing operation of the user B is not consumed first, and then the editing operation of the user B is consumed after the editing operation of the user a is completed, that is, in an embodiment, the operation data is stored in the message queue, and the step "applying the operation data to the multi-user collaborative editing document currently edited by the client" includes:
acquiring current operation data of a multi-user collaborative editing document currently edited by a client, wherein the current operation data carries an operation type;
if the operation type of the current operation data meets a preset condition, acquiring the operation data from the message alignment;
and applying the operation data to the multi-person collaborative editing document currently edited by the client.
For example, the operation data of the user for the multi-user document currently edited by the client may be specifically obtained, and if the operation type of the operation data meets a preset condition, that is, is not a preset operation type, and indicates that the editing operation of the user does not belong to an operation interrupted by other editing operations, the operation data or sub-operation data obtained by decomposing the operation data is obtained from the message queue, and the operation data is applied to the multi-user document currently edited by the client.
And if the operation type of the current operation data does not meet the preset condition, namely the operation type is the preset operation type, obtaining the operation data from the message queue after waiting for the current operation data to be applied to the multi-person document, and applying the operation data to the multi-person collaborative editing document currently edited by the client.
The method includes that for a plurality of current operation data generated by a plurality of editing operations of a multi-user document currently edited by a client, the plurality of current operation data may include combinable operation data of the editing operations, and the operation data may be combined, so as to reduce the number of the current operation data, reduce occupation of network resources by sending the current operation data to a server, reduce the current operation data received by a collaboration client, and reduce the number of operation data that needs to be responded to the collaboration client, that is, in an embodiment, the current operation data includes a plurality of operation data, and after the step "obtaining the current operation data of the multi-user collaborative editing document currently edited by the client", the document processing method provided in the embodiment of the present application may further include:
acquiring an operation object and an operation type of current operation data;
performing operation combination on a plurality of current operation data matched with the operation objects and the operation types to obtain combined operation data;
and sending the merged operation data to a server so that a collaboration client acquires the merged operation data from the server to synchronize the current operation data of the client, wherein the collaboration client is a client for editing a multi-user collaborative editing document in cooperation with the client.
For example, the operation object and the operation type of the current operation data may be obtained, and the operation object and the operation type are matched to perform operation merging on a plurality of current operation data, so as to obtain merged operation data, where the operation object matching may be that the operation object of the operation data b is located at a target position of the operation object of the operation data a, for example, the current operation data a indicates that the node a is moved to the position b (target position), the current operation data b indicates that the node b at the position b is moved to the position c, and the node b is located at the target position of the node a, so that the node a is matched with the node b.
Whether the operation types of the operation data are matched or not can be flexibly set according to the types of the multi-person documents and the editing operation supported by the multi-person document index, for example, the operation types are the same and are matched.
The operation data matched with both the operation type and the operation object are operated and merged, for example, the plurality of current operation data include current operation data a corresponding to the node a moved to the position b, and then current operation data b moved from the position b to the position c, the current operation data a and the current operation data b can be merged to obtain merged operation data, and the merged operation data indicates that the node a is moved to the position c; for another example, the plurality of current operation data includes current operation data a corresponding to the node a moved to the position b, and then current operation data b of the node c is deleted from the position b.
When a user executes a lot of editing operations on a multi-user document currently edited by a client, the client generates a lot of operation data, when the client sends the operation data to a server, network disconnection is easily caused by excessive network load, in order to avoid disconnection of network connection between the server and the client due to excessive network load, data segmentation can be performed, and the current operation data is divided into a plurality of parts and sent to the server respectively, that is, in an embodiment, the step "sending the merged operation data to the server" specifically includes:
if the number of the merged operation data meets a preset threshold value, performing data segmentation on the merged data to obtain first segmentation data and second segmentation data;
sending the first cut data to a server;
and when receiving confirmation information returned by the server based on the first segmentation data, sending second segmentation data to the server.
The first cut data comprises a data volume smaller than or equal to a preset threshold.
For example, the data splitting may be specifically performed on the merged operation data if the number of the merged operation data meets a preset threshold, so as to obtain first split data including operation data whose number is less than or equal to the preset threshold and second split data including operation data other than the first split data, and send the first split data to the server, but send the second split data to the server when receiving confirmation information returned by the server based on the first split data, where the confirmation information indicates that the server has received the first split data.
Optionally, if the number of the operation data included in the second segmentation data meets a preset threshold, performing data segmentation on the second segmentation data to obtain two parts of data, where one part of data includes the number of the operation data that is less than or equal to the preset threshold, and if the number of the operation data included in the other part meets the preset threshold, continuing to perform data segmentation, and ensuring that the number of the operation data that does not exceed the preset threshold is sent to the server each time.
Optionally, the ot algorithm is provided with different state machines, as shown in fig. 3, the state machines include a Synchronized state (Synchronized), a wait confirmation state (awaitingconfirrm), and an operation wait state (awaitingwothbuffer), where when the client does not send a data retransmission request, the client is in the Synchronized state, when the client sends a data retransmission request and is not responded by the server, the client is in the awaitingconfirrm state, and when the client is in the awaitingconfirrm and the client continuously generates a new action, the client is converted into the awaitingbuthffer state, and the client performs different operations in different states.
When data segmentation is performed on current operation data, the current operation data needs to be divided into first segmentation data and second segmentation data to be sent, which is equivalent to that in the sending process of the first segmentation data, a client generates a new action (namely, the second segmentation data), so that the client is converted from an AwaitingConfirmer state to an AwaitingWithBuffer state.
As can be seen from the above, in the embodiment of the present application, the version identifier of the multi-user collaborative editing document currently edited by the client is obtained; generating a query vernier according to the version identification, wherein the query vernier is used for querying operation data generated by editing the multi-person collaborative editing document; if the operation data is not queried locally at the client through the query cursors, a data retransmission request is sent to the server based on the version identification; and acquiring operation data returned by the server in response to the data retransmission request, and applying the operation data to the multi-user collaborative editing document currently edited by the client.
According to the scheme, the query vernier is generated according to the version identification of the multi-user collaborative editing document edited at the current time by the client, and the corresponding operation data is obtained through the query vernier, so that the client can obtain the operation data with the correct version, the version identification of the multi-user collaborative editing document on the client can be accurately increased in an increasing mode, the version identification of the multi-user collaborative editing document on the server is kept consistent, and the synchronization effect of the editing operation of different clients for the multi-user collaborative editing document is improved.
On the basis of the above-described embodiments, further details will be given below by way of example.
The embodiment will be described from the perspective of a document processing system, which may include a terminal and a server, where the terminal is installed with a client supporting different users to edit a document cooperatively and online by multiple users, a communication connection is established between the server and the client, and the server may provide a service to the client based on the communication connection.
As shown in fig. 4, a specific flow of the document processing method provided in the embodiment of the present application may be as follows:
201. the server receives the sent operation data generated by the plurality of clients for editing the document by the multi-person collaborative editing of the current editing and sends the operation data to the plurality of clients.
For a multi-person document, the server should process the multi-person document according to the arrival sequence of the operation data, the server receives the operation data generated by editing different multi-person documents, and the server can perform hash according to the document identification of the multi-person document to store the operation data generated by editing the multi-person document into a corresponding message queue, consume the message queue through a thread, and ensure that the operation data for different multi-person documents are processed in sequence.
For example, as shown in fig. 5, the main thread of the server is mainly responsible for network communication, receiving operation data sent by the client, and sending the operation data to the client through broadcast/unicast.
The method comprises the steps that a work thread pool is created to process operation conversion and operation application of operation data, the number of threads of the work thread pool is limited, a server can hash the operation data to a corresponding message queue according to document identification of a multi-person document, and each queue is consumed by one thread in the work thread pool.
Alternatively, the server may send a plurality of operation data to the client in the form of a data packet.
202. And the terminal receives the operation data sent by the server through the client and stores the operation data into a storage position corresponding to the version identifier carried by the operation data.
For example, for operation data generated by editing a multi-user document with different versions, the terminal performs mapping according to the version identifier, determines the storage location of the operation data, and stores the operation data corresponding to the version identifier.
203. The terminal obtains the version identification of the multi-person collaborative editing document currently edited by the client.
For example, the version identifier may be specifically carried by the multi-user collaborative editing document, and the terminal acquires the version identifier of the multi-user collaborative editing document edited by the client, optionally, when the multi-user collaborative editing document is just started, the terminal may acquire the version identifier based on the document data returned by the server, or acquire the version identifier according to the locally stored document data of the multi-user collaborative editing document, and then the terminal may acquire the version identifier by querying the cursor.
204. And the terminal inquires the operation data at the storage position corresponding to the version identification through the inquiry cursor.
For example, the terminal generates a query cursor by using the version identifier as a query object of the cursor, and the query cursor can query the local storage space (e.g., cache) of the terminal for the operation data generated by editing the version identifier.
In an embodiment, the terminal performs mapping through the version identifier to obtain a storage location of the operation data of the multi-user document corresponding to the version identifier, uses the storage location as a query object of the query cursor, generates the query cursor, queries the storage location with the query cursor, and obtains data on the storage location.
And mapping the version identifier to obtain a storage position of the operation data of the multi-person document corresponding to the version identifier, using the storage position as a query object of the cursor, generating a query cursor, querying the storage position by the query cursor, and acquiring data on the storage position.
205. And if the operation data is not inquired, the terminal initiates a data retransmission request to the server based on the version identification.
For example, if the terminal does not inquire the operation data through the inquiry cursor, for example, the operation data does not exist in the storage location corresponding to the version identifier, the terminal sends a data retransmission request to the server according to the version identifier, so as to obtain the operation data from the server.
Optionally, a timeout mechanism may be further set, and when the server responds to the data retransmission request timeout, the server re-initiates the data retransmission request, and in addition, when the network is disconnected, the client may be connected with the server again, so as to avoid data loss.
206. And the terminal acquires operation data returned by the server in response to the data retransmission request, and applies the operation data to the multi-user collaborative editing document edited by the client at present.
For example, after the terminal sends a data retransmission request to the server, it receives operation data returned by the server in response to the data retransmission request, and after the terminal acquires the operation data corresponding to the version identifier, the terminal applies the operation data to the multi-person document currently edited by the client, for example, the operation data represents that a node a is added at the position a of the multi-person document, and then after the terminal acquires the operation data, the terminal applies the operation data to the multi-person document, that is, the node a is added at the position a of the multi-person document.
207. And the terminal updates the version identification of the currently edited multi-user collaborative editing document through the client and updates the query cursor.
For example, after the terminal applies the operation data to the multi-person document, the version identifier of the multi-person document is updated, and the query cursor is updated, for example, the version identifier of the multi-person document is updated from 1.0 to 2.0, and after the query cursor is updated, the query cursor can obtain the operation data generated by editing the multi-person document with the version identifier of 2.0.
As shown in fig. 6, the client may include a network transmission module, an operation conversion algorithm module, an action delay module, a data generation module, and an exception generation module.
Wherein, the network transmission module is used for receiving and caching: obtaining operation data and caching; packet loss retransmission: when the operation data is lost, a data retransmission request is initiated to the server; and (4) overtime retransmission: when the server responds overtime, the server initiates a data retransmission request again; and (3) breaking the network and reconnecting: when the network is disconnected, the client side can be connected with the server again, and data loss is avoided.
The operation conversion algorithm module is used for state conversion; and (3) conflict processing: when editing conflicts, converting the editing actions into conflict-free editing actions; and (4) action merging: performing operation combination on a plurality of current operation data matched with the operation objects and the operation types to obtain combined operation data; and (3) action splitting: if the number of the operation data meets the preset threshold, performing data segmentation on the data, and referring to the description of the related content in the above embodiment in the specific process, details are not repeated here.
The action delay module is used for controlling consumption of the operation data through the message queue, and comprises the steps of controlling consumption of the operation data from the server and the operation data generated by the client and delaying consumption.
The data generation module is used for responding to an instruction triggered by the editing operation of the user aiming at the multi-person document and converting the editing operation into operation data.
The exception recovery module is used for data reconciliation: comparing the difference between the multi-person document and the copy; and (3) data recovery: and applying the difference operation data corresponding to the difference information to the multi-person document currently edited by the client so as to reply the data of the multi-person document.
As shown in fig. 6, the server may include a network module, a traffic module, a service management module, and a data module.
Wherein, the network module is used for heartbeat monitoring: the system is used for monitoring whether the client is connected or not; maintaining connection: maintaining network connection with the client; and (3) message broadcasting: and sending the operation data and the like to the client.
The service module is used for version control: controlling the versions of the multi-person collaborative editing document; and (3) checking account of data: comparing the difference between the multi-person document on the client and the hungry copy on the server; conversion control, which performs operation conversion on the operation data; and (3) data statistics: and counting the operation data.
The service management module is used for configuration management, monitoring alarm and service management.
The data module supports database (MySQL), storage system (Redis), and file functions.
As can be seen from the above, in the embodiment of the present application, the server receives the sent operation data generated by the plurality of clients for editing the currently edited multi-person collaborative editing document, and sends the operation data to the plurality of clients; the terminal receives operation data sent by the server through the client and stores the operation data into a storage position corresponding to the version identification carried by the operation data; the method comprises the steps that a terminal obtains a version identification of a multi-person collaborative editing document currently edited by a client; the terminal inquires the operation data at the storage position corresponding to the version identification through the inquiry vernier; if the operation data is not inquired, the terminal initiates a data retransmission request to the server based on the version identification; and the terminal updates the version identification of the currently edited multi-user collaborative editing document through the client and updates the query cursor.
According to the scheme, the query vernier is generated according to the version identification of the multi-user collaborative editing document edited at the current time by the client, and the corresponding operation data is obtained through the query vernier, so that the client can obtain the operation data with the correct version, the version identification of the multi-user collaborative editing document on the client can be accurately increased in an increasing mode, the version identification of the multi-user collaborative editing document on the server is kept consistent, and the synchronization effect of the editing operation of different clients for the multi-user collaborative editing document is improved.
In order to better implement the document processing method provided by the embodiment of the application, a document processing device is further provided in an embodiment. Wherein the meaning of the noun is the same as that in the document processing method, and the specific implementation details can refer to the description in the method embodiment.
The document processing apparatus may be specifically integrated in a computer device, as shown in fig. 7, and may include: the identifier obtaining unit 301, the cursor generating unit 302, the querying unit 303 and the application unit 304 are as follows:
(1) identification acquisition unit 301: the method is used for obtaining the version identification of the multi-person collaborative editing document currently edited by the client.
(2) The cursor generation unit 302: and the query vernier is used for querying the operation data generated by editing the multi-person collaborative editing document.
(3) The inquiring unit 303: and if the operation data is not queried locally at the client through the query cursor, initiating a data retransmission request to the server based on the version identification.
In an embodiment, the querying unit 303 may include an updating subunit and a data retransmission subunit, specifically:
updating the subunit: the system comprises a query cursor, a version identifier and a version identifier, wherein the query cursor is used for generating the query cursor according to the version identifier, and the version identifier is used for updating the version identifier if the operation data is not queried through the query cursor and is generated by a client;
a data retransmission subunit: and if the operation data is not inquired and is not generated by the client, initiating a data retransmission request to the server based on the version identification.
(4) The application unit 304: the method is used for acquiring operation data returned by the server in response to the data retransmission request and applying the operation data to the multi-user collaborative editing document edited by the client at present.
In an embodiment, the operation data carries an operation type, and the application unit 304 may include a decomposition subunit and a first data application subunit, specifically:
decomposing the subunit: the operation data analysis device is used for performing operation decomposition on the operation data to obtain at least one sub-operation data if the operation type of the operation data is a target type;
a first data application subunit: and the multi-user collaborative editing device is used for sequentially applying at least one piece of sub-operation data to the multi-user collaborative editing document currently edited by the client.
In an embodiment, the operation data is stored in a message queue, and the application unit 304 may include a first data obtaining subunit, a second data obtaining subunit, and a second data applying subunit, specifically:
the first data acquisition subunit: the method comprises the steps of obtaining current operation data of a multi-user collaborative editing document edited by a client at present, wherein the current operation data carries an operation type;
a second data acquisition subunit: the method comprises the steps of obtaining operation data from a message alignment if the operation type of current operation data meets a preset condition;
a second data application subunit: the method is used for applying the operation data to the multi-person collaborative editing document currently edited by the client.
In an embodiment, the current operation data includes a plurality of data, and the document processing apparatus may further include an obtaining unit, an operation merging unit, and a sending unit, specifically:
an acquisition unit: the operation object and the operation type are used for acquiring current operation data;
an operation merging unit: the operation merging device is used for carrying out operation merging on a plurality of current operation data with matched operation objects and operation types to obtain merged operation data;
a transmission unit: and the cooperative client is a client for editing the multi-person collaborative editing document in cooperation with the client.
In an embodiment, the sending unit may include a data slicer unit, a first data sending subunit, and a second data sending subunit, specifically:
data segmentation subunit: the data segmentation method comprises the steps of performing data segmentation on merged data to obtain first segmentation data and second segmentation data if the number of the merged operation data meets a preset threshold;
the first data transmission subunit: for sending the first cut data to the server;
a second data transmitting subunit: and the server is used for sending the second segmentation data to the server when receiving confirmation information returned by the server based on the first segmentation data.
In an embodiment, the document processing apparatus may further include a copy obtaining unit, a difference comparing unit, an operation converting unit, and a correcting unit, specifically:
a copy acquisition unit: the multi-person collaborative editing file copy server is used for acquiring a multi-person collaborative editing file copy corresponding to the version identification from the server;
a difference comparison unit: the client side is used for comparing the difference between the multi-person collaborative editing document copy and the multi-person collaborative editing document currently edited by the client side to obtain difference information;
an operation conversion unit: the operation conversion is carried out according to the difference information to obtain difference operation data;
a correction unit: the method is used for correcting the multi-person collaborative editing document currently edited by the client based on the operation difference data.
As can be seen from the above, the document processing apparatus in the embodiment of the present application obtains, by the identifier obtaining unit 301, the version identifier of the multi-user collaborative editing document currently edited by the client; the vernier generating unit 302 generates a query vernier according to the version identification, wherein the query vernier is used for querying operation data generated by editing a multi-person collaborative editing document; if the operation data is not queried locally at the client through the query cursor, a data retransmission request is initiated to the server through the query unit 303 based on the version identification; finally, the operation data returned by the server in response to the data retransmission request is obtained through the application unit 304, and the operation data is applied to the multi-user collaborative editing document currently edited by the client.
According to the scheme, the query cursor is generated according to the version identification of the multi-user collaborative editing document edited by the client currently, the corresponding operation data is obtained through the query cursor, the client can obtain the operation data with the correct version, the version identification of the multi-user collaborative editing document edited by the client can be increased in an accurate mode, the version identification of the multi-user collaborative editing document edited by the client is kept consistent with the version identification of the multi-user collaborative editing document edited by the server, and the synchronous effect of the editing operation of different clients on the multi-user collaborative editing document is improved.
An embodiment of the present application further provides a computer device, where the computer device may be a terminal or a server, as shown in fig. 8, which shows a schematic structural diagram of the computer device according to the embodiment of the present application, and specifically:
the computer device may include components such as a processor 1001 of one or more processing cores, memory 1002 of one or more computer-readable storage media, a power supply 1003, and an input unit 1004. Those skilled in the art will appreciate that the computer device configuration illustrated in FIG. 8 does not constitute a limitation of computer devices, and may include more or fewer components than those illustrated, or some components may be combined, or a different arrangement of components. Wherein:
the processor 1001 is a control center of the computer device, connects various parts of the entire computer device using various interfaces and lines, and performs various functions of the computer device and processes data by running or executing software programs and/or modules stored in the memory 1002 and calling data stored in the memory 1002, thereby monitoring the computer device as a whole. Optionally, processor 1001 may include one or more processing cores; preferably, the processor 1001 may integrate an application processor, which mainly handles operating systems, user interfaces, computer programs, etc., and a modem processor, which mainly handles wireless communications. It will be appreciated that the modem processor described above may not be integrated into the processor 1001.
The memory 1002 may be used to store software programs and modules, and the processor 1001 executes various functional applications and data processing by operating the software programs and modules stored in the memory 1002. The memory 1002 may mainly include a storage program area and a storage data area, wherein the storage program area may store an operating system, a computer program required by at least one function (such as a sound playing function, an image playing function, etc.), and the like; the storage data area may store data created according to use of the computer device, and the like. Further, the memory 1002 may include high speed random access memory, and may also include non-volatile memory, such as at least one magnetic disk storage device, flash memory device, or other volatile solid state storage device. Accordingly, the memory 1002 may also include a memory controller to provide the processor 1001 access to the memory 1002.
The computer device further includes a power source 1003 for supplying power to each component, and preferably, the power source 1003 may be logically connected to the processor 1001 through a power management system, so that functions of managing charging, discharging, power consumption, and the like are implemented through the power management system. The power source 1003 may also include any component including one or more of a dc or ac power source, a recharging system, a power failure detection circuit, a power converter or inverter, a power status indicator, and the like.
The computer device may also include an input unit 1004, and the input unit 1004 may be used to receive input numeric or character information and generate keyboard, mouse, joystick, optical or trackball signal inputs related to user settings and function control.
Although not shown, the computer device may further include a display unit and the like, which are not described in detail herein. Specifically, in this embodiment, the processor 1001 in the computer device loads the executable file corresponding to the process of one or more computer programs into the memory 1002 according to the following instructions, and the processor 1001 runs the computer programs stored in the memory 1002, so as to implement various functions as follows:
acquiring a version identifier of a multi-user collaborative editing document currently edited by a client;
generating a query vernier according to the version identification, wherein the query vernier is used for querying operation data generated by editing the multi-person collaborative editing document;
if the operation data is not queried locally at the client through the query cursors, a data retransmission request is sent to the server based on the version identification;
and acquiring operation data returned by the server in response to the data retransmission request, and applying the operation data to the multi-user collaborative editing document currently edited by the client.
The above operations can be implemented in the foregoing embodiments, and are not described in detail herein.
As can be seen from the above, the computer device according to the embodiment of the present application may obtain the version identifier of the multi-user collaborative editing document currently edited by the client; generating a query vernier according to the version identification, wherein the query vernier is used for querying operation data generated by editing the multi-person collaborative editing document; if the operation data is not queried locally at the client through the query cursors, a data retransmission request is sent to the server based on the version identification; and acquiring operation data returned by the server in response to the data retransmission request, and applying the operation data to the multi-user collaborative editing document currently edited by the client.
According to the scheme, the query vernier is generated according to the version identification of the multi-user collaborative editing document edited at the current time by the client, and the corresponding operation data is obtained through the query vernier, so that the client can obtain the operation data with the correct version, the version identification of the multi-user collaborative editing document on the client can be accurately increased in an increasing mode, the version identification of the multi-user collaborative editing document on the server is kept consistent, and the synchronization effect of the editing operation of different clients for the multi-user collaborative editing document is improved.
According to an aspect of the present application, there is provided a computer program product comprising a computer program containing computer instructions stored in a computer readable storage medium. The processor of the computer device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions to cause the computer device to perform the method provided in the various alternative implementations of the above embodiments.
It will be understood by those skilled in the art that all or part of the steps of the methods of the above embodiments may be performed by a computer program, which may be stored in a computer-readable storage medium and loaded and executed by a processor, or by related hardware controlled by the computer program.
To this end, the present application provides a computer-readable storage medium, in which a computer program is stored, where the computer program can be loaded by a processor to execute any one of the document processing methods provided by the present application.
The above operations can be implemented in the foregoing embodiments, and are not described in detail herein.
Wherein the computer-readable storage medium may include: read Only Memory (ROM), Random Access Memory (RAM), magnetic or optical disks, and the like.
Since the computer program stored in the computer-readable storage medium can execute any document processing method provided in the embodiments of the present application, beneficial effects that can be achieved by any document processing method provided in the embodiments of the present application can be achieved, and detailed descriptions are omitted here for the foregoing embodiments.
The foregoing describes in detail a document processing method, apparatus, computer device, and computer-readable storage medium provided in the embodiments of the present application, and specific examples are applied in the present application to explain the principles and implementations of the present application, and the descriptions of the foregoing embodiments are only used to help understand the method and core ideas of the present application; meanwhile, for those skilled in the art, according to the idea of the present application, there may be variations in the specific embodiments and the application scope, and in summary, the content of the present specification should not be construed as a limitation to the present application.
Claims (11)
1. A method of document processing, comprising:
acquiring a version identifier of a multi-user collaborative editing document currently edited by a client;
generating a query vernier according to the version identification, wherein the query vernier is used for querying operation data generated by editing the multi-person collaborative editing document;
if the operation data is not queried locally at the client through the query cursor, a data retransmission request is initiated to a server based on the version identification;
and acquiring the operation data returned by the server in response to the data retransmission request, and applying the operation data to the multi-user collaborative editing document currently edited by the client.
2. The method according to claim 1, wherein the operation data carries an operation type, and the applying the operation data to the multi-person collaborative editing document currently edited by the client comprises:
if the operation type of the operation data is a target type, performing operation decomposition on the operation data to obtain at least one sub-operation data;
and sequentially applying the at least one sub-operation data to the multi-person collaborative editing document currently edited by the client.
3. The method of claim 1, wherein the operation data is stored in a message queue, and wherein applying the operation data to a multi-person collaborative editing document currently edited by the client comprises:
acquiring current operation data of a multi-user collaborative editing document currently edited by the client, wherein the current operation data carries an operation type;
if the operation type of the current operation data meets a preset condition, acquiring the operation data from the message alignment;
and applying the operation data to the multi-person collaborative editing document currently edited by the client.
4. The method according to claim 3, wherein the current operation data includes a plurality of operation data, and after obtaining the current operation data of the multi-person collaborative editing document currently edited by the client, the method further comprises:
acquiring an operation object and an operation type of the current operation data;
performing operation combination on a plurality of current operation data matched with the operation objects and the operation types to obtain combined operation data;
and sending the merged operation data to the server so that a collaboration client acquires the merged operation data from the server to synchronize the current operation data of the client, wherein the collaboration client is a client for editing the multi-person collaborative editing document in collaboration with the client.
5. The method of claim 4, wherein sending the merged operation data to the server comprises:
if the number of the merged operation data meets a preset threshold value, performing data segmentation on the merged data to obtain first segmentation data and second segmentation data;
sending the first cut data to the server;
and when receiving confirmation information returned by the server based on the first cut data, sending the second cut data to the server.
6. The method of claim 1, wherein if the operation data is not queried locally at the client through the query cursor, initiating a data retransmission request to a server based on the version identification, comprises:
if the operation data is not queried through the query cursor and is generated by the client, updating the version identification, taking the updated version identification as the version identification, and returning to execute the query cursor generated according to the version identification;
and if the operation data is not inquired and is not generated by the client, initiating a data retransmission request to a server based on the version identification.
7. The method according to any one of claims 1-6, further comprising:
acquiring a multi-person collaborative editing document copy corresponding to the version identification from the server;
comparing the difference between the multi-person collaborative editing document copy and the multi-person collaborative editing document currently edited by the client to obtain difference information;
performing operation conversion according to the difference information to obtain difference operation data;
and correcting the multi-person collaborative editing document currently edited by the client based on the operation difference data.
8. A document processing apparatus, comprising:
the identification acquisition unit is used for acquiring the version identification of the multi-person collaborative editing document currently edited by the client;
the vernier generating unit is used for generating a query vernier according to the version identification, and the query vernier is used for querying operation data generated by editing the multi-person collaborative editing document;
the query unit is used for initiating a data retransmission request to a server based on the version identification if the operation data is not queried locally at the client through the query cursor;
and the application unit is used for acquiring the operation data returned by the server in response to the data retransmission request and applying the operation data to the multi-user collaborative editing document currently edited by the client.
9. A computer device comprising a memory and a processor; the memory stores a computer program, and the processor is used for operating the computer program in the memory to execute the document processing method of any one of claims 1 to 7.
10. A computer-readable storage medium for storing a computer program which is loaded by a processor to perform the document processing method of any one of claims 1 to 7.
11. A computer program product comprising a computer program, characterized in that the computer program, when executed by a processor, implements the document processing method of any one of claims 1 to 7.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202210564751.0A CN114896960A (en) | 2022-05-23 | 2022-05-23 | Document processing method, apparatus, computer device, readable storage medium and product |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202210564751.0A CN114896960A (en) | 2022-05-23 | 2022-05-23 | Document processing method, apparatus, computer device, readable storage medium and product |
Publications (1)
Publication Number | Publication Date |
---|---|
CN114896960A true CN114896960A (en) | 2022-08-12 |
Family
ID=82724643
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202210564751.0A Pending CN114896960A (en) | 2022-05-23 | 2022-05-23 | Document processing method, apparatus, computer device, readable storage medium and product |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN114896960A (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN117035067A (en) * | 2023-10-07 | 2023-11-10 | 腾讯科技(深圳)有限公司 | Thinking guide drawing rendering method and device and electronic equipment |
-
2022
- 2022-05-23 CN CN202210564751.0A patent/CN114896960A/en active Pending
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN117035067A (en) * | 2023-10-07 | 2023-11-10 | 腾讯科技(深圳)有限公司 | Thinking guide drawing rendering method and device and electronic equipment |
CN117035067B (en) * | 2023-10-07 | 2024-01-23 | 腾讯科技(深圳)有限公司 | Thinking guide drawing rendering method and device and electronic equipment |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN109976667B (en) | Mirror image management method, device and system | |
US10455014B2 (en) | Method and apparatus for synchronizing content | |
EP2414947B1 (en) | System and method for editing a conversation in a hosted conversation system | |
US9166939B2 (en) | Systems and methods for uploading media content in an instant messaging conversation | |
US20160316038A1 (en) | Shared memory messaging channel broker for an application server | |
CN111143382B (en) | Data processing method, system and computer readable storage medium | |
CN105117382B (en) | Document cooperation method and device | |
CN114363407B (en) | Message service method and device, readable storage medium and electronic equipment | |
CN105045802A (en) | Message-driven multi-type file preview system | |
US20150256504A1 (en) | Distributed synchronization data in a message management service | |
CN111314433B (en) | Message transmission method and device and electronic equipment | |
US11265182B2 (en) | Messaging to enforce operation serialization for consistency of a distributed data structure | |
CN111259022B (en) | Information synchronization method, synchronization system, computer equipment and medium | |
CN104050287A (en) | Method and system for replying messages during instant chat | |
CN113596117A (en) | Real-time data processing method, system, device and medium | |
CN114896960A (en) | Document processing method, apparatus, computer device, readable storage medium and product | |
CN105989065B (en) | Flash data processing method and system | |
US20090319519A1 (en) | Communication system, communication device, and computer program | |
Shen et al. | Personalized multi-user view and content synchronization and retrieval in real-time mobile social software applications | |
CN115630122A (en) | Data synchronization method and device, storage medium and computer equipment | |
CN103095765B (en) | Peer-to-peer communication network and data content distributing method thereof and communication node thereof | |
CN113111118A (en) | Data processing method, device, server, project group equipment and storage medium | |
CN108471375B (en) | Message processing method, device and terminal | |
CN114253626B (en) | Message processing method, device, electronic equipment and storage medium | |
CN115150466B (en) | Method and device for realizing data distribution, electronic equipment and storage medium |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination |