Document editing method and device, electronic equipment and storage medium

By editing locally in the terminal and merging documents when switching to online, the problems of online editing interruptions and content conflicts are solved, improving the continuity and user experience of document editing.

CN119150805APending Publication Date: 2024-12-17ZHUHAI KINGSOFT OFFICE SOFTWARE +2
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202310725315.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-06-16
Publication Date
2024-12-17

AI Technical Summary

Technical Problem

During the online document editing process, network fluctuations cause terminals to be offline, resulting in interruption of editing, poor user experience, and it is difficult for the existing technology to effectively resolve content conflicts between online editing and offline editing.

Method used

By editing the first version of the target document locally in the terminal and sending it to the server for merging when switching to the online state, receiving the merged third version and prompt information, resolving content conflicts and realizing offline editing without perception by users Continuity.

Benefits of technology

Improve the continuity and user experience of online document editing, ensure that the editing content during offline editing periods can be merged and resolved conflicts when re-online, and avoid editing interruptions and content conflicts.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119150805A_ABST
    Figure CN119150805A_ABST
Patent Text Reader

Abstract

The embodiment of the invention provides a document editing method and device, electronic equipment and a storage medium. The document editing method comprises the following steps: determining an editing state of the terminal; in response to switching of the editing state from the online state to the offline state, locally editing a target document according to editing operation to obtain a first version of the target document; in response to switching of the editing state from the offline state to the online state, sending a first version stored by the terminal to a server; wherein the first version is used for being combined with the target document of a second version stored in a server side to obtain a third version; a third version and / or first prompt information sent by the server side are / is received, and the first prompt information is used for prompting that content conflict exists between the first version and the second version.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to but is not limited to the field of document processing technology, and in particular to a document editing method and device, an electronic device and a storage medium. Background Art

[0002] During the online editing of a document, the terminal may go offline due to fluctuations in network conditions or changes in the environment where the device is located. Generally, if the terminal is offline, the online document cannot be edited. Obviously, the online editing of documents is heavily dependent on the network conditions. Fluctuations in network conditions will affect whether the editing can continue or the user experience of editing. Therefore, how to improve the user experience and intelligence of document editing, especially online document editing, is a problem that must be further solved by related technologies. Summary of the invention

[0003] Embodiments of the present disclosure provide a document editing method and device, an electronic device, and a storage medium.

[0004] A first aspect of an embodiment of the present disclosure provides a document editing method, which is executed by a terminal, and the method includes:

[0005] determining an editing state of the terminal;

[0006] In response to the editing state switching from the online state to the offline state, locally editing the target document according to the editing operation to obtain a first version of the target document;

[0007] In response to the editing state switching from the offline state to the online state, sending the first version saved by the terminal to the server; wherein the first version is used to merge with the second version of the target document saved by the server to obtain a third version;

[0008] The third version and / or the first prompt information sent by the server is received, wherein the first prompt information is used to prompt that there is a content conflict between the first version and the second version.

[0009] A second aspect of the present disclosure provides a document editing method, which is executed by a server, and the method includes:

[0010] Receiving a first version of a target document sent by a terminal, wherein the first version of the target document is edited when the terminal is in an offline state;

[0011] Merging the first version and the second version of the target document saved by the server to obtain a third version of the target document;

[0012] The target document of the third version and first prompt information are sent to the terminal, wherein the first prompt information is used to prompt that there is a content conflict between the first version and the second version.

[0013] A third aspect of the present disclosure provides a device for processing incremental information of a file, the device comprising:

[0014] A determination module, used to determine the editing state of the terminal;

[0015] An editing module, configured to locally edit a target document according to an editing operation to obtain a first version of the target document in response to the editing state switching from an online state to an offline state;

[0016] A first sending module, configured to send the first version saved by the terminal to the server in response to the editing state switching from the offline state to the online state; wherein the first version is used to merge with the second version of the target document saved by the server to obtain a third version;

[0017] The first receiving module is used to receive the third version and / or the first prompt information sent by the server, wherein the first prompt information is used to prompt that there is a content conflict between the first version and the second version.

[0018] A fourth aspect of the present disclosure provides a device for processing incremental information of a file, the device comprising:

[0019] A second receiving module, configured to receive a first version of a target document sent by a terminal, wherein the first version of the target document is edited when the terminal is in an offline state;

[0020] A merging module, used for merging the first version and the second version of the target document saved by the server to obtain a third version of the target document;

[0021] The second sending module is used to send the third version of the target document and first prompt information to the terminal, wherein the first prompt information is used to prompt that there is a content conflict between the first version and the second version.

[0022] A fifth aspect of the present disclosure provides an electronic device, including:

[0023] processor;

[0024] a memory for storing processor-executable instructions;

[0025] The processor is configured to: implement the document editing method provided by any one of the technical solutions of the first aspect and / or the second aspect when running the executable instructions.

[0026] A sixth aspect of an embodiment of the present disclosure provides a computer-readable storage medium, which stores an executable program. When the executable program is executed by a processor, it implements the document editing method provided by any one of the first and / or second aspects.

[0027] The technical solution provided by the embodiment of the present disclosure no longer directly prompts that the target document is currently offline and cannot be edited after the editing state of the terminal changes from the online state to the offline state. Instead, the user is allowed to continue the local target document without feeling, and the first version of the target document is stored locally. In this way, when the terminal is offline for a short time, the user cannot perceive the offline of the terminal when editing the target document online, thereby improving the continuity and user experience of the terminal editing the target document online. At the same time, in order to resolve the conflict between the current terminal offline editing and the online editing of other accounts, after the terminal switches to the online state again, the terminal will send the first version of the target document to the server, and the server will merge the first version and the second version, and receive the third version of the target document and the first prompt information from the server to resolve the content conflict. That is, the solution provided by the embodiment of the present disclosure not only realizes the offline editing of the document pre-edited online by the terminal, but also after the offline editing returns to the online editing again, the server will merge multiple versions and resolve the conflict through the first prompt information, so that the editing of the terminal offline period is executed.

[0028] It is to be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the present disclosure. BRIEF DESCRIPTION OF THE DRAWINGS

[0029] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present disclosure and, together with the description, serve to explain the principles of the present disclosure.

[0030] Figure 1 The figure is a flowchart of a document editing method according to an exemplary embodiment.

[0031] Figure 2A The figure is a schematic diagram showing an effect of a first prompt information according to an exemplary embodiment.

[0032] Figure 2B The figure is a schematic diagram showing another effect of first prompt information according to an exemplary embodiment.

[0033] Figure 3 The figure is a flowchart of a document editing method according to an exemplary embodiment.

[0034] Figure 4The figure is a schematic diagram showing the effect of a conflict prompt according to an exemplary embodiment.

[0035] Figure 5 The figure is a flowchart of a document editing method according to an exemplary embodiment.

[0036] Figure 6 The figure is a flowchart of a document editing method according to an exemplary embodiment.

[0037] Fig. 7A is a schematic structural diagram of a document editing device according to an exemplary embodiment; Figure 7B is a schematic structural diagram of a document editing device according to an exemplary embodiment; Figure 8 The diagram is a schematic structural diagram of an electronic device according to an exemplary embodiment. DETAILED DESCRIPTION

[0039] Exemplary embodiments will be described in detail herein, examples of which are shown in the accompanying drawings. When the following description refers to the drawings, unless otherwise indicated, the same numbers in different drawings represent the same or similar elements. The implementations described in the following exemplary embodiments do not represent all implementations consistent with the embodiments of the present disclosure. Instead, they are merely examples of devices and methods consistent with some aspects of the embodiments of the present disclosure as detailed in the appended claims.

[0040] Regarding the device in the above embodiment, the specific manner in which each module performs operations has been described in detail in the embodiment of the method, and will not be elaborated here.

[0041] like Figure 1 As shown, the embodiment of the present disclosure provides a document editing method, which is executed by a terminal, and the method includes:

[0042] S1110: Determine the editing state of the terminal;

[0043] S1120: In response to the editing state switching from the online state to the offline state, locally editing the target document according to the editing operation to obtain a first version of the target document;

[0044] S1130: In response to the editing state switching from the offline state to the online state, the first version saved by the terminal is sent to the server; wherein the first document is used to merge with the target document of the second version saved by the server to obtain a third version;

[0045] S1140: Receive the third version and the first prompt information sent by the server, exemplarily, as follows: Figure 1As shown, the third version and the first prompt information sent by the server are received, wherein the first prompt information is used to prompt that there is a content conflict between the first version and the second version.

[0046] The document editing method provided in the embodiments of the present disclosure may be implemented by a terminal of a client that has a target application installed.

[0047] The target document may be a cloud document originally scheduled for online editing, or may be a document collaboratively edited by multiple accounts.

[0048] In some embodiments, the terminal may determine its own editing status by detecting its own network status.

[0049] The editing state of the terminal may include an online state and / or an offline state. Editing the target document when the terminal is in an online state is called online editing. Editing the target document when the terminal is in an offline state is called offline editing.

[0050] Exemplarily, a Hyper Text Transfer Protocol (http) connection is established between the terminal and the server, and then the heartbeat detection is performed. For example, heartbeat data is transmitted between the terminal and the server, and according to the receiving and sending status of the heartbeat data packet, it is determined whether the http connection between the terminal and the server is in a keep-alive state.

[0051] As another example, a long connection may be established between the terminal and the server based on a socket. To avoid fluctuations in network conditions, it is possible to detect whether the long connection is disconnected by sending and receiving data packets of network quality.

[0052] The terminal can record the amount of local data that has not been synchronized to the server to determine whether the terminal is currently online.

[0053] For another example, the terminal may determine, based on local records, that the synchronization failure duration reaches a specified duration and determine that the terminal is currently in an offline state; otherwise, it may be considered to be in an online state.

