Text collaborative editing method and related device, electronic device, and storage medium

By acquiring and integrating document modification data of multiple users and updating basic text data, the problem of real-time update of multi-user collaborative editing is solved, real-time collaborative editing of documents is realized, and editing efficiency is improved.

CN114357949BActive Publication Date: 2024-10-18ANHUI IFLYREC TECH CO LTD
View PDF 6 Cites 0 Cited by

Patent Information

Application Number
CN202111539208.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-12-15
Publication Date
2024-10-18
Estimated Expiration
2041-12-15

AI Technical Summary

Technical Problem

It is difficult to realize collaborative editing when multiple users edit documents at the same time with the existing technology. Each user can only learn about his or her own modifications and cannot update the editing content of other users in real time.

Method used

By obtaining the modification data of the local and other terminals, integrating the modification content of the same text unit, updating the basic text data, and realizing collaborative text editing.

Benefits of technology

Real-time collaborative editing of documents by multiple users is realized on the local end, which reduces the functional requirements for the local editor, avoids the complex processing of monitoring editors in the existing technology, and improves editing efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114357949B_ABST
    Figure CN114357949B_ABST
Patent Text Reader

Abstract

The present application discloses a text collaborative editing method and related devices, electronic devices, and storage media, wherein the text collaborative editing method includes: the local end obtains local modification data and several other-end modification data, wherein the local modification data and the other-end modification data are both generated by modifying basic text data, and the basic text data includes several text units; integrating the modification content of the same text unit in the local modification data and the several other-end modification data to obtain the target modification content corresponding to the text unit; based on the target modification content of the text unit, updating the text unit in the basic text data. The above scheme can realize text collaborative editing on the local end.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of information processing technology, and in particular to a text collaborative editing method and related devices, electronic devices, and storage media. Background Art

[0002] With the development of communication technology, text transmission can be achieved through the Internet, so that other users can obtain the text edited by the local user. However, when multiple users edit a document at the same time, each user can only learn about his or her own changes and cannot update the text according to the edits of other users. In view of this, how to achieve text collaborative editing on the local side has become an urgent problem to be solved. Summary of the invention

[0003] The main technical problem solved by the present application is to provide a text collaborative editing method and related devices, electronic devices, and storage media, which can realize text collaborative editing on the local side.

[0004] In order to solve the above-mentioned technical problems, the first aspect of the present application provides a text collaborative editing method, including: a local end obtains local modification data and a number of other-end modification data, wherein the local modification data and the other-end modification data are both generated by modifying basic text data, and the basic text data includes a number of text units; integrating the modification contents of the same text unit in the local modification data and the several other-end modification data to obtain the target modification content corresponding to the text unit; and updating the text unit in the basic text data based on the target modification content of the text unit.

[0005] In order to solve the above-mentioned technical problems, the second aspect of the present application provides a text collaborative editing device, which includes: an acquisition module, used to obtain local modification data and a plurality of other-end modification data, wherein the local modification data and the other-end modification data are both generated by modifying basic text data, and the basic text data includes a plurality of text units; an integration module, used to integrate the modification contents of the same text unit in the local modification data and the plurality of other-end modification data to obtain the target modification contents corresponding to the text unit; an update module, used to update the text unit in the basic text data based on the target modification contents of the text unit.

[0006] In order to solve the above technical problems, the third aspect of the present application provides an electronic device, including a memory and a processor coupled to each other, wherein the processor is used to execute program instructions stored in the memory to implement the text collaborative editing method in the above first aspect.

[0007] In order to solve the above technical problems, the fourth aspect of the present application provides a computer-readable storage medium storing program instructions that can be executed by a processor, and the program instructions are used to implement the text collaborative editing method in the above first aspect.

[0008] In the above scheme, since the modification data on this end and the modification data on the other end are both generated by modifying the basic text data, that is, the basis of all modification data is the same, after the local end obtains the modification data on this end and several modification data on other ends, the modification content of the same text unit in the modification data on this end and the several modification data on other ends is integrated to obtain the target modification content corresponding to the text unit, and finally based on the target modification content of the text unit, the text unit in the basic text data is updated, so that the modification data of all ends are integrated on the basis of the basic text data, and then text collaborative editing is realized on the local end. BRIEF DESCRIPTION OF THE DRAWINGS

[0009] Figure 1 It is a flowchart of an embodiment of the collaborative editing method of the present application;

[0010] Figure 2 It is a flowchart of another embodiment of the collaborative editing method of the text of the present application;

[0011] Figure 3 It is a schematic diagram of the framework of an embodiment of a text collaborative editing device of the present application;

[0012] Figure 4 It is a schematic diagram of the framework of an embodiment of the electronic device of the present application;

[0013] Figure 5 It is a schematic diagram of a framework of an embodiment of a computer-readable storage medium of the present application. DETAILED DESCRIPTION

[0014] The scheme of the embodiment of the present application is described in detail below in conjunction with the drawings of the specification.

[0015] In the following description, for the purpose of explanation rather than limitation, specific details such as specific system structures, interfaces, and technologies are provided to facilitate a thorough understanding of the present application.

[0016] The terms "system" and "network" are often used interchangeably in this article. The term "and / or" in this article is only a description of the association relationship of associated objects, indicating that there can be three relationships. For example, A and / or B can mean: A exists alone, A and B exist at the same time, and B exists alone. In addition, the character " / " in this article generally indicates that the associated objects before and after are in an "or" relationship. In addition, "many" in this article means two or more than two.

[0017] See also Figure 1 , Figure 1 This is a flowchart of an embodiment of the collaborative editing method of the present application. Specifically, it may include the following steps:

[0018] Step S11: the local end obtains the local end modification data and several other end modification data.

[0019] The modified data on this end and the modified data on the other end are both generated by modifying the basic text data, that is, the modification objects of the modified data on this end and the modified data on the other end are the same. The basic text data can be obtained by converting the conference record audio into text, and cached on this end and the other end. For example, in one implementation scenario, the user on this end updates the basic text data stored locally on this end to obtain the modified data on this end, and several users on the other end update the basic text data stored locally on the other end to obtain the modified data on the other end, wherein the basic text data stored locally on this end and the basic text data stored locally on the other end are the same, and are both obtained by converting the conference record audio into text in the same meeting. The basic text data includes several text units, which can be text components such as paragraphs and sentences, which are not specifically limited here.

