Document content generation method and system, and device and medium
By providing document content generation methods in the online word processing system, and automatically generating document content using target content blocks and language models, the problem of high time cost for users in reprocessing of document content is solved, fast and automatic document content generation is achieved, and processing efficiency is improved.
Patent Information
- Application Number
- PCT/CN2024/133208
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2023-11-21
- Filing Date
- 2024-11-20
- Publication Date
- 2025-05-30
AI Technical Summary
In an online word processing system, when users reprocess the document content (such as extracting key information or translating), it takes a lot of time and low processing efficiency.
A document content generation method is provided. By receiving content generation operations in a document, an automated document content is generated using target content blocks, processing is performed based on user generation requirements information and document content, and using language model to generate required content.
It realizes the rapid and automatic generation of document content, improves the richness of document content, reduces the time cost of users in reprocessing document content, and improves processing efficiency.
Smart Images

Figure CN2024133208_30052025_PF_FP_ABST
Abstract
Description
Document content generation method, system, device and medium
[0001] This application claims priority to Chinese Patent Application No. 202311559395.4 filed on November 21, 2023, and the contents of the above-mentioned Chinese patent application disclosure are hereby incorporated by reference in their entirety as a part of this application. Technical Field
[0002] The present disclosure relates to a document content generation method, system, electronic device, and computer-readable storage medium. Background Art
[0003] With the continuous development of computer technology, online word processing systems have emerged. Online word processing systems (also known as document applications or document modules) support users to create documents, edit document content, or collaborate with others on document content.
[0004] In some use cases, users can reprocess document content. For example, if the document is a weekly work report, users can extract key information from it (such as information about potential project delays). In another example, if the document is written in one language, users can translate it into another language.
[0005] However, considering that the document content can be quite large, it takes a lot of time for users to reprocess the document content, and the processing efficiency is low. Summary of the Invention
[0006] The present disclosure provides a method for generating document content. This method can achieve rapid and automatic document content generation, thereby enhancing the richness of the document content. The present disclosure also provides a system, electronic device, computer-readable storage medium, and computer program product corresponding to the above method.
[0007] In a first aspect, the present disclosure provides a method for generating document content, the method comprising:
[0008] In response to receiving a content generation operation in a document, presenting a target content block in the document, with the content carried by the target content block serving as document content of the document;
[0009] First content is generated in the target content block according to first information and at least part of the document content, wherein the first information includes generation requirement information associated with the content generation operation.
[0010] In some possible implementations, the method further includes:
[0011] The first content is presented within the document in a presentation format of document content in the document.
[0012] In some possible implementations, after generating the first content in the target content block, the method further includes:
[0013] In response to receiving a change in at least a portion of the document content, second content is generated in the target content block according to the first information and the changed at least portion of the document content.
[0014] In some possible implementations, the first content is generated by the following steps:
[0015] generating prompt information according to the first information and the at least part of the document content;
[0016] The prompt information is sent to a language model, and the first content returned by the language model is received.
[0017] In some possible implementations, sending the prompt information to a language model and receiving the first content returned by the language model includes:
[0018] Sending the prompt information to a language model, so that the language model processes at least a portion of the original document content in the document according to the prompt information to generate first content;
[0019] Receive the first content returned by the language model.
[0020] In some possible implementations, sending the prompt information to a language model and receiving the first content returned by the language model includes:
[0021] Sending the prompt information to a language model, so that the language model processes at least a portion of document content in at least one document stored in the document module according to the prompt information to generate first content;
[0022] Receive the first content returned by the language model.
[0023] In some possible implementations, in response to receiving a content generation operation in a document, presenting a target content block in the document includes:
[0024] In response to receiving a triggering operation for a preset content generation control in a document, presenting a target content block in the document;
[0025] The first information includes generation requirement information associated with the content generation operation, including:
[0026] The first information includes generation requirement information corresponding to the preset content generation control.
[0027] In some possible implementations, after presenting the target content block in the document, the method further includes:
[0028] Input information in the target content block is acquired, and the input information is used as first information.
[0029] In some possible implementations, obtaining input information in the target content block includes:
[0030] providing an input box in the target content block;
[0031] In response to receiving an information sending operation triggered in the input box, the input information in the input box is acquired.
[0032] In some possible implementations, the method further includes:
[0033] In response to receiving a trigger operation for the input box, candidate input information is presented, where the candidate input information includes at least one of historical input information and stored input information.
[0034] In some possible implementations, generating the first content in the target content block includes:
[0035] providing an output box in the target content block;
[0036] In the output box, the generation progress of the first content is displayed, and the generation progress includes the generated content in the first content.
[0037] In some possible implementations, after generating the first content in the target content block, the method further includes:
[0038] In response to receiving an editing operation on the first content, the edited first content is displayed in the target content block.
[0039] In some possible implementations, the content generation operation is triggered by the first client, and the method further includes:
[0040] In response to a second client viewing the document, the second client collaboratively presents the presentation content of the first client, where the presentation content includes a process of generating the first content in the target content block.
[0041] In some possible implementations, after generating the first content in the target content block, the method further includes:
[0042] In response to receiving a viewing operation on the document from a third client, the target content block in the third client presents identification information, where the identification information includes at least one of information indicating the first content generator and the generation time of the first content. The third client has reading permission for the document, but does not have editing permission for the document.
[0043] In some possible implementations, the generation requirement information includes at least one of a generation intention of the first content or an output format of the first content.
[0044] In a second aspect, the present disclosure provides a document content generation system, the system comprising:
[0045] a rendering module, configured to, in response to receiving a content generation operation in a document, render a target content block in the document, wherein the content carried by the target content block serves as the document content of the document;
[0046] A generating module is configured to generate first content in the target content block according to first information and at least a portion of document content, wherein the first information includes generation requirement information associated with the content generation operation.
[0047] In some possible implementations, the presentation module is further configured to:
[0048] The first content is presented within the document in a presentation format of document content in the document.
[0049] In some possible implementations, the generating module is further configured to:
[0050] In response to receiving a change in at least a portion of the document content, second content is generated in the target content block according to the first information and the changed at least portion of the document content.
[0051] In some possible implementations, the generating module is specifically configured to:
[0052] generating prompt information according to the first information and the at least part of the document content;
[0053] The prompt information is sent to a language model, and the first content returned by the language model is received.
[0054] In some possible implementations, the generating module is specifically configured to:
[0055] Sending the prompt information to a language model, so that the language model processes at least a portion of the original document content in the document according to the prompt information to generate first content;
[0056] Receive the first content returned by the language model.
[0057] In some possible implementations, the generating module is specifically configured to:
[0058] , sending the prompt information to a language model, so that the language model processes at least a portion of the document content of at least one document stored in the document module according to the prompt information to generate first content;
[0059] Receive the first content returned by the language model.
[0060] In some possible implementations, the presentation module is specifically configured to:
[0061] In response to receiving a triggering operation for a preset content generation control in a document, presenting a target content block in the document;
[0062] The first information includes generation requirement information corresponding to the preset content generation control.
[0063] In some possible implementations, the system further includes an acquisition module, configured to:
[0064] Input information in the target content block is acquired, and the input information is used as first information.
[0065] In some possible implementations, the acquisition module is specifically configured to:
[0066] providing an input box in the target content block;
[0067] In response to receiving an information sending operation triggered in the input box, the input information in the input box is acquired.
[0068] In some possible implementations, the presentation module is further configured to:
[0069] In response to receiving a trigger operation for the input box, candidate input information is presented, where the candidate input information includes at least one of historical input information and stored input information.
[0070] In some possible implementations, the generating module is specifically configured to:
[0071] providing an output box in the target content block;
[0072] In the output box, the generation progress of the first content is displayed, and the generation progress includes the generated content in the first content.
[0073] In some possible implementations, the presentation module is further configured to:
[0074] In response to receiving an editing operation on the first content, the edited first content is displayed in the target content block.
[0075] In some possible implementations, the content generation operation is triggered by the first client, and the presentation module is further configured to:
[0076] In response to a second client viewing the document, the second client collaboratively presents the presentation content of the first client, where the presentation content includes a process of generating the first content in the target content block.
[0077] In some possible implementations, the presentation module is further configured to:
[0078] In response to receiving a viewing operation on the document from a third client, the target content block in the third client presents identification information, where the identification information includes at least one of information indicating the first content generator and the generation time of the first content. The third client has reading permission for the document, but does not have editing permission for the document.
[0079] In some possible implementations, the generation requirement information includes at least one of a generation intention of the first content or an output format of the first content.
[0080] In a third aspect, the present disclosure provides an electronic device comprising a processor and a memory. The processor and the memory communicate with each other. The processor is configured to execute instructions stored in the memory to cause the electronic device to perform the document content generation method according to the first aspect or any implementation of the first aspect.
[0081] In a fourth aspect, the present disclosure provides a computer-readable storage medium, wherein the computer-readable storage medium stores instructions, wherein the instructions instruct an electronic device to execute the document content generation method described in the first aspect or any implementation of the first aspect.
[0082] In a fifth aspect, the present disclosure provides a computer program product comprising instructions, which, when executed on an electronic device, enables the electronic device to execute the document content generation method described in the first aspect or any one of the implementations of the first aspect.
[0083] Based on the implementations provided in the above aspects, the present disclosure can be further combined to provide more implementations. BRIEF DESCRIPTION OF THE DRAWINGS
[0084] In order to more clearly illustrate the technical methods of the embodiments of the present disclosure, the following briefly introduces the drawings required for use in the embodiments.
[0085] FIG1 is a flow chart of a method for generating document content according to an embodiment of the present disclosure;
[0086] 2A to 2G are schematic diagrams of a document page provided by an embodiment of the present disclosure;
[0087] FIG3 is a schematic structural diagram of a document content generation system provided by an embodiment of the present disclosure;
[0088] FIG4 is a schematic structural diagram of an electronic device provided by an embodiment of the present disclosure. DETAILED DESCRIPTION
[0089] The terms "first" and "second" in the embodiments of the present disclosure are used for descriptive purposes only and should not be understood to indicate or imply relative importance or implicitly specify the number of technical features indicated. Therefore, the terms "first" and "second" may explicitly or implicitly include one or more of the features.
[0090] First, some technical terms involved in the embodiments of the present disclosure are introduced.
[0091] With the continuous development of computer technology, online word processing systems have emerged. Online word processing systems (also known as document applications or document modules) support users to create documents, edit document content, or collaborate with others on document content.
[0092] In some usage scenarios, users can reprocess the document content. However, considering that the document content can be large, it takes a lot of time and cost for users to reprocess the document content, and the processing efficiency is low.
[0093] The following will explain this with reference to specific usage scenarios. In some examples, when the document content is a weekly work report, users can extract key information from the document content. In this case, users need to read all the information in the document content and find the information they are interested in, such as project information that may be delayed and information about the person in charge related to the project information. This takes a long time for users and the efficiency of information extraction is low.
[0094] In other examples, when the document content is written in a certain language, the user can translate the document content into another language. In this case, the user can use a translation application to translate the document content and paste the translated document content into the original document. However, when pasting the translated document content into the original document, there may be a problem of formatting loss, requiring the user to adjust the format again, resulting in low translation efficiency. Some online word processing systems provide users with a translation function, which users can use to translate document content. However, since the translated document content is automatically saved as a new document, the user needs to merge the document content of the original document with the translated document content in the new document to achieve the need to display the document content before and after translation in one document, and the operation path is relatively long.
[0095] In other examples, when the document content is task information, users can extract tasks to be completed (also called to-dos) from the document content and communicate with the person in charge of the tasks to be completed to determine the completion time of the tasks. At this time, users need to check the document content regularly and send messages to different persons in charge to inquire about the completion time of the tasks. Relying on manual periodic work is inefficient.
[0096] In other embodiments, the online word processing system may store multiple documents, and users may search for document content related to a certain project from multiple documents. In this case, the user needs to use the search function provided by the online word processing system to search from multiple documents, which consumes a lot of time and may result in omissions.
[0097] In view of this, the present disclosure provides a document content generation method. In response to receiving a content generation operation within a document, the method presents a target content block within the document, wherein the content carried by the target content block serves as document content of the document, and then generates first content within the target content block based on first information and at least a portion of the document content, wherein the first information includes generation requirement information associated with the content generation operation.
[0098] In this method, users can trigger content generation within a document. Based on the user's generation requirements, the server automatically generates first content within a target content block. The first content carried by the target content block can then be directly used as the document's content. This enables rapid and automatic document content generation, meeting the diverse generation requirements of users during document usage and enhancing the richness of document content.
[0099] To facilitate understanding of the technical solutions provided by the embodiments of the present disclosure, they will be described below with reference to the accompanying drawings.
[0100] Referring to FIG. 1 , a flowchart of a method for generating document content according to an embodiment of the present disclosure is shown. The method specifically includes:
[0101] S101 : In response to receiving a content generation operation in a document, presenting a target content block in the document.
[0102] A document can be understood as a page used to display and edit document content. Document content can include different types of content, such as text, images, tables, videos, polls, task lists, code blocks, and more.
[0103] The document content can be content edited by the user within the document, or content obtained by the user viewing other users' documents, and the embodiments of the present disclosure do not limit this. In some possible implementations, the document content within the document can also be empty. For example, when the document is newly created, since the user has not yet edited the content, the document content can be empty.
[0104] It is understandable that when a user has edit permission, the document content can be edited, such as adding document content, deleting document content, modifying document content, etc. When a user does not have edit permission but has read permission, the document content can be viewed but cannot be edited.
[0105] In embodiments of the present disclosure, documents may be provided by an online word processing system. The online word processing system may be a software system for managing documents. The online word processing system may be different in different scenarios. In some embodiments, the online word processing system may be an independent software system, such as an independent document management application or word processing application. In other embodiments, the online word processing system may be integrated into other software systems, such as a business system, as a system module of the business system, providing document management and word processing services to users.
[0106] The content generation operation can be understood as an operation for automatically generating document content. Furthermore, the content generation operation can be associated with generation requirement information. In other words, the generation requirement information can be determined based on the content generation operation, and then the document content can be generated based on the generation requirement information.
[0107] In an embodiment of the present disclosure, after receiving a content generation operation, a target content block may be presented in a document. The target content block, also referred to as a block, may be used to carry content, and the content carried by the target content block serves as the document content of the document.
[0108] In other words, the content carried by the target content block can be directly displayed as document content within the document. If the content carried by the target content block is not deleted, the content carried by the target content block can continue to be displayed. Even if the user triggers an operation such as refreshing or reopening the document, the content carried by the target content block will still be displayed in the document as document content (i.e., the document body).
[0109] The disclosed embodiments support triggering content generation operations in different ways. In some embodiments, in response to receiving a triggering operation for a preset content generation control in a document, a target content block may be presented in the document.
[0110] That is, a preset content generation control (also called a preset control or a quick control) may be provided in the document, and the user may perform a content generation operation by triggering the preset content generation control.
[0111] In some possible implementations, a document may provide a document editing panel, which may provide multiple document content editing controls, such as an image addition control, a table addition control, etc. In embodiments of the present disclosure, a preset content generation control may be provided in the document editing panel, so that a user can trigger the preset content generation control in the document editing panel to perform a content generation operation.
[0112] In other possible implementations, a document may also allow users to invoke a document editing panel using a preset marker. For example, a user may invoke the document editing panel by entering a preset marker (e.g., " / ") within a document. In embodiments of the present disclosure, a preset content generation control may be provided within the document editing panel. Thus, a user may trigger the preset content generation control using a preset marker, thereby executing a content generation operation.
[0113] In other embodiments, the content generation operation may be performed by user inputting information. In this case, after the target content block is presented in the document, the input information in the target content block may be obtained.
[0114] That is to say, when the preset content generation control does not meet the user's content generation needs, the user can perform content generation operations by inputting natural language (also known as free instructions, custom instructions).
[0115] Similarly, in some possible implementations, an entry for information input operations may be provided in the document editing panel, so that the user may trigger the information input operation in the document editing panel and then perform the content generation operation.
[0116] In some other possible implementations, a document editing panel may be invoked through a preset marker, and the document editing panel may include an entry for information input operations. In this way, the user may trigger the information input operation through the preset marker and then perform the content generation operation.
[0117] In a specific implementation, an input box can be provided in the target content block. For example, in response to a trigger operation for an entry for information input operations in a document editing panel, the target content block can be presented and an input box can be provided in the target content block. For another example, in response to a trigger operation for an entry for information input operations invoked by a preset marker, the target content block can be presented and an input box can be provided in the target content block. Then, in response to receiving an information sending operation triggered in the input box, the input information in the input box is obtained.
[0118] That is, when the user has a generation requirement based on a custom instruction, an input box can be provided in the target content block so that the user can express the generation requirement by inputting natural language in the input box provided by the target content block.
[0119] Furthermore, in response to receiving a trigger operation for the input box, candidate input information may be presented, wherein the candidate input information may include at least one of historical input information and stored input information.
[0120] It is understandable that the user can first trigger the input box and then input information in the input box. Therefore, after the user triggers the input box, candidate input information can be displayed to the user, so that the user can refer to the candidate input information when entering information, thereby improving the efficiency of information input.
[0121] The historical input information can be understood as the user's input information within a historical time period. For example, the historical input information may include a set number of input information (e.g., 100) within a historical time period, or may include the user's input information within a set historical time period (e.g., within the past month), and the present embodiment does not limit this.
[0122] Stored input information can be understood as input information stored by users during other interactions on a document page. For example, a document page may support a floating window component, through which users can interact with a digital assistant. The floating window component can display the digital assistant's processing results, and users can save the digital assistant's processing results to obtain stored input information.
[0123] Considering that the number of candidate input information may be large, only a certain number (for example, 5) of candidate input information may be presented, and other candidate input information may be put into a secondary menu (for example, a "more" menu). When the user triggers the secondary menu, more candidate input information may be further displayed.
[0124] In this way, for some periodic and repetitive generation needs, by displaying candidate input information, users can quickly determine the input information from the candidate input information, or determine the input information after simply modifying the candidate input information, which simplifies the user's operation and further improves the efficiency of information input.
[0125] The following describes input information in conjunction with specific application scenarios. In some embodiments, when the document content is a weekly work report, the user can extract key information from the document content (such as information about projects that may be delayed, information about the person responsible for the project information, etc.). In this case, the input information can be "summarize the project delays and reasons for the delays in the document, and output it in the following format: *Project Name@Project Person in Charge:Project Description, Reason for Delay."
[0126] In other embodiments, when the document content is written in a certain language, the user can translate the document content into another language. In this case, the input information can be "translate the entire text into English".
[0127] In other embodiments, when the document content is task information, the user can extract to-be-completed tasks from the document content. At this time, the input information can be "Please perform the following tasks: 1. Organize the overdue and unfinished Todos in the document, and output in the following format: -[]Todo 1@Executor-[]Todo 2@Executor-[]Todo 3@Executor 2. <<Send a message>> to the relevant executor, the message content is: {{You have an unfinished task in the <<document link>>, please confirm the completion status. If it is not completed, please explain the reason for the overdue and the estimated completion time.}}".
[0128] In other embodiments, the online word processing system can store multiple documents, and users can browse the document content related to Project A from multiple documents. The input information can be "Organize the documents related to Project A that I have read, sort them according to my reading time, and output them in the following format: |Document title|Reading time|Last update time||<<Document link>>|<<Reading time>>|<<Last update time>>||<<Document link>>|<<Reading time>>|<<Last update time>>|".
[0129] S102: Generate first content in a target content block according to the first information and at least a portion of the document content.
[0130] The first information may include generation requirement information associated with the content generation operation. In other words, the first content may be content generated by processing at least part of the document content based on the user's generation requirement information.
[0131] In the embodiment of the present disclosure, the generation requirement information may include the generation intention of the first content and the output format of the first content. That is, the first content may be content that meets the user's generation intention and is generated in the output format required by the user.
[0132] The above process of generating the first content based on the generation requirement information associated with the content generation operation may also be referred to as document content generation based on an artificial intelligence (AI) template.
[0133] In some embodiments, the content generation operation may be a trigger operation for a preset content generation control. In this case, the first information may include generation requirement information corresponding to the preset content generation control.
[0134] For example, the preset content generation control may be a summary control, and the generation requirement corresponding to the summary control is a document content summary requirement. Another example is a preset content generation control may be a to-do extraction control, and the generation requirement corresponding to the extraction control is a requirement to extract to-do items from document content. Another example is a preset content generation control may be a translation control, and the generation requirement corresponding to the translation control is a document content translation requirement.
[0135] In other embodiments, the content generation operation may be an information input operation, in which case the input information may be used as the first information.
[0136] Typically, the input information may represent natural language content, and semantic recognition of the input information representing natural language content may be performed to determine the generation requirement. For example, the input information may be "Help me find deferred tasks," and the generation requirement indicated by the input information may be the requirement to extract deferred tasks from the document content.
[0137] The server can generate the first content based on the first information and at least a portion of the document content. In a specific implementation, the server can generate prompt information based on the first information and at least a portion of the document content, then send the prompt information to the language model and receive the first content returned by the language model.
[0138] In other words, the server can generate the first content based on the prompt learning using a language model. The language model can be a model with natural language processing capabilities and capable of handling natural language tasks, for example, a deep learning model trained using text data.
[0139] Prompt information can be used to guide the reasoning process of the language model. In the disclosed embodiment, a prompt is generated using generation requirement information associated with a content generation operation (e.g., a generation requirement corresponding to a preset content generation control, or a generation requirement indicated by input information). The language model is then called to process the prompt, allowing the language model to generate the first content by identifying and analyzing the prompt information, thereby improving the language model's reasoning performance and making the first content more consistent with the user's generation requirements.
[0140] In some possible implementations, original document content exists within the document. The server may send prompt information to the language model, so that the language model processes at least a portion of the original document content within the document based on the prompt information to generate the first content. The server may then receive the first content returned by the language model.
[0141] That is to say, when the generation requirement is related to the original document content (for example, the generation requirement is to summarize and translate the original document content), the server can use the language model to process the document content in the document, thereby generating the first content related to the original document content.
[0142] In other possible implementations, the server may also send prompt information to the language model so that the language model processes at least part of the document content in at least one document stored in the document module according to the prompt information to generate the first content. Then, the server may receive the first content returned by the language model.
[0143] That is to say, when the generation demand is not related to the original document content (for example, it is to find document content related to a certain project from multiple documents viewed by the user), or when the original document content is empty, that is, the document does not have original document content, the server can use the language model to process the document content of other documents in the document module (that is, the online word processing system) to generate the first content related to the document content of other documents.
[0144] In this way, the document content of the current document or other external documents can be processed according to the actual generation requirements of the user, and the internal document can be connected with the external document, thereby enriching the use scenarios of the document content generation method provided by the present disclosure.
[0145] By calling the language model, the first content can be generated in the target content block. Furthermore, the first content can be presented in the document in the presentation format of the document content in the document.
[0146] That is, in the embodiment of the present disclosure, after the user triggers the content generation operation, the generated first content will be directly displayed as the main text of the document. In this way, the user does not need to perform other operations on the first content to achieve the enrichment of the document content.
[0147] During specific implementation, an output box may be provided in the target content block, and the generation progress of the first content may be displayed in the output box.
[0148] The generation progress may include the generated content in the first content. Considering that the first content can be transmitted to the client in a streaming manner, an output box is provided in the target content block to display the generated content in the output box, thereby achieving a real-time display of the generation progress of the first content with a typewriter effect.
[0149] In some possible implementations, the document content within the same document may change. For example, for a document collaboratively processed by multiple users, each user may add, delete, or edit the document content. In an embodiment of the present disclosure, in response to receiving a change in at least a portion of the document content, second content may be generated in the target content block based on the first information and at least the portion of the document content that has changed.
[0150] That is, when at least part of the document content changes, the content carried by the target content block can also change accordingly. In some embodiments, the target content block can provide an update control, and the user can trigger the update control to update the content carried by the target content block under the same generation requirements (all first information), thereby updating the first content to the second content.
[0151] In this way, for some periodic or repetitive tasks, users do not need to repeat the content generation operation every time, but can automatically update the content carried by the target content block, or quickly update the content carried by the target content block by simply triggering the update control.
[0152] Furthermore, the embodiment of the present disclosure supports the user to edit the first content. In a specific implementation, in response to receiving an editing operation on the first content, the edited first content can be displayed in the target content block.
[0153] Since the first content can be displayed in the document as part of the document content in the form of the document body, the user can perform the same operation as editing the document content to edit the first content. In this way, when the generated first content contains content that needs to be modified, the user can make the corresponding modification.
[0154] Furthermore, embodiments of the present disclosure also support users modifying input information and regenerating the content in the target content block. For example, the user can re-enter information through the input box provided by the target content block. The re-entered input information can indicate new generation requirements, so that the server can regenerate content in the target content block based on the new generation requirements.
[0155] In some possible implementations, an online word processing system can support collaborative document processing with others. Specifically, if user A has edit permission for document A, and user B is viewing document A while user A is editing the document, user B can view user A's editing process in real time. For example, user B can view user A's operations on document A, such as additions, deletions, and modifications, thereby enabling collaborative document processing.
[0156] In an embodiment of the present disclosure, the generation of first content can be collaboratively displayed to other users. In a specific implementation, the content generation operation can be triggered by a first client. In response to a second client viewing a document, the first client's display content can be collaboratively displayed on the second client. The display content can include the process of generating the first content in a target content block.
[0157] That is, in the document content generation method provided by the embodiment of the present disclosure, the process of generating the first content in the target content block can be displayed on the second client, achieving a collaborative display effect. In this way, the second client can be informed of the relevant operations performed by the first client in the document in real time.
[0158] Furthermore, considering that the first content is automatically generated by the document content generation method provided by the embodiments of the present disclosure, rather than manually edited by a user, the embodiments of the present disclosure may also identify the first content using identification information. In a specific implementation, in response to receiving a document viewing operation from a third client, the identification information may be presented in the target content block on the third client.
[0159] The identification information may include at least one of information indicating the first content generator and the generation time of the first content. The third client has the reading permission of the document, but does not have the editing permission of the document.
[0160] That is to say, when the user only views the document and does not edit the document content (also known as reading mode), identification information can be presented in the target content block. The identification information can inform the user viewing the document page that this part of the document content is not edited by other users, but is automatically generated.
[0161] Based on the above description, embodiments of the present disclosure provide a document content generation method. In response to receiving a content generation operation within a document, the method presents a target content block within the document, wherein the content carried by the target content block serves as the document content of the document, and then generates first content within the target content block based on first information and at least a portion of the document content, wherein the first information includes generation requirement information associated with the content generation operation.
[0162] In this method, users can trigger content generation within a document. Based on the user's generation requirements, the server automatically generates first content within a target content block. The first content carried by the target content block can then be directly used as the document's content. This enables rapid and automatic document content generation, meeting the diverse generation requirements of users during document usage and enhancing the richness of document content.
[0163] The above describes the document content generation method provided by the embodiment of the present disclosure, and the following will describe it in conjunction with specific scenarios.
[0164] 2A to 2G , a schematic diagram of a document page is shown. As shown in FIG. 2A , the document page 20 includes a document information display area 201 , a document editing panel 202 , and a document content display area 203 .
[0165] Specifically, the document information display area 201 is used to display the attribute information of the document, such as the document name. The document editing panel 202 is used to provide multiple document content editing controls and preset content generation controls. The document content editing controls include but are not limited to task list addition controls, picture addition controls, table addition spaces, highlight block addition controls, etc. The preset content generation controls can be presented after triggering the "AI Template" button. The preset content generation controls include but are not limited to summary controls, to-do extraction controls, translation controls, etc. In addition, after triggering the "AI Template" button, an entry for information input operations can also be presented, such as a "Custom AI Block" control. The document content display area 203 is used to display document content.
[0166] In some possible implementations, the preset content generation controls and the entry for information input operations can also be invoked via a preset marker. As shown in FIG2B , a user can enter a preset marker, such as “ / ”, in the document content display area 203 of the document page 20. After entering the preset marker, the document editing panel 204 can be invoked at the input position in the document content display area 203. The document editing panel 204 includes the preset content generation controls and the entry for information input operations.
[0167] In response to the content generation operation, the target content block can be presented. As shown in Figure 2C, the target content block can provide an input box 205, and the user can trigger the information input operation in the input box 205 to input information. In some embodiments, in response to the triggering operation on the input box 205, candidate input information 206 can also be displayed. Among them, the candidate input information 206 can include basic input information (such as summary, extraction of to-do items, translation) and historical input information (such as "help me generate a reading guide", "help me extract content that requires everyone's attention"). The candidate input information 206 can also include stored input information, which is not shown in Figure 2C.
[0168] Based on the first information and at least part of the document content, the first content can be generated in the target content block. As shown in Figure 2D, the target content block can provide an output box 207, which displays the generation progress of the target document, that is, displays the generated content in the first content, thereby realizing real-time display of the first content generation process. Furthermore, during the generation process of the first content, a sign indicating that the first content is being generated can be presented in the upper area of the output box 207, so that the user can know that the first content is being generated through the sign. In addition, a retry control and a stop control can also be presented in the upper area of the output box 207. The user can regenerate the first content by triggering the retry control, or stop generating the first content by triggering the stop control.
[0169] As shown in Figure 2E, after the first content is generated, it can be presented in the target content block, for example, "This is a research report on Project A. The research objective is XXXX, and the research method is XXXX." In this way, the automatically generated first content is displayed as the main body of the document without requiring additional user interaction, enriching the document content.
[0170] Furthermore, the user can update the first content. As shown in Figure 2F, the user can trigger an update operation through the first content. For example, the target content block can provide an input box 208, and the input box 208 includes an update control. The information displayed by default in the input box 208 can be the first information. If the user does not modify the first information, the first content can be updated to the second content by triggering the update control. In this way, after at least part of the document content changes, the content carried by the target content block is quickly updated. The user can also modify the information displayed by default in the input box 208 to update the generation requirements, and then generate new content in the target content block according to the updated generation requirements.
[0171] As shown in FIG2G , when a user views a document page 20, for example, in reading mode, identification information can be displayed in the area used to display the first content, such as information that the first content was generated by a digital assistant and the generation time of the target document. In this way, the user is informed of the generator and generation time of the document content through the identification information.
[0172] The document content generation method provided by the embodiment of the present disclosure is described in detail above with reference to FIG. 1 and FIG. 2A to FIG. 2G . The system and device provided by the embodiment of the present disclosure will be described below with reference to the accompanying drawings.
[0173] Referring to the structural diagram of the document content generation system shown in FIG3 , the system 30 includes:
[0174] A presentation module 301 is configured to present a target content block in the document in response to receiving a content generation operation in the document, with the content carried by the target content block serving as the document content of the document;
[0175] The generating module 302 is configured to generate first content in the target content block according to first information and at least a portion of the document content, wherein the first information includes generation requirement information associated with the content generation operation.
[0176] In some possible implementations, the presenting module 301 is further configured to:
[0177] The first content is presented within the document in a presentation format of document content in the document.
[0178] In some possible implementations, the generating module 302 is further configured to:
[0179] In response to receiving a change in at least a portion of the document content, second content is generated in the target content block according to the first information and the changed at least portion of the document content.
[0180] In some possible implementations, the generating module 302 is specifically configured to:
[0181] generating prompt information according to the first information and the at least part of the document content;
[0182] The prompt information is sent to a language model, and the first content returned by the language model is received.
[0183] In some possible implementations, the generating module 302 is specifically configured to:
[0184] Sending the prompt information to a language model, so that the language model processes at least a portion of the original document content in the document according to the prompt information to generate first content;
[0185] Receive the first content returned by the language model.
[0186] In some possible implementations, the generating module 302 is specifically configured to:
[0187] Sending the prompt information to a language model, so that the language model processes at least a portion of document content in at least one document stored in the document module according to the prompt information to generate first content;
[0188] Receive the first content returned by the language model.
[0189] In some possible implementations, the presenting module 301 is specifically configured to:
[0190] In response to receiving a triggering operation for a preset content generation control in a document, presenting a target content block in the document;
[0191] The first information includes generation requirement information corresponding to the preset content generation control.
[0192] In some possible implementations, the system 30 further includes an acquisition module, which is configured to:
[0193] Input information in the target content block is acquired, and the input information is used as first information.
[0194] In some possible implementations, the acquisition module is specifically configured to:
[0195] providing an input box in the target content block;
[0196] In response to receiving an information sending operation triggered in the input box, the input information in the input box is acquired.
[0197] In some possible implementations, the presenting module 301 is further configured to:
[0198] In response to receiving a trigger operation for the input box, candidate input information is presented, where the candidate input information includes at least one of historical input information and stored input information.
[0199] In some possible implementations, the generating module 302 is specifically configured to:
[0200] providing an output box in the target content block;
[0201] In the output box, the generation progress of the first content is displayed, and the generation progress includes the generated content in the first content.
[0202] In some possible implementations, the presenting module 301 is further configured to:
[0203] In response to receiving an editing operation on the first content, the edited first content is displayed in the target content block.
[0204] In some possible implementations, the content generation operation is triggered by the first client, and the presentation module 301 is further configured to:
[0205] In response to a second client viewing the document, the second client collaboratively presents the presentation content of the first client, where the presentation content includes a process of generating the first content in the target content block.
[0206] In some possible implementations, the presenting module 301 is further configured to:
[0207] In response to receiving a viewing operation on the document from a third client, the target content block in the third client presents identification information, where the identification information includes at least one of information indicating the first content generator and the generation time of the first content. The third client has reading permission for the document, but does not have editing permission for the document.
[0208] In some possible implementations, the generation requirement information includes at least one of a generation intention of the first content or an output format of the first content.
[0209] According to the embodiment of the present disclosure, the document content generation system 30 may correspond to executing the method described in the embodiment of the present disclosure, and the above-mentioned and other operations and / or functions of each module / unit of the document content generation system 30 are respectively for implementing the corresponding processes of each method in the embodiment shown in Figure 1. For the sake of brevity, they will not be repeated here.
[0210] The present disclosure also provides an electronic device, which is specifically configured to implement the functions of the document content generation system 30 in the embodiment shown in FIG3 .
[0211] FIG4 is a schematic diagram of the structure of an electronic device 400. As shown in FIG4, the electronic device 400 includes a bus 401, a processor 402, a communication interface 403, and a memory 404. The processor 402, the memory 404, and the communication interface 403 communicate with each other via the bus 401.
[0212] Bus 401 may be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus. Buses can be categorized as address buses, data buses, and control buses. For ease of illustration, FIG4 shows only one thick line, but this does not imply that there is only one bus or only one type of bus.
[0213] The processor 402 may be any one or more of a central processing unit (CPU), a graphics processing unit (GPU), a microprocessor (MP), or a digital signal processor (DSP).
[0214] The communication interface 403 is used for communicating with the outside, for example, the communication interface 403 can be used for communicating with a terminal.
[0215] The memory 404 may include volatile memory, such as random access memory (RAM), or non-volatile memory, such as read-only memory (ROM), flash memory, hard disk drive (HDD), or solid state drive (SSD).
[0216] The memory 404 stores executable codes, and the processor 402 executes the executable codes to perform the aforementioned document content generation method.
[0217] Specifically, when implementing the embodiment shown in FIG3 , and when each module or unit of the document content generation system 30 described in the embodiment of FIG3 is implemented by software, the software or program code required to execute the functions of each module / unit in FIG3 may be partially or completely stored in the memory 404. The processor 402 executes the program code corresponding to each unit stored in the memory 404 to perform the aforementioned document content generation method.
[0218] The present disclosure also provides a computer-readable storage medium. The computer-readable storage medium can be any available medium capable of being stored by a computing device, or a data storage device such as a data center that contains one or more available media. The available medium can be a magnetic medium (e.g., a floppy disk, a hard disk, a magnetic tape), an optical medium (e.g., a DVD), or a semiconductor medium (e.g., a solid-state drive). The computer-readable storage medium includes instructions that instruct the computing device to execute the document content generation method applied to the document content generation system 30.
[0219] The present disclosure also provides a computer program product comprising one or more computer instructions that, when loaded and executed on a computing device, fully or partially generate the process or function described in the present disclosure.
[0220] The computer instructions may be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another computer-readable storage medium. For example, the computer instructions may be transmitted from one website, computer, or data center to another website, computer, or data center via wired (e.g., coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) means.
[0221] When the computer program product is executed by a computer, the computer executes any of the aforementioned document content generation methods. The computer program product may be a software installation package, and when any of the aforementioned document content generation methods is needed, the computer program product may be downloaded and executed on the computer.
[0222] The flowcharts and block diagrams in the accompanying drawings illustrate the possible implementation architecture, functions and operations of the systems, methods and computer program products according to the various embodiments of the present disclosure. In this regard, each box in the flowchart or block diagram can represent a module, program segment, or a part of code, and the module, program segment, or a part of code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in a different order than that marked in the accompanying drawings. For example, two boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram and / or flowchart, and the combination of the boxes in the block diagram and / or flowchart, can be implemented with a dedicated hardware-based system that performs the specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.
[0223] The units involved in the embodiments described in this disclosure may be implemented in software or hardware, wherein the name of a unit / module does not, in some cases, limit the unit itself.
[0224] The functions described above herein may be performed, at least in part, by one or more hardware logic components. For example, and without limitation, exemplary types of hardware logic components that may be used include: field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chip (SOCs), complex programmable logic devices (CPLDs), and the like.
[0225] In the context of the embodiments of the present disclosure, a machine-readable medium can be a tangible medium that can contain or store a program for use by or in conjunction with an instruction execution system, device, or equipment. A machine-readable medium can be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium can include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, device, or equipment, or any suitable combination of the foregoing. A more specific example of a machine-readable storage medium can include an electrical connection based on one or more lines, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
[0226] It should be noted that the various embodiments in this specification are described in a progressive manner, with each embodiment focusing on the differences from other embodiments. Reference can be made to the common and similar parts between the various embodiments. For the systems or devices disclosed in the embodiments, since they correspond to the methods disclosed in the embodiments, the description is relatively simple, and the relevant parts can be referred to the method description.
[0227] It should be understood that in the present disclosure, "at least one (item)" refers to one or more, and "plurality" refers to two or more. "And / or" is used to describe the association relationship of associated objects, indicating that three relationships may exist. For example, "A and / or B" can mean: only A exists, only B exists, and A and B exist at the same time, where A and B can be singular or plural. The character " / " generally indicates that the previous and next associated objects are in an "or" relationship. "At least one of the following items" or similar expressions refers to any combination of these items, including any combination of single items or plural items. For example, at least one of a, b or c can mean: a, b, c, "a and b", "a and c", "b and c", or "a and b and c", where a, b, c can be single or multiple.
[0228] It should also be noted that, in this document, relational terms such as first and second, etc., are used only to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "comprises," "comprising," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or device comprising a series of elements includes not only those elements, but also other elements not explicitly listed, or elements inherent to such process, method, article, or device. In the absence of further limitations, an element defined by the phrase "comprising a ..." does not exclude the presence of additional identical elements in the process, method, article, or device comprising the element.
[0229] The steps of the methods or algorithms described in conjunction with the embodiments disclosed herein may be implemented directly 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), internal memory, read-only memory (ROM), electrically programmable ROM, electrically erasable programmable ROM, registers, a hard disk, a removable disk, a CD-ROM, or any other form of storage medium known in the art.
[0230] The above description of the disclosed embodiments is intended to enable one skilled in the art to implement or use the present disclosure. Various modifications to these embodiments will be readily apparent to one skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the present disclosure. Therefore, the present disclosure is not limited to the embodiments shown herein, but is intended to be construed in the widest manner consistent with the principles and novel features disclosed herein.
Claims
1. A method for generating document content, comprising: In response to receiving a content generation operation in a document, presenting a target content block in the document, with the content carried by the target content block serving as document content of the document; Generate first content in the target content block according to first information and at least part of the document content, wherein the first information includes generation requirement information associated with the content generation operation.
2. The method according to claim 1, further comprising: The first content is presented within the document in a presentation format of document content in the document.
3. The method according to claim 1, wherein: After generating the first content in the target content block, the method further includes: In response to receiving that the at least part of the document content has changed, second content is generated in the target content block according to the first information and the at least part of the document content that has changed.
4. The method according to claim 1, wherein: The first content is generated by the following steps: Generate prompt information according to the first information and at least part of the document content; The prompt information is sent to a language model, and the first content returned by the language model is received.
5. The method according to claim 4, wherein: The sending the prompt information to the language model and receiving the first content returned by the language model includes: Sending the prompt information to a language model, so that the language model processes at least a portion of the original document content in the document according to the prompt information to generate first content; The first content returned by the language model is received.
6. The method according to claim 4, wherein: The sending the prompt information to the language model and receiving the first content returned by the language model includes: Sending the prompt information to a language model, so that the language model processes at least a portion of the document content in at least one document stored in the document module according to the prompt information to generate first content; The first content returned by the language model is received.
7. The method according to claim 1, wherein: In response to receiving a content generation operation in a document, presenting a target content block in the document comprises: In response to receiving a trigger operation for a preset content generation control in a document, presenting a target content block in the document; The first information includes generation requirement information associated with the content generation operation, including: The first information includes generation requirement information corresponding to the preset content generation control.
8. The method according to claim 1, wherein: After presenting the target content block in the document, the method further includes: Input information in the target content block is acquired, and the input information is used as first information.
9. The method according to claim 8, wherein: The acquiring of input information in the target content block includes: providing an input box in the target content block; In response to receiving an information sending operation triggered in the input box, the input information in the input box is acquired.
10. The method according to claim 9, further comprising: In response to receiving a trigger operation for the input box, candidate input information is presented, where the candidate input information includes at least one of historical input information and stored input information.
11. The method according to claim 1, wherein: The generating the first content in the target content block comprises: providing an output box in the target content block; In the output box, the generation progress of the first content is displayed, and the generation progress includes the generated content in the first content.
12. The method according to claim 1, wherein: After generating the first content in the target content block, the method further includes: In response to receiving an editing operation on the first content, the edited first content is displayed in the target content block.
13. The method according to claim 1, wherein: The content generation operation is triggered by the first client, and the method further includes: In response to a second client viewing the document, display content of the first client is collaboratively displayed on the second client, where the display content includes a process of generating the first content in the target content block.
14. The method according to claim 1, wherein: After generating the first content in the target content block, the method further includes: In response to receiving a viewing operation of the document by a third client, identification information is presented in the target content block in the third client, where the identification information includes at least one of information indicating the first content generator and generation time of the first content, the third client has reading permission for the document, and the third client does not have editing permission for the document.
15. The method according to any one of claims 1 to 14, wherein: The generation requirement information includes: at least one of the generation intention of the first content or the output format of the first content.
16. A document content generation system, comprising: A presentation module, configured to present a target content block in the document in response to receiving a content generation operation in the document, wherein the content carried by the target content block serves as the document content of the document; as well as The generating module is configured to generate first content in the target content block according to first information and at least part of the document content, wherein the first information includes generation requirement information associated with the content generating operation.
17. An electronic device comprising a processor and a memory; wherein: The processor is configured to execute instructions stored in the memory, so that the electronic device performs the method according to any one of claims 1 to 15.
18. A computer-readable storage medium comprising instructions, wherein: The instruction instructs the electronic device to execute the method according to any one of claims 1 to 15.
Citation Information
Patent Citations
Document processing method and device, equipment and medium
CN114997115A
Document access method and device, equipment, medium and program product
CN115544982A
Document content generation method, system and equipment and medium
CN118657132A