[0054] Determine whether the terminal is currently online based on the historical network status information of the terminal.

[0055] The current network status information of the terminal is obtained using a preset model. The network status information indicates the network status of the terminal. For example, an artificial intelligence (AI) model is used to obtain the current status information of the terminal, and a judgment result output by the AI ​​model is obtained, which indicates that the terminal is currently online or offline. The AI ​​model includes but is not limited to a machine learning model and / or a deep learning model.

[0056] When the terminal edits the target document, the editing state of the terminal is determined according to whether the terminal is connected to the network or according to the connection status between the terminal and the server.

[0057] Exemplarily, if the terminal currently has a network connection, it can be considered that the terminal is in an online state; if the terminal is currently disconnected from the network, it can be considered that the terminal is in an offline state.

[0058] For example, if the connection between the terminal and the server is in a keep-alive state, the terminal can be considered to be in an online state; if the connection between the terminal and the server is not in a keep-alive state, the terminal can be considered to be in an offline state. Furthermore, if the disconnection time between the terminal and the server exceeds a time threshold, the terminal can be considered to have entered an offline state from an online state.

[0059] If the terminal is online, the incremental information of the target document can be synchronized to the server at the first time. If the terminal is offline, the terminal can only upload the local version of the target document or the incremental information edited in the offline state to the server after it enters the online state again.

[0060] In an embodiment of the present disclosure, if the editing state of the terminal is switched from an online state to an offline state, the first version of the target document is saved locally according to the editing operation of the terminal.

[0061] Once it is detected that the terminal is switched from an offline state to an online state, the first version stored locally in the terminal is sent to the server.

[0062] The server can merge the first version of the target document uploaded by the terminal with the second version saved by the server. After the first version and the second version are merged, a third version is obtained.

[0063] The second version saved by the server may be a version edited online by other terminals, or the current version after the server merges the versions edited offline by other terminals and the versions edited online by some terminals. Exemplarily, the second version may be the latest version saved by the server.

[0064] The first version, the second version and the third version of the target document have the same file identifier, but different version numbers. Thus, by combining the file identifier and the version number, different files can be distinguished and different versions of the same file can be distinguished.

[0065] In the disclosed embodiment, after the editing state of the terminal changes from the online state to the offline state, it is no longer directly prompted that the target document is currently offline and cannot be edited. Instead, the user is allowed to continue editing the target document locally without noticing, and the first version of the target document is stored locally. In this way, when the terminal is offline for a short period of time, the user cannot perceive the offline state of the terminal when editing the target document online, thereby improving the continuity and user experience of the terminal's online editing of the target document.

[0066] Here, the terminal locally edits the target document, which may include: the terminal edits the locally stored target document based on the input operation of the user interface (UI) to obtain the editing result, and stores the editing result on the disk of the terminal, so as to facilitate the subsequent retrieval of the target document edited locally in the terminal.

[0067] Furthermore, in the disclosed embodiment, if the terminal is restored to an online state again, the first version of the target document saved locally can be uploaded to the server, and in order to resolve content conflicts generated by editing during the offline period of the terminal, a conflict prompt will be provided through the first prompt information.

[0068] If there is a content conflict between the first version and the second version, the conflict is resolved through the first prompt information.

[0069] In some embodiments, the terminal first receives the first prompt information from the server, and then receives the third version of the target document merged under the request determined to have a conflict.

[0070] In some other embodiments, the terminal receives the first prompt information and the third version of the target document from the server at the same time.

[0071] In some other embodiments, the terminal first receives the third version of the target document from the server, and then receives the first prompt information.

[0072] Figure 2A and Figure 2B There are two different first prompt messages.

[0073] Figure 2A A dialog box is used to prompt that there is a content conflict between the first version and the second version.

[0074] Figure 2B The dialog box prompts that the first version and the second version have content conflicts and is used for conflict resolution. For example, the first prompt message prompts whether to select version 1 based on the user's offline version as the conflict resolution version, or to select version 2 based on other users' online editing as the conflict resolution version.

[0075] Exemplarily, the first prompt information may be displayed in a dialog box. Also exemplary, the first prompt information may be directly displayed in the target document of the third version.

[0076] The third prompt information may include a conflict mark and / or a conflict prompt text. The conflict mark may be any symbolic thing that prompts the conflict through patterns and / or colors and / or fonts. The conflict prompt text may provide content conflicts in text form. Figure 4 Conflict markers with hand shapes are displayed in the middle, and conflict prompt texts are displayed between the conflict markers.

[0077] The specific content of the conflict prompt text may include but is not limited to at least one of the following:

[0078] The word conflict indicates that the content conflicts;

[0079] The account and / or account nickname that edited the conflicting content offline;

[0080] Editing time information of offline editing conflict content.

[0081] In some embodiments, the conflict prompt text may also include information such as the account level for offline editing of the conflicting content, so as to facilitate the user to resolve content conflicts according to the conflict prompt text.

[0082] The first prompt information may be used to directly or indirectly prompt that there is a content conflict between the first version and the second version.

[0083] In some embodiments, the terminal may receive the first prompt information sent by the server alone, or receive the third version sent by the server alone; or Figure 1 As shown, the terminal can receive the first prompt information and the third version.

[0084] For example, the first prompt information can be used to prompt that the first version submitted by the terminal to the server has content conflicts with the second version. For another example, the first prompt information can be used to prompt that there are conflicting contents in the merged third version, or there are multiple third versions with conflicting contents.

[0085] In this way, not only can the terminal perform offline editing on the document that was previously edited online, but after the offline editing returns to online editing, the server will also merge multiple versions and resolve conflicts through the first prompt information, so that the editing during the terminal offline period can be executed.

[0086] like Figure 3 As shown, the embodiment of the present disclosure provides a document editing method, which is executed by a terminal, and the method includes:

[0087] S1210: Determine the editing state of the terminal;

[0088] S1220: In response to the editing state switching from the online state to the offline state, locally editing the target document according to the editing operation to obtain a first version of the target document;

[0089] S1230: Determine the editing status of the terminal in an offline state;

[0090] S1240: In response to the editing situation meeting the offline editing stop condition, displaying a second prompt message;

[0091] S1250: In response to the editing state switching from the offline state to the online state, the first version saved by the terminal is sent to the server; wherein the first document is used to merge with the target document of the second version saved by the server to obtain a third version;

[0092] S1260: Receive the third version and the first prompt information sent by the server, wherein the first prompt information is used to prompt that there is a content conflict between the first version and the second version.

[0093] After the terminal enters the offline state, the target document is allowed to continue editing. In order to reduce excessive content editing during the offline period, resulting in excessive conflicts with the second version content edited online by other users, it is determined that after the terminal enters the offline state, the editing status of the terminal will be monitored, and if the editing status meets the editing stop condition, a second prompt message will be displayed. The second prompt message can be used to prompt the user to stop offline editing. Or, the second prompt message is used to indicate that the amount of data edited during the offline period has exceeded the limit, or the second prompt message is used to indicate that the duration of offline editing has exceeded the limit.

[0094] By displaying the second prompt information, the phenomenon of excessive merge conflicts caused by the amount of data edited during the offline period corresponding to the offline state is reduced.

[0095] In some embodiments, the editing situation meets the offline editing stop condition, including at least one of the following:

[0096] The duration of the terminal being offline reaches the duration threshold;

[0097] The amount of data edited by the terminal in offline state reaches the data amount threshold;

[0098] The terminal edits the designated part of the target document in an offline state.

[0099] In one embodiment, if the duration of the terminal being offline continuously reaches a duration threshold, the terminal may enter a state where offline editing is prohibited.

[0100] In the disclosed embodiment, if the terminal is offline for a long time, and considering that other online accounts have been edited multiple times and / or the terminal has a large amount of incremental content of the first version stored locally, which may cause many conflicts between the first and second versions of the target document, it can be considered that offline editing is no longer allowed.

[0101] If the terminal is not offline for a long time, but a large amount of new information is written to the target document or a large amount of updates are made to the first version of the target document based on the user's editing operations, it may also cause a large conflict between the first version and the second version. Therefore, in this case, the data volume threshold can be used to determine whether to display the second prompt message to prevent the user from continuing offline editing.

[0102] In the embodiments of the present disclosure, the duration threshold and / or the data volume threshold may be a pre-specified value, or an empirical value automatically learned by the server during the processing of a large number of documents, or a test value based on a test.

[0103] In another embodiment, if the duration of the terminal being offline continuously reaches a duration threshold, the target document may be stored as a file copy with the same content as the target document but a different file identifier, and the document may continue to be edited offline. Since the file identifiers are different, the target document and the file copy belong to different documents, which can meet the editing needs of the user and avoid excessive conflicts between the content edited by the user and the online version of the target document, which may lead to confusion in document synchronization.

[0104] After the subsequent terminal enters the online state, the file copy is uploaded to the server. In some embodiments, the designated portion may be the finalized portion of the target document, or a portion that has been edited a preset number of times, or a portion that has been edited by a designated account.

[0105] For example, the target document may include multiple parts, and different parts may be finalized at different times. If the designated part is the finalized part, and the terminal edits it in an offline state, it may cause unnecessary conflicts, and such offline editing may be prevented. If some parts have been edited many times, it means that they are close to the finalized part, and editing in an offline state may cause unnecessary conflicts, and such offline editing may be prevented by displaying a second prompt message. The designated account may be a high-level account, and a high-level account may have the final decision-making power over the corresponding part of the target document. If some parts have been edited by the designated account, and continuing to edit them in an offline state will cause unnecessary conflicts, it can also be considered that the offline editing stop condition is met.

[0106] Of course, if the offline editing condition is caused because the terminal edits the designated part in the offline state, the terminal can be allowed to edit the non-designated part offline in combination with the duration and / or data volume of the terminal being in the offline state.