[0020] In a disclosed embodiment, when acquiring the local modified data, the local text data and the basic text data can be acquired. The local text data is obtained by the local user modifying the basic text data, and then the text units of the local text data and the basic text data are compared to determine the modified content of each text unit. Then, the local modified data can be generated based on the modified content of each text unit. Therefore, the local modified data is the result of the comparison between the local text data and the basic text data, reflecting the modified content of the basic text data by the local user. Similarly, the acquisition of the other-end modified data is that the other end acquires the other-end text data and the basic text data. The other-end text data is obtained by the other end user modifying the basic text data, and then the text units of the other-end text data and the basic text data are compared to determine the modified content of each text unit. Then, the other-end modified data can be generated based on the modified content of each text unit. Then, the local end receives several other-end modified data sent by the server, wherein the other-end modified data is sent to the server by the corresponding other end.

[0021] The local end and / or the other end may be a communication terminal such as a smart phone, a PC (Personal Computer), a PDA (Personal Digital Assistant or tablet computer), and is not specifically limited here.

[0022] Step S12: Integrate the modification content of the same text unit in the modification data of the local end and the modification data of several other ends to obtain the target modification content corresponding to the text unit.

[0023] The modification data on this end and the modification data on the other end are both generated by modifying the basic text data, and the basic text data includes several text units. Therefore, if the modification data on this end and the modification data on the other end both modify the same text unit, the local end can integrate the modification content of the same text unit in the modification data on this end and several modification data on the other ends to obtain the target modification content corresponding to the text unit. When text collaborative editing is implemented through the existing OT (operation transform) algorithm, the editor on the local side needs to be modified. The local side needs to record the operation information of the local user by monitoring the editor. The operation information includes the position of the modified content in the text, the type of modification (deletion or addition), the length of the deleted content, the specific content added, etc. Then the local side and the other side send the modified data to the server, and the server converts the operation information. Based on this, the requirements for the editor on the local side are relatively high. The editor needs to perform a lot of monitoring processing. If the multi-user collaborative editing function is added, a large number of other existing functions on the local side need to be modified. Therefore, compared with the previous situation where the local side and the other side modify the same text, the local side and the other side need to give the modified content of the same text unit to the server, and the server integrates the modified content. In this solution, the integration of the modified content of the same text unit can be realized on the local side, and the functional requirements for the editor on the local side are relatively small. There is no need to obtain the modified content through the monitoring editor, and the impact on the original function is relatively small.

[0024] Step S13: Based on the target modified content of the text unit, the text unit in the basic text data is updated.

[0025] After obtaining the target modification content of the text unit, the text unit in the basic text data can be updated. In the case where the local modification data and several other-end modification data modify the same text unit, it is determined to be a modification conflict. The local end integrates the modification content of the same text unit in the local modification data and several other-end modification data to obtain the target modification content corresponding to the text unit, and replaces the content of the text unit with the target modification content, thereby realizing the update of the basic text data, and the updated text unit can also be displayed on the local interface.

[0026] In the above scheme, since the modification data on this end and the modification data on the other end are both generated by modifying the basic text data, that is, the basis of all modification data is the same, after the local end obtains the modification data on this end and several modification data on other ends, it integrates the modification contents of the same text unit in the modification data on this end and several modification data on other ends to obtain the target modification content corresponding to the text unit, and finally, based on the target modification content of the text unit, updates the text unit in the basic text data, thereby integrating the modification data on all ends on the basis of the basic text data, and then realizing text collaborative editing on the local end.

[0027] To further clarify how to obtain local modification data, see Figure 2 , Figure 2 This is a flowchart of another embodiment of the collaborative editing method of the text of the present application. Specifically, it may include the following steps:

[0028] Step S21: Acquire local text data and basic text data.

[0029] The local text data is obtained by the local user modifying the basic text data. The modification of the basic text data by the local user can be not modifying the text unit, deleting the text unit, modifying the text unit, and adding a new text unit. The local text data and the basic text data are structured data obtained by structurally processing the local interface text and the basic text respectively, so as to convert the text data into a structural form recognizable by the local end, so as to facilitate the local end to identify and compare the text. For example, the basic text data is cache data stored locally on the local side, and the local text data is the local interface text displayed on the local interface. Therefore, before the local user modifies the local interface text on the local interface, the local text data and the basic text data are the same. After the local user modifies the local interface text on the local interface, the local text data and the basic text data are different. At this time, the basic text data remains unchanged, and the local text data is obtained by searching all text units of the local interface text displayed on the local interface. The local text data is the result of the local user updating the local interface text in real time. Therefore, the local text data and the basic text data are obtained so that the modification content of the local user can be determined later.

[0030] Step S22: Compare the text units of the local text data with the text units of the basic text data to obtain the modification type to which each text unit belongs.

[0031] The modification type includes at least one of the following: content not modified, deleted, content modified, and added. Among the modification types, content not modified means that the text content of the text unit in the local text data and the basic text data is the same; deleted means that a text unit that does not exist in the local text data but exists in the basic text data is deleted; content modified means that the text content of the text unit in the local text data and the basic text data is the same; added means that a text unit that exists in the local text data but does not exist in the basic text data is added. The method for comparing the text unit of the local text data and the text unit of the basic text data can be any existing method that can determine whether the text content of the text unit is modified.

[0032] In order to facilitate the comparison of text units, each text unit of text data such as basic text data, local text data or other end text data generates an identifier for uniquely representing the text unit based on the same identifier generation method to ensure the uniformity and uniqueness of the identifier generation. For example, it can include generating the identifier of each text unit in the form of MD5 (Message-Digest Algorithm 5). In a public embodiment, when comparing the text unit of the local text data and the text unit of the basic text data to obtain the modification type to which each text unit belongs, the text unit with the same identifier in the local text data and the basic text data can be searched. If the text content of the text unit with the same identifier is the same, it is determined that the modification type to which the text unit belongs is that the content is not modified. If the text content of the text unit with the same identifier is different, it is determined that the modification type to which the text unit belongs is that the content is modified; if the identifier of the text unit in the local text data does not exist in the basic text data, it is determined that the modification type to which the text unit belongs is added; if the identifier of the text unit in the basic text data does not exist in the local interface text data, it is determined that the modification type to which the text unit belongs is deleted. Therefore, compared with word-by-word comparison, using text units as comparison data can reduce the frequency of text content comparison and the size of transmitted data, and by combining the comparison of identifiers and text content, the modification type to which the text unit belongs can be easily and quickly determined.

