Document cooperation method and device, electronic equipment and storage medium
By obtaining the user's modification goals in the document and using the content generation service to generate modification suggestions, the problem of inefficient generation of document modification suggestions is solved, and automated generation and presentation is realized, and collaboration efficiency is improved.
Patent Information
- Application Number
- CN202410894819.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-04
- Publication Date
- 2024-12-20
AI Technical Summary
In the prior art, the generation of document modification suggestions is low, and users need to list modification suggestions one by one, resulting in inefficiency.
By obtaining the user's modification goals in the document, using the content generation service to generate modification suggestions based on the document and the modification goals, and displaying these suggestions in the document, users can collaborate with the content generation service to generate and display the modification suggestions for the document.
It improves the efficiency of generating document modification suggestions, generates and displays modification suggestions through automated means, reduces the steps of manual input by users and improves collaboration efficiency.
Smart Images

Figure CN119167898A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of document processing technology, and in particular to a document collaboration method, device, electronic device and storage medium. Background Art
[0002] In the related art, when a user has modification suggestions for a document, the user is usually required to express the modification suggestions in text or voice, and list the modification suggestions for the document one by one, so that other users can modify the document accordingly according to the proposed modification opinions. As a result, the efficiency of generating modification suggestions for the document is low.
[0003] It can be seen that how to improve the efficiency of generating modification suggestions for documents is a technical issue worthy of attention. Summary of the invention
[0004] In view of this, in order to solve some or all of the above-mentioned technical problems, the embodiments of the present application provide a document collaboration method, device, electronic device and storage medium.
[0005] In a first aspect, an embodiment of the present application provides a document collaboration method, the method comprising:
[0006] Get the modification target written by the user in the document;
[0007] Generate a modification suggestion for the document based on the document and the modification target through a content generation service;
[0008] The modification suggestion is displayed in the document.
[0009] In a possible implementation, obtaining the modification target written by the user in the document includes:
[0010] A modification target written by a user to a preset position of a document is obtained, where the preset position includes at least one of the following: an annotation of the document, and a revision mark of the document.
[0011] In a possible implementation, obtaining the modification target written by the user in the document includes:
[0012] Read document data written by the user to the document;
[0013] A modification target is extracted from the document data that meets the preset requirements.
[0014] In a possible implementation manner, the preset requirement includes at least one of the following:
[0015] The document data is data including preset characters, and the preset characters are used to trigger the content generation service;
[0016] The document data is data written into the document at a preset time;
[0017] The document data is data written into the document by a preset user;
[0018] The document data is data that has not been processed by the content generation service.
[0019] In a possible implementation, the generating, by the content generation service, a modification suggestion for the document based on the document and the modification target includes:
[0020] Based on the modification target, determining target content in the document that is related to the modification target, wherein the target content is at least part of the content in the document;
[0021] Through the content generation service, a modification suggestion for the target content is generated based on the target content and the modification target.
[0022] In a possible implementation manner, determining, based on the modification target, target content in the document that is related to the modification target, includes at least one of the following:
[0023] Determining target content according to the position of the modification target in the document;
[0024] Determining target content according to the type of the object in the document to which the modification target is applied;
[0025] A semantic analysis is performed on the modification target to determine the target content from the document.
[0026] In a possible implementation, the displaying the modification suggestion includes:
[0027] Displaying the modification suggestion on the preset interface;
[0028] After displaying the modification suggestion, the method further includes:
[0029] Receiving a user operation acting on the preset interface;
[0030] In response to the user operation, the modification suggestion is cancelled, or the document content of the document is revised based on the modification suggestion.
[0031] In a possible implementation, the displaying the modification suggestion includes:
[0032] Revising the document content of the document based on the modification suggestion;
[0033] Using the revised document content as target content, wherein the target content includes revision marks generated by revision based on the modification suggestion;
[0034] The target content is displayed.
[0035] In a possible implementation manner, the modification suggestion includes: modification content, and revising the document content of the document based on the modification suggestion includes:
[0036] The modification content included in the modification suggestion is written into the document content of the document in the form of revision marks and / or the document content of the document is deleted.
[0037] In a possible implementation manner, the modification suggestion further includes: a reason for modification;
[0038] After writing the modification content included in the modification suggestion into the document content of the document in the form of revision marks and / or deleting the document content of the document, the method further includes:
[0039] The modification reason included in the modification suggestion is used to identify the written content and / or deleted content.
[0040] In a possible implementation manner, the using the modification reason included in the modification suggestion to identify the written content and / or deleted content includes:
[0041] The written content and / or deleted content is marked in the form of annotations, wherein the annotations at least display the reason for the modification.
[0042] In a possible implementation manner, the modified content includes first content and / or second content, wherein the first content is original content of the document, and the second content is content after the first content is modified;
[0043] The step of writing the modification content included in the modification suggestion into the document content of the document in the form of a revision mark and / or deleting the document content of the document includes:
[0044] marking the first content in the document with a revision mark indicating deletion of content; and / or,
[0045] The second content is added to the document, and the second content is marked in the document with a revision mark indicating the added content.
[0046] In a possible implementation manner, adding the second content to the document includes:
[0047] determining a format of the first content;
[0048] The second content having the format is added to the document.
[0049] In a possible implementation manner, the modified content includes first content and / or second content, wherein the first content is original content of the document, and the second content is content after the first content is modified;
[0050] The step of writing the modification content included in the modification suggestion into the document content of the document in the form of a revision mark and / or deleting the document content of the document includes:
[0051] comparing the difference between the first content and the second content;
[0052] modifying the first content into the second content based on the difference;
[0053] The portions modified based on the difference are marked with revision marks indicating deleted content and / or with revision marks indicating added content.
[0054] In a possible implementation manner, before revising the document content of the document based on the modification suggestion, the method further includes:
[0055] Determining a modification location corresponding to the modification suggestion in the document; and
[0056] The step of revising the document content of the document based on the modification suggestion includes:
[0057] According to the modification content included in the modification suggestion, the document content of the document is written at the modification position in the form of revision marks and / or the document content corresponding to the modification position in the document is deleted.
[0058] In a possible implementation manner, when the modification suggestion includes document deletion content, displaying the target content includes:
[0059] determining how revisions of said document are displayed;
[0060] Displaying the document deleted content that has been deleted from the target content in accordance with the revised display mode;
[0061] The document deleted content refers to content deleted from the document content of the document, and the document deleted content is displayed as a revision mark in the target content.
[0062] In a possible implementation manner, displaying the deleted document content that has been deleted from the target content in the revised display manner includes:
[0063] In the case where the revision display mode is the first mode, the deleted document content in the target content is displayed in an annotation mode, wherein the first mode means displaying the revision mark in an annotation box; or
[0064] When the revision display mode is the second mode, the document deleted content deleted from the target content is displayed in an embedded manner, wherein the second mode means that a revision mark is embedded in the document.
[0065] In a possible implementation, the content generation service is implemented by a large language model; and
[0066] The step of generating a modification suggestion for the document based on the document and the modification target through a content generation service includes:
[0067] Based on the modification target, determining a prompt word of the large language model;
[0068] Inputting the document and the prompt word into the large language model to generate modification suggestions for the document;
[0069] The large language model represents the correspondence between the document, the prompt word, and the modification suggestion of the document.
[0070] In a possible implementation, obtaining the modification target written by the user in the document includes:
[0071] Obtaining the annotation content written by the user in the document; determining the modification target of the document from the annotation content; or,
[0072] Acquire a preset instruction written by a user in a document; determine a modification target of the document based on an association relationship between the preset instruction and a preset modification target; or,
[0073] Obtain a revision mark written by a user in a document; and determine a modification target of the document from the revision mark.
[0074] In a possible implementation, after displaying the modification suggestion in the document, the method further includes at least one of the following:
[0075] In response to a revision acceptance operation for the document, accepting all or part of the revision marks generated by the content generation service in the document;
[0076] In response to a revision rejection operation for the document, rejecting all or part of the revision marks generated by the content generation service in the document;
[0077] In response to a first display operation on the document before revision, displaying the document content before the modification suggestion is revised to the document;
[0078] In response to a second display operation on the revised document, displaying the document content after the modification suggestion is revised to the document;
[0079] In response to a selection operation on a target review object in a review object set of the document, a revision mark generated by the target review object is displayed, wherein the review object set includes the review objects represented by the content generation service.
[0080] In a second aspect, an embodiment of the present application provides a document collaboration device, the device comprising:
[0081] An acquisition unit, used for acquiring a modification target written by a user in a document;
[0082] A generating unit, configured to generate a modification suggestion for the document based on the document and the modification target through a content generation service;
[0083] A display unit is used to display the modification suggestion in the document.
[0084] In a possible implementation, obtaining the modification target written by the user in the document includes:
[0085] A modification target written by a user to a preset position of a document is obtained, where the preset position includes at least one of the following: an annotation of the document, and a revision mark of the document.
[0086] In a possible implementation, obtaining the modification target written by the user in the document includes:
[0087] Read document data written by the user to the document;
[0088] A modification target is extracted from the document data that meets the preset requirements.
[0089] In a possible implementation manner, the preset requirement includes at least one of the following:
[0090] The document data is data including preset characters, and the preset characters are used to trigger the content generation service;
[0091] The document data is data written into the document at a preset time;
[0092] The document data is data written into the document by a preset user;
[0093] The document data is data that has not been processed by the content generation service.
[0094] In a possible implementation, the generating, by the content generation service, a modification suggestion for the document based on the document and the modification target includes:
[0095] Based on the modification target, determining target content in the document that is related to the modification target, wherein the target content is at least part of the content in the document;
[0096] Through the content generation service, a modification suggestion for the target content is generated based on the target content and the modification target.
[0097] In a possible implementation manner, determining, based on the modification target, target content in the document that is related to the modification target, includes at least one of the following:
[0098] Determining target content according to the position of the modification target in the document;
[0099] Determining target content according to the type of the object in the document to which the modification target is applied;
[0100] A semantic analysis is performed on the modification target to determine the target content from the document.
[0101] In a possible implementation, the displaying the modification suggestion includes:
[0102] Display the modification suggestion on the preset interface;
[0103] After displaying the modification suggestion, the method further includes:
[0104] A receiving unit, used to receive a user operation acting on the preset interface;
[0105] The processing unit is used to cancel the modification suggestion in response to the user operation, or to revise the document content of the document based on the modification suggestion.
[0106] In a possible implementation, the displaying the modification suggestion includes:
[0107] Revising the document content of the document based on the modification suggestion;
[0108] Using the revised document content as target content, wherein the target content includes revision marks generated by revision based on the modification suggestion;
[0109] The target content is displayed.
[0110] In a possible implementation manner, the modification suggestion includes: modification content, and revising the document content of the document based on the modification suggestion includes:
[0111] The modification content included in the modification suggestion is written into the document content of the document in the form of revision marks and / or the document content of the document is deleted.
[0112] In a possible implementation manner, the modification suggestion further includes: a reason for modification;
[0113] After writing the modification content included in the modification suggestion into the document content of the document in the form of revision marks and / or deleting the document content of the document, the method further includes:
[0114] The identification unit is used to identify the written content and / or deleted content using the modification reason included in the modification suggestion.
[0115] In a possible implementation manner, the using the modification reason included in the modification suggestion to identify the written content and / or deleted content includes:
[0116] The written content and / or deleted content is marked in the form of annotations, wherein the annotations at least display the reason for the modification.
[0117] In a possible implementation manner, the modified content includes first content and / or second content, wherein the first content is original content of the document, and the second content is content after the first content is modified;
[0118] The step of writing the modification content included in the modification suggestion into the document content of the document in the form of a revision mark and / or deleting the document content of the document includes:
[0119] marking the first content in the document with a revision mark indicating deletion of content; and / or,
[0120] The second content is added to the document, and the second content is marked in the document with a revision mark indicating the added content.
[0121] In a possible implementation manner, adding the second content to the document includes:
[0122] determining a format of the first content;
[0123] The second content having the format is added to the document.
[0124] In a possible implementation manner, the modified content includes first content and / or second content, wherein the first content is original content of the document, and the second content is content after the first content is modified;
[0125] The step of writing the modification content included in the modification suggestion into the document content of the document in the form of a revision mark and / or deleting the document content of the document includes:
[0126] comparing the difference between the first content and the second content;
[0127] modifying the first content into the second content based on the difference;
[0128] The portions modified based on the difference are marked with revision marks indicating deleted content and / or with revision marks indicating added content.
[0129] In a possible implementation manner, before revising the document content of the document based on the modification suggestion, the device further includes:
[0130] a determining unit, configured to determine a modification position corresponding to the modification suggestion in the document; and
[0131] The step of revising the document content of the document based on the modification suggestion includes:
[0132] According to the modification content included in the modification suggestion, the document content of the document is written at the modification position in the form of revision marks and / or the document content corresponding to the modification position in the document is deleted.
[0133] In a possible implementation manner, when the modification suggestion includes document deletion content, displaying the target content includes:
[0134] determining how revisions of said document are displayed;
[0135] Displaying the document deleted content that has been deleted from the target content in accordance with the revised display mode;
[0136] The document deleted content refers to content deleted from the document content of the document, and the document deleted content is displayed as a revision mark in the target content.
[0137] In a possible implementation manner, displaying the deleted document content that has been deleted from the target content in the revised display manner includes:
[0138] In the case where the revision display mode is the first mode, the deleted document content in the target content is displayed in an annotation mode, wherein the first mode means displaying the revision mark in an annotation box; or
[0139] When the revision display mode is the second mode, the document deleted content deleted from the target content is displayed in an embedded manner, wherein the second mode means that a revision mark is embedded in the document.
[0140] In a possible implementation, the content generation service is implemented by a large language model; and
[0141] The step of generating a modification suggestion for the document based on the document and the modification target through a content generation service includes:
[0142] Based on the modification target, determining a prompt word of the large language model;
[0143] Inputting the document and the prompt word into the large language model to generate modification suggestions for the document;
[0144] The large language model represents the correspondence between the document, the prompt word, and the modification suggestion of the document.
[0145] In a possible implementation, obtaining the modification target written by the user in the document includes:
[0146] Obtaining the annotation content written by the user in the document; determining the modification target of the document from the annotation content; or,
[0147] Acquire a preset instruction written by a user in a document; determine a modification target of the document based on an association relationship between the preset instruction and a preset modification target; or,
[0148] Obtain a revision mark written by a user in a document; and determine a modification target of the document from the revision mark.
[0149] In a possible implementation manner, after displaying the modification suggestion in the document, the device further includes at least one of the following:
[0150] In response to a revision acceptance operation for the document, accepting all or part of the revision marks generated by the content generation service in the document;
[0151] In response to a revision rejection operation for the document, rejecting all or part of the revision marks generated by the content generation service in the document;
[0152] In response to a first display operation on the document before revision, displaying the document content before the modification suggestion is revised to the document;
[0153] In response to a second display operation on the revised document, displaying the document content after the modification suggestion is revised to the document;
[0154] In response to a selection operation on a target review object in a review object set of the document, a revision mark generated by the target review object is displayed, wherein the review object set includes the review objects represented by the content generation service.
[0155] In a third aspect, an embodiment of the present application provides an electronic device, including:
[0156] Memory for storing computer programs;
[0157] The processor is used to execute the computer program stored in the memory, and when the computer program is executed, the method of any embodiment of the document collaboration method of the first aspect of the present application is implemented.
[0158] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium having a computer program stored thereon. When the computer program is executed by a processor, the method of any embodiment of the document collaboration method of the first aspect described above is implemented.
[0159] In a fifth aspect, an embodiment of the present application provides a computer program product, which includes a computer-readable code. When the computer-readable code is executed on a device, the processor in the device implements a method as in any embodiment of the document collaboration method of the first aspect mentioned above.
[0160] The document collaboration method provided in the embodiment of the present application can obtain the modification target written by the user in the document, and then generate the modification suggestion of the document based on the document and the modification target through the content generation service, and then display the modification suggestion in the document. Thus, the user can write the modification target of the document by interacting with the document, and then display the modification suggestion of the document generated by the content generation service based on the document and the modification target of the document in the document. In this way, the modification suggestion of the document can be generated and displayed through the collaboration of the user and the content generation service, which can improve the generation efficiency of the modification suggestion of the document. BRIEF DESCRIPTION OF THE DRAWINGS
[0161] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present application and, together with the description, serve to explain the principles of the present application.
[0162] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, for ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative labor.
[0163] One or more embodiments are exemplarily described by pictures in the corresponding drawings, and these exemplified descriptions do not constitute limitations on the embodiments. Elements with the same reference numerals in the drawings represent similar elements, and unless otherwise stated, the figures in the drawings do not constitute proportional limitations.
[0164] Figure 1 A flowchart of a document collaboration method provided in an embodiment of the present application;
[0165] Figure 2 A flowchart of another document collaboration method provided in an embodiment of the present application;
[0166] Figure 3 A flowchart of another document collaboration method provided in an embodiment of the present application;
[0167] Figure 4 A flowchart of another document collaboration method provided in an embodiment of the present application;
[0168] Figure 5A-5M A schematic diagram of an application scenario of a document collaboration method provided in an embodiment of the present application;
[0169] Figure 6 A schematic diagram of the structure of a document collaboration device provided in an embodiment of the present application;
[0170] Figure 7 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0171] Various exemplary embodiments of the present application will now be described in detail with reference to the accompanying drawings. Obviously, the described embodiments are part of the embodiments of the present application, rather than all of the embodiments. It should be noted that unless otherwise specifically stated, the relative arrangement of the components and steps, the numerical expressions and the numerical values described in these embodiments do not limit the scope of the present application.
[0172] Those skilled in the art will understand that the terms "first" and "second" in the embodiments of the present application are only used to distinguish between different steps, devices, modules and other objects, and do not represent any specific technical meanings, nor do they indicate the logical order between them.
[0173] It should also be understood that in this embodiment, “plurality” may refer to two or more than two, and “at least one” may refer to one, two or more than two.
[0174] It should also be understood that any component, data or structure mentioned in the embodiments of the present application can generally be understood as one or more, unless explicitly limited or otherwise indicated in the context.
[0175] In addition, the term "and / or" in this application 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 represent: A exists alone, A and B exist at the same time, and B exists alone. In addition, the character " / " in this application generally indicates that the associated objects before and after are in an "or" relationship.
[0176] It should also be understood that the description of the various embodiments in this application focuses on the differences between the various embodiments, and the same or similar aspects thereof can be referenced to each other, and for the sake of brevity, they will not be described one by one.
[0177] The following description of at least one exemplary embodiment is merely illustrative in nature and is in no way intended to limit the present application, its application, or uses.
[0178] Technologies, methods, and equipment known to ordinary technicians in the relevant art may not be discussed in detail, but where appropriate, the above-mentioned technologies, methods, and equipment should be considered as part of the specification.
[0179] It should be noted that like reference numerals and letters refer to similar items in the following figures, and therefore, once an item is defined in one figure, it need not be further discussed in subsequent figures.
[0180] It should be noted that, in the absence of conflict, the embodiments in this application and the features in the embodiments can be combined with each other. To facilitate the understanding of the embodiments of the present application, the present application will be described in detail below with reference to the accompanying drawings and in combination with the embodiments. Obviously, the described embodiments are part of the embodiments of the present application, rather than all of the embodiments. Based on the embodiments in this application, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of this application.
[0181] In addition, it should be noted that the users described in this application can be distinguished by user identification. For example, the user identification can be a login account. In this scenario, if different persons use the same account to log in, the above different persons can be considered to be the same user; if the same person uses different accounts to log in, the same person who logs in to different accounts can be considered to be different users. For another example, when the device is not logged in, the user identification can also be assigned based on the device identification of the device. In this scenario, if different persons use devices with the same device identification to operate, the above different persons can be considered to be the same user; if the same person uses devices with different device identifications to operate, the above same person can be considered to be different users.
[0182] In order to solve the technical problem of how to improve the efficiency of generating modification suggestions for documents in the prior art, the present application provides a document collaboration method, device, electronic device and storage medium, which can improve the efficiency of generating modification suggestions for documents.
[0183] Figure 1 A flowchart of a document collaboration method provided for an embodiment of the present application. The method can be applied to one or more electronic devices such as smart phones, laptops, desktop computers, portable computers, servers, etc. In addition, the execution subject of the method can be hardware or software. When the above-mentioned execution subject is hardware, the execution subject can be one or more of the above-mentioned electronic devices. For example, a single electronic device can execute the method, or a plurality of electronic devices can cooperate with each other to execute the method. When the above-mentioned execution subject is software, the method can be implemented as multiple software or software modules, or as a single software or software module. No specific limitation is made here.
[0184] like Figure 1 As shown, the method specifically includes:
[0185] Step 101, obtaining the modification target written by the user in the document.
[0186] In this embodiment, the document may include but is not limited to files in the following formats: doc format, docx format, ppt format, pptx format, rtf (Rich Text Format) and html (Hyper Text Markup Language) format, etc. In addition, the document may also be an offline document stored locally, or an online document stored in the cloud.
[0187] The document can be opened and processed using the document processing software / system. The user can be an account or device that logs into the document processing software / system. A unique identification number of the user can be set to distinguish different accounts and devices. The account can be a user registered in the document processing software / system or a guest user. When the execution subject is software, the document processing software / system can be the execution subject. When the execution subject is hardware, the document processing software / system is installed in the execution subject, or the document processing software / system can be accessed.
[0188] Users can operate, edit, write and modify documents.
[0189] The modification target can indicate the modification effect that the user expects to achieve. Specifically, the modification target can be plain text or rich text. For example, "Please write a description", "Please provide illustrations for each example in the description", "Please add illustration marks and illustration descriptions in the description according to the illustrations, and give examples", "Please polish the entire text, the specific requirement is AAAAAA".
[0190] As an example, the user may write the modification target of the document into the document data of the document, for example, into the body text, annotations, comments of the document, or a preset window of a document display page associated with the document.
[0191] Furthermore, the document data of the document may be read, and the modification target written into the document data by the user may be acquired from the document data.
[0192] For example, taking a word document (e.g., doc format, docx format) as an example, a word document is essentially a compressed package, and after decompression, there are various xml files, which are the document data corresponding to the word document. Different parts of a document can be stored in the same xml file, or in different xml files. For example, comments and annotations on the main text of the document can be stored in the "comments.xml" file, and the main text of the document can be stored in the "document.xml" file. Tags are used in the xml file to save the content of the document, the type of content, and the content format.
[0193] Content in the form of comments and annotations can be stored in the "comments.xml" file, which can be represented in the document data of the document as follows:
[0194]
[0195] Above, label <w:comment>It is used to indicate that the content represented by this segment of document data is an annotation or comment. Furthermore, the parameter of w:id represents the unique identification number "2" of the comment, the parameter of w:author represents the user name or user unique identification number "User A" of the user who wrote the comment, and the parameter of w:date represents the time when the comment was written "2024-07-01". <w:p>The tag indicates where in the document the comment is written. Specifically, the unique paragraph number "7B7A7054" represented by the parameter of paraId is used to indicate the paragraph in the document where the comment is written. <w:t>The tag indicates that the specific content of the comment is "Please write an explanation, @AI Collaborative Assistant".
[0196] Content of the text type can be stored in the "document.xml" file. In particular, revision marks can be represented in the document data of the document as follows:
[0197]
[0198] Above, revision marks include deletion marks, using the tag <w:del>Indicates a delete mark. <w:deltext>The tag indicates that the specific deleted content is "get", the w:id tag indicates that the unique identification number of the deletion mark is "3", the w:author parameter indicates that the user who deleted the content is "AI writing assistant", and the w:date parameter indicates that the time of deletion of the content is "2024-07-02".
[0199] Revision marks include insertion marks (addition marks), using tags <w:ins>Indicates a delete mark. <w:t>The tag indicates that the specific deleted content is "Please write instructions, @AI Collaboration Assistant", the w:id tag is used to indicate that the unique identification number of the insertion mark is "12", the w:author parameter is used to indicate that the user who inserted the content is "User B", and the w:date parameter is used to indicate the time of insertion of the content is "2024-07-02".
[0200] In the example of a word document, the document data of the document can be read, and based on the content in the document data determined by the tag and the type of the content, the modification target can be read from the content of the preset type, such as the above-mentioned "Please write a description, @AI Collaborative Assistant" belonging to the comment type.
[0201] Step 102: Generate modification suggestions for the document based on the document and the modification target through a content generation service.
[0202] In this embodiment, the content generation service is a service that can automatically generate content, and the generated content may include text, rich text, etc. Specifically, the content generation service is integrated with preset functions related to content processing. This function can be implemented through a neural network model or a preset content processing rule. Exemplarily, the neural network model can be a large language model, a generative adversarial model, an encoder, a decoder, etc., which can be used to implement content processing related functions such as proofreading text errors, detecting sensitive words, or document polishing. The preset content processing rules can be rules for proofreading text errors, detecting sensitive words, or document polishing, so as to implement content processing functions such as proofreading text errors, detecting sensitive words, or document polishing.
[0203] In a specific embodiment, the content generation service may process the received content with the corresponding function and then output the result. For example, the document and the modification target of the document may be used as the input content of the content generation service, and after the content generation service processes the input content, a modification suggestion of the document is generated as the output result of the content generation service.
[0204] As an example, the content generation service may be a software module that implements the above functions, or the content generation service may also be provided via a service responsible for implementing the above functions.
[0205] The content generation service may be run in the above-mentioned execution subject, or may be run in a location accessible to the execution subject.
[0206] The modification suggestion may indicate a modification method that meets the above modification target. As an example, the modification suggestion may include at least one of the following: modification content, modification reason, modification location, modification object, etc. As an example, when the modification target indicates "document polishing", the modification suggestion may include "Paragraph X has a grammatical error and can be adjusted to BBBB"; or, the modification suggestion may also include "It is recommended to adjust A in the document to B"; or, the modification suggestion may also use revision to adjust A in the document to B, and / or give the modification reason "there is a grammatical error".
[0207] Step 103: display the modification suggestion in the document.
[0208] In this embodiment, after the modification suggestion is generated, the modification suggestion can be displayed in the document. For example, the modification suggestion can be directly written into the body of the document in the form of revision; it can also be displayed only in the document annotation; or it can be displayed in a preset interface, such as a sidebar, floating window, etc.
[0209] As an example, when the modification suggestion includes the modification content, A in the document content can be adjusted to B by revision. The above adjustment can represent content addition, content deletion, content replacement, etc. When the modification suggestion includes the modification reason, the modification reason included in the modification suggestion can be displayed in the document in the form of annotation. When the modification suggestion includes the modification position, the modification suggestion can be displayed in association with the modification position of the document, for example, the modification suggestion is displayed at the modification position of the document, and for another example, the modification position of the document is marked in the form of annotation. When the modification suggestion includes the modification object, the modification object included in the modification suggestion can be displayed in the document by using a preset animation or a preset format.
[0210] In some optional implementations of this embodiment, the modification suggestion may be displayed on a preset interface.
[0211] The preset interface may be an interface preset in the document. As an example, the preset interface may be an annotation display interface, an information prompt interface, and the like.
[0212] The preset interface may include virtual buttons for triggering user operations, or a menu bar may be popped up by right-clicking the mouse in the preset interface, thereby triggering user operations in the menu bar.
[0213] The above user operation may indicate acceptance or rejection of at least part of the modification suggestion.
[0214] On this basis, after the modification suggestion is displayed, the following steps may also be performed:
[0215] The first step is to receive a user operation acting on the preset interface.
[0216] The second step is to cancel the modification suggestion in response to the user operation, or to revise the document content of the document based on the modification suggestion.
[0217] Specifically, when the user operation indicates acceptance of one or more modification suggestions, after receiving the user operation, the document content of the document can be revised based on the modification suggestions; when the user operation indicates rejection of one or more modification suggestions, after receiving the user operation, the modification suggestions can be canceled.
[0218] In addition, when the number of modification suggestions is greater than or equal to 2, it may be determined whether to accept or reject each modification suggestion. For example, some or all modification suggestions may be checked and the checked modification suggestions may be accepted, while unchecked modification suggestions may be rejected.
[0219] It can be understood that in the above optional implementation, the modification suggestion can be automatically cancelled through user operation on the preset interface, or the document content of the document can be automatically revised based on the modification suggestion, thereby improving the efficiency of document collaboration.
[0220] In some optional implementations of this embodiment, the modification suggestion may be displayed in the following manner:
[0221] The first step is to revise the document content of the document based on the modification suggestion.
[0222] Here, after the modification suggestion is generated, the content that needs to be added (inserted), deleted, or replaced in the document can be determined based on the modification suggestion, and the document content of the document can be revised accordingly.
[0223] The second step is to use the revised document content as the target content.
[0224] Among them, the target content includes revision marks generated by revisions based on the modification suggestions. Revision marks are a type of identification used to display modified content during the document editing process. Revision marks can show changes in the document before and after editing, including newly added content (inserted content), deleted content, etc. Revision marks can highlight modifications in specific colors, symbols, or special formats. For example, newly added text can appear in a specific color or underlined, and deleted text can be struck through or marked with a different color. Revision marks from different users can also be displayed in different colors. Revision marks can be reflected in document data as preset tags, such as <w:del>or <w:ins>wait.
[0225] The third step is to display the target content.
[0226] Here, since the revision mark can highlight the modified part with a specific color, symbol or special format, the target content can be highlighted with a specific color, symbol or special format.
[0227] It can be understood that in the above optional implementation, revisions can be automatically made based on modification suggestions, so that the revised document content is displayed in a manner including revision marks. This makes it convenient for users to view the document content before and after revision, so as to determine the modification method more quickly, thereby improving document collaboration efficiency.
[0228] In some application scenarios of the above optional implementations, the modification suggestion includes modification content.
[0229] The modified content may include at least one of content that needs to be added and content that needs to be deleted.
[0230] On this basis, the document content of the document can be revised based on the modification suggestions in the following manner:
[0231] The modification content included in the modification suggestion is written into the document content of the document in the form of revision marks and / or the document content of the document is deleted.
[0232] Specifically, in the case where the modified content includes content that needs to be added, the content that needs to be added in the modified content included in the modification suggestion can be written into the document content of the document in the form of revision marks; in the case where the modified content includes content that needs to be deleted, the content that needs to be deleted in the modified content included in the modification suggestion can be deleted from the document content of the document in the form of revision marks.
[0233] It can be understood that in the above application scenario, the modification content included in the modification suggestion can be automatically written into the document content of the document and / or automatically deleted in the form of revision marks, thereby further improving the document collaboration efficiency.
[0234] In some cases in the above application scenarios, the modification suggestion also includes: reasons for modification.
[0235] The modification reason may indicate the reasons and explanations for modifying the document.
[0236] On this basis, after the modification content included in the modification suggestion is written into the document content of the document and / or the document content of the document is deleted in the form of a revision mark, the modification reason included in the modification suggestion can also be used to identify the written content and / or deleted content.
[0237] It can be understood that in the above situation, the document content written into the document and / or the document content deleted from the document can be used as identification objects, and the modification reasons included in the modification suggestions can be used to identify them, so as to establish an association relationship between the modification content and the modification reasons included in each modification suggestion, thereby facilitating the determination of the editing method of the document and improving the collaborative efficiency of the document.
[0238] For example, the tag indicating the deletion mark can be <w:del>and a label representing the insertion mark <w:ins>Use a preset tag indicating the reason for modification, or use a preset tag indicating the reason for modification to nest a tag indicating a deletion mark <w:del>and a label representing the insertion mark <w:ins>Afterwards, a specific reason for modification may be written into the preset tag indicating the reason for modification, thereby associating the reason for modification with the modified content (inserted content and / or deleted content).
[0239] As another example, the tag indicating the deletion mark may be included in the <w:del>and / or a tag to indicate an insertion mark <w:ins>Add a comment to the content, and the content of the comment is the specific reason for the modification.
[0240] In some examples of the above situation, the following method may be adopted to identify the written content and / or deleted content using the modification reason included in the modification suggestion:
[0241] Mark the written content and / or deleted content in the form of annotations, wherein the annotations at least display the reason for the modification. Figure 5E , Figure 5E A document display page showing a reason for modification is shown.
[0242] It can be understood that in the above example, the document content written into the document and / or the document content deleted from the document can be used as annotation objects, and annotated using the modification reasons included in the modification suggestions, so as to establish an association relationship between the modification content and the modification reasons included in each modification suggestion, thereby facilitating the determination of the editing method of the document and improving the collaborative efficiency of the document.
[0243] In some cases in the above application scenarios, the modified content includes the first content and / or the second content.
[0244] The first content is the original content of the document, and the second content is the content after the first content is modified.
[0245] On this basis, at least one of the following methods may be adopted to write the modification content included in the modification suggestion into the document content of the document in the form of a revision mark and / or delete the document content of the document:
[0246] Method 1 is to mark the first content in the document with a revision mark indicating deleted content (such as the deletion mark mentioned above).
[0247] As an example, the content identified by a revision mark indicating deleted content may be displayed in a strikethrough format, or may be displayed as a revision mark with "deleted" annotated in a comment box.
[0248] Method 2 is to add the second content to the document (such as the insertion mark mentioned above), and mark the second content in the document with a revision mark indicating the added content.
[0249] The content identified by the revision mark indicating added content can be displayed in an underlined format or with the revision mark annotated with "added" in a balloon.
[0250] In some embodiments, revision marks may also be defined as marks displayed in the document, such as the above-mentioned strikethrough, underline, comment, etc.
[0251] In some implementations, the revision mark is a preset tag in the document data of the document, for example, a tag indicating a deletion mark. <w:del>and a label representing the insertion mark <w:ins>.
[0252] It can be understood that in the above situation, the original content of the document can be marked in the document with a revision mark indicating deleted content, to indicate that the original content is deleted in the document; and the modified content can be marked in the document with a revision mark indicating added content, to indicate that the modified content is inserted in the document. In this way, the original content of the document to be deleted and the modified content to be inserted can be more clearly displayed in the document.
[0253] In one embodiment, when the revision is accepted, the original content can be deleted from the document and the revised content can be inserted. Exemplarily, when the revision is accepted, if the revision mark of the target content is a deletion mark, the target content and its deletion mark are deleted from the document data of the document; if the revision mark of the target content is an insertion mark, the target content is retained in the document data of the document and its insertion mark is deleted.
[0254] In some examples of the above situation, the second content may be added to the document in the following manner:
[0255] The first step is to determine the format of the first content.
[0256] The format of the first content may include at least one of the following: font, font size, text color, bold, italic, underline, strikethrough, etc.
[0257] In some cases, the first step described above may be performed in parallel with the step of determining the second content.
[0258] The second step is to add the second content in the format to the document.
[0259] It can be understood that in the above example, the format of the second content to be added can be determined based on the format of the first content, without having to determine the format of the second content in the process of determining the second content. This can improve the efficiency of document content replacement and thus improve the efficiency of document collaboration.
[0260] In one embodiment, a formatting tag corresponding to the first content is applied to the second content.
[0261] In some cases of the above application scenarios, the modified content includes the first content and / or the second content.
[0262] The first content is the original content of the document, and the second content is the content after the first content is modified.
[0263] On this basis, the following method can be adopted to write the modification content included in the modification suggestion into the document content of the document in the form of revision mark and / or delete the document content of the document:
[0264] The first step is to compare the differences between the first content and the second content.
[0265] The second step is to modify the first content into the second content based on the difference.
[0266] Specifically, the difference between the first content and the second content may include the same part and the different part in the first content and the second content. Among them, the same part in the first content and the second content may be retained; for the different part in the first content and the second content, the content corresponding to the different part in the second content may be used to replace the content corresponding to the different part in the first content. More specifically, for the different part in the first content and the second content, the part included in the second content but not included in the first content is added to the original content of the document, and the part included in the first content but not included in the second content is deleted from the original content of the document.
[0267] The third step is to mark the parts modified based on the difference with revision marks indicating deleted content and / or with revision marks indicating added content.
[0268] The content represented by the revision mark indicating deleted content can be displayed in a format with a strikethrough, or can be a revision mark with "deleted" annotated in a comment box.
[0269] The content indicated by the revision mark indicating added content can be displayed in an underlined format or can be annotated with "added" in a comment box.
[0270] In some embodiments, revision marks may also be defined as marks displayed in the document, such as the above-mentioned strikethrough, underline, comment, etc.
[0271] In some implementations, the revision mark is a preset tag in the document data of the document, for example, a tag indicating a deletion mark. <w:del>and a label representing the insertion mark <w:ins>.
[0272] It can be understood that in the above situation, the original content of the document can be marked in the document with a revision mark indicating deleted content, and the modified content can be marked in the document with a revision mark indicating added content, so that the original content and the modified content of the document can be more clearly displayed in the document. In addition, by comparing the difference between the first content and the second content to determine the part of the original content of the document that needs to be added or deleted, the document can be modified more specifically and the degree of refinement of the modification can be improved.
[0273] In some application scenarios of the above optional implementation manner, before revising the document content of the document based on the modification suggestion, a modification position corresponding to the modification suggestion in the document may also be determined.
[0274] The modification position may indicate a position in the document where content needs to be deleted, added, or replaced.
[0275] Here, the modification position may be determined by a user, or the modification position may be determined by a content generation service.
[0276] The content generation service may be a software module for realizing the above functions, or the content generation service may be provided by a service responsible for realizing the above functions.
[0277] For example, the content generation service can be implemented by a large language model. Thus, the modification suggestion and the prompt word can be input into the large language model to generate the modification position corresponding to the modification suggestion.
[0278] The large language model represents the corresponding relationship between the modification suggestion, the prompt word, and the modification position corresponding to the modification suggestion.
[0279] As an example, the above-mentioned large language model can be a model obtained by fine-tuning a pre-trained large language model using a training sample set including modification suggestions, the prompt words, and modification positions corresponding to the modification suggestions.
[0280] On this basis, the document content of the document can be revised based on the modification suggestions in the following manner:
[0281] According to the modification content included in the modification suggestion, the document content of the document is written at the modification position in the form of revision marks and / or the document content corresponding to the modification position in the document is deleted.
[0282] Specifically, when the modification content included in the modification suggestion indicates writing the document content of the document, the document content of the document can be written at the modification location; when the modification content included in the modification suggestion indicates deleting the document content of the document, the document content corresponding to the modification location in the document can be deleted.
[0283] It can be understood that in the above application scenario, by determining the modification position corresponding to the modification suggestion in the document, and writing the document content at the modification position and / or deleting the document content corresponding to the modification position in the document, the document modification can be performed more accurately.
[0284] In some application scenarios of the above optional implementations, the target content may be displayed in the following manner:
[0285] In the first step, determine how revisions of the document are to be displayed.
[0286] The revision display mode may include at least one of the following:
[0287] Color coding: Use different colors to distinguish between new, deleted, and modified content. For example, new text may appear in blue, and deleted text may appear in red with a strikethrough.
[0288] Symbolication: Use specific symbols to indicate revisions. For example, there may be a "+" sign next to added content and a "-" sign next to deleted content.
[0289] Underline and Strikethrough: Newly added text may be underlined, and deleted text may be struck through.
[0290] Sidebar display: Lists the detailed information of the revision in the sidebar of the document, including the modified location, modifier, modification time, and specific modified content.
[0291] Bubble Notes: Display the revised content in the form of bubbles near the text, with the editor's comments and instructions.
[0292] In the second step, the modified content portion of the target content is displayed according to the revised display mode, wherein the modified content includes at least one of the following: deleted content of the document that has been deleted, and new content inserted into the document.
[0293] The document deleted content refers to content deleted from the document content of the document. The document deleted content is displayed as a revision mark in the target content.
[0294] It can be understood that in the above application scenario, the deleted content of the document that has been deleted in the target content can be displayed according to the revised display mode of the document, thereby making the display mode of the modified content more in line with the user's browsing habits for documents.
[0295] In some cases of the above application scenarios, at least one of the following methods may be used to display the document deleted content that has been deleted from the target content in the revised display mode:
[0296] Mode 1: When the revision display mode is the first mode, the document deletion content deleted from the target content is displayed in an annotation manner.
[0297] The first method indicates displaying the revision mark in the comment box.
[0298] Mode 2: When the revision display mode is the second mode, the deleted document content in the target content is displayed in an embedded manner. Figure 5M As shown, Figure 5M A document display page is shown which displays the deleted content of the document in an embedded manner.
[0299] The second manner indicates embedding a display revision mark in the document.
[0300] It can be understood that in the above situation, the deleted content of the document that has been deleted from the target content can be displayed in a comment box, or the deleted content of the document that has been deleted from the target content can be embedded in the document to display it. In this way, the display method of the deleted content of the document can be more in line with the user's browsing habits for documents.
[0301] In some optional implementations of this embodiment, the content generation service is implemented by a large language model.
[0302] Among them, the Large Language Model (LLM) is a natural language processing model based on deep learning technology. It is trained on a large amount of text data to learn the knowledge and patterns of language grammar, semantics, pragmatics, etc., so that it can generate natural and fluent text, answer various questions, perform language translation, text summarization, sentiment analysis and other tasks.
[0303] In addition, large language models can be run remotely or locally.
[0304] On this basis, the following method can be adopted to generate modification suggestions for the document based on the document and the modification target through the content generation service:
[0305] The first step is to determine the prompt words of the large language model based on the modification target.
[0306] Prompt is a term used in natural language processing and human-computer interaction, which refers to the initial input or clue provided to guide the model to generate output of a specific type or topic.
[0307] As an example, the prompt words of a large language model may include the above modification targets.
[0308] As another example, semantic analysis may be first performed on the modification target to obtain an analysis result, and then the prompt word of the large language model is determined based on the analysis result.
[0309] The second step is to input the document and the prompt word into the large language model to generate modification suggestions for the document.
[0310] The large language model represents the correspondence between the document, the prompt word, and the modification suggestion of the document.
[0311] As an example, the large language model may be a model obtained by fine-tuning a pre-trained large language model using a training sample set including documents, prompt words, and modification suggestions for the documents.
[0312] In some cases, the document, the prompt words, and the modification target may also be input into the large language model to generate modification suggestions for the document.
[0313] In this case, the large language model represents the correspondence between the document, the prompt word, the modification target of the document, and the modification suggestion of the document. The large language model can be a model obtained by fine-tuning a pre-trained large language model using a training sample set including the document, the prompt word, the modification target of the document, and the modification suggestion of the document.
[0314] Here, in the process of executing the above second step, it can be displayed as follows Figure 5B After generating the modification suggestions for the document, the following page can be displayed: Figure 5C The page shown in the figure. You can then revise the generated modification suggestions to the document one by one or at the same time. After the revision is completed, the page shown in the figure can be displayed as follows: Figure 5D The page shown.
[0315] It can be understood that in the above optional implementation, a large language model can be used to more accurately generate modification suggestions for the document.
[0316] In some application scenarios of the above optional implementations, at least one of the following methods may be used to obtain the modification target written by the user in the document:
[0317] Method 1 is to obtain the annotation content written by the user in the document, and then determine the modification target of the document from the annotation content.
[0318] As an example, the above-mentioned annotation content may contain preset characters, such as "@AI", "modification target:", etc. On this basis, the modification target of the document can be determined from the annotation content by identifying the preset characters in the annotation.
[0319] As another example, the annotation for writing the modification target can also be pre-specified. For example, the first annotation in the document can be used as the annotation for writing the modification target. On this basis, the annotation content in the annotation can be used as the modification target of the document.
[0320] Method 2: obtaining a preset instruction written by a user in a document or obtaining a preset instruction. Then, based on the association relationship between the preset instruction and the preset modification target, determining the modification target of the document.
[0321] The preset instruction may be a preset instruction. Here, multiple preset instructions may be preset, and each preset instruction may have an association relationship with a preset modification target. Thus, the modification target of the document may be determined based on the above association relationship and the preset instruction.
[0322] There are other ways to target modifications. For example, see Figure 5A If the user clicks "Full Text Polishing" in the menu bar on the document display page, the modification target can be determined as "Full Text Polishing".
[0323] Method three is to obtain the revision mark written by the user in the document, and then determine the modification target of the document from the revision mark.
[0324] As an example, the revision mark written into the above document may contain preset characters, such as "@AI", "modification target:", etc. On this basis, the modification target of the document can be determined from the revision mark by identifying the preset characters in the revision mark.
[0325] As another example, the position of the revision mark for writing the modification target can also be pre-specified. For example, the first revision mark written in the document can be used as the revision mark for writing the modification target. On this basis, the revision content in the revision mark can be used as the modification target of the document.
[0326] It can be understood that in the above application scenarios, multiple methods can be used to obtain the modification targets written by the user in the document, thereby enriching the methods of obtaining the modification targets written by the user in the document and improving the convenience of obtaining the modification targets written by the user in the document.
[0327] In some optional implementations of this embodiment, after the modification suggestion is displayed in the document, at least one of the following operations may be performed:
[0328] Operation 1: In response to a revision acceptance operation for the document, accept all or part of the revision marks generated by the content generation service in the document.
[0329] In one embodiment, in the case of accepting revisions, if the revision mark that marks the target content is a deletion mark, the target content and its deletion mark are deleted in the document data of the document; if the revision mark that marks the target content is an insertion mark, the target content is retained in the document data of the document and its insertion mark is deleted.
[0330] Here, all or part of the revision marks generated by the content generation service in the document may be accepted according to the time and position of the revision marks generated by the content generation service.
[0331] For example, the time when each revision mark is generated by the content generation service can be determined. The user or other object can select one or more times from the determined time. When receiving a revision acceptance operation for the document, the revision mark generated by the one or more selected times in the document can be accepted.
[0332] For another example, the positions of the revision marks generated by the content generation service may be determined. A user or other object may select one or more positions from the determined positions. When a revision acceptance operation is received for the document, the revision marks at the selected one or more positions in the document may be accepted. For example, see Figure 5G You can click "Accept Changes" to accept a single suggested change in the document, click "Accept All Displayed Changes" to accept all suggested changes displayed in the document, and click "Accept All Changes Made to Document" to receive all suggested changes in the document.
[0333] Operation 2: In response to a revision rejection operation on the document, reject all or part of the revision marks generated by the content generation service in the document.
[0334] In one embodiment, in the case of rejecting revision, if the revision mark that marks the target content is a deletion mark, the target content is retained in the document data of the document and the deletion mark is deleted; if the revision mark that marks the target content is an insertion mark, the target content and the insertion mark are deleted in the document data of the document.
[0335] Here, all or part of the revision marks generated by the content generation service in the document may be rejected according to the time and location of the revision marks generated by the content generation service.
[0336] For example, the time when each revision mark is generated by the content generation service can be determined. The user or other object can select one or more times from the determined time. In the case of receiving a revision rejection operation for the document, the revision marks generated at the selected one or more times in the document can be rejected.
[0337] For another example, the positions of each revision mark generated by the content generation service may be determined. A user or other object may select one or more positions from the determined positions. When a revision rejection operation for the document is received, the revision marks at the selected one or more positions in the document may be rejected.
[0338] Operation three: in response to the first display operation on the document before revision, displaying the document content before the revision suggestion is revised to the document.
[0339] The first display operation may indicate displaying the document content before the modification suggestion is revised to the document. Fig.5I As shown, the marked document content before the modification suggestion is revised to the document can be displayed, that is, the original state of the mark can be displayed, or, as shown Figure 5K As shown, the unmarked document content before the modification suggestion is revised to the document can be displayed, that is, the original state is displayed.
[0340] Operation four: in response to a second display operation on the revised document, displaying the document content after the modification suggestion is revised to the document.
[0341] The second display operation may indicate displaying the document content after the modification suggestion is revised to the document. Figure 5H As shown, the marked document content after the modification suggestion is revised to the document can be displayed, that is, the final state of the mark can be displayed, or, as shown Figure 5J As shown, the unmarked document content after the modification suggestion is revised to the document can be displayed, that is, the final state is displayed.
[0342] Operation five: in response to a selection operation on a target review object in the review object set of the document, displaying a revision mark generated by the target review object.
[0343] The review object set includes the review objects represented by the content generation service.
[0344] The target review object may be a review object selected from the review object set by a selection operation.
[0345] Here, the content generation service can be used as a review object. Thus, one or more target review objects can be selected through a selection operation, and the revision marks generated by them can be displayed.
[0346] For example, see Fig. 5F ,exist Fig. 5F In the example, the review object set includes Elvin and AI writing assistant. The AI writing assistant is the review object represented by the content generation service. The AI writing assistant and other users can serve as review objects and as collaborators of the document, participating in the collaborative processing of the document, such as editing the document.
[0347] In addition, see Figure 5L , the AI writing assistant can be used as a review object, and the information of the AI writing assistant can be displayed in the comment box.
[0348] It can be understood that in the above optional implementation, at least one of the above operations can be performed after the modification suggestion is displayed in the document, so that users can collaborate on the document more quickly based on revision marks.
[0349] In addition, when multiple modification suggestions are generated, the user can confirm whether to keep each modification suggestion one by one. If not, the original document corresponding to the modification suggestion is restored; if kept, the revision can be accepted or kept.
[0350] The document collaboration method provided in the embodiment of the present application can obtain the modification target written by the user in the document, and then generate the modification suggestion of the document based on the document and the modification target through the content generation service, and then display the modification suggestion in the document. Thus, the user can write the modification target of the document by interacting with the document, and then display the modification suggestion of the document generated by the content generation service based on the document and the modification target of the document in the document. In this way, the modification suggestion of the document can be generated and displayed through the collaboration of the user and the content generation service, which can improve the generation efficiency of the modification suggestion of the document.
[0351] Figure 2 A flowchart of another document collaboration method provided in an embodiment of the present application. Figure 2 As shown, the method specifically includes:
[0352] Step 201 : obtaining a modification target written by a user to a preset position of a document, wherein the preset position includes at least one of the following: an annotation of the document, and a revision mark of the document.
[0353] In this embodiment, the annotation of the document may contain preset characters, such as "@AI", "@AI writing assistant", "modification target:", etc. On this basis, the modification target of the document can be determined from the annotation content of the annotation by identifying the preset characters in the annotation. In addition, the annotation for writing the modification target can also be pre-specified. For example, the first annotation in the document can be used as the annotation for writing the modification target. On this basis, the annotation content in the annotation can be used as the modification target of the document.
[0354] The revision mark of a document may contain preset characters, such as "@AI", "@AI writing assistant", "modification target:", etc. On this basis, the modification target of the document can be determined from the revision mark by identifying the preset characters in the revision mark. In addition, the revision mark for writing the modification target can also be pre-specified. For example, the first revision mark in a document can be used as the revision mark for writing the modification target. On this basis, the content of the revision mark can be used as the modification target of the document.
[0355] Step 202: Generate modification suggestions for the document based on the document and the modification target through a content generation service.
[0356] In this embodiment, step 202 and Figure 1 Step 102 in the corresponding embodiment is basically the same and will not be described again here.
[0357] Step 203: display the modification suggestion in the document.
[0358] In this embodiment, step 203 and Figure 1 Step 103 in the corresponding embodiment is basically the same and will not be described again here.
[0359] It should be noted that, in addition to the above contents, this embodiment may also include Figure 1 The corresponding technical features described in the corresponding embodiments are realized Figure 1 For technical effects of the collaborative method of the document shown, please refer to Figure 1 For the sake of brevity, the relevant description is not repeated here.
[0360] The document collaboration method provided in the embodiment of the present application can make it easier for users and other objects to modify targets through document annotations and / or document revision marks, thereby reducing the complexity of users and other objects writing and modifying targets.
[0361] Figure 3 A flowchart of another document collaboration method provided in an embodiment of the present application. Figure 3 As shown, the method specifically includes:
[0362] Step 301: read the document data written into the document by the user.
[0363] In this embodiment, the document data may include, but is not limited to, the following forms of data in the document: text, pictures, tables, etc.
[0364] For example, taking a word document (e.g., doc format, docx format) as an example, a word document is essentially a compressed package, and after decompression, there are various xml files, which are the document data corresponding to the word document. Different parts of a document can be stored in the same xml file, or in different xml files. For example, comments and annotations on the main text of the document can be stored in the "comments.xml" file, and the main text of the document can be stored in the "document.xml" file. Tags are used in the xml file to save the document content, content type, and content format.
[0365] Step 302: extracting modification targets from the document data that meets preset requirements.
[0366] In this embodiment, the preset requirement may be a pre-set requirement used to filter the modification target from the document data.
[0367] As an example, the preset requirement may be determined based on at least one of the following: editing time of the document data, user authority, an editing user of the document data, the document data itself, and a collaboration status between the document data and the content generation service.
[0368] Specifically, for example, whether the editing time of the document data falls within the preset time range, whether the document data has been modified by the content generation service, whether the user who enters the revision target has the authority to call the content generation service, the revision targets entered by certain specific users, and whether the document data contains preset characters (such as @AI).
[0369] In some optional implementations of this embodiment, the preset requirement includes at least one of the following:
[0370] The first type is that the document data is data including preset characters. The preset characters are used to trigger the content generation service. For example, the preset characters may be "@AI", "Modification target:", "@AI writing assistant", etc.
[0371] Second, the document data is data written into the document at a preset time.
[0372] The preset time may be a preset time point, a preset time period, a preset time cycle, etc. As an example, the preset time may be set by a user or the like.
[0373] The third type is that the document data is data written into the document by a preset user.
[0374] The preset user may be a pre-set user. As an example, the preset user may be set via an object such as a document creator. For example, a document may include document data written by multiple users. On this basis, any user or a user with authority may select one or more users from multiple users, thereby making the one or more users selected by the user as the preset users. On this basis, the preset user may also be set to have authority to access the content generation service.
[0375] Fourthly, the document data is data that has not been processed by the content generation service.
[0376] Here, since the content generation service can be used to generate the modification target, the modification target can be extracted only from the document data that has not been processed by the content generation service. It can be understood that the document data that has been processed by the content generation service does not need to be repeatedly processed.
[0377] It can be understood that in the above optional implementations, one or a combination of at least two of the above multiple methods can be used to extract the modification target, thereby enriching the methods for extracting the modification target and improving the efficiency of extracting the modification target.
[0378] Step 303: Generate modification suggestions for the document based on the document and the modification target through a content generation service.
[0379] In this embodiment, step 303 and Figure 1 Step 102 in the corresponding embodiment is basically the same and will not be described again here.
[0380] Step 304: display the modification suggestion in the document.
[0381] In this embodiment, step 304 and Figure 1 Step 103 in the corresponding embodiment is basically the same and will not be described again here.
[0382] It should be noted that, in addition to the contents recorded above, this embodiment may also include the corresponding technical features described in the above embodiments, so as to achieve the technical effects of the above document collaboration method. Please refer to the above description for details. For the sake of brevity, it will not be repeated here.
[0383] The document collaboration method provided in the embodiment of the present application can determine the document data that meets the preset requirements from the document data written by the user to the document, and extract the modification targets therefrom, thereby reducing the scope of extracting the modification targets, thereby improving the efficiency of extracting the modification targets and the accuracy of responding to the collaboration, and avoiding repeated modification or incorrect modification of the document due to excessive or incorrect use of the content generation service.
[0384] Figure 4 A flowchart of another document collaboration method provided in an embodiment of the present application. Figure 4 As shown, the method specifically includes:
[0385] Step 601, obtaining the modification target written by the user in the document.
[0386] In this embodiment, step 601 and Figure 1 Step 101 in the corresponding embodiment is basically the same and will not be described again here.
[0387] Step 602: Based on the modification target, determine target content in the document that is related to the modification target, where the target content is at least part of the content in the document.
[0388] In this embodiment, the target content may be content in the document that is related to the modification target. For example, the target content may be content that needs to be deleted or replaced from the document.
[0389] Here, the target content can be determined by the content generation service based on the modification target, or it can be obtained by the user associating the modification target and the target content when writing the modification target. For example, after the user selects at least part of the content in the document, the user can add an annotation to the selected content and write the modification target in the annotation. Thus, at least part of the selected content can be used as the target content related to the modification target.
[0390] Step 603: Generate modification suggestions for the target content based on the target content and the modification target through a content generation service.
[0391] In this embodiment, the content generation service may be used to generate modification suggestions for the target content based on the target content and the modification target.
[0392] As an example, the content generation service may be a software module for implementing the above functions, or the content generation service may also be provided via a service responsible for implementing the above functions.
[0393] For example, the content generation service can be implemented by a large language model. Thus, the prompt words of the large language model can be determined based on the modification target, and then the target content and the prompt words are input into the large language model to generate modification suggestions for the target content.
[0394] The large language model represents the corresponding relationship between the target content, the prompt word, and the modification suggestion of the target content.
[0395] As an example, the large language model may be a model obtained by fine-tuning a pre-trained large language model using a training sample set including target content, prompt words, and modification suggestions for the target content.
[0396] Step 604: display the modification suggestion in the document.
[0397] In this embodiment, step 604 and Figure 1 Step 103 in the corresponding embodiment is basically the same and will not be described again here.
[0398] In some optional implementations of this embodiment, at least one of the following methods may be used to determine the target content related to the modification target in the document based on the modification target:
[0399] Method 1: determining the target content according to the position of the modification target in the document.
[0400] As an example, the content at the selected position of the annotation in the document can be used as the target content; or, the content at the selected position of the annotation in the document can be first determined, and then the document content containing the above content (for example, the context document content in the document containing the above content) can be used as the target content.
[0401] As another example, the content at the revised position in the document can be used as the target content; or, the content at the revised position in the document can be first determined, and then the document content containing the above content (such as the context document content in the document containing the above content) can be used as the target content.
[0402] Method 2: determining the target content according to the type of the object in the document to which the modification target is applied.
[0403] The types of objects may include but are not limited to: title, picture, and text.
[0404] As an example, in the case where the modification target is determined from the annotation content:
[0405] If you select Title 1 and write a comment for Title 1, you can determine that all Title 1s in the document are the target content; or you can determine that the text belonging to Title 1 is the target content.
[0406] If the selected content contains a picture (it may also contain other object types, such as text, table), and the annotation content is: Please change to a fresh-style picture, then it can be determined that the target content is the selected picture.
[0407] If a paragraph of text is selected and the annotation content is: Please add a picture to this paragraph of text and insert it below, then the target content can be determined to be the selected text;
[0408] If a table is selected and the comment content is: Please adjust the cell width or character font size of the table so that the table is displayed completely, then it can be determined that the target content is the selected table.
[0409] As yet another example, in the case where a modification target is determined from the content of a revision mark:
[0410] If the content of the revision mark is Title 1, then all or part of Title 1 in the document may be determined as the target content; or, the body text belonging to Title 1 may be determined as the target content.
[0411] If the content of the revision mark is a picture, then it can be determined that the target content is the picture.
[0412] If the content of the revision mark is a paragraph of text, then the target content can be determined to be the selected text;
[0413] If the content of the revision mark is a table, then the target content can be determined to be the table.
[0414] Method three: perform semantic analysis on the modification target and determine the target content from the document.
[0415] As an example, if the modification target is "Title One", then all Title Ones can be determined as target content; or, the text belonging to Title One can be determined as target content.
[0416] As another example, if the modification target is: please replace the pictures in the full text with fresh-style pictures, then the target content can be determined to be the pictures in the full text of the document.
[0417] It can be understood that in the above optional implementations, at least one of the above methods can be used to determine the target content related to the modification target in the document based on the modification target, so that the richness of the methods for determining the target content related to the modification target in the document can be improved, which is convenient for users to select.
[0418] In addition, the target content related to the modification target in the document may be determined based on the modification target in the following manner: based on the generation time of the modification target, the target content related to the modification target in the document may be determined.
[0419] For example, before the modification target is written into the document, the document contains document content A. Afterwards, the modification target written into the document by the user is "adjusting the format and language style of the document content subsequently written into the document to the format and language style of document content A". Then, another user writes document content B into the document. Then, the target content related to the modification target may be "document content B". Furthermore, during or after the other user writes document content B into the document, the modification suggestion generated may indicate "adjusting the format and language style of document content B to the format and language style of document content A".
[0420] It should be noted that, in addition to the contents recorded above, this embodiment may also include the corresponding technical features described in the above embodiments, so as to achieve the technical effects of the above document collaboration method. Please refer to the above description for details. For the sake of brevity, it will not be repeated here.
[0421] The document collaboration method provided in the embodiment of the present application can determine the target content related to the modification target in the document, and generate modification suggestions for the target content based on the target content and the modification target through a content generation service. Therefore, there is no need to generate modification suggestions for content other than the target content in the document, which can improve the efficiency and pertinence of generating modification suggestions.
[0422] The following is an illustrative description of the embodiments of the present application, but it should be noted that the embodiments of the present application may have the features described below, but the following description does not constitute a limitation on the scope of protection of the embodiments of the present application.
[0423] Before introducing this scheme, the nouns designed in this scheme are explained as follows:
[0424] AIGC (AI-Generated Content) is content automatically generated using artificial intelligence technology, including text, images, audio, video, etc.
[0425] API (Application Programming Interface) defines the rules and methods for interaction and communication between different software components.
[0426] A prompt is an instruction, question, or sentence that requires a language model to generate a specific output. Large language models have good natural language understanding and generation capabilities and extensive world knowledge.
[0427] In some feasible technical solutions, the design of document modification tools generally has the following problems: modification results are inconvenient to display.
[0428] There are three main ways to display the modification results:
[0429] Mark changes: Mark the changes in the original text and display the modified results outside the document (such as in the sidebar). This method is not convenient when reading, and you need to continuously compare left and right and bring the modified results into the original text.
[0430] Comparative display: The original and modified documents are displayed simultaneously. Although the content before and after the modification can be compared, there is a lot of redundant information, the efficiency is low, and it relies on a large screen size.
[0431] Direct replacement: directly change the entire text and replace the original text. It is not convenient for comparison and is only suitable for modifying shorter paragraphs or sentences.
[0432] In addition, the technical solutions of some document modification tools lack support for collaboration: when currently applied to multiple people collaborating, AI cannot process and respond to comments or revision suggestions from other collaborators, and cannot achieve collaboration between AI and multiple authors.
[0433] In view of this, this embodiment provides a document modification method based on AIGC and document review technology, which can realize the direct insertion of document modification results into the text and support multiple display modes. At the same time, it supports AI to understand and respond to collaborators' comments or revision suggestions to promote multi-subject human-computer collaboration. In addition, the AIGC technology and document review technology are deeply integrated to realize the direct insertion of modified results into the text and support multiple display forms. AI can understand the comments or revisions left by other creators in the document, thereby supporting AI to participate in human collaboration.
[0434] In a specific embodiment, the scheme includes the following steps:
[0435] Step 1: The creator initiates the request.
[0436] The author initiates a request to modify the document, and the client sends the comments or revisions of the document and / or collaborators (who are reviewers) to the large language model for processing. For example, see Figure 5A , creators can initiate a request to modify the document by clicking "Full Text Polishing" in the icon.
[0437] Step 2: Call the built instruction and ask the large language model to modify it.
[0438] The large language model is called through the API to request the large language model to make targeted modifications to the document. On the one hand, the document modification instructions are constructed, for example, based on the modification target, the prompt words of the large language model are determined. Here, the large language model is required to review and modify the document content and generate modification results and instructions. On the other hand, instructions are constructed to respond to the revisions and comments of the collaborators (such as the reason for the modification) and to execute the collaborators' suggestions. For example, after calling the large language model, Figure 5B The page shown.
[0439] Step 3: Receive, parse, and process the data returned by the large language model.
[0440] The large language model returns the modified content and the reason for the modification in the form of structured data. The returned data may include:
[0441] The revised original text or suggestions from the original collaborators;
[0442] Modified results;
[0443] The reason for the change (grammatical error, style improvement, etc.).
[0444] The data of the large language model is processed. On the one hand, the position of the modified content in the original text (that is, the modified position mentioned above) is calculated; on the other hand, the modified content is associated with the format of the original text (that is, the format of the first content mentioned above) or the data type. Here, the processed data structure can be:
[0445]
[0446] Step 4: Apply the changes in the document.
[0447] By calling the review API, the modified content (second content) is inserted into the original text in revision mode, or the first content in the original text is deleted, so that the author can directly view the modification results. The specific implementation includes:
[0448] Insert the results in the main text using revisions;
[0449] Mark the modified location;
[0450] Display the replaced original text and the reason for the modification in the sidebar; or reply to the original collaborator's comments; or use a comment box to mark the inserted or deleted content in the revision mode and display the reason for the revision.
[0451] As an example, see Figure 5C , the process of revising the document content based on the modification suggestions can be as follows Figure 5C The modifications included in the modification suggestion can be inserted into the document one by one.
[0452] Next, see Figure 5D The status of document revision completion can be as follows Figure 5D shown.
[0453] In addition, if Figure 5E As shown, the reasons for the changes may be added in the revision.
[0454] Step 5: Creators can view, confirm, and switch display modes.
[0455] Users can view and confirm the modification results, accept or reject AI's modifications, and support batch operations. Support switching between different display formats, including displaying the final status (such as Figure 5H , 5J ), display the original state (as shown), Fig.5I ); contains the final state of the mark (such as Figure 5H ), the final state without the mark (such as Figure 5J ); display the modified results in the text (such as Figure 5H , 5J ), display the original text in the main text (such as Figure 5K ), display the revision information in the comment box (as shown in Figure 5L ), display revisions inline (as shown in Figure 5M As shown), etc., to meet the differentiated needs of different creators.
[0456] In addition, if Fig. 5F As shown, other collaborators (users) or AI assistants can also be filtered to display modification suggestions for the filtered review objects.
[0457] like Figure 5G As shown, batch operations can be supported, for example, click "Accept Revisions" to accept a single modification suggestion in the document, click "Accept All Displayed Revisions" to accept all displayed modification suggestions in the document, and click "Accept All Revisions Made to the Document" to receive all modification suggestions in the document.
[0458] For example, in a single-person modification scenario, a user uploads an academic paper, parses the document, uses pre-built instructions, calls a large language model to generate modification suggestions, and calls an API to insert the modification suggestions into the text as revisions. The user switches the display mode to view the modification results and reasons. In a multi-person collaboration scenario, a user uploads a project report containing multi-person annotations and revisions, parses the document and annotation content, builds instructions containing collaborators' suggestions, calls a large language model to process collaborators' suggestions, generates targeted modifications, calls an API to insert the modification suggestions into the text as revisions, and can reply to the reasons under the original collaborator's annotations. The user switches the display mode to view the modification results and reasons.
[0459] In some cases, the analysis of the author's document can be started after the author initiates the request. Preprocess the document to avoid data or formatting loss. Call the built instructions and ask the large language model to make changes. Receive, parse and process the data returned by the large language model to ensure that the review API can be called correctly to modify the document. Apply the changes in the document so that the author can finally see the results of the changes.
[0460] The reason for preprocessing the document data is that since large language models lack understanding of complex formats and objects, preprocessing the documents can reduce the difficulty of understanding of large language models and focus on content modification itself. Thanks to the preprocessing, the data returned by the large language model can be inserted into the text in the original format or type to avoid data loss or format confusion.
[0461] The preprocessing method may include deleting a preset format in the document, deleting document data that does not need to be modified in the document, deleting preset tags in the document data of the document, and the like.
[0462] The reason for calling the constructed instructions is that good instructions have a crucial impact on the effect of the model output. The instructions constructed in advance have been carefully designed, evaluated, and compared. Different instructions will also be called for different document types and different quality levels to better ensure the effect.
[0463] During the process of creators viewing, confirming and switching display modes, the switching of display modes can be supported, which can meet the needs of creators with different needs to view according to the best experience. Batch acceptance or rejection can improve the decision-making efficiency of creators.
[0464] It should be noted that, in addition to the contents recorded above, this embodiment may also include the technical features described in the above embodiments, so as to achieve the technical effects of the collaborative method of the documents shown above. Please refer to the above description for details. For the sake of brevity, it will not be repeated here.
[0465] The document collaboration method provided in the embodiment of the present application inserts the modified results into the main text in the form of revisions, displays the reasons for the modifications and the original text in the sidebar, and switches to different display modes. In addition, AI can respond to comments or revisions of other collaborators, and modify the main text and reply to the messages of collaborators according to the suggestions of collaborators. This solution can be applied to most document types and can effectively improve the quality of documents. Easy operation: Document optimization can be performed with one click, and AI automatically evaluates the dimensions that need to be improved and performs modifications; modifications can be accepted or rejected in batches. Easy operation. Interactive and friendly: The creator's document can be modified by revisions, and the results of the modifications can be directly displayed in the main text, and the comparison before and after the modifications and the reasons for the modifications can be displayed in the sidebar, providing a good reading experience. Meet personalized display demands: Creators can switch between different views according to their own habits, which can meet the display demands of different people. Support multi-person collaboration: This solution can respond to modification suggestions left by other creators through comments or revisions, and automatically execute them to improve creation efficiency and experience.
[0466] Figure 6 A schematic diagram of the structure of a document collaboration device provided in an embodiment of the present application. Specifically comprising:
[0467] The acquisition unit 401 is used to acquire the modification target written by the user in the document;
[0468] A generating unit 402, configured to generate a modification suggestion for the document based on the document and the modification target through a content generation service;
[0469] The display unit 403 is used to display the modification suggestion in the document.
[0470] In a possible implementation, obtaining the modification target written by the user in the document includes:
[0471] A modification target written by a user to a preset position of a document is obtained, where the preset position includes at least one of the following: an annotation of the document, and a revision mark of the document.
[0472] In a possible implementation, obtaining the modification target written by the user in the document includes:
[0473] Read document data written by the user to the document;
[0474] A modification target is extracted from the document data that meets the preset requirements.
[0475] In a possible implementation manner, the preset requirement includes at least one of the following:
[0476] The document data is data including preset characters, and the preset characters are used to trigger the content generation service;
[0477] The document data is data written into the document at a preset time;
[0478] The document data is data written into the document by a preset user;
[0479] The document data is data that has not been processed by the content generation service.
[0480] In a possible implementation, the generating, by the content generation service, a modification suggestion for the document based on the document and the modification target includes:
[0481] Based on the modification target, determining target content in the document that is related to the modification target, wherein the target content is at least part of the content in the document;
[0482] Through the content generation service, a modification suggestion for the target content is generated based on the target content and the modification target.
[0483] In a possible implementation manner, determining, based on the modification target, target content in the document that is related to the modification target, includes at least one of the following:
[0484] Determining target content according to the position of the modification target in the document;
[0485] Determining target content according to the type of the object in the document to which the modification target is applied;
[0486] A semantic analysis is performed on the modification target to determine the target content from the document.
[0487] In a possible implementation, the displaying the modification suggestion includes:
[0488] Displaying the modification suggestion on the preset interface;
[0489] After displaying the modification suggestion, the method further includes:
[0490] A receiving unit (not shown in the figure), used to receive a user operation acting on the preset interface;
[0491] A processing unit (not shown in the figure) is used to cancel the modification suggestion in response to the user operation, or to revise the document content of the document based on the modification suggestion.
[0492] In a possible implementation, the displaying the modification suggestion includes:
[0493] Revising the document content of the document based on the modification suggestion;
[0494] Using the revised document content as target content, wherein the target content includes revision marks generated by revision based on the modification suggestion;
[0495] The target content is displayed.
[0496] In a possible implementation manner, the modification suggestion includes: modification content, and revising the document content of the document based on the modification suggestion includes:
[0497] The modification content included in the modification suggestion is written into the document content of the document in the form of revision marks and / or the document content of the document is deleted.
[0498] In a possible implementation manner, the modification suggestion further includes: a reason for modification;
[0499] After writing the modification content included in the modification suggestion into the document content of the document in the form of revision marks and / or deleting the document content of the document, the method further includes:
[0500] The identification unit is used to identify the written content and / or deleted content using the modification reason included in the modification suggestion.
[0501] In a possible implementation manner, the using the modification reason included in the modification suggestion to identify the written content and / or deleted content includes:
[0502] The written content and / or deleted content is marked in the form of annotations, wherein the annotations at least display the reason for the modification.
[0503] In a possible implementation manner, the modified content includes first content and / or second content, wherein the first content is original content of the document, and the second content is content after the first content is modified;
[0504] The step of writing the modification content included in the modification suggestion into the document content of the document in the form of a revision mark and / or deleting the document content of the document includes:
[0505] marking the first content in the document with a revision mark indicating deletion of content; and / or,
[0506] The second content is added to the document, and the second content is marked in the document with a revision mark indicating the added content.
[0507] In a possible implementation manner, adding the second content to the document includes:
[0508] determining a format of the first content;
[0509] The second content having the format is added to the document.
[0510] In a possible implementation manner, the modified content includes first content and / or second content, wherein the first content is original content of the document, and the second content is content after the first content is modified;
[0511] The step of writing the modification content included in the modification suggestion into the document content of the document in the form of a revision mark and / or deleting the document content of the document includes:
[0512] comparing the difference between the first content and the second content;
[0513] modifying the first content into the second content based on the difference;
[0514] The portions modified based on the difference are marked with revision marks indicating deleted content and / or with revision marks indicating added content.
[0515] In a possible implementation manner, before revising the document content of the document based on the modification suggestion, the device further includes:
[0516] a determination unit (not shown in the figure), configured to determine a modification position in the document corresponding to the modification suggestion; and
[0517] The step of revising the document content of the document based on the modification suggestion includes:
[0518] According to the modification content included in the modification suggestion, the document content of the document is written at the modification position in the form of revision marks and / or the document content corresponding to the modification position in the document is deleted.
[0519] In a possible implementation manner, when the modification suggestion includes document deletion content, displaying the target content includes:
[0520] determining how revisions of said document are displayed;
[0521] Displaying the document deleted content that has been deleted from the target content in accordance with the revised display mode;
[0522] The document deleted content refers to content deleted from the document content of the document, and the document deleted content is displayed as a revision mark in the target content.
[0523] In a possible implementation manner, displaying the deleted document content that has been deleted from the target content in the revised display manner includes:
[0524] In the case where the revision display mode is the first mode, the deleted document content in the target content is displayed in an annotation mode, wherein the first mode means displaying the revision mark in an annotation box; or
[0525] When the revision display mode is the second mode, the document deleted content deleted from the target content is displayed in an embedded manner, wherein the second mode means that a revision mark is embedded in the document.
[0526] In a possible implementation, the content generation service is implemented by a large language model; and
[0527] The step of generating a modification suggestion for the document based on the document and the modification target through a content generation service includes:
[0528] Based on the modification target, determining a prompt word of the large language model;
[0529] Inputting the document and the prompt word into the large language model to generate modification suggestions for the document;
[0530] The large language model represents the correspondence between the document, the prompt word, and the modification suggestion of the document.
[0531] In a possible implementation, obtaining the modification target written by the user in the document includes:
[0532] Obtaining the annotation content written by the user in the document; determining the modification target of the document from the annotation content; or,
[0533] Acquire a preset instruction written by a user in a document; determine a modification target of the document based on an association relationship between the preset instruction and a preset modification target; or,
[0534] Obtain a revision mark written by a user in a document; and determine a modification target of the document from the revision mark.
[0535] In a possible implementation manner, after displaying the modification suggestion in the document, the device further includes at least one of the following:
[0536] In response to a revision acceptance operation for the document, accepting all or part of the revision marks generated by the content generation service in the document;
[0537] In response to a revision rejection operation for the document, rejecting all or part of the revision marks generated by the content generation service in the document;
[0538] In response to a first display operation on the document before revision, displaying the document content before the modification suggestion is revised to the document;
[0539] In response to a second display operation on the revised document, displaying the document content after the modification suggestion is revised to the document;
[0540] In response to a selection operation on a target review object in a review object set of the document, a revision mark generated by the target review object is displayed, wherein the review object set includes the review objects represented by the content generation service.
[0541] The document collaboration device provided in this embodiment may be as follows: Figure 6 The document collaboration device shown in can execute all steps of the collaboration method of each document described above, thereby realizing the technical effect of the collaboration method of each document described above. For details, please refer to the above related description. For the sake of brevity, it will not be repeated here.
[0542] Figure 7 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application, Figure 7 The electronic device 500 shown includes: at least one processor 501, a memory 502, at least one network interface 504 and other user interfaces 503. The various components in the electronic device 500 are coupled together via a bus system 505. It is understood that the bus system 505 is used to achieve connection and communication between these components. In addition to the data bus, the bus system 505 also includes a power bus, a control bus and a status signal bus. However, for the sake of clarity, the bus system 505 is not shown in FIG. Figure 7 Various buses are labeled as bus system 505 .
[0543] The user interface 503 may include a display, a keyboard, or a pointing device (eg, a mouse, a trackball, a touch pad, or a touch screen).
[0544] It can be understood that the memory 502 in the embodiment of the present application can be a volatile memory or a non-volatile memory, or can include both volatile and non-volatile memories. Among them, the non-volatile memory can be a read-only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electrically erasable programmable read-only memory (EEPROM), or a flash memory. The volatile memory can be a random access memory (RAM), which is used as an external cache. By way of example but not limitation, many forms of RAM are available, such as static random access memory (SRAM), dynamic random access memory (DRAM), synchronous dynamic random access memory (SDRAM), double data rate synchronous dynamic random access memory (DDRSDRAM), enhanced synchronous dynamic random access memory (ESDRAM), synchronous link dynamic random access memory (SLDRAM) and direct RAM bus random access memory (DRRAM). The memory 502 described herein is intended to include, but is not limited to, these and any other suitable types of memory.
[0545] In some implementations, the memory 502 stores the following elements, executable units or data structures, or a subset thereof, or an extended set thereof: an operating system 5021 and an application program 5022 .
[0546] Among them, the operating system 5021 includes various system programs, such as a framework layer, a core library layer, a driver layer, etc., which are used to implement various basic services and process hardware-based tasks. The application 5022 includes various application programs, such as a media player (Media Player), a browser (Browser), etc., which are used to implement various application services. The program for implementing the method of the embodiment of the present application can be included in the application 5022.
[0547] In this embodiment, by calling the program or instruction stored in the memory 502, specifically, the program or instruction stored in the application 5022, the processor 501 is used to execute the method steps provided by each method embodiment, for example, including:
[0548] Get the modification target written by the user in the document;
[0549] Generate a modification suggestion for the document based on the document and the modification target through a content generation service;
[0550] The modification suggestion is displayed in the document.
[0551] The method disclosed in the above embodiment of the present application can be applied to the processor 501, or implemented by the processor 501. The processor 501 may be an integrated circuit chip with signal processing capabilities. In the implementation process, each step of the above method can be completed by the hardware integrated logic circuit or software instructions in the processor 501. The above processor 501 can be a general 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 methods, steps and logic block diagrams disclosed in the embodiments of the present application can be implemented or executed. The general processor can be a microprocessor or the processor can also be any conventional processor, etc. The steps of the method disclosed in the embodiment of the present application can be directly embodied as a hardware decoding processor to execute, or the hardware and software units in the decoding processor can be executed. The software unit can be located in a mature storage medium in the field such as a random access memory, a flash memory, a read-only memory, a programmable read-only memory or an electrically erasable programmable memory, a register, etc. The storage medium is located in the memory 502, and the processor 501 reads the information in the memory 502 and completes the steps of the above method in combination with its hardware.
[0552] It is understood that the embodiments described herein may be implemented in hardware, software, firmware, middleware, microcode, or a combination thereof. For hardware implementation, the processing unit may be implemented in one or more application specific integrated circuits (ASIC), digital signal processors (DSP), digital signal processing devices (DSPDevice, DSPD), programmable logic devices (PLD), field programmable gate arrays (FPGA), general purpose processors, controllers, microcontrollers, microprocessors, other electronic units for performing the above functions of the present application, or a combination thereof.
[0553] For software implementation, the technology described above in this article can be implemented by a unit that performs the functions described above in this article. The software code can be stored in a memory and executed by a processor. The memory can be implemented in the processor or outside the processor.
[0554] The electronic device provided in this embodiment may be Figure 7 The electronic device shown in can execute all steps of the collaboration method of each document described above, thereby achieving the technical effect of the collaboration method of each document described above. Please refer to the above related description for details. For the sake of brevity, it will not be repeated here.
[0555] The embodiment of the present application also provides a storage medium (computer-readable storage medium). The storage medium here stores one or more programs. The storage medium may include a volatile memory, such as a random access memory; the memory may also include a non-volatile memory, such as a read-only memory, a flash memory, a hard disk or a solid-state drive; the memory may also include a combination of the above-mentioned types of memory.
[0556] When one or more programs in the storage medium can be executed by one or more processors, the document collaboration method executed on the electronic device side can be implemented.
[0557] The processor is used to execute the document collaboration program stored in the memory to implement the following steps of the document collaboration method executed on the electronic device side:
[0558] Get the modification target written by the user in the document;
[0559] Generate a modification suggestion for the document based on the document and the modification target through a content generation service;
[0560] The modification suggestion is displayed in the document.
[0561] The professionals should also be further aware that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented with electronic hardware, computer software, or a combination of the two. In order to clearly illustrate the interchangeability of hardware and software, the composition and steps of each example have been generally described in terms of function in the above description. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.
[0562] The steps of the method or algorithm described in conjunction with the embodiments disclosed herein may be implemented using hardware, a software module executed by a processor, or a combination of the two. The software module may be placed in a random access memory (RAM), a memory, a read-only memory (ROM), an electrically programmable ROM, an electrically erasable programmable ROM, a register, a hard disk, a removable disk, a CD-ROM, or any other form of storage medium known in the art.
[0563] It should be understood that the terms used herein are only for the purpose of describing specific example embodiments and are not intended to be limiting. Unless the context clearly indicates otherwise, the singular forms "one", "an" and "said" as used herein may also be meant to include plural forms. The terms "include", "comprise", "contain", and "have" are inclusive and therefore specify the existence of stated features, steps, operations, elements and / or parts, but do not exclude the existence or addition of one or more other features, steps, operations, elements, parts, and / or combinations thereof. The method steps, processes, and operations described herein are not interpreted as necessarily requiring them to be performed in the specific order described or illustrated, unless the execution order is clearly indicated. It should also be understood that additional or alternative steps may be used.
[0564] The above description is only a specific implementation of the present application, so that those skilled in the art can understand or implement the present application. Various modifications to these embodiments will be apparent to those skilled in the art, and the general principles defined herein can be implemented in other embodiments without departing from the spirit or scope of the present application. Therefore, the present application will not be limited to the embodiments shown herein, but will conform to the widest range consistent with the principles and novel features applied for herein.< / w:ins> < / w:del> < / w:ins> < / w:del> < / w:ins> < / w:del> < / w:ins> < / w:del> < / w:ins> < / w:del> < / w:ins> < / w:del> < / w:t> < / w:ins> < / w:deltext> < / w:del> < / w:t> < / w:p> < / w:comment>
Claims
1. A collaborative approach to documentation, It is characterized in that The method comprises: Get the modification target written by the user in the document; Generate a modification suggestion for the document based on the document and the modification target through a content generation service; The modification suggestion is displayed in the document.
2. The method according to claim 1, It is characterized in that The step of obtaining the modification target written by the user in the document includes: A modification target written by a user to a preset position of a document is obtained, where the preset position includes at least one of the following: an annotation of the document, and a revision mark of the document.
3. The method according to claim 1, It is characterized in that The step of obtaining the modification target written by the user in the document includes: Read document data written by the user to the document; A modification target is extracted from the document data that meets the preset requirements.
4. The method according to claim 3, It is characterized in that The preset requirements include at least one of the following: The document data is data including preset characters, and the preset characters are used to trigger the content generation service; The document data is data written into the document at a preset time; The document data is data written into the document by a preset user; The document data is data that has not been processed by the content generation service.
5. The method according to claim 1, It is characterized in that The step of generating a modification suggestion for the document based on the document and the modification target through a content generation service includes: Based on the modification target, determining target content in the document that is related to the modification target, wherein the target content is at least part of the content in the document; Through the content generation service, a modification suggestion for the target content is generated based on the target content and the modification target.
6. The method according to claim 5, It is characterized in that The determining, based on the modification target, target content in the document that is related to the modification target comprises at least one of the following: Determining target content according to the position of the modification target in the document; Determining target content according to the type of the object in the document to which the modification target is applied; A semantic analysis is performed on the modification target to determine the target content from the document.
7. The method according to claim 1, It is characterized in that The displaying of the modification suggestion includes: Displaying the modification suggestion on the preset interface; After displaying the modification suggestion, the method further includes: Receiving a user operation acting on the preset interface; In response to the user operation, the modification suggestion is cancelled, or the document content of the document is revised based on the modification suggestion.
8. The method according to claim 1, It is characterized in that The displaying of the modification suggestion includes: Revising the document content of the document based on the modification suggestion; Using the revised document content as target content, wherein the target content includes revision marks generated by revision based on the modification suggestion; The target content is displayed.
9. The method according to claim 8, It is characterized in that The modification suggestion includes: modification content, and revising the document content of the document based on the modification suggestion includes: The modification content included in the modification suggestion is written into the document content of the document in the form of revision marks and / or the document content of the document is deleted.
10. The method according to claim 9, It is characterized in that The modification proposal also includes: reasons for modification; After writing the modification content included in the modification suggestion into the document content of the document in the form of revision marks and / or deleting the document content of the document, the method further includes: The modification reason included in the modification suggestion is used to identify the written content and / or deleted content.
11. The method according to claim 9, It is characterized in that The modified content includes first content and / or second content, wherein the first content is the original content of the document, and the second content is the content after the first content is modified; The step of writing the modification content included in the modification suggestion into the document content of the document in the form of a revision mark and / or deleting the document content of the document includes: marking the first content in the document with a revision mark indicating deletion of content; and / or, The second content is added to the document, and the second content is marked in the document with a revision mark indicating the added content.
12. The method according to claim 11, It is characterized in that The adding the second content to the document includes: determining a format of the first content; The second content having the format is added to the document.
13. The method according to claim 9, It is characterized in that The modified content includes first content and / or second content, wherein the first content is the original content of the document, and the second content is the content after the first content is modified; The step of writing the modification content included in the modification suggestion into the document content of the document in the form of a revision mark and / or deleting the document content of the document includes: comparing the difference between the first content and the second content; modifying the first content into the second content based on the difference; The portions modified based on the difference are marked with revision marks indicating deleted content and / or with revision marks indicating added content.
14. The method according to claim 8, It is characterized in that In the case where the modification suggestion includes document deletion content, the displaying the target content includes: determining how revisions of said document are displayed; Displaying the document deleted content that has been deleted from the target content in accordance with the revised display mode; The document deleted content refers to content deleted from the document content of the document, and the document deleted content is displayed as a revision mark in the target content.
15. The method according to any one of claims 1 to 14, It is characterized in that After displaying the modification suggestion in the document, the method further includes at least one of the following: In response to a revision acceptance operation for the document, accepting all or part of the revision marks generated by the content generation service in the document; In response to a revision rejection operation for the document, rejecting all or part of the revision marks generated by the content generation service in the document; In response to a first display operation on the document before revision, displaying the document content before the modification suggestion is revised to the document; In response to a second display operation on the revised document, displaying the document content after the modification suggestion is revised to the document; In response to a selection operation on a target review object in a review object set of the document, a revision mark generated by the target review object is displayed, wherein the review object set includes the review objects represented by the content generation service.
16. A document collaboration device, It is characterized in that The device comprises: An acquisition unit, used for acquiring a modification target written by a user in a document; A generating unit, configured to generate a modification suggestion for the document based on the document and the modification target through a content generation service; A display unit is used to display the modification suggestion in the document.
17. An electronic device, It is characterized in that include: Memory for storing computer programs; A processor is used to execute the computer program stored in the memory, and when the computer program is executed, the document collaboration method of any one of claims 1 to 15 is implemented.
18. A computer-readable storage medium having a computer program stored thereon, It is characterized in that When the computer program is executed by a processor, the document collaboration method of any one of claims 1 to 15 is implemented.