[0107] The above are just examples of conditions that cause offline editing to stop in an offline state. In some embodiments, the editing situation meets the offline editing stop conditions, and may also include:

[0108] When it is determined that the first block is to be generated according to the editing operation of the terminal, it is determined that the editing situation meets the offline editing stop condition. Exemplarily, the target document includes one or more second blocks, and the second block can be an area determined by the server.

[0109] That is, in an offline state, if the terminal needs to generate a first block different from a second block, it can be considered that the current editing situation meets the offline editing stop condition.

[0110] It is worth noting that: for any target document, the offline editing stop condition can be met when the terminal needs to generate a new first block in an offline state; or, for a specific target document, the offline editing stop condition can be met when the terminal needs to generate a new first block in an offline state. The specific target document may include: a target document whose document structure has been pre-divided or limited by the server.

[0111] In some embodiments, the offline state includes:

[0112] First offline state;

[0113] The second offline state, wherein the state parameters of the second offline state are different from the state parameters of the first offline editing state.

[0114] The first offline state and the second offline state are both offline states of the terminal, but are offline states of different durations.

[0115] Specifically, exemplarily, if it is determined according to the time threshold that the duration of the terminal being in the offline state reaches the decision threshold, then the terminal can be considered to be in the second offline state; otherwise, the terminal can be considered to be in the first offline state.

[0116] In some embodiments, the status parameter includes at least one of the following:

[0117] Maximum offline time;

[0118] Maximum amount of data for offline editing;

[0119] The size of the block used for conflict detection when merging different versions of the target document;

[0120] The number of blocks to be checked for conflicts when merging different versions of the target document.

[0121] That is, the maximum offline durations supported by the first offline state and the second offline state are different.

[0122] In some embodiments, the terminal can be seamlessly switched from the first offline state to the second offline state according to the length of time the terminal is in the offline state.

[0123] In other embodiments, the reminder information may be displayed when it is determined that the terminal needs to switch from the first offline state to the second offline state according to the length of time the terminal has been in the offline state.

[0124] Exemplarily, the reminder information is used to prompt the user to switch from the first offline state to the second offline state. This reminder information is equivalent to informing the user that the terminal has been offline for a period of time and has entered a longer offline state, and the remaining available offline time is limited. In this way, the user determines whether to find the network in time to switch to the online state according to his own needs.

[0125] The reminder information is used to inquire whether to switch from the first offline state to the second offline state. In this case, if a user operation acting on the reminder information is detected, it is determined whether to switch from the first offline state to the second offline state based on the user operation. For example, if the user operation indicates to determine to switch from the first offline state to the second offline state, the terminal switches from the first offline state to the second offline state. If the user operation indicates not to switch from the first offline state to the second offline state, after the maximum offline time of the first offline state is reached, the second prompt information is output to prompt the user to stop offline editing, or prompt the user to save the target document as a file copy, etc. If no user operation acting on the reminder information is detected within the specified time, the terminal switches from the first offline state to the second offline state by default.

[0126] In some embodiments, the state parameter distinguishing the first offline state from the second offline state is the amount of data edited offline.

[0127] In some embodiments, the terminal can be seamlessly switched from the first offline state to the second offline state according to the amount of edited data when the terminal is in the offline state.

[0128] In other embodiments, it may be possible to display reminder information when it is determined that a switch from a first offline state to a second offline state is required based on the amount of data edited when the terminal is in an offline state.

[0129] Exemplarily, the reminder information is used to prompt the user to switch from the first offline state to the second offline state. This reminder information is equivalent to informing the user that the terminal has currently edited a lot of data offline, and the user can edit more data offline in the second offline state, but the amount of data that can be edited may not be much. If necessary, the user needs to find a place with a network connection in time to switch the terminal from the offline state to the online state.

[0130] The reminder information is used to inquire whether to switch from the first offline state to the second offline state. In this case, if a user operation acting on the reminder information is detected, it is determined whether to switch from the first offline state to the second offline state based on the user operation. For example, if the user operation indicates to determine to switch from the first offline state to the second offline state, the terminal switches from the first offline state to the second offline state. If the user operation indicates not to switch from the first offline state to the second offline state, after the maximum amount of data edited in the first offline state is reached, the second prompt information is output to prompt the user to stop offline editing, or prompt the user to save the target document as a file copy, etc. If no user operation acting on the reminder information is detected within the specified time period, the terminal is defaulted to switch from the first offline state to the second offline state.

[0131] In some embodiments, a block may be the smallest detection unit when the first version and the second version are merged. The block may be one or more sentences, one or more paragraphs, or any text and / or picture content distributed continuously in the target document.

[0132] Exemplarily, each block in any version of the target document has its own unique block identifier, and different versions of the target document determine whether they belong to the same block through the area identifier. The subsequent update, deletion, and relocation of the paragraph will not change its block identifier. In this way, conflict detection of different versions of the target document is performed based on the block identifier. For example, the content of block 1 of version 1 of the target document is content 1, and the content of block 1 of version 2 of the target document is content 2. When the contents of content 1 and content 2 are different, it is determined that the two versions of the target document have a conflict in area 1.

[0133] In one embodiment, each paragraph of the target document is regarded as a block. A unique paragraph identifier is assigned each time a paragraph is created in the target document. The paragraph identifier here can be a type of the aforementioned block identifier. In this way, conflict detection at the paragraph granularity can be performed based on the paragraph.

[0134] In one embodiment, text, tables, pictures, videos and / or audios with content relevance can be divided into a block. For example, if picture A is inserted into the target document, and one or more sentences, one or more paragraphs before picture A are all related descriptions and / or introductions of picture A, then picture A and these sentences or these paragraphs can be divided into one block. Alternatively, one or more sentences, one or more paragraphs after picture A are all related descriptions and / or introductions of picture A, then picture A and these sentences or these paragraphs can be attributed to the same block. In this embodiment, it is equivalent to dividing the blocks according to the relevance of the content. Dividing the content in the target document into blocks by relevance can ensure that the contextual relationship is fully considered when resolving block content conflicts, which can increase the accuracy of conflict resolution and better reflect user intentions.

[0135] In some embodiments, the AI ​​model may be used to partition and / or update the target document, and such partitioning will be applicable to any version of the target document.

[0136] In some other embodiments, each paragraph in the target document may be divided into blocks by the initial editor. For example, the target document includes paragraph A, paragraph B, paragraph C, and paragraph D. The initial editors of paragraph A and paragraph B are user 1, and the initial editors of paragraph C and paragraph D are user 2. When dividing into blocks, paragraph A and paragraph B initially edited by user 1 may be divided into one block, and paragraph C and paragraph D edited by user 2 may be divided into one block.

[0137] In summary, in the embodiments of the present disclosure, the blocks may be divided according to the distribution structure of the content in the target document, the content relevance between different parts, and / or the information of the editors of different parts.

[0138] Through the reasonable division of blocks, when there are multiple versions of the target document, content conflict detection can be performed based on the blocks. When a conflict is detected, the corresponding merged version will be sent to the relevant user account for conflict resolution. Other co-editing accounts that are not closely related may not receive the first prompt information, thereby reducing information interference to these users. In addition, of course, the first prompt information may be sent to any user account that co-edits the target document, thereby realizing information sharing between co-editing user accounts.

[0139] In the embodiment of the present disclosure, the number of blocks used as the minimum unit for conflict detection may be different in different offline states. For example, the first offline state may use one block as a conflict detection unit, while the second offline state may use two or more blocks as a conflict detection unit.

[0140] Exemplarily, the offline time length corresponding to the second offline state is greater than the offline time length corresponding to the first offline state, and / or,

[0141] The maximum amount of data to be edited offline in the second offline state is greater than the maximum amount of data to be edited offline in the first offline state, and / or,

[0142] The second offline state and the first offline state have different ways of resolving the content conflict between the first version and the second version.

[0143] The offline duration here may be the duration of the terminal being disconnected from the network, and the offline duration allowed by the second offline state is greater than the offline duration corresponding to the first offline state.

[0144] The amount of data allowed for offline editing varies when the terminal is in different offline states.

[0145] The data volume of the first version edited by the terminal in the second offline state is different from that in the first offline state. In the embodiment of the present disclosure, different content conflict resolution methods are used to resolve the conflict between the first version and the second version.

[0146] For example, for the first version in the second offline state, it is not directly automatically merged with the second version edited online by other terminals and conflict resolution is performed during the automatic merging. In this case, the first version can be used as another copy of the second version, and the conflict between the first version and the second version can be resolved through one or more interactions with the user.

[0147] In one embodiment, the file identification that can be different from the current target file can be configured for the replica, which facilitates subsequent conflict handling. In another embodiment, a replica tag can be configured for the replica, which is different from the file identification and version number. Both the newly added file identification and the replica tag can be used to distinguish different files.

[0148] In some embodiments, the third version of the target document includes a plurality of blocks having content conflicts; or, different third versions of the target document have content conflicts.

[0149] In some embodiments, content blocks with content conflicts are written to the same target document, and then there is only one third version. In this case, the target document may include two or more blocks with content conflicts. For example, in the third version of the target document, online edited blocks and offline edited blocks with content conflicts may be sorted in a preset order, for example, the offline edited blocks may be arranged behind the online edited blocks with content conflicts.

[0150] In other embodiments, different blocks with different content will be written into different third versions of the target document. In this case, there are multiple third versions.

[0151] In some embodiments, when the terminal is in an offline state to edit the target document, it is determined whether a first block is generated according to the editing result, and the first block is different from a second block included in the target document when the terminal is in an online state;

[0152] According to the identifier generation rule, a block identifier of the first block is generated; wherein the block identifier of the first block is different from the block identifier of the second block. Such difference in block identifiers may be caused by the difference in identifier generation rules. For example, the identifier generation rule used by the block identifier of the first block is different from the identifier generation rule used by the block identifier of the second block.