[0033] In an actual scenario, the basic text data is obtained by converting the conference record audio into text, and is cached in the local end and the other end. The basic text data is composed of several text units and the text unit is a paragraph. Therefore, when obtaining the basic text data, the local interface text displayed on the local interface is read, and the data is stored in a paragraph as the smallest unit to form the basic text data, which is suitable for just entering the meeting and the local interface text already exists; or the identification content of the conference record audio is stored in a paragraph as the smallest unit to form the basic text data, which is suitable for real-time updating of the basic text data during the meeting. When the local end and several other ends need to segment the conference record audio for text conversion, the identifier of each paragraph is generated in the form of MD5. Since the content of the same conference record audio after text conversion is the same, the way of generating the identifier at each end is the same, so the basic text data of each end is the same and the identifier of each paragraph in the basic text data is the same. Therefore, using a paragraph as the smallest comparison unit can reduce the frequency of text content comparison and the size of transmitted data, and apply text collaborative editing to the conference scene to realize multi-user collaborative editing of the basic text data obtained by converting the conference record audio.

[0034] Step S23: Acquire the local difference information corresponding to the text unit whose content has been modified.

[0035] When the modification type of the text unit is content modification, obtain the local difference information corresponding to the text unit whose content is modified. The local difference information indicates the difference between the text unit in the local text data and the basic text data. The acquisition method and expression form of the local difference information are not specifically limited, and it is sufficient to be able to indicate the difference between the text unit in the local text data and the basic text data.

[0036] In a disclosed embodiment, when obtaining the local difference information corresponding to the text unit whose content is modified, the DIFF algorithm can be used to obtain the local difference information of the text unit whose content is modified. The DIFF algorithm can calculate the difference between different text units and generate local difference information to reflect the text difference. Specifically, the text unit of the local text data and the text unit of the basic text data are searched from the beginning and the end to see whether the first word is the same. If they are the same, continue to search downward. If the beginning and the end are different, the text content is divided into two text contents, and the same method is used to search downward. The modification mark of the text content of the local text data and the text unit of the basic text data that are the same is 0 (indicating that the corresponding text content is the unmodified content in the local text data), the modification mark of the text content that exists in the text unit of the basic text data but does not exist in the text unit of the local text data is -1 (indicating that the corresponding text content is the content deleted in the local text data), and the modification mark of the text content that exists in the text unit of the local text data but does not exist in the text unit of the basic text data is 1 (indicating that the corresponding text content is the newly added content in the local text data). For example, if the text unit of the local text data is "text execution conversion" and the text unit of the basic text data is "text operation conversion", the local difference information is [[0, text], [1, operation], [-1, execution][0, conversion]].

[0037] The local end difference information may include several groups of content difference data, wherein each group of content difference data includes the text content of the text unit and a modification mark, and the several groups of content difference data are sorted according to the position of the corresponding text content in the text unit, and the modification mark is used to indicate that the corresponding text content is the unmodified content in the local end text data, the corresponding text content is the newly added content in the local end text data, and the corresponding text content is the deleted content in the local end text data. Taking the local end difference information as [[0, text], [1, operation], [-1, execution] [0, conversion]] as an example, [0, text], [1, operation], [-1, execution], [0, conversion] are content difference data respectively and are sorted according to the position of the corresponding text content in the text unit, wherein [0, text] is taken as an example again, "0" in [0, text] is the modification mark, and "text" in [0, text] is the text content.

[0038] Therefore, when comparing the text units of the local text data with the text units of the basic text data and determining the modified content of each text unit, the text units of the local text data and the basic text data are first compared, and after obtaining the modification type of each text unit, the local difference information corresponding to the text unit whose content is modified is obtained. On the one hand, it is not only determined that the text unit is modified, but also the specific modification content is determined. On the other hand, the modification type can be determined first, and the three modification types of unmodified content, deletion and addition do not need to determine the local difference information, which saves data processing time and improves efficiency. In addition, the local end can use the DIFF algorithm to find the difference between the local text data and the basic text data with the text unit as the minimum comparison unit, and obtain the local difference information. The local difference information includes the text content and the modification mark, which is convenient for the subsequent integration of the modified content by the local end.

[0039] By obtaining the local difference information corresponding to the text unit whose content is modified in the above manner, local modification data can be generated based on the modified content of each text unit. For details, please refer to steps S24 and S25 below.

[0040] Step S24: the identification information of the text unit whose content has not been modified or deleted is used as the constituent data, the text content and position information of the newly added text unit is used as the constituent data, and the difference content of the local end is used as the constituent data.

[0041] Under the modification types of different text units such as content not modified, deleted, content modified and added, the composition data forming the modification data on this side is also different. If the modification type of the text unit is that the content is not modified or deleted, the identification information of the text unit whose content is not modified or deleted is used as the composition data, and no other information needs to be saved. If the modification type of the text unit is added, the text content and position information of the added text unit are used as the composition data. If the modification type of the text unit is that the content is modified, the difference content on this side is used as the composition data.

[0042] In a disclosed embodiment, the local text data and the basic text data are structured data obtained by respectively processing the local interface text and the basic text, and the local text data and the basic text data often contain a lot of tag information. For example, the existing local text data is " <ins data-unquied=’1h2j12b’> This is newly generated content< / ins> ",in," <ins data-unquied=’1h2j12b’> "and"< / ins>" are all label information, and "This is newly generated content" is the text content of the local text data. When comparing the text units of the local text data and the text units of the basic text data, the modification type of each text unit is obtained, and it is found that the modification type is content modification. When obtaining the local difference information corresponding to the text unit whose content is modified, both the label information and the text content will be used to obtain the local difference information corresponding to the text unit whose content is modified. In order to speed up the text comparison speed and quickly obtain the local difference content, before obtaining the local difference content of the text unit whose content is modified in the local text data and the basic text data, the label information in the local text data and the basic text data can be converted into special characters, and the correspondence between the label information and the special characters can be used to generate a data dictionary, so that when the local difference content is used as the component data, the local difference content and the data dictionary are used as the component data. The data dictionary is used to restore special characters to label information based on the data dictionary when updating the basic text data.

[0043] In a real scenario, the local text data " <ins data-unquied=’1h2j12b’> This is newly generated content< / ins> ", the basic text data is " <ins data-unquied=’1h2j12b’> Newly generated speech content< / ins> " is taken as an example, both the local text data and the basic text data will have the label information " <ins data-unquied=’1h2j12b’> "and"< / ins> " are converted into special characters and Then the text data on this end is updated to " This is newly generated content ", basic text data is updated to " Newly generated speech content ", using the corresponding relationship between label information and special characters to generate a data dictionary as { <ins data-unquied=’1h2j12b’>, < / ins>}, and thus use the DIFF algorithm to obtain the local difference information of the text unit whose content has been modified: [[0, ],[1,This is],[0,Newly generated],[-1,Speaking],[0,Content ]], when taking the local difference content as the component data, after taking the above local difference content and the data dictionary as the component data, when updating the basic text data, the special characters can be restored to the label information based on the data dictionary, thereby reducing the workload of processing the local difference data for the label information, and at the same time preventing the label information from causing unnecessary influence on the displayed text content during the comparison between the local text data and the basic text data, thereby reducing the comparison error.

[0044] Step S25: Summarize the composition data to obtain the local modification data.

[0045] After the constituent data are aggregated and all the contents of the modifications made by the local user to the basic text data are obtained, the local modification data can be obtained.

[0046] Step S26: Obtaining some other-end modification data.

[0047] In order to realize multi-user collaborative editing, both the local end and the other end can obtain the modification data of the corresponding end through the above-mentioned steps S21 to S25. The local end sends the modification data of the local end to the server connected to the local end and several other ends, so that the server forwards the modification data of the local end to the other end. Similarly, the other end can also send the modification data of the other end to the above-mentioned server.

[0048] When the local end obtains several other-end modification data, it can receive several other-end modification data sent by the server, wherein the other-end modification data corresponds to the other-end data sent to the server, and includes the modification content of each text unit in the other-end text data and the basic text data. The other-end modification data can be the same as the local end modification data, which can be composed of identification information of text units whose contents have not been modified or deleted, text content and position information of newly added text units, local end difference content, local end difference content and data dictionary, including the modification content of each text unit in the other-end text data and the basic text data, so that the subsequent integration of the local end modification data and several other-end modification data can be more convenient and quick. In a public embodiment, obtaining several other-end modification data can also be directly sent to the local end by the other end in an achievable manner. In a disclosed embodiment, the other-end modification data may also be generated on the local end by replacing the local-end text data in the above steps S21 to S25 with the other-end text data after the local end receives the other-end text data, so that the local-end modification data and the other-end modification data are both generated by the same local end, avoiding differences in data processing at different user ends. The local end receives the other-end modification data from the server, and since the other-end modification data includes the modified contents of each text unit in the other-end text data and the basic text data, it is convenient to quickly integrate the modified contents when the local end and the other end modify the same text unit.

[0049] The order of obtaining the local modification data in the above steps S21 to S25 and obtaining the modification data of the other ends in step S26 is not specifically limited.

[0050] After the local end obtains the local modification data and several other-end modification data in the above manner, the local end can integrate the modification contents of the same text unit in the local modification data and several other-end modification data to obtain the target modification contents corresponding to the text unit. For details, please refer to steps S27 and S28 below.

[0051] Step S27: obtaining local-end difference information of the text unit based on the local-end modification data, and obtaining other-end difference information of the same text unit based on the other-end modification data.

[0052] The local end difference information indicates the difference between the text unit in the local end text data and the basic text data, while the other end difference information indicates the difference between the text unit in the other end text data and the basic text data. Both the local end difference information and the other end difference data may include several groups of content difference data, wherein each group of content difference data includes the text content and a modification mark of the text unit, and the several groups of content difference data are sorted according to the position of the corresponding text content in the text unit, and the modification mark is used to indicate that the corresponding text content is the unmodified content in the local end text data, the corresponding text content is the newly added content in the local end text data, and the corresponding text content is the deleted content in the local end text data.

[0053] Step S28: Based on the local end difference information, determine the local end modification content and local end modification position of the text unit, and based on the other end difference information, determine the other end modification content and other end modification position of the text unit.

[0054] Based on the local difference information, the local modification content and local modification position of the text unit can be determined, and based on the other-end difference information, the other-end modification content and other-end modification position of the text unit can also be determined, and the difference between the local text data and the basic text data and the difference between the other-end text data and the basic text data are obtained respectively, and the modification content and modification position are determined respectively, so that the modification content is subsequently merged and processed on the same basic text data, and the conflicting merge of the modification content can be achieved without locking the text unit as in the prior art. The relevant explanation of the local difference information and the other-end difference information can be referred to the above step S23, which will not be repeated here.

[0055] In a practical scenario, the basic text data is " Newly generated speech content ", local text data is " This is newly generated content ", the difference information obtained on this end is [[0, ],[1,This is],[0,Newly generated],[-1,Speaking],[0,Content ]], that is, the local user added "this is" and deleted "speaking", so based on the local difference information, it can be determined that the local modification content and local modification position of the text unit are to add "this is" and place it in the first position of the cached data, and to delete "speaking" and place it in the fifth position of the cached data; the basic text data of the other end is the same as the basic text data of the local end, which is " Newly generated speech content ", the text data on the other end is " Newly generated speech content 123 ", the difference information obtained from the other end is [[0, Newly generated speech content],[1,123],[0, ]], that is, the user on the other end added "123". Based on the difference information on the other end, it is determined that the modification content and modification position of the text unit on the other end are to add "123" and it is at the ninth position of the cached data.

[0056] Step S29: based on the modified content and position of the local end and the modified content and position of the other end, the text unit in the basic text data is updated.

[0057] After obtaining the target modification content corresponding to the text unit through steps S27 and S28, when updating the text unit in the basic text data based on the target modification content of the text unit, the text unit in the basic text data can be updated based on the modification content of the local end, the modification position of the local end, and the modification content of the other end and the modification position of the other end, so that multiple users have modified the same text unit and it is determined that there is a conflict in the modification. At this time, there is no need to lock the text unit, and the modified content can be automatically merged. After the local end updates the text unit in the basic text data, the updated basic text data can be sent to the other end, so that the other end directly receives the updated basic text data and then updates the basic text data of the other end, or the local end and the other end receive several other end modification data sent by the server, and each updates the text unit in the basic text data through steps S27 to S29.

[0058] Since the local user and several other users generate local modification data and several other modification data by modifying the same basic text data, and the methods of obtaining the local difference information and the other difference information can also be the same, the local modification content, the local modification position, and the other modification content and the other modification position can be used to update the text unit in the basic text data based on the local modification content, the local modification position, and the other modification content and the other modification position. Taking the actual scenario of step S28 as an example, in the basic text data " Newly generated speech content ", add "this is" and put it in the first position of the cached data, delete "speak" and put it in the fifth position of the cached data, add "123" and put it in the ninth position of the cached data, and the updated text unit is " This is newly generated content123 ". Among them, special characters and Does not take up space.

[0059] When the local end and several other ends modify the same text unit, if the modification positions of each end are different, the text unit in the basic text data can be updated based on the modification content and modification position of the local end and the modification content and modification position of the other ends; if the modification positions of each end are the same, the text units in the basic text data are updated in sequence based on the order of each end. The order of each end can be the time order of the local end obtaining the modification data of the local end and the modification data of several other ends, or it can be a pre-set order of each end, etc.