[0153] In some embodiments, the block identifiers of the first block and the second block may share the same identifier generation rule, but different block identifiers are generated.

[0154] In this way, after the terminal switches to the online state, after synchronizing the first block generated in the offline state to the server, the server can know whether there is a new area generated in the currently synchronized first version according to the block identifier.

[0155] Exemplarily, the block identifier of the second block is an identifier determined with the participation of the server.

[0156] The differences between the block identifier of the first block and the block identifier of the second block may include:

[0157] The end identifiers of the block identifiers are different. The block identifier of the first block is generated by the terminal alone, and the end identifier in the block identifier points to the terminal alone; the block identifier of the second block is generated by the server end, and the end identifier in the block identifier points to the server end;

[0158] or,

[0159] The block identifiers have different versions. The block identifier of the first block uses the identifier generation rule of the first version, and the block identifier of the second block uses the identifier generation rule of the second version. Thus, the first block and the second block have different versions. The different versions can also be reflected in the different identifier lengths and / or identifier encoding rules.

[0160] like Figure 4 As shown, the embodiment of the present disclosure provides a document editing method, which is executed by a terminal, and the method includes:

[0161] S1310: Determine the editing state of the terminal;

[0162] S1320: In response to the editing state switching from the online state to the offline state, locally editing the target document according to the editing operation to obtain a first version of the target document;

[0163] S1330: In response to the editing state switching from the offline state to the online state, the first version saved by the terminal is sent to the server; wherein the first document is used to merge with the target document of the second version saved by the server to obtain a third version;

[0164] S1340: Receive the third version and the first prompt information sent by the server, wherein the first prompt information is used to prompt that there is a content conflict between the first version and the second version.

[0165] S1350: Detecting a feedback operation on the first prompt information;

[0166] S1360: according to the feedback operation, remove the part of the content that causes the content conflict according to the third version. Here, removing the part of the content that causes the content conflict according to the third version means removing the part of the content that causes the content conflict based on the third version, which is specifically embodied in removing the content in the third version, or deleting one or more of the conflicting third versions.

[0167] In the embodiment of the present disclosure, when the first prompt information is displayed, a user operation acting on the first prompt information is also detected, and the user operation can be referred to as a feedback operation. The feedback operation may include: confirmation feedback and / or denial feedback. Confirmation feedback can be used to indicate the resolution of content conflicts. How to resolve the conflict specifically can be automatically resolved by the terminal device and / or the server according to the conflict resolution mechanism, or the conflict can be resolved based on the operation instruction of the confirmation feedback.

[0168] For example, the first prompt information may include: confirmation and cancellation controls. According to the feedback operation on the confirmation control, it may be decided to overwrite the content of the second version that conflicts with the content of the first version. According to the feedback operation on the cancellation control, it may be decided to abandon the content of the first version and maintain the content of the second version. In this way, the preset conflict can be easily resolved.

[0169] In some other embodiments, the first prompt information also includes a conflicting block link or address, and when a click operation acting on the first prompt information is detected, the conflicting block corresponding to the third version will be displayed. An editing operation acting on the conflicting block is further detected, and the content conflict is resolved according to the new editing operation. For example, the editing operation may include a deletion operation of deleting a block with content conflict and / or an editing operation of updating a block. Such editing operations are all a type of feedback operation.

[0170] In summary, in the embodiments of the present disclosure, the aforementioned content conflict can be resolved according to user needs and / or expectations based on any one or more feedback operations on the first prompt information.

[0171] Exemplarily, according to the feedback operation, removing part of the content that causes the content conflict based on the third version includes:

[0172] In response to a target document having multiple third versions with conflicting contents, a first indication is sent to a server according to a feedback operation, wherein the first indication is used to retain one third version of the target document and remove other third versions of the target document, or to generate a fourth version of the target document based on the multiple third versions.

[0173] Since the terminal is currently online, while the terminal locally edits the third version of the target document, it sends a first instruction to the server, thereby resolving the content conflict of the third version of the target document between the terminal and the server.

[0174] In some embodiments, the first indication may indicate a deleted third version, or indicate a retained third version, or a fourth version obtained by combining the contents of multiple third versions. The fourth version does not have any content conflict at the current moment.

[0175] In some embodiments, according to the feedback operation, removing part of the content that causes the content conflict based on the third version includes:

[0176] In response to the third version of the target document containing multiple blocks with content conflicts, a second indication is sent to the server according to a feedback operation, wherein the second indication is used to retain one block and delete the remaining blocks; or, the second indication is used to determine the fourth version of the target document generated by the third version.

[0177] In some embodiments, the feedback operation may include a selection operation and / or an editing operation. For example, the selection operation may include a selection operation to determine the blocks retained in the fourth version. At this time, the second indication may indicate the retained blocks and / or the deleted blocks.

[0178] In some other embodiments, the feedback operation may include any editing operation. The editing operation may include: a write operation, a delete operation and / or an overwrite operation. In this way, content conflicts between multiple blocks can be resolved through the editing operation, thereby obtaining a fourth version without content conflicts.

[0179] In some embodiments, there is a content conflict between the first version and the second version, and a conflict marker is included in the target document of the third version.

[0180] A conflict marker is set in the target content to facilitate users to determine whether the corresponding content has a conflict through the conflict marker.

[0181] For example, if there is only one third version of the target document, the third version of the target content will be displayed with different display parameters for the conflicting blocks and the non-conflicting blocks. This form of display distinction is a type of the aforementioned conflict mark. In other embodiments, specific conflict marks can be displayed in the corresponding blocks. For example, the conflict mark is displayed with a revision mark, and a specific mark is added at the end of the block with content conflict. Of course, there are many ways to add conflict marks.

[0182] The aforementioned feedback operation for resolving content conflicts may also include any operation acting on the conflict mark. For example, selecting the conflict mark of a block pops up a selection menu for feedback operations, and further operations on the selection menu can be used as feedback operations for resolving content conflicts.

[0183] In some embodiments, the conflict mark may be a component of the aforementioned first prompt information.

[0184] In some embodiments, the editing state further includes: an online state; wherein the data synchronization method of the terminal in the online state and the offline state is different; and / or the data conflict resolution method is different when the terminal is in the online state and the offline editing state. Exemplarily, if the terminal is currently in the online editing mode, the document editing can be synchronized in real time. There is no need to wait until the terminal is online again to synchronize the content edited during the offline period to the server.

[0185] As another example, collaborative editing of multiple accounts may also result in conflicts, and an operational transformation (OT) algorithm is used to resolve conflicts in online editing.

[0186] The following is an example of using the OT algorithm to resolve conflicts in online editing:

[0187] Terminal A adds A at the end, which becomes 12A locally, and sends an insert (insert(2,A)). This insert operation is counted as OA.

[0188] Terminal B adds B at the end, which becomes 12B locally, and sends insert(2,B). This operation is counted as OB.

[0189] Terminal A receives OB and performs transform(OA,OB) to obtain the modified operation insert(3,B), denoted as OB'. Compared with OB, it modifies the insertion position from 2 to 3, so "12A" becomes 12AB.

[0190] Terminal B receives OA and executes transform(OA,OB) in the same way, obtaining the correction operation insert(2,A), denoted as O1', which changes the content from "12A" to 12AB. The transform method generates OA' and OB' at the same time.

[0191] Finally, terminal A and terminal B both display 12AB, that is, the final displayed content is the same.

[0192] For offline editing, conflict resolution is achieved by merging different versions on the server and displaying the first prompt information and / or conflict markers. Obviously, the methods for resolving conflicts are different.

[0193] In this way, the terminal can select a corresponding synchronization mode and / or conflict resolution mode according to its own editing state to achieve collaborative editing and / or conflict resolution of the target document.

[0194] In some embodiments, online status includes:

[0195] First online status;

[0196] Second online status;

[0197] The network condition corresponding to the first online state is stronger than the network condition corresponding to the second online state.

[0198] For example, the first online state may be referred to as a real-time online state or a strong network online state, and the second online state may be referred to as a non-real-time online state or a weak network online state.

[0199] The network status here may be the status of any feedback terminal accessing the network, and may include but is not limited to at least one of the following:

[0200] Network bandwidth;

[0201] Network instantaneous rate;

[0202] Average network rate per unit time;

[0203] The packet loss rate of the network.

[0204] Exemplarily, the network condition corresponding to the first online state is better than the network condition corresponding to the second online state, which may include: the network bandwidth corresponding to the first online state is greater than the network bandwidth corresponding to the second online state, and / or the average network rate corresponding to the first online state is higher than the average network rate corresponding to the second online state.

[0205] Exemplarily, the online persistence corresponding to the first online state is stronger than the online persistence corresponding to the second online state.

[0206] The online persistence here can be reflected by at least one of the following parameters:

[0207] The length of time that the network is disconnected per unit time. The longer the length of time that the network is disconnected, the worse the online continuity.

[0208] The number of network disconnections per unit time. The more network disconnections there are, the worse the online continuity is.

[0209] The online duration between two consecutive network outages. The longer the online duration, the stronger the online continuity.

[0210] The duration of a single network outage. The longer the network outage lasts, the worse the online continuity.

[0211] Online persistence reflects the continuous state of the terminal remaining online.

[0212] Exemplarily, the number of times the terminal leaves the network per unit time in the first online condition is lower than the number of times the terminal leaves the network per unit time in the second online condition; or, the total duration of the terminal leaving the network per unit time in the first online condition is lower than the total duration of the terminal leaving the network per unit time in the second online condition.

[0213] In some embodiments, the method further comprises:

[0214] In response to the current editing state of the target document being switched from an offline state to an online state, state information of the offline state is sent to the server.

[0215] The status information may indicate whether the edited content sent to the server end is edited in an offline state or an online state.