[0060] In a disclosed embodiment, in order to ensure that the cursor position on the local interface remains consistent before and after the text unit is modified, when the content of the text unit is modified, if the modified content of the modified data on the other end is located after the cursor position recorded before the update of the local interface text, the cursor is displayed in the updated local interface text according to the cursor position recorded before the update; if the modified content of the modified data on the other end is located before the cursor position recorded before the update, the cursor position recorded before the update is added to the length of the modified content of the modified data on the other end to obtain the latest cursor position, and the cursor is displayed in the updated local interface text according to the latest cursor position to realize the cursor echo. The length of the modified content does not include the length of special characters. Compared with the existing OT algorithm to realize text collaborative editing, the modification of the text style needs to be processed separately. When this solution realizes text collaborative editing on the local end, the original cursor position can be echoed regardless of whether the modified content on the other end is located after or before the cursor position recorded before the update of the local interface text.

[0061] Steps S27 to S29 are for the case where the modification type is content modification, that is, multiple users modify the same text unit. In addition, the modification type of the text unit may also be content unmodified, deleted, and newly added. As described in step S24, if the modification type of the text unit is content unmodified or deleted, the identification information of the text unit whose content is unmodified or deleted is used as the constituent data; if the modification type of the text unit is newly added, the text content and position information of the newly added text unit are used as the constituent data. Therefore, in a disclosed embodiment, after obtaining the modification data on the local side, the modification data on the local side can be used to obtain the identification information of the text unit deleted on the local side, and the text unit belonging to the identification information in the basic text data can be deleted; and / or, the modification data on the local side can be used to obtain the text content of the text unit newly added on the local side and the local position information, and the text content of the text unit newly added on the local side is added to the basic text data based on the local position information. Similarly, after obtaining the modification data of the other end, the modification data of the other end can be used to obtain the identification information of the text unit deleted by the other end, and the text unit belonging to the identification information in the basic text data can be deleted; and / or, the modification data of this end can be used to obtain the text content of the text unit newly added by the other end and the position information of the other end, and the text content of the text unit newly added by the other end can be added to the basic text data based on the position information of the other end. Since there is no conflict in processing the deletion and addition modification types in the same text unit, the text unit belonging to the identification information in the basic text data can be directly deleted according to the identification information of the text unit, and the text content of the newly added text unit can be directly added to the basic text data based on the above position information. Since multiple users do not affect each other when deleting or adding text units, the basic text data can be directly updated according to the modifications of this end and the other end, thereby improving the efficiency of collaborative text editing. In a public embodiment, the local end can send the local modification data to the server so that the server aggregates the local modification data and several other-end modification data sent by several other ends to the server and forwards them to the local end or the other end, so that when the local end obtains the local modification data and several other-end modification data, the local end receives the local modification data and several other-end modification data sent by the server, and based on this, respectively uses the local modification data and several other-end modification data sent by the server as current modification data, and determines whether the current modification data is the local modification data. If so, the text unit of the basic text data is updated based on the local modification data. If not, the local modification data is obtained and subsequent steps S27 to S29 are executed to update the text unit in the basic text data.

[0062] In a disclosed embodiment, in order to display the modifications made to basic text data by different users in a differentiated manner, after obtaining the modification data of the local end and the modification data of several other ends, the modification contents in the modification data of several other ends can be updated to the local interface text displayed on the local interface, and then the modification contents of each end in the updated local interface text can be displayed in a differentiated manner. For example, when the modification type of a text unit is new addition, the text content of the newly added text unit is displayed in a differentiated manner; for another example, when the modification type of a text unit is content modification, the modification content and modification position of the text unit by the other end are determined based on the difference information of the other end, and when the modification content of the local other end is addition, the added modification content of the other end is displayed in a differentiated manner, for example, the text data of the other end is " Newly generated speech content 123 ", the difference information obtained from the other end is [[0, Newly generated speech content],[1,123],[0, ]], that is, if the user on the other end adds "123", "123" will be displayed differently. The different display methods include bold, underline, italic, color highlighting, etc., and different users can correspond to different different display methods, or different users can correspond to different color highlights, so that users can compare and view the modifications of other users. In an actual scenario, the basic text data is obtained by converting the conference record audio into text, and is cached on the local end and the other end. In order to distinguish the modification content of each user on the basic text data on the local end interface and the different display method is color highlighting, the entry time of the local end user and several other end users is obtained, and the highlight color corresponding to the user is determined based on the entry time and the preset highlight color rule. The time to enter the meeting can be customized according to the situation, such as the time to modify the basic text data, the time to open the local end interface, etc. The preset highlight color rule includes the ranking of the time to enter the meeting and its corresponding highlight color. For example, if the time to enter the meeting is the first, the highlight color is red, etc. Therefore, the modification of the text style can be realized, and the modification of the style does not require special business processing.

[0063] In the above scheme, the local text data and the basic text data are obtained, and the text units of the local text data and the basic text data are compared to obtain the modification type of each text unit. When the modification type of the text unit is that the content is modified, the local difference information corresponding to the text unit whose content is modified is obtained. There is no need to determine the local difference information for the three modification types of unchanged content, deletion and new addition, which saves data processing time and improves efficiency. Then, the identification information of the text unit whose content is unchanged or deleted is used as the constituent data, the text content and position information of the newly added text unit is used as the constituent data, and the local difference content is used as the constituent data. The constituent data are summarized to obtain the local modification data. After obtaining the local modification data and several other-end modification data, the local difference information of the text unit is obtained based on the local modification data, and the other-end difference information of the same text unit is obtained based on the other-end modification data, so as to determine the local modification content and local modification position of the text unit made by the local end based on the local difference information, and determine the other-end modification content and other-end modification position of the text unit made by the other end based on the other-end difference information. Then, the text unit in the basic text data can be updated based on the local modification content, local modification position and other-end modification content and other-end modification position. Therefore, if multiple users have modified the same text unit and it is determined that the modifications conflict, there is no need to lock the text unit, and the local end can automatically merge the modified content.

[0064] See also Figure 3 , Figure 3 It is a framework diagram of an embodiment of a text collaborative editing device 30 of the present application. The text collaborative editing device 30 includes an acquisition module 31, an integration module 32, and an update module 33; the acquisition module 31 is used to acquire local modification data and a plurality of other-end modification data, wherein the local modification data and the other-end modification data are both generated by modifying basic text data, and the basic text data includes a plurality of text units; the integration module 32 is used to integrate the modification contents of the same text unit in the local modification data and a plurality of other-end modification data to obtain the target modification contents corresponding to the text unit; the update module 33 is used to update the text unit in the basic text data based on the target modification contents of the text unit.