[0216] In this way, when the terminal synchronizes the first version to the server, it is convenient for the server to select the corresponding kernel mechanism or kernel to synchronize the edited content.

[0217] Of course, in some cases, the status information may not be sent to the server. The server can determine whether the edited content synchronized by the terminal is edited in an offline state or an online state according to the network status between itself and the terminal.

[0218] like Figure 5 As shown, the embodiment of the present disclosure provides a document editing method, which is executed by a server, and the method includes:

[0219] S2110: receiving a first version of a target document sent by a terminal, wherein the first version of the target document is edited when the terminal is in an offline state;

[0220] S2120: Merge the first version and the second version of the target document saved by the server to obtain a third version of the target document;

[0221] S2130: Sending the third version of the target document and first prompt information to the terminal, wherein the first prompt information is used to prompt that there is a content conflict between the first version and the second version.

[0222] The server may include one or more servers. The server may be an application server of the target document editing application. The server may also provide various other services besides document editing, such as email service and / or instant messaging service.

[0223] After receiving the first version of the target document, the server will merge the first version of the target document with the second version stored by the server. The second version of the target document may be the last version currently stored by the server.

[0224] In some embodiments, during the merging process of the first version and the second version of the target document, different blocks with the same block marker may be determined as content conflicts and then marked with conflict markers.

[0225] In some embodiments, during the merging process of the first version and the second version of the target document, the text contents with the same block identifier may be matched, the same parts may be automatically merged, and the different parts may be distinguished by conflict markers.

[0226] In other embodiments, during the merging process of the first version and the second version, an AI model can be used to automatically merge content with the same semantics but different descriptions, and to mark content with different semantics as conflicts.

[0227] After the third version is obtained by merging, the third version will be returned to the terminal. If the target document of the first version and the second version has a content conflict, the first prompt information will be returned to the terminal at the same time as the third version is returned to the terminal. If the target document of the first version and the second version has no content conflict, the third version will be directly returned to the terminal without returning the first prompt information to the terminal.

[0228] That is, the document processing method provided by the present disclosure allows the terminal to edit in an offline state, and the first version edited offline can be synchronized to the server for synchronization when it is converted to an online state. In this way, offline users can also participate in the editing of the target document, and this editing is effective editing, thereby improving the user experience of document editing.

[0229] In some embodiments, the method further comprises:

[0230] Receives and stores a file copy of the target file from the terminal.

[0231] The file copy has a copy mark or has a different file ID than the destination file.

[0232] In some implementations, the method further comprises:

[0233] Detect user actions on file copies;

[0234] According to the user operation, the conflict between the file copy and the version of the target file currently stored on the server is resolved.

[0235] Typically, the file copy has a large amount of terminal offline editing content, so the conflict resolution is performed based on manual instructions corresponding to the user operation, rather than the automatic or semi-automatic conflict resolution between the first version and the second version as in the aforementioned embodiment.

[0236] In some embodiments, the method further comprises:

[0237] receiving status information sent by the terminal, wherein the status information indicates an offline state;

[0238] Determining, based on the state information, a conflict detection rule between the first version and the second version of the target document;

[0239] According to the conflict detection rule, it is determined that there is a content conflict between the first version and the second version.

[0240] The status information may be sent by the terminal to indicate whether the currently received edited content is content edited in an offline state or an online state.

[0241] Thus, based on the state information, conflict detection rules for content conflicts can be generated. For example, the OT algorithm can be used for online state, while conflict detection based on merging of different versions can be used for edited content in offline state.

[0242] In some embodiments, determining, according to a conflict detection rule, that there is a content conflict between the first version and the second version includes:

[0243] Determine, according to the conflict detection rule, whether the block edited by the first version during the terminal offline period is the same as the block edited by the second version during the terminal offline period;

[0244] When the blocks edited in the first version during the terminal offline period are the same as the blocks edited in the second version during the terminal offline period, it is determined that there is a content conflict between the first version and the second version.

[0245] For example, whether the block edited during the offline period is the same as the block edited online by other accounts is determined based on the block identifier. If the block edited during the offline period is the same as the area edited online, it can be determined that there is a content conflict between the first version and the second version.

[0246] For example, in the paragraph block, user 1 edits paragraph N offline while in an offline state, and other users also edit paragraph N online. Therefore, user 1 edits the paragraph offline while other users edit the paragraph online at the same time, which results in content conflict.

[0247] In some embodiments, the method further comprises:

[0248] In the case that the blocks edited in the first version during the terminal offline period are different from the blocks edited in the second version during the terminal offline period, it is determined that the first version and the second version have no content conflict.

[0249] In the disclosed embodiment, if the offline editing user and the online editing user edit different blocks, it can be considered that such editing does not have content conflict. For example, user 1 edits block 1 offline, and user 2 edits block 2 online; when user 1's terminal is online again, the first version submitted by the terminal and the second version saved by the server are edits of different blocks, so it is considered that such editing does not have content conflict. The first version and the second version will be directly merged into the third version.

[0250] In some embodiments, when a block edited in the first version during the terminal offline period is the same as a block edited in the second version during the terminal offline period, determining that there is a content conflict between the first version and the second version includes:

[0251] When the blocks edited in the first version during the terminal offline period are the same as the blocks edited in the second version during the terminal offline period, it is determined whether there is a content conflict between the first version and the second version according to the contents of the first version and the second version.

[0252] In some embodiments, determining whether there is a content conflict between the first version and the second version according to the content of the first version and the second version includes:

[0253] Input the blocks edited by the first version during the terminal offline period and the blocks edited by the second version during the terminal offline period to obtain the conflict indication value of the preset model;

[0254] According to the conflict indication value, it is determined whether there is a content conflict between the first version and the second version.

[0255] In the embodiments of the present disclosure, the preset model may be a machine learning model and / or a deep learning model.

[0256] The different contents of the first version and the second version can be input into the AI ​​model. At this time, the AI ​​model obtains a conflict indication value after a series of calculations. The conflict indication value can be obtained by comparing the conflict probability with the probability threshold. The conflict indication value can indicate a conflict or no conflict.

[0257] During the conflict detection process, the AI ​​model can selectively merge content with the same meaning, thereby reducing unnecessary content conflicts.

[0258] In some embodiments, the state information indicates a first offline state or a second offline state; wherein a state parameter of the second offline state is different from a state parameter of the first offline editing state.

[0259] In some embodiments, the status parameter includes at least one of the following:

[0260] Maximum offline time;

[0261] Maximum amount of data for offline editing;

[0262] The size of the block used for conflict detection when merging different versions of the target document;

[0263] The number of blocks to be checked for conflicts when merging different versions of the target document.

[0264] That is, the maximum offline durations supported by the first offline state and the second offline state are different.

[0265] In some embodiments, the terminal can be seamlessly switched from the first offline state to the second offline state according to the length of time the terminal is in the offline state.

[0266] In other embodiments, the reminder information may be displayed when it is determined that the terminal needs to switch from the first offline state to the second offline state according to the length of time the terminal has been in the offline state.

[0267] In some embodiments, the server may determine whether the terminal is currently in an offline state or the specific offline state of the terminal according to data interaction with the terminal.

[0268] In some embodiments, the interaction of the heartbeat data packets between the server and the terminal, when it is determined that the heartbeat data packet sent by the terminal or the response data packet of the heartbeat data packet has not been received for a period of time corresponding to the first offline state, it can be considered that the terminal has entered the offline state. After entering the offline state, it can also be specifically determined whether it is the first offline state or the second offline state according to the further offline time.

[0269] In other embodiments, the server may process the current network status information and / or historical status information of the terminal through an AI model to determine whether the terminal is currently offline.

[0270] Of course, the above is only the judgment of the server side whether the terminal is in an offline state or an online state.

[0271] In some cases, the terminal may also send status information to the server when synchronizing the edited content, so that the server does not need to determine whether the terminal is in an offline state or an online state.

[0272] In some embodiments, the state parameter distinguishing the first offline state from the second offline state is the amount of data edited offline.

[0273] Exemplarily, the offline time length corresponding to the second offline state is greater than the offline time length corresponding to the first offline state, and / or,

[0274] The maximum amount of data to be edited offline in the second offline state is greater than the maximum amount of data to be edited offline in the first offline state, and / or,

[0275] The second offline state and the first offline state have different ways of resolving the content conflict between the first version and the second version.

[0276] In some embodiments, a block may be the smallest detection unit when the first version and the second version are merged. The block may be one or more sentences, one or more paragraphs, or any text and / or picture content distributed continuously in the target document.

[0277] Exemplarily, each block in any version of the target document has its own unique block identifier, and different versions of the target document determine whether they belong to the same block through the area identifier. The subsequent update, deletion, and relocation of the paragraph will not change its block identifier. In this way, conflict detection of different versions of the target document is performed based on the block identifier. For example, the content of block 1 of version 1 of the target document is content 1, and the content of block 1 of version 2 of the target document is content 2. When the contents of content 1 and content 2 are different, it is determined that the two versions of the target document have a conflict in area 1.

[0278] In one embodiment, each paragraph of the target document is regarded as a block. A unique paragraph identifier is assigned each time a paragraph is created in the target document. The paragraph identifier here can be a type of the aforementioned block identifier. In this way, conflict detection at the paragraph granularity can be performed based on the paragraph.

[0279] In one embodiment, text, tables, pictures, videos and / or audios with content relevance can be divided into a block. For example, if picture A is inserted into the target document, and one or more sentences, or one or more paragraphs before picture A are all related descriptions and / or introductions of picture A, then picture A and these sentences or these paragraphs can be divided into one block. Alternatively, one or more sentences, or one or more paragraphs after picture A are all related descriptions and / or introductions of picture A, then picture A and these sentences or these paragraphs can be assigned to the same block. In this embodiment, it is equivalent to dividing the blocks according to the relevance of the content.