[0065] In the above scheme, since the modification data on this end and the modification data on the other end are both generated by modifying the basic text data, that is, the basis of all modification data is the same, after the acquisition module 31 acquires the modification data on this end and several modification data on other ends, the acquisition module 31 integrates the modification contents of the same text unit in the modification data on this end and several modification data on other ends to obtain the target modification contents corresponding to the text unit. Finally, the update module 33 updates the text unit in the basic text data based on the target modification contents of the text unit, thereby integrating the modification data on all ends on the basis of the basic text data, and then realizing text collaborative editing on this end.

[0066] In some disclosed embodiments, when the acquisition module 31 is used to acquire the local modification data, it is also used to acquire the local text data and basic text data, where the local text data is obtained by the local user modifying the basic text data; compare the text units of the local text data with the text units of the basic text data to determine the modification content of each text unit; and generate the local modification data based on the modification content of each text unit.

[0067] Therefore, the local modified data is the result of comparing the local text data with the basic text data, and reflects the modification content of the basic text data by the local user.

[0068] In some disclosed embodiments, the acquisition module 31 is used to compare the text units of the local text data with the text units of the basic text data, and when determining the modified content of each text unit, it is also used to compare the text units of the local text data with the text units of the basic text data to obtain the modification type of each text unit, wherein the modification type includes at least one of the following: content not modified, deleted, content modified and newly added; and, obtain the local difference information corresponding to the text unit whose content is modified, wherein the local difference information represents the difference between the text unit in the local text data and the basic text data; the acquisition module 31 is used to generate the local modification data based on the modified content of each text unit, and is also used to use the identification information of the text unit whose content is not modified or deleted as the constituent data, the text content and position information of the newly added text unit as the constituent data, and the local difference content as the constituent data; summarize the constituent data to obtain the local modification data.

[0069] Therefore, when comparing the text units of the local text data with the text units of the basic text data to determine the modified content of each text unit, first compare the text units of the local text data with the text units of the basic text data to obtain the modification type of each text unit, and then obtain the local difference information corresponding to the text units whose content has been modified. On the one hand, it is not only determined that the text unit has been modified, but also the specific modification content is determined. On the other hand, the modification type can be determined first. The three modification types of unchanged content, deletion and new addition do not need to determine the local difference information, which saves data processing time and improves efficiency.

[0070] In some disclosed embodiments, the acquisition module 31 is used to compare the text units of the local text data and the text units of the basic text data, and when obtaining the modification type of each text unit, it is also used to search for text units with the same identifier in the local text data and the basic text data. If the text content of the text units with the same identifier is the same, it is determined that the modification type of the text unit is not modified; if the text content of the text units with the same identifier is different, it is determined that the modification type of the text unit is modified; if the identifier of the text unit in the local text data does not exist in the basic text data, it is determined that the modification type of the text unit is added; if the identifier of the text unit in the basic text data does not exist in the local interface text data, it is determined that the modification type of the text unit is deleted.

[0071] Therefore, by combining the comparison of the identifier and the text content, the modification type to which the text unit belongs can be determined simply and quickly.

[0072] In some disclosed embodiments, the local difference information includes several groups of content difference data, wherein each group of content difference data includes the text content and a modification identifier of a text unit, and the several groups of content difference data are sorted according to the position of the corresponding text content in the text unit, and the modification identifier is used to indicate that the corresponding text content is unmodified content in the local text data, the corresponding text content is newly added content in the local text data, and the corresponding text content is deleted content in the local text data; and / or, when the acquisition module 31 is used to obtain the local difference information corresponding to the text unit whose content is modified, it is also used to use the DIFF algorithm to obtain the local difference information of the text unit whose content is modified.

[0073] Therefore, the local end can use the DIFF algorithm to find the difference between the local text data and the basic text data with the text unit as the minimum comparison unit, and obtain the local difference information. The local difference information includes the text content and the modification mark, which is convenient for the subsequent integration of the modified content when the local end realizes text collaborative editing.

[0074] In some disclosed embodiments, the local text data and the basic text data are structured data obtained by respectively performing structured processing on the local interface text and the basic text; before the acquisition module 31 is used to acquire the local difference content between the local text data and the basic text data of the text unit whose content is modified, it is also used to convert the label information in the local text data and the basic text data into special characters, and generate a data dictionary using the correspondence between the label information and the special characters; when the local difference content is used as the component data, it is also used to use the local difference content and the data dictionary as the component data, and the data dictionary is used to restore the special characters to the label information based on the data dictionary when updating the basic text data.

[0075] Therefore, by converting the label information into special characters before obtaining the local difference content, the workload of local difference data processing of the label information can be reduced, and at the same time, the label information can be prevented from causing unnecessary impact on the displayed text content during the comparison between the local text data and the basic text data, thereby reducing the comparison error.

[0076] In some public embodiments, the acquisition module 31 is used to acquire a number of other-end modification data and is also used to receive a number of other-end modification data sent by the server, wherein the other-end modification data corresponds to the other-end data sent to the server and includes the modification content of each text unit in the other-end text data and the basic text data.

[0077] Therefore, this end receives the other end modification data from the server. Since the other end modification data includes the modification contents of each text unit in the other end text data and the basic text data, it is convenient to quickly integrate the modification contents when this end and the other end modify the same text unit.

[0078] In some disclosed embodiments, the integration module 32 is used to integrate the modification contents of the same text unit in the local modification data and several other-end modification data, and when obtaining the target modification contents corresponding to the text unit, it is also used to obtain the local difference information of the text unit based on the local modification data, and to obtain the other-end difference information of the same text unit based on the other-end modification data, wherein the local difference information represents the difference between the text unit in the local text data and the basic text data, and the other-end difference information represents the difference between the text unit in the other-end text data and the basic text data; based on the local difference information, determine the local modification contents and local modification positions of the text unit by the local end, and based on the other-end difference information, determine the other-end modification contents and other-end modification positions of the text unit by the other end; the update module 33 is used to update the text unit in the basic text data based on the target modification contents of the text unit, and is also used to update the text unit in the basic text data based on the local modification contents, the local modification positions, and the other-end modification contents and other-end modification positions.

[0079] Therefore, the differences between the text data on this end and the basic text data and the differences between the text data on the other end and the basic text data are obtained respectively, and the modified content and the modified position are determined respectively, so as to merge and process the modified content on the same basic text data, and the conflicting merge of the modified content can be achieved without locking the text unit as in the prior art.

[0080] In some disclosed embodiments, after the acquisition module 31 acquires the modification data of the local end, it is also used to use the modification data of the local end to acquire the identification information of the text unit deleted by the local end, and delete the text unit belonging to the identification information in the basic text data; and / or, using the modification data of the local end, acquire the text content of the text unit newly added to the local end and the position information of the local end, and add the text content of the text unit newly added to the local end to the basic text data based on the position information of the local end; after the acquisition module 31 acquires the modification data of the other end, it is also used to use the modification data of the other end to acquire the identification information of the text unit deleted by the other end, and delete the text unit belonging to the identification information in the basic text data; and / or, using the modification data of the local end, acquire the text content of the text unit newly added to the other end and the position information of the other end, and add the text content of the text unit newly added to the other end to the basic text data based on the position information of the other end.

[0081] Therefore, since multiple users do not affect each other when deleting or adding text units, the basic text data can be directly updated according to the modifications made by the local end and other ends, thereby improving the efficiency of collaborative text editing.

[0082] In some public embodiments, after the acquisition module 31 acquires the modification data of the local end and several modification data of the other ends, it is also used to update the modification contents in several modification data of the other ends to the local interface text displayed on the local interface; and display the modification contents of each end in the updated local interface text differently; and / or, if the modification contents of the modification data of the other end are located after the cursor position recorded in the local interface text before the update, the cursor is displayed in the updated local interface text according to the cursor position recorded before the update; if the modification contents of the modification data of the other end are located before the cursor position recorded before the update, the cursor position recorded before the update is added to the length of the modification contents of the modification data of the other end to obtain the latest cursor position, and the cursor is displayed in the updated local interface text according to the latest cursor position.

[0083] Therefore, compared with the existing OT algorithm to achieve text collaborative editing, the modification of text style needs to be processed separately. When implementing text collaborative editing on this end, the modified content of each end can be displayed differently, and the modification of text style can be achieved without special business processing, and it is convenient for users to compare and view the modified content of each end. In addition, whether the modified content of the other end is located after or before the cursor position recorded before the update of the text on the interface of this end, the original cursor position can be echoed.

[0084] In some disclosed embodiments, the text unit is a paragraph; and / or the basic text data is obtained by converting the conference record audio into text and is cached on the local end and the other end.

[0085] Therefore, using paragraphs as the smallest comparison unit can reduce the frequency of text content comparison and the size of transmitted data, and apply text collaborative editing to conference scenarios to enable multiple users to collaboratively edit the basic text data converted from conference record audio.

[0086] See also Figure 4 , Figure 4 1 is a schematic diagram of a framework of an embodiment of an electronic device 40 of the present application. The electronic device 40 includes a memory 41 and a processor 42 coupled to each other, the memory 41 stores program instructions, and the processor 42 is used to execute the program instructions to implement the steps in any of the above-mentioned text collaborative editing method embodiments. Specifically, the electronic device 40 may include but is not limited to: a desktop computer, a laptop computer, a server, a mobile phone, a tablet computer, etc., which are not limited here.

[0087] Specifically, the processor 42 is used to control itself and the memory 41 to implement the steps in any of the above-mentioned text collaborative editing method embodiments. The processor 42 can also be called a CPU (Central Processing Unit). The processor 42 may be an integrated circuit chip with signal processing capabilities. The processor 42 can also be a general-purpose processor, a digital signal processor (Digital Signal Processor, DSP), an application-specific integrated circuit (Application Specific Integrated Circuit, ASIC), a field-programmable gate array (Field-Programmable Gate Array, FPGA) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components. The general-purpose processor can be a microprocessor or the processor can also be any conventional processor, etc. In addition, the processor 42 can be implemented by an integrated circuit chip.

[0088] In the above scheme, since the modification data on this end and the modification data on the other end are both generated by modifying the basic text data, that is, the basis of all modification data is the same, after the local end obtains the modification data on this end and several modification data on other ends, it integrates the modification contents of the same text unit in the modification data on this end and several modification data on other ends to obtain the target modification content corresponding to the text unit, and finally, based on the target modification content of the text unit, updates the text unit in the basic text data, thereby integrating the modification data on all ends on the basis of the basic text data, and then realizing text collaborative editing on the local end.

[0089] See also Figure 5 , Figure 5 The schematic diagram is a schematic diagram of a computer-readable storage medium 50 of the present application. The computer-readable storage medium 50 stores program instructions 51 that can be executed by a processor, and the program instructions 51 are used to implement the steps in any of the above-mentioned text collaborative editing method embodiments.

[0090] In the above scheme, since the modification data on this end and the modification data on the other end are both generated by modifying the basic text data, that is, the basis of all modification data is the same, after the local end obtains the modification data on this end and several modification data on other ends, it integrates the modification contents of the same text unit in the modification data on this end and several modification data on other ends to obtain the target modification content corresponding to the text unit, and finally, based on the target modification content of the text unit, updates the text unit in the basic text data, thereby integrating the modification data on all ends on the basis of the basic text data, and then realizing text collaborative editing on the local end.

[0091] In some embodiments, the functions or modules included in the device provided by the embodiments of the present disclosure can be used to execute the method described in the above method embodiments. The specific implementation can refer to the description of the above method embodiments, and for the sake of brevity, it will not be repeated here.

[0092] The above description of various embodiments tends to emphasize the differences between the various embodiments. The same or similar aspects can be referenced to each other, and for the sake of brevity, they will not be repeated herein.

[0093] In the several embodiments provided in the present application, it should be understood that the disclosed methods and devices can be implemented in other ways. For example, the device implementation described above is only schematic. For example, the division of modules or units is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, and the indirect coupling or communication connection of devices or units can be electrical, mechanical or other forms.

[0094] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the present embodiment.

[0095] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.

[0096] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application is essentially or the part that contributes to the prior art or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including a number of instructions to enable a computer device (which can be a personal computer, server, or network device, etc.) or a processor (processor) to perform all or part of the steps of each implementation method of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk and other media that can store program code.

Claims

1. A text collaborative editing method, characterized in that: The method comprises: The local end obtains local text data and basic text data, wherein the local text data is obtained by modifying the basic text data by the local end user, and the basic text data includes a plurality of text units; Comparing the text units of the local text data with the text units of the basic text data, obtaining the modification type of each text unit, wherein the modification type includes at least one of the following: content is not modified, deleted, content is modified, and added; and, Acquire local end difference information corresponding to the text unit whose content is modified, wherein the local end difference information indicates the difference between the text unit in the local end text data and the basic text data; Using identification information of the text unit whose content is not modified or deleted as constituent data, using text content and position information of the newly added text unit as constituent data, and using the local end difference content as constituent data; Summarize the composition data to obtain local modification data; The local end obtains a plurality of other-end modification data, wherein the local-end modification data and the other-end modification data are both generated by modifying the basic text data; Integrate the modification content of the same text unit in the modification data of the local end and the modification data of the plurality of other ends to obtain the target modification content corresponding to the text unit; The text unit in the basic text data is updated based on the target modified content of the text unit.