[0280] In some embodiments, the AI ​​model may be used to partition and / or update the target document, and such partitioning will be applicable to any version of the target document.

[0281] In some other embodiments, each paragraph in the target document may be divided into blocks by the initial editor. For example, the target document includes paragraph A, paragraph B, paragraph C, and paragraph D. The initial editors of paragraph A and paragraph B are user 1, and the initial editors of paragraph C and paragraph D are user 2. When dividing into blocks, paragraph A and paragraph B initially edited by user 1 may be divided into one block, and paragraph C and paragraph D edited by user 2 may be divided into one block.

[0282] In summary, in the embodiments of the present disclosure, the blocks may be divided according to the distribution structure of the content in the target document, the content relevance between different parts, and / or the information of the editors of different parts.

[0283] Through the reasonable division of blocks, when there are multiple versions of the target document, content conflict detection can be performed based on the blocks. When a conflict is detected, the corresponding merged version will be sent to the relevant user account for conflict resolution. Other co-editing accounts that are not closely related may not receive the first prompt information, thereby reducing information interference to these users. In addition, of course, the first prompt information may be sent to any user account that co-edits the target document, thereby realizing information sharing between co-editing user accounts.

[0284] In the embodiment of the present disclosure, the number of blocks used as the minimum unit for conflict detection may be different in different offline states. For example, the first offline state may use one block as a conflict detection unit, while the second offline state may use two or more blocks as a conflict detection unit.

[0285] In some embodiments, the conflict detection unit may be determined in advance through negotiation between the server and the client, or may be determined dynamically by the server after receiving the first version of the offline editing.

[0286] In some embodiments, the third version of the target document includes a plurality of blocks having content conflicts;

[0287] or,

[0288] The target documents of the different third versions have content conflicts.

[0289] In some embodiments, content blocks with content conflicts are written to the same target document, and then there is only one third version. In this case, the target document may include two or more blocks with content conflicts. For example, in the third version of the target document, online edited blocks and offline edited blocks with content conflicts may be sorted in a preset order, for example, the offline edited blocks may be arranged behind the online edited blocks with content conflicts.

[0290] In other embodiments, different blocks with different content will be written into different third versions of the target document. In this case, there are multiple third versions.

[0291] In some embodiments, the method further comprises:

[0292] receiving a first instruction, wherein the first instruction is used to retain a third version of a target document and remove other third versions of the target document, or the first instruction is used to determine a fourth version of the target document generated based on multiple third versions;

[0293] According to the first instruction, a fourth version of the target document is determined according to the third version of the target document.

[0294] Since the terminal is currently online, while the third version of the target document is being edited locally on the terminal, a first indication is sent to the server, so that the server receives the first indication. Upon receiving the first indication, the server knows the conflict resolution method of the current terminal, and thus selects a third version to be retained as the fourth version, thereby achieving a resolution of the content conflict of the third version of the target document between the terminal and the server.

[0295] In some embodiments, the first indication may indicate a deleted third version, or indicate a retained third version, or a fourth version obtained by combining the contents of multiple third versions. The fourth version does not have any content conflict at the current moment.

[0296] In some embodiments, the method further comprises:

[0297] receiving a second instruction, wherein the second instruction is used to retain one block and delete the remaining blocks; or the second instruction is used to determine a fourth version of the target document generated from the third version;

[0298] According to the second instruction, a fourth version of the target document is determined according to the third version of the target document.

[0299] If there is one third version and there are multiple blocks with conflicting contents in the third version, then after the third version is displayed to the terminal, a second indication may be received. The server receives the second indication and can determine the fourth version of the target document according to the third version of the target document based on the second indication. The fourth version of the target document is a version with no content conflict or reduced content conflict relative to the third version.

[0300] In some embodiments, the server has a first kernel and a second kernel; wherein the first kernel is used to respond to online editing of the target document; and the second kernel is used to merge and / or detect conflicts between the first version of the target document edited by the terminal in an offline state and the second version of the target document.

[0301] The second kernel is different from the first kernel.

[0302] The server will select different kernels to be responsible for online editing and / or offline editing respectively. In this way, when the server is dealing with the content edited offline, it can minimize the interference with the content edited online, thereby improving the response rate and / or user editing experience in the target document.

[0303] In some other embodiments, the first kernel and the second kernel are of different magnitudes, and the magnitude of the second kernel is lighter than that of the first kernel. Since the probability of occurrence of offline editing is still relatively low compared to online editing, a lighter second kernel can be used for processing, which can reduce the kernel resources occupied by offline editing.

[0304] In some embodiments, the method further comprises:

[0305] In response to the first kernel being in a keep-alive state, the third version of the target document formed by merging the second kernel is transmitted to the first kernel through a message channel with the first kernel.

[0306] In some embodiments, the first kernel and the second kernel may use different kernel mechanisms to process content edited online and offline respectively, so that appropriate kernel mechanisms may be used to process content edited in different editing states of the terminal, thereby improving user experience and offline editing effects.

[0307] In the disclosed embodiment, a message transmission channel is configured between the first core and the second core, so that the first core and the second core are both in the startup state at the same time and can perform collaborative processing of the target document when editing different status contents respectively, thereby improving the editing effect of the target document.

[0308] The embodiment of the present disclosure provides a document editing method, specifically including a collaborative editing method for a document. In this editing scenario, the state of the terminal may include: an online state and an offline state. The online state may include: a strong network state and / or a weak network state. The offline state may include a short offline state and a long offline state. Editing in the online state may be online editing. Editing in the offline state may be offline editing.

[0309] Offline editing means editing documents without Internet access.

[0310] Online editing means editing documents when there is a network connection.

[0311] Users can perform offline editing in documents, and the offline edited content will be synchronized to the cloud after connecting to the Internet.

[0312] If other collaborators in the cloud are editing the same paragraph online at this time, the delayed synchronization of offline content will cause conflicts between offline and online content.

[0313] Existing solutions may cause semantic confusion in the text when dealing with collaboration conflicts.

[0314] Example: There is a paragraph 126789 in the document;

[0315] 34 new offline users are added, and the current paragraph is displayed as 12346789 from the offline user's perspective;

[0316] There are 345 new online users, and the current paragraph from the perspective of online users is 123456789;

[0317] After connecting to the Internet, the content edited by offline users will be synchronized to the cloud, and the paragraphs presented in the final document will be 12343456789.

[0318] After the terminal is connected to the Internet, it enters the online state.

[0319] At this point, the paragraphs cannot meet the expectations of offline / online users.

[0320] Offline edited content (offline content for short) in paragraph units and online edited content (online content) are displayed in a synchronized conflicting manner; or, after the conflict between the offline edited content and the online content is resolved, a clear conflict mark is displayed.

[0321] Intelligent control of offline editing duration may include but is not limited to at least one of the following:

[0322] Focusing on the actual office offline scenario - business travel, we investigated the longest flight time of domestic flights and took the default short offline time threshold of 6 hours.

[0323] AI is used to intelligently identify users' document editing habits and past network fluctuations, and intelligently expand offline editing time. While ensuring that document data is not lost, the user's actual editing needs are not restricted as much as possible.

[0324] Offline content synchronization may include but is not limited to one of the following:

[0325] Based on the principle of user input is what you get, it is expected that offline / online users will submit the edited paragraph to the server to resolve the offline / online content synchronization conflict.

[0326] Offline content is synchronized after connecting to the Internet, and different synchronization processing strategies can be used according to different scenarios.

[0327] Offline / online users edit different paragraphs: In this scenario, the synchronization is performed silently without causing any collaboration conflicts or prompting the user.

[0328] Offline / online users edit the same paragraph: In this scenario, collaborative content synchronization conflicts are handled and users are prompted that there is a content conflict.

[0329] Offline / online conflict resolution in the same section may include:

[0330] The original paragraph is divided into two versions. The version edited by the online user is displayed first, and the version edited by the offline user is displayed below. The two versions coexist.

[0331] Offline / online paragraph conflict content prompts and markers.

[0332] After the synchronization is completed, if there is a paragraph conflict, the user will be prompted to pay attention. And the offline synchronized version will be marked below in the text.

[0333] like Figure 6 As shown, the present disclosure provides a document editing method, which may include:

[0334] The terminal opens the document to edit the content;

[0335] By using set rules and / or machine learning, the offline duration of the terminal entering the offline state is intelligently controlled; the model corresponding to the machine learning may be one of the aforementioned AI models;

[0336] After connecting to the Internet, synchronize the offline edited content to the server;

[0337] Over-limit synchronization means that after the offline time is too long, the edited content before the offline time exceeds the limit will be synchronized to the server.

[0338] Short offline content is synchronized to the cloud;

[0339] Determine whether the same paragraph has been edited by an online user;

[0340] Yes, mark the conflicting paragraphs, keep the online edited paragraphs, and display the offline edited paragraphs below;

[0341] Add user logo data as the boundary for displaying comparative information, using a non-ordinary text format;

[0342] No, silent sync does not prompt the user.

[0343] As shown in FIG. 7 , an embodiment of the present disclosure provides a document editing device, the device comprising:

[0344] A determination module 110, used to determine the editing state of the terminal;

[0345] An editing module 120, configured to locally edit a target document according to an editing operation to obtain a first version of the target document in response to the editing state switching from an online state to an offline state;

[0346] The first sending module 130 is used to send the first version saved by the terminal to the server in response to the editing state switching from the offline state to the online state; wherein the first document is used to merge with the target document of the second version saved by the server to obtain a third version;

[0347] The first receiving module 140 is configured to receive the third version and first prompt information sent by the server, wherein the first prompt information is configured to prompt that there is a content conflict between the first version and the second version.

[0348] It can be understood that the determination module 110 is also configured to determine the editing situation when the terminal is in an offline state;