2. The method according to claim 1, characterized in that The comparing the text units of the local text data with the text units of the basic text data to obtain the modification type to which each of the text units belongs includes: Searching for text units with the same identifier in the local text data and the basic text data, and if the text contents of the text units with the same identifier are the same, determining that the modification type to which the text unit belongs is that the content is not modified; if the text contents of the text units with the same identifier are different, determining that the modification type to which the text unit belongs is that the content is modified; If the identifier of the text unit in the local text data does not exist in the basic text data, determining that the modification type to which the text unit belongs is the addition; If the identifier of the text unit in the basic text data does not exist in the local text data, it is determined that the modification type to which the text unit belongs is the deletion.

3. The method according to claim 1, characterized in that: The local end difference information includes several groups of content difference data, wherein each group of the content difference data includes the text content of the text unit and a modification identifier, the several groups of content difference data are sorted according to the position of the corresponding text content in the text unit, and the modification identifier is used to indicate that the corresponding text content is the unmodified content in the local end text data, the corresponding text content is the newly added content in the local end text data, and the corresponding text content is the deleted content in the local end text data; And / or, the obtaining of the local end difference information corresponding to the text unit whose content is modified includes: The local end difference information of the text unit whose content is modified is obtained by using a DIFF algorithm.

4. The method according to claim 2, characterized in that: The local text data and the basic text data are structured data obtained by respectively performing structured processing on the local interface text and the basic text; before obtaining the local difference content between the local text data and the basic text data of the text unit whose content is modified, the method further includes: Convert the tag information in the local text data and the basic text data into special characters, and generate a data dictionary using the correspondence between the tag information and the special characters; The taking the local end difference content as the composition data includes: The local end difference content and the data dictionary are used as the component data, and the data dictionary is used to restore the special characters to the label information based on the data dictionary when the basic text data is updated.

5. The method according to claim 1, characterized in that Acquiring the plurality of other-end modification data includes: A plurality of other-end modification data sent by the server is received, wherein the other-end modification data is sent by the corresponding other-end to the server and includes the modification content of each text unit in the other-end text data and the basic text data.

6. The method according to claim 1, characterized in that The step of integrating the modification contents of the same text unit in the local modification data and the plurality of other-end modification data to obtain target modification contents corresponding to the text unit includes: Acquire local-end difference information of the text unit based on the local-end modification data, and acquire other-end difference information of the same text unit based on the other-end modification data, wherein the local-end difference information represents the difference between the text unit in the local-end text data and the basic text data, and the other-end difference information represents the difference between the text unit in the other-end text data and the basic text data; Determine the local modification content and the local modification position of the text unit by the local end based on the local end difference information, and determine the other end modification content and the other end modification position of the text unit by the other end based on the other end difference information; The updating of the text unit in the basic text data based on the target modified content of the text unit includes: The text unit in the basic text data is updated based on the local-end modified content, the local-end modified position, and the other-end modified content and the other-end modified position.

7. The method according to claim 1, characterized in that After obtaining the modification data at the local end, the method further includes: Using the local modification data, obtaining identification information of the text unit deleted by the local end, and deleting the text unit belonging to the identification information in the basic text data; and / or, Using the local modification data, the text content of the text unit newly added on the local end and the local position information are obtained, and based on the local position information, the text content of the text unit newly added on the local end is added to the basic text data; After acquiring the modification data of the other end, the method further includes: Using the other-end modification data, obtaining identification information of the text unit deleted by the other-end, and deleting the text unit belonging to the identification information in the basic text data; and / or, The local-end modification data is used to obtain the text content of the text unit newly added by the other end and the other end position information, and the text content of the text unit newly added by the other end is added to the basic text data based on the other end position information.

8. The method according to claim 1, characterized in that After obtaining the local-end modification data and a plurality of other-end modification data, the method further includes: Update the modified contents in the modified data of the other end to the local end interface text displayed on the local end interface; Distinguishing and displaying the modified contents of each terminal in the updated local terminal interface text; and / or, If the modified content of the data modified by the other end is located after the cursor position recorded before the update of the local interface text, the cursor is displayed on the updated local interface text according to the cursor position recorded before the update; if the modified content of the data modified by the other end is located before the cursor position recorded before the update, the cursor position recorded before the update is added to the length of the modified content of the data modified by the other end to obtain the latest cursor position, and the cursor is displayed on the updated local interface text according to the latest cursor position.

9. The method according to claim 1, characterized in that: The text unit is a paragraph; And / or, the basic text data is obtained by converting the conference record audio into text and is cached on the local end and the other end.

10. A text collaborative editing device, characterized in that: The device comprises: An acquisition module, used for acquiring local-end modification data and a plurality of other-end modification data, wherein the local-end modification data and the other-end modification data are both generated by modifying basic text data, and the basic text data includes a plurality of text units; An integration module, used for integrating the modification contents of the same text unit in the modification data of the local end and the modification data of the plurality of other ends, to obtain the target modification contents corresponding to the text unit; An updating module, configured to update the text unit in the basic text data based on the target modified content of the text unit; Among them, when the acquisition module is used to obtain the modified data on the local side, it is also used to obtain the text data on the local side and the basic text data, and the text data on the local side is obtained by the local user modifying the basic text data; compare the text units of the text data on the local side and the text units of the basic text data to obtain the modification type to which each of the text units belongs, wherein the modification type includes at least one of the following: content not modified, deleted, content modified and newly added; and obtain the local difference information corresponding to the text unit whose content is modified, wherein the local difference information represents the difference between the text unit in the text data on the local side and the basic text data; use the identification information of the text unit whose content is not modified or deleted as the constituent data, use the text content and position information of the newly added text unit as the constituent data, and use the local difference content as the constituent data; summarize the constituent data to obtain the modified data on the local side.

11. An electronic device, characterized in that: It comprises a memory and a processor coupled to each other, wherein the processor is used to execute program instructions stored in the memory to implement the text collaborative editing method as described in any one of claims 1 to 9.

12. A computer-readable storage medium having stored thereon program instructions executable by a processor, characterized in that: When the program instructions are executed by a processor, the text collaborative editing method described in any one of claims 1 to 9 is implemented.

Citation Information

Patent Citations

  • Document parallel processing method and system

    CN102096660A

  • Data file processing method, device and system

    CN104090943A

  • Interface code generation method and terminal device

    CN108268253A

  • Method and device for allowing multi-users to edit a shared electronic file simultaneously

    CN1979466A

  • Method and system for row lock solution

    US20210149867A1