[0349] The document editing device also includes:

[0350] The display module is further configured to display a second prompt message in response to the editing situation meeting the offline editing stop condition.

[0351] It can be understood that the editing situation meets the offline editing stop condition, including at least one of the following:

[0352] The duration of the terminal being offline reaches the duration threshold;

[0353] The amount of data edited by the terminal in offline state reaches the data amount threshold;

[0354] The terminal edits the designated part of the target document in an offline state.

[0355] Understandably, offline status includes:

[0356] First offline state;

[0357] The second offline state, wherein the state parameters of the second offline state are different from the state parameters of the first offline editing state.

[0358] It can be understood that the status parameter includes at least one of the following:

[0359] Maximum offline time;

[0360] Maximum amount of data for offline editing;

[0361] The size of the block used for conflict detection when merging different versions of the target document;

[0362] The number of blocks to be checked for conflicts when merging different versions of the target document.

[0363] It can be understood that the offline time length corresponding to the second offline state is greater than the offline time length corresponding to the first offline state, and / or,

[0364] The maximum amount of data to be edited offline in the second offline state is greater than the maximum amount of data to be edited offline in the first offline state, and / or,

[0365] The second offline state and the first offline state have different ways of resolving the content conflict between the first version and the second version.

[0366] It can be understood that the third version of the target document includes a plurality of blocks having content conflicts;

[0367] or,

[0368] The target documents of the different third versions have content conflicts.

[0369] It is understood that the device also includes:

[0370] A detection module is configured to detect a feedback operation acting on the first prompt information;

[0371] The removal module is configured to remove part of the content causing the content conflict based on the third version according to the feedback operation.

[0372] It can be understood that the output module is configured to send a first indication to the server according to a feedback operation in response to a target document having multiple third versions with conflicting contents, wherein the first indication is used to retain a third version of the target document and remove other third versions of the target document, or the first indication is used to determine a fourth version of the target document generated based on the multiple third versions.

[0373] It can be understood that the removal module is configured to send a second indication to the server according to a feedback operation in response to the third version of the target document containing multiple blocks with content conflicts, wherein the second indication is used to retain one block and delete the remaining blocks; or, the second indication is used to determine the fourth version of the target document generated by the third version.

[0374] It can be understood that there is a content conflict between the first version and the second version, and there is a conflict mark in the target document of the third version.

[0375] It is understandable that the editing state also includes: an online state; wherein the data synchronization method is different when the terminal is in the online state and the offline state; and / or the data conflict resolution method is different when the terminal is in the online state and the offline editing state.

[0376] Understandably, online status includes:

[0377] First online status;

[0378] Second online status;

[0379] The network condition corresponding to the first online state is stronger than the network condition corresponding to the second online state.

[0380] It can be understood that the online continuity corresponding to the first online state is stronger than the online continuity corresponding to the second online state; or, the network bandwidth corresponding to the first online state is greater than the network bandwidth corresponding to the second online state.

[0381] It can be understood that the first sending module 130 is configured to send the status information of the offline state to the server in response to the current editing state of the target document being switched from the offline state to the online state.

[0382] As shown in FIG. 7 , an embodiment of the present disclosure provides a document editing device, the device comprising:

[0383] The second receiving module 210 is used to receive a first version of a target document sent by a terminal, wherein the first version of the target document is edited when the terminal is in an offline state;

[0384] A merging module 220, configured to merge the first version and the second version of the target document stored in the server to obtain a third version of the target document;

[0385] The second sending module 230 is used to send the third version of the target document and the first prompt information to the terminal, wherein the first prompt information is used to prompt that there is a content conflict between the first version and the second version.

[0386] It can be understood that the second receiving module 210 is configured to receive status information sent by the terminal, wherein the status information indicates an offline state;

[0387] The device further comprises:

[0388] The determination module is configured to determine a conflict detection rule between the first version and the second version of the target document according to the state information; and determine that there is a content conflict between the first version and the second version according to the conflict detection rule.

[0389] It can be understood that the determination module is configured to determine whether the blocks edited by the first version during the terminal offline period are the same as the blocks edited by the second version during the terminal offline period according to the conflict detection rules; if the blocks edited by the first version during the terminal offline period are the same as the blocks edited by the second version during the terminal offline period, it is determined that there is a content conflict between the first version and the second version.

[0390] It is understood that the device also includes:

[0391] The conflict module is configured to determine that the first version and the second version have no content conflict when the block edited by the first version during the terminal offline period is different from the block edited by the second version during the terminal offline period.

[0392] It can be understood that the conflict module is configured to determine whether there is a content conflict between the first version and the second version based on the contents of the first version and the second version when the block edited in the first version during the terminal offline period is the same as the block edited in the second version during the terminal offline period.

[0393] It can be understood that the conflict module is configured to input the blocks edited by the first version during the terminal offline period and the blocks edited by the second version during the terminal offline period into the preset model to obtain the conflict indication value of the preset model; and determine whether there is a content conflict between the first version and the second version based on the conflict indication value.

[0394] It can be understood that the state information indicates a first offline state or a second offline state; wherein the state parameters of the second offline state are different from the state parameters of the first offline editing state.

[0395] It can be understood that the status parameter includes at least one of the following:

[0396] Maximum offline time;

[0397] Maximum amount of data for offline editing;

[0398] The size of the block used for conflict detection when merging different versions of the target document;

[0399] The number of blocks to be checked for conflicts when merging different versions of the target document.

[0400] It can be understood that the third version of the target document includes a plurality of blocks having content conflicts;

[0401] or,

[0402] The target documents of the different third versions have content conflicts.

[0403] It can be understood that the second receiving module 210 is configured to receive a first indication, wherein the first indication is used to retain a third version of the target document and remove other third versions of the target document, or the first indication is used to determine a fourth version of the target document generated from multiple third versions;

[0404] The editing module is configured to determine a fourth version of the target document according to the third version of the target document according to the first instruction.

[0405] It can be understood that the second receiving module 210 is configured to receive a second instruction, wherein the second instruction is used to retain a block and delete the remaining blocks; or the second instruction is used to determine the fourth version of the target document generated from the third version;

[0406] The editing module is configured to determine a fourth version of the target document according to the third version of the target document according to the second instruction.

[0407] It can be understood that the server has a first kernel and a second kernel; wherein the first kernel is used to respond to online editing of the target document; and the second kernel is used to merge and / or detect conflicts between the first version of the target document edited by the terminal in an offline state and the second version of the target document.

[0408] It is understood that the device also includes:

[0409] The transmission module is configured to transmit the third version of the target document formed by merging the second kernel to the first kernel through a message channel with the first kernel in response to the first kernel being in a keep-alive state.

[0410] An embodiment of the present disclosure further provides an electronic device, including:

[0411] processor;

[0412] a memory for storing processor-executable instructions;

[0413] The processor is configured to implement the document editing method of any embodiment of the present disclosure when running the executable instructions.

[0414] The electronic device can at least be a server and / or a terminal. One or more servers can constitute a service end.

[0415] The memory may include various types of storage media, which are non-transitory computer storage media that can continue to remember information stored thereon after the communication device loses power.

[0416] The processor can be connected to the memory through a bus or the like to read the executable program stored in the memory, for example, to implement the following Figure 1 , Figures 3 to 5 Any document editing method shown in the following items.

[0417] The embodiments of the present disclosure further provide a computer-readable storage medium, wherein the computer-readable storage medium stores an executable program, wherein when the executable program is executed by a processor, the document editing method of any embodiment of the present disclosure is implemented. Figure 1 , Figure 3 , Figure 5 and / or Figure 6 Any document editing method shown in the following items.

[0418] Regarding the device in the above embodiment, the specific manner in which each module performs operations has been described in detail in the embodiment of the method, and will not be elaborated here.

[0419] The present disclosure provides an electronic device, comprising: a processor; a memory for storing processor executable instructions; wherein the processor is configured to: when running the executable instructions, implement the document editing method provided by any of the above technical solutions, for example, to implement the following Figure 1 , Figure 3 , Figure 5 and / or Figure 6 Any document editing method shown in the following items.

[0420] like Figure 8 As shown, an embodiment of the present disclosure shows a structure of an electronic device. For example, the electronic device 900 can be provided as a terminal and / or a server having a client installed therein. Figure 8 The electronic device 900 includes a processing component 922, which further includes one or more processors, and a memory resource represented by a memory 932 for storing instructions executable by the processing component 922, such as an application. The application stored in the memory 932 may include one or more modules, each corresponding to a set of instructions. In addition, the processing component 922 is configured as an executable program to perform any of the aforementioned methods for applying to the access device, for example, to implement the following method: Figure 1 , Figure 3 , Figure 5 and / or Figure 6Any document editing method shown in the following items.

[0421] The electronic device 900 may also include a power supply component 926 configured to perform power management of the electronic device 900, a wired or wireless network interface 950 configured to connect the electronic device 900 to a network, and an input / output (I / O) interface 958. The electronic device 900 may operate based on an operating system stored in the memory 932, such as Windows Server™, Mac OS X™, Unix™, Linux™, FreeBSD™ or the like.

[0422] In an exemplary embodiment, an embodiment of the present disclosure provides a computer-readable storage medium, which stores an executable program, wherein the executable program, when executed by a processor, implements the document editing method provided by any of the aforementioned technical solutions.

[0423] The computer-readable storage medium may specifically be: a non-temporary computer-readable storage medium.

[0424] Exemplarily, for example, the memory 932 includes an executable program, and the above instructions can be executed by the processing component 922 of the electronic device 900 to complete the above method.

[0425] The non-transitory computer-readable storage medium may be a ROM, a random access memory (RAM), a CD-ROM, a magnetic tape, a floppy disk, an optical data storage device, and the like.

[0426] Those skilled in the art will readily appreciate other implementations of the disclosed embodiments after considering the specification and practicing the invention disclosed herein. This application is intended to cover any variations, uses, or adaptations of the disclosed embodiments, which follow the general principles of the disclosed embodiments and include common knowledge or customary technical means in the art that are not disclosed in the present disclosure. The specification and examples are to be considered as exemplary only, and the true scope and spirit of the disclosed embodiments are indicated by the following claims.

[0427] It should be understood that the embodiments of the present disclosure are not limited to the precise structures described above and shown in the drawings, and various modifications and changes may be made without departing from the scope thereof. The scope of the embodiments of the present disclosure is limited only by the appended claims.

Claims

1. A document editing method, It is characterized in that Executed by a terminal, the method includes: determining an editing state of the terminal; In response to the editing state switching from the online state to the offline state, locally editing the target document according to the editing operation to obtain a first version of the target document; In response to the editing state switching from the offline state to the online state, sending the first version saved by the terminal to the server; wherein the first version is used to merge with the second version of the target document saved by the server to obtain a third version; The third version and / or the first prompt information sent by the server is received, wherein the first prompt information is used to prompt that there is a content conflict between the first version and the second version.

2. The method according to claim 1, It is characterized in that The method comprises: Determining an editing situation in which the terminal is in the offline state; In response to the editing situation meeting the offline editing stop condition, a second prompt message is displayed.

3. The method according to claim 2, It is characterized in that The editing situation meets the offline editing stop condition, including at least one of the following: The duration of the terminal being in the offline state reaches a duration threshold; The amount of data edited by the terminal in an offline state reaches a data amount threshold; The terminal edits a designated portion of the target document in an offline state.

4. The method according to any one of claims 1 to 3, It is characterized in that The offline state includes: First offline state; A second offline state, wherein state parameters of the second offline state are different from state parameters of the first offline editing state.

5. The method according to claim 4, It is characterized in that The state parameter includes at least one of the following: Maximum offline time; Maximum amount of data for offline editing; The block size for a conflict detection when different versions of the target document are merged; The number of blocks to be checked for conflicts when merging different versions of the target document.

6. The method according to any one of claims 1 to 5, It is characterized in that The offline time length corresponding to the second offline state is longer than the offline time length corresponding to the first offline state, and / or, The maximum amount of data to be edited offline in the second offline state is greater than the maximum amount of data to be edited offline in the first offline state, and / or, The second offline state and the first offline state have different ways of resolving the content conflict between the first version and the second version.

7. The method according to any one of claims 1 to 6, It is characterized in that The third version of the target document includes a plurality of blocks having the content conflicts; or, The target documents different from the third version have the content conflict.

8. The method according to any one of claims 1 to 7, It is characterized in that The method further comprises: detecting a feedback operation acting on the first prompt information; According to the feedback operation, part of the content causing the content conflict is removed based on the third version.

9. The method according to claim 8, It is characterized in that The removing, based on the third version and according to the feedback operation, part of the content causing the content conflict includes: In response to the target document having multiple third versions with conflicting contents, a first indication is sent to the server according to the feedback operation, wherein the first indication is used to retain one of the third versions of the target document and remove other third versions of the target document, or the first indication is used to determine a fourth version of the target document generated based on the multiple third versions.

10. The method according to claim 8, It is characterized in that The removing, based on the third version and according to the feedback operation, part of the content causing the content conflict includes: In response to the third version of the target document containing multiple blocks with content conflicts, a second indication is sent to the server according to the feedback operation, wherein the second indication is used to retain one of the blocks and delete the remaining blocks; or, the second indication is used to determine a fourth version of the target document generated based on the third version.

11. The method according to any one of claims 1 to 10, It is characterized in that There is a content conflict between the first version and the second version, and a conflict mark is included in the target document of the third version.

12. The method according to any one of claims 1 to 11, It is characterized in that The editing state also includes: an online state; wherein the data synchronization mode of the terminal in the online state and the offline state is different; and / or the data conflict resolution mode of the terminal in the online state and the offline editing state is different.

13. The method according to claim 12, It is characterized in that The online status includes: First online status; Second online status; The network condition corresponding to the first online state is stronger than the network condition corresponding to the second online state.

14. The method according to claim 13, It is characterized in that The online persistence corresponding to the first online state is stronger than the online persistence corresponding to the second online state; or, A network bandwidth corresponding to the first online state is greater than a network bandwidth corresponding to the second online state.

15. The method according to any one of claims 1 to 14, It is characterized in that The method further comprises: In response to the current editing state of the target document being switched from the offline state to the online state, the state information of the offline state is sent to the server.

16. A document editing method, It is characterized in that Executed by the server, the method includes: Receiving a first version of a target document sent by a terminal, wherein the first version of the target document is edited when the terminal is in an offline state; Merging the first version and the second version of the target document saved by the server to obtain a third version of the target document; The target document of the third version and first prompt information are sent to the terminal, wherein the first prompt information is used to prompt that there is a content conflict between the first version and the second version.

17. The method according to claim 16, It is characterized in that The method further comprises: Receiving status information sent by the terminal, wherein the status information indicates the offline state; Determining, based on the state information, a conflict detection rule between the first version and the second version of the target document; According to the conflict detection rule, it is determined that there is a content conflict between the first version and the second version.

18. The method according to claim 17, It is characterized in that The determining, according to the conflict detection rule, that there is a content conflict between the first version and the second version includes: Determining, according to the conflict detection rule, whether a block edited by the first version during the terminal offline period is the same as a block edited by the second version during the terminal offline period; When the block edited by the first version during the terminal offline period is the same as the block edited by the second version during the terminal offline period, it is determined that there is the content conflict between the first version and the second version.

19. The method according to claim 17, It is characterized in that The method further comprises: In a case where the block edited by the first version during the terminal offline period is different from the block edited by the second version during the terminal offline period, it is determined that the first version and the second version do not have the content conflict.

20. The method according to claim 18, It is characterized in that When the block edited by the first version during the terminal offline period is the same as the block edited by the second version during the terminal offline period, determining that there is a content conflict between the first version and the second version includes: When the blocks edited by the first version during the terminal offline period are the same as the blocks edited by the second version during the terminal offline period, it is determined whether there is the content conflict between the first version and the second version according to the contents of the first version and the second version.

21. The method according to claim 20, It is characterized in that The determining, according to the contents of the first version and the second version, whether there is a content conflict between the first version and the second version includes: Inputting the blocks edited by the first version during the terminal offline period and the blocks edited by the second version during the terminal offline period into a preset model to obtain a conflict indication value of the preset model; According to the conflict indication value, it is determined whether there is the content conflict between the first version and the second version.

22. The method according to claim 17, It is characterized in that The state information indicates a first offline state or a second offline state; wherein the state parameters of the second offline state are different from the state parameters of the first offline editing state.

23. The method according to claim 18, It is characterized in that The state parameter includes at least one of the following: Maximum offline time; Maximum amount of data for offline editing; The block size for a conflict detection when different versions of the target document are merged; The number of blocks to be checked for conflicts when merging different versions of the target document.

24. The method according to any one of claims 16 to 23, It is characterized in that The third version of the target document includes a plurality of blocks having the content conflicts; or, The target documents different from the third version have the content conflict.

25. The method according to any one of claims 16 to 24, It is characterized in that The method further comprises: receiving a first instruction, wherein the first instruction is used to retain one of the third versions of the target document and remove other third versions of the target document, or the first instruction is used to determine a fourth version of the target document generated based on multiple third versions; According to the first indication, the target document of the fourth version is determined according to the target document of the third version.

26. The method according to any one of claims 16 to 25, It is characterized in that The method further comprises: receiving a second instruction, wherein the second instruction is used to retain one of the blocks and delete the remaining blocks; or the second instruction is used to determine a fourth version of the target document generated based on the third version; According to the second instruction, the target document of the fourth version is determined according to the target document of the third version.

27. The method according to any one of claims 16 to 26, It is characterized in that The server has a first kernel and a second kernel; wherein the first kernel is used to respond to the online editing of the target document; and the second kernel is used to merge and / or perform conflict detection between the first version of the target document edited by the terminal in an offline state and the second version of the target document.

28. The method according to claim 27, It is characterized in that The method further comprises: In response to the first kernel being in a keep-alive state, the third version of the target document formed by merging the second kernel is transmitted to the first kernel through a message channel with the first kernel.

29. A document editing device, It is characterized in that The device comprises: A determination module, used to determine the editing state of the terminal; An editing module, configured to locally edit a target document according to an editing operation to obtain a first version of the target document in response to the editing state switching from an online state to an offline state; A first sending module, configured to send the first version saved by the terminal to the server in response to the editing state switching from the offline state to the online state; wherein the first version is used to merge with the second version of the target document saved by the server to obtain a third version; The first receiving module is used to receive the third version and / or the first prompt information sent by the server, wherein the first prompt information is used to prompt that there is a content conflict between the first version and the second version.

30. A document editing device, It is characterized in that The device comprises: A second receiving module is used to receive a first version of a target document sent by a terminal, wherein the first version of the target document is edited when the terminal is in an offline state; A merging module, used for merging the first version and the second version of the target document saved by the server to obtain a third version of the target document; The second sending module is used to send the third version of the target document and first prompt information to the terminal, wherein the first prompt information is used to prompt that there is a content conflict between the first version and the second version.

31. An electronic device, It is characterized in that include: processor; a memory for storing processor-executable instructions; Wherein, the processor is configured to: implement the document editing method described in any one of claims 1 to 15 or 16 to 28 when running the executable instructions.

32. A computer-readable storage medium, It is characterized in that The readable storage medium stores an executable program, wherein the executable program, when executed by a processor, implements the document editing method according to any one of claims 1 to 15 or 16 to 28.

Citation Information

Cited By

  • Online visual demonstration document editing method

    CN119378504A