Document generation method and device, equipment and storage medium
By determining multiple document parts and configuration information of the target document and determining the generation mode based on this information, the problem of chapter association neglect in the existing document generation method is solved, and the quality and efficiency of document generation is balanced.
Patent Information
- Application Number
- CN202411537033.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-30
- Publication Date
- 2025-02-14
- Estimated Expiration
- 2044-10-30
AI Technical Summary
The existing document generation method ignores the association between different chapters when generating documents, resulting in the lack of association or connection between different chapters, and the generation time is long, and the user needs to wait for a long time.
By determining a plurality of document parts of the target document to be generated and its corresponding configuration information, the generation mode is determined based on the relationship between the multiple document parts, including the generation order, and the main content of each document part is generated according to the generation mode.
In document generation, the association between different document parts is considered, and the generation mode is determined through association, which balances the quality and efficiency of document generation and reduces the waiting time.
Smart Images

Figure CN119443276A_ABST
Abstract
Description
Technical Field
[0001] Example embodiments of the present disclosure generally relate to the field of computers, and more particularly, to document generation methods, devices, apparatuses, and computer-readable storage media. Background Art
[0002] Currently, machine learning models can be used to generate document content. By training on a large amount of document data, machine learning models can learn language rules and patterns, and thus automatically generate new document content. Such machine learning models have been widely used in content creation, data analysis and other fields, providing users with convenient and efficient document generation services. Summary of the invention
[0003] In a first aspect of the present disclosure, a document generation method is provided. The method includes: determining a plurality of document parts included in a target document to be generated and document configuration information for the target document, wherein the document configuration information includes at least corresponding configuration information of the plurality of document parts; determining a generation mode of the target document based on the relationship between the plurality of document parts, wherein the generation mode indicates at least a generation order of the plurality of document parts; and generating corresponding main contents of the plurality of document parts based on the corresponding configuration information of the plurality of document parts according to the generation mode.
[0004] In a second aspect of the present disclosure, a document generation device is provided. The device includes: a configuration information determination module, configured to determine multiple document parts included in a target document to be generated and document configuration information for the target document, wherein the document configuration information at least includes corresponding configuration information of the multiple document parts; a generation mode determination module, configured to determine a generation mode of the target document based on the relationship between the multiple document parts, wherein the generation mode at least indicates a generation order of the multiple document parts; and a main content generation module, configured to generate corresponding main contents of the multiple document parts based on the corresponding configuration information of the multiple document parts according to the generation mode.
[0005] In a third aspect of the present disclosure, an electronic device is provided. The device includes at least one processing unit; and at least one memory, the at least one memory is coupled to the at least one processing unit and stores instructions for execution by the at least one processing unit. When the instructions are executed by the at least one processing unit, the device executes the method of the first aspect.
[0006] In a fourth aspect of the present disclosure, a computer-readable storage medium is provided, wherein a computer program is stored on the computer-readable storage medium, and the computer program can be executed by a processor to implement the method of the first aspect.
[0007] It should be understood that the contents described in this content section are not intended to limit the key features or important features of the embodiments of the present disclosure, nor are they intended to limit the scope of the present disclosure. Other features of the present disclosure will become easily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS
[0008] The above and other features, advantages and aspects of the embodiments of the present disclosure will become more apparent with reference to the following detailed description in conjunction with the accompanying drawings. In the accompanying drawings, the same or similar reference numerals represent the same or similar elements, wherein:
[0009] Figure 1 A schematic diagram showing an example environment in which embodiments of the present disclosure can be implemented;
[0010] Figure 2 A flowchart showing an example process of document generation according to some embodiments of the present disclosure;
[0011] FIG. 3A to FIG. 3C A schematic diagram showing an example interface for creating a document template according to some embodiments of the present disclosure;
[0012] FIG. 4A to FIG. 4D A schematic diagram showing an example interface for generating a document using a template according to some embodiments of the present disclosure;
[0013] Figure 5 A schematic structural block diagram showing an example apparatus for document generation according to some embodiments of the present disclosure; and
[0014] Figure 6 A block diagram illustrating an electronic device in which one or more embodiments of the present disclosure may be implemented is shown. DETAILED DESCRIPTION
[0015] It is understandable that before using the technical solutions disclosed in the embodiments of the present disclosure, the types, scope of use, usage scenarios, etc. of the personal information involved in the present disclosure should be informed to the user and the user's authorization should be obtained in an appropriate manner in accordance with relevant laws and regulations.
[0016] For example, in response to receiving an active request from a user, a prompt message is sent to the user to clearly prompt the user that the operation requested to be performed will require obtaining and using the user's personal information. Thus, the user can autonomously choose whether to provide personal information to software or hardware such as an electronic device, application, server, or storage medium that performs the operation of the technical solution of the present disclosure according to the prompt message.
[0017] As an optional but non-limiting implementation, in response to receiving an active request from the user, the prompt information may be sent to the user in the form of a pop-up window, in which the prompt information may be presented in text form. In addition, the pop-up window may also carry a selection control for the user to choose "agree" or "disagree" to provide personal information to the electronic device.
[0018] It is understandable that the above notification and the process of obtaining user authorization are merely illustrative and do not constitute a limitation on the implementation of the present disclosure. Other methods that meet the relevant laws and regulations may also be applied to the implementation of the present disclosure.
[0019] It is understandable that the data involved in this technical solution (including but not limited to the data itself, the acquisition or use of the data) shall comply with the requirements of relevant laws, regulations and relevant provisions.
[0020] Embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. Although certain embodiments of the present disclosure are shown in the accompanying drawings, it should be understood that the present disclosure can be implemented in various forms and should not be construed as being limited to the embodiments set forth herein. On the contrary, these embodiments are provided to provide a more thorough and complete understanding of the present disclosure. It should be understood that the drawings and embodiments of the present disclosure are only for exemplary purposes and are not intended to limit the scope of protection of the present disclosure.
[0021] It should be noted that the titles of any sections / subsections provided herein are not restrictive. Various embodiments are described throughout this article, and any type of embodiment may be included under any section / subsection. In addition, the embodiments described in any section / subsection may be combined in any manner with any other embodiments described in the same section / subsection and / or different sections / subsections.
[0022] Herein, unless explicitly stated, executing a step “in response to A” does not mean executing the step immediately after “A” but may include one or more intermediate steps.
[0023] In the description of the embodiments of the present disclosure, the term "including" and similar terms should be understood as open inclusion, that is, "including but not limited to". The term "based on" should be understood as "based at least in part on". The term "one embodiment" or "the embodiment" should be understood as "at least one embodiment". The term "some embodiments" should be understood as "at least some embodiments". Other explicit and implicit definitions may be included below. The terms "first", "second", etc. may refer to different or the same objects. Other explicit and implicit definitions may be included below.
[0024] As used herein, the term "component" may refer to any suitable model, module, unit, etc. used to achieve special effects. Such a component may provide a corresponding output based on the input provided, and may include any suitable operation, calculation, etc. An example of a component is an algorithm. In the following, some embodiments of the present disclosure will be described mainly with reference to algorithms, but it should be understood that such embodiments are also applicable to other types of components.
[0025] It is understandable that the data involved in this technical solution (including but not limited to the data itself, the acquisition, use, storage or deletion of the data) shall comply with the requirements of relevant laws, regulations and relevant provisions.
[0026] It is understandable that before using the technical solutions disclosed in the various embodiments of the present disclosure, the types, scopes of use, usage scenarios, etc. of the information involved in the present disclosure should be informed to relevant users and their authorization should be obtained in an appropriate manner in accordance with relevant laws and regulations. The relevant users may include any type of right holders, such as individuals, enterprises, and groups.
[0027] For example, in response to receiving an active request from a user, a prompt message is sent to the relevant user to clearly prompt the relevant user that the operation requested to be performed will require obtaining and using the information of the relevant user, so that the relevant user can independently choose whether to provide information to software or hardware such as an electronic device, application, server or storage medium that executes the operation of the technical solution of the present disclosure based on the prompt message.
[0028] As an optional but non-limiting implementation, in response to receiving an active request from a relevant user, a prompt message is sent to the relevant user, for example, in the form of a pop-up window, in which the prompt message may be presented in text form. In addition, the pop-up window may also carry a selection control for the user to select "agree" or "disagree" to provide information to the electronic device.
[0029] It is understandable that the above notification and the process of obtaining user authorization are only illustrative and do not limit the implementation of the present disclosure. Other methods that meet relevant laws and regulations may also be applied to the implementation of the present disclosure. The activation of the digital assistant related functions, the acquired data, the processing and storage of the data, etc. in the embodiment of the present disclosure shall obtain the prior authorization of the user and other rights holders associated with the user, and shall comply with the relevant laws and regulations and the agreement rules between the rights holders.
[0030] As used herein, the term "model" can learn the association between the corresponding input and output from the training data, so that after the training is completed, the corresponding output can be generated for a given input. The generation of the model can be based on machine learning technology. Deep learning is a machine learning algorithm that processes inputs and provides corresponding outputs by using multi-layer processing units. A neural network model is an example of a model based on deep learning. In this article, "model" may also be referred to as "machine learning model", "learning model", "machine learning network" or "learning network", and these terms are used interchangeably in this article.
[0031] As used herein, the term "document" refers to a material used to record information. In some embodiments, a document may be an electronic document in any suitable format, such as a document in a web page, a word document, a portable document format (PDF) document, etc. In embodiments of the present disclosure, a document may have any suitable type of content, including but not limited to text, tables, pictures, formulas, and the like.
[0032] As used herein, the term "document section" may refer to a portion of a document used to organize content. Depending on the specific implementation, a document section may have different granularities. For example, a document section may be a chapter. As another example, a document section may be a paragraph. In addition, although all are referred to as document sections, multiple document sections in the same document may have a hierarchy. For example, one document section may be the next level of another document section. A document section may have a title, a body, and optional auxiliary text (e.g., comments, footnotes, etc.). In particular, if document section A is the next level of document section B, then document section A may be considered to be at least a portion of the body of document section B.
[0033] As used herein, a "document template" or "template" may refer to an electronic, computer-processable file that describes how to generate a document.
[0034] As briefly described above, machine learning models can be applied to content creation, data analysis and other fields. In document generation, a common approach is to generate each chapter of the document sequentially. However, this approach will cause problems such as long overall document generation time and users need to wait for a long time. Another possible approach is to generate each chapter of the document concurrently. Although this approach can speed up document generation, it ignores the possible connections between different chapters. Therefore, doing so may result in a lack of connection or connection between different chapters in the generated document.
[0035] To this end, in an embodiment of the present disclosure, a document generation scheme is provided. In the scheme, multiple document parts included in a target document to be generated and document configuration information for the target document are determined, and the document configuration information at least includes corresponding configuration information of the multiple document parts. Based on the relationship between the multiple document parts, a generation mode of the target document is determined, and the generation mode at least indicates the generation order of the multiple document parts. According to the generation mode, the corresponding main contents of the multiple document parts are generated based on the corresponding configuration information of the multiple document parts.
[0036] In this way, the main contents of multiple document parts are generated by determining the configuration and generation mode of multiple document parts of the target document. In this way, in document generation, the possible association between different document parts is taken into account. The generation mode of the document is determined based on this association. In this way, a balance can be achieved between the generation quality and generation efficiency of the document.
[0037] Example Environment
[0038] Figure 1 A schematic diagram of an example environment 100 in which embodiments of the present disclosure can be implemented is shown. Environment 100 involves an application management platform 110, which can support the creation of applications and / or the running of applications. In some embodiments, the portion of the application management platform 110 that supports the creation of applications can also be referred to as an application creation portion. In some embodiments, the portion of the application management platform 110 that supports the running of applications can also be referred to as an application running portion.
[0039] As shown in the figure, the application creation part can provide a user 105 with an environment for creating and publishing applications. User 105 can be referred to as an application creation user or creator. In some embodiments, the application creation part can be a low-code platform that provides a collection of tools for application creation. The application creation part can support visual development of various types of applications, so that developers can skip the process of manual coding and speed up the development cycle and cost of applications. The application creation part can support any appropriate platform for users to develop one or more types of applications, for example, it can include a platform based on application platform as a service (aPaaS). Such a platform can support users to efficiently develop applications and realize operations such as application creation and application function adjustment.
[0040] The application creation part can be deployed locally on the terminal device of user 105, and / or can be supported by a server device. For example, the terminal device of user 105 can run a client of the application creation part, which can support the interaction between the user and the application creation part provided by the server. In the case where the application creation part runs locally on the user's terminal device, the user 105 can directly interact with the local application creation part using the terminal device. In the case where the application creation part runs on the server device, the server device can, based on the communication connection with the terminal device, implement service provision for the client running in the terminal device. The application creation part can present a corresponding interface 130 to the user 105 based on the operation of the user 105, so as to output and / or receive information related to application creation to the user 105.
[0041] In some embodiments, the application creation part can be associated with a corresponding database, which stores data or information required for the application creation process supported by the application creation part. For example, the database can store the code and description information corresponding to each functional module that constitutes the application. The application creation part can also perform operations such as calling, adding, deleting, and updating the functional modules in the database. The database can also store operations that can be performed on different functional blocks. Exemplarily, in a scenario where an application is to be created, the application creation part can call the corresponding functional blocks from the database to build the application.
[0042] In an embodiment of the present disclosure, a user 105 can create a target application 120 as needed on the application creation part and publish the target application 120. The target application 120 can be published to any appropriate application running part, as long as the application running part can support the operation of the target application 120. After publishing, the target application 120 can be used to be operated by one or more terminal users 145. The terminal user 145 can operate the target application 120 through an associated terminal device 146, and then interact with the application management platform 110. The terminal user 145 can be referred to as the terminal user of the target application 120. In some embodiments, the target application 120 may include or be implemented as a digital assistant 122.
[0043] The digital assistant 122 may be configured to have intelligent conversation capabilities. Figure 1In the example shown, the digital assistant 122 can be integrated into the target application 120 to assist in performing task processing within the target application 120 as part of the target application 120. In other examples, the digital assistant 122 can be configured as an independently running application, such as a web application or other types of applications. In such an example, the digital assistant 122 and the target application 120 can be regarded as the same application. The digital assistant 122 is provided to assist users with various task processing requirements in different applications and scenarios. During the interaction with the digital assistant 122, the user inputs an interactive message, and the digital assistant 122 provides a reply message in response to the user input. Typically, the digital assistant 122 can support users to input questions in natural language, and perform tasks and provide replies based on the understanding of natural language input and logical reasoning ability.
[0044] In some embodiments, digital assistant 122 can interact with end user 145 as a contact of end user 145. For example, digital assistant 122 can be implemented in an instant messaging (IM) application. Digital assistant 122 can interact with end user 145 in a single chat session with end user 145. In some embodiments, digital assistant 122 can interact with multiple users in a group chat session including multiple users.
[0045] For each terminal user 145, the client of the application running part can present various interfaces of the target application 120 in the client interface. Figure 1 In the example of , an interaction window 142 between the terminal user 145 and the digital assistant 122 is shown, such as a conversation window with the digital assistant 122. The terminal user 145 can enter a conversation message in the conversation window, and the target application 120 can determine the reply message of the digital assistant 122 based on the created configuration information and present it to the user in the interaction window 142. In some embodiments, depending on the configuration of the target application 120, the interaction message with the target application 120 may include a message in a multimodal form, such as a text message (e.g., natural language text), a voice message, an image message, a video message, and the like.
[0046] Similar to the application creation part, the application running part can be deployed locally on the terminal device of each terminal user 145, and / or can be supported by the server device. For example, the terminal device of the terminal user 145 can run a client with the application running part, and the client can support the interaction between the user and the application running part provided by the server. In the case where the application running part runs locally on the user's terminal device, the terminal user 145 can directly use the terminal device to interact with the local application running part. In the case where the application running part runs on the server device, the server device can realize the service supply to the client running in the terminal device based on the communication connection with the terminal device. The application running part can present the corresponding application page to the terminal user 145 based on the operation of the terminal user 145, so as to output and / or receive information related to the use of the application to the terminal user 145.
[0047] In some embodiments, the implementation of at least part of the functions of the target application 120 and / or the implementation of at least part of the functions of the digital assistant 122 in the target application 120 can be implemented based on a machine learning model (referred to as a model). During the creation or operation of the target application 120, one or more models 155, such as the capabilities of the model 155, can be called. In the target application 120, the digital assistant 122 can use the model 155 to understand the user input, and respond to the user input based on the output of the model 155, such as providing a reply to the user input.
[0048] During the creation process, the application management platform 110 needs to use the model 155 to determine whether the operation result of the target application 120 meets expectations when testing the target application 120. During the operation process, in response to different operation requests of the user of the target application 120, the application operation part may need to use the model 155 to determine the response result to the user.
[0049] Although shown as being independent of the application management platform 110, one or more models 155 may run on the application management platform 110, or other remote servers. In some embodiments, the model 155 may be a machine learning model, a deep learning model, a learning model, a neural network, etc. In some embodiments, the model may be based on a language model (LM). The language model can have question-answering capabilities by learning from a large amount of corpus. The model 155 may also be based on other appropriate models.
[0050] In some embodiments, the target application 120 may provide a writing function, for example, the target application 120 may be a writing application or may include a writing component. This writing function may be implemented with the aid of one or more models 155, and is therefore also referred to as "intelligent writing". In some embodiments, the user 105 may generate or create a document template for writing through the application management platform 110. The created document template may be distributed to the end user 145 of the target application 120. In some embodiments, the application management platform 110 may support a template creation mode from scratch. For example, the user 105 may input requirements for a template to be generated to initiate a template creation process. In some embodiments, the application management platform 110 may support a template creation mode based on an existing document (also referred to as a model or reference document). For example, the user 105 may specify an existing document to initiate a template creation process.
[0051] In some embodiments, the end user 145 can write, that is, generate a document, through the target application 120. The application management platform 110 can support various suitable document generation modes. In some embodiments, the application management platform 110 can support a document generation mode based on a template. For example, the end user 145 can generate a document using a template created and distributed by the user 105. In some embodiments, the application management platform 110 can support a document generation mode based on an existing document. For example, the end user 145 can specify an existing document as a reference to generate a target document. In some embodiments, the application management platform 110 can support a document generation mode from scratch. For example, the end user 145 can input the requirements of the document to be generated to initiate the document generation process.
[0052] The application management platform 110 can run on appropriate electronic devices. The electronic devices here can be any type of device with computing capabilities, including terminal devices or server devices. The terminal device can be any type of mobile terminal, fixed terminal or portable terminal, including mobile phones, desktop computers, laptop computers, notebook computers, netbook computers, tablet computers, media computers, multimedia tablets, personal communication systems (PCS) devices, personal navigation devices, personal digital assistants (PDAs), audio / video players, digital cameras / camcorders, positioning devices, television receivers, radio broadcast receivers, e-book devices, gaming devices or any combination of the foregoing, including accessories and peripherals of these devices or any combination thereof. The server device can include, for example, a computing system / server, such as a mainframe, an edge computing node, a computing device in a cloud environment, and the like. In some embodiments, the application management platform 110 can be implemented based on cloud services.
[0053] It should be understood that the structure and functionality of the environment 100 are described for exemplary purposes only and do not imply any limitation on the scope of the present disclosure. For example, although a single user interacting with the application creation portion and a single user interacting with the application execution portion are shown, in reality multiple users can access the application management platform 110 to each create a digital assistant, and each digital assistant can be used to interact with multiple users.
[0054] Some example embodiments of the present disclosure will be described in detail below with reference to the examples of the accompanying drawings. It should be understood that the pages shown in the accompanying drawings are only examples, and various page designs may actually exist. The various graphical elements in the page may have different arrangements and different visual representations, one or more of which may be omitted or replaced, and one or more other elements may also exist. The embodiments of the present disclosure are not limited in this respect.
[0055] The process described in the embodiments of the present disclosure may be implemented on an application management platform, a terminal device on which the application management platform is installed, and / or a server corresponding to the application management platform. In the following examples, for the sake of discussion, the description is from the perspective of the application management platform, for example Figure 1 The application management platform 110 shown. The user interface presented by the application management platform 110 can be presented via the terminal device of the user 145, and the application management platform 110 can receive user input via the terminal device of the user 145. In some embodiments, the user 145 is a terminal user of the target application 120. It should be understood that the user interface presented by the application management platform 110 can also be presented via the terminal device of the user 105, and the application management platform 110 can also receive user input via the terminal device of the user 105. In some embodiments, the user 105 is the creator, manager or maintainer of the target application 120.
[0056] Example Process
[0057] Figure 2 FIG. 2 is a flowchart showing a process 200 of document generation according to some embodiments of the present disclosure. Figure 1 The process 200 is described with reference to the environment 100 of FIG. The process 200 may be implemented in Figure 1At the application management platform 110. As discussed above, the application management platform 110 has an application creation part and an application running part. The application creation part can support the user 105 to generate or create a document template for writing through the application management platform 110. In the application running part, the application management platform 110 can support document generation based on the document template. In some examples, process 200 can be implemented in the generation or creation process of the document template. In such examples, the user described with reference to process 200 can be the creator of the template, such as user 105. In other examples, process 200 can be a document generation process based on a document template. In such examples, the user described with reference to process 200 can be a user of the template, such as terminal user 145.
[0058] refer to Figure 2 In box 210, the application management platform 110 determines the multiple document parts included in the target document to be generated and the document configuration information for the target document, and the document configuration information at least includes the corresponding configuration information of the multiple document parts. In some embodiments, the application management platform 110 can receive the operation of the user 105 via the interface presented in the application creation part, and determine the multiple document parts (for example, multiple chapters, etc.) and the corresponding configuration information. In other embodiments, the application management platform 110 can receive the operation of the terminal user 145 via the interface presented in the application running part, and determine the multiple document parts and the corresponding configuration information. The following will refer to the example interface diagram to describe these two implementation methods in detail.
[0059] FIG. 3A to FIG. 3C 1 shows example interfaces 300A, 300B, and 300C of document generation according to some embodiments of the present disclosure. In an embodiment of the present disclosure, interfaces 300A, 300B, and 300C may be composed of Figure 1 Provided by the application creation portion of the application management platform 110 shown.
[0060] like FIG. 3A to FIG. 3C As shown, during the creation of the document template, for the multiple document parts presented, the application management platform 110 can receive the modification of the corresponding configuration information of the multiple document parts by the user 105. The configuration of the multiple document parts on the user 105 side will be described in detail below.
[0061] refer to Figure 3A, during the generation process of the document template, an editing area 310 for the document structure may be presented on the interface 300A. The document structure may include one or more document parts. The document parts discussed herein may refer to chapters or paragraphs of a document. In some embodiments, each document part may have a corresponding title, which may also be referred to as a chapter title or a paragraph title. As an example, the titles of multiple document parts may be presented in the editing area 310, such as "Overview of Industry Development", "Origin of Industry", ..., "Industry Consumer Behavior Analysis", etc. The editing area 310 includes multiple editable items corresponding to multiple document parts, and the title of each document part may be presented in each editable item. The editable items may, for example, be an editable item 311 including the title "Overview of Industry Development", an editable item 312 including the title "Origin of Industry", ..., an editable item 319 including the title "Industry Consumer Behavior Analysis", etc. Through the editable items, the corresponding document parts may be edited and configured.
[0062] In some embodiments, the editable item corresponding to each document part may include a configuration entry 320 for the document part. The configuration entry 320 may be any appropriate type of entry for configuring the corresponding document part. In one example, as shown in the figure, after receiving a preset operation of the user 105 for a certain editable item, the configuration entry 320 may be presented in the editable item. The preset operation discussed herein may include, for example, any appropriate type of operation such as a click operation (such as a single click operation, a double click operation, etc.), a long press operation, a sliding operation, etc., without limitation. In another example, the configuration entry may be directly presented in each editable item. It should be understood that the presentation mode of the configuration entry may be set according to actual needs, without limitation. In some embodiments, the application management platform 110 may present a configuration panel 325 after receiving a preset operation of the user 105 on the configuration entry 320. The configuration panel 325 may also be a configuration window, a configuration page, etc. Through the configuration panel 325, the configuration of the corresponding document part by the user 105 may be received.
[0063] In some embodiments, the configuration panel 325 may include content description information for the corresponding document part, and the content description information may indicate the generation requirements for the main content of the corresponding document part (e.g., the generation requirement example in box 326). Based on the user input for the content description information, the application management platform 110 may update the content description information as at least a part of the configuration information of the corresponding document part. Here, the user input may be the user 105 inputting the content description information in the form of text or voice. In some embodiments, the configuration panel 325 may also include a reference material entry 330. The application management platform 110 may receive the user 105's preset operation on the entry 330, thereby presenting the reference data source interface 300B. In addition, the application management platform 110 may also receive the user 105's preset operation on the add control 332 in the reference data source interface 300B, thereby presenting at least one reference data source for generating partial configuration information of the target document.
[0064] refer to Figure 3C In some embodiments, the application management platform 110 may also present document preview information on the interface 300C after receiving a preview indication from the user 105, and the document preview information may indicate document generation requirements. For example, upon receiving a preset operation (e.g., trigger) from the user 105 on the document preview control 340, a panel 342 is presented to receive document generation requirements. Document generation requirements may include, for example, the subject or supplementary information of the target document. As an example, the application management platform 110 may receive supplementary information from the user 105 as configuration information of the target document through an entry 344 for uploading text, an entry 345 for uploading a URL link, an entry 346 for uploading an attachment, etc. It should be understood that supplementary information may also include any other suitable information, which is not limited here.
[0065] Further, at least through the above-mentioned various configurations, the application management platform 110 can receive the user 105's instruction to generate a document template and execute the generation of the target document. For example, in the case of receiving the user 105's preset operation (e.g., triggering) on the generate button 348, the target document is generated. It should be understood that in other embodiments, the document configuration information may also include other configuration information about the target document. Figure 2 Let’s discuss the specific generation process of the target document in detail.
[0066] FIG. 4A to FIG. 4D 400A to 400D are shown as example interfaces 400A to 400D for document generation according to some embodiments of the present disclosure. In an embodiment of the present disclosure, interfaces 400A to 400D may be composed of Figure 1 The application management platform 110 shown is provided by the application running part.
[0067] like FIG. 4A to FIG. 4D As shown, after the end user 145 selects a document template, based on the presented multiple document parts, the application management platform 110 can receive the modification of the corresponding configuration information of the multiple document parts by the end user 145. The configuration of the multiple document parts on the end user 145 side will be described in detail below.
[0068] refer to Figure 4A After the terminal user 145 selects a document template (such as the created document template discussed above), an editing area 410 and a navigation area 420 for the document structure may be presented on the interface 400A. The document structure may include one or more document parts. The navigation area 420 may include navigation information about the document structure, such as titles and hierarchical relationships of multiple document parts. Similar to the editing area 310 on the interface 300A, the editing area 410 may include multiple editable items corresponding to the multiple document parts, and each editable item may include a configuration entry 420 for the corresponding document part. Configuration functions similar to those of the configuration entry 320 may be implemented through the configuration entry 420. For example, in combination with Figure 4B After receiving the preset operation of the terminal user 145 on the configuration entry 420, the application management platform 110 can present a configuration panel 425 similar to the configuration panel 325 on the interface 400B. Through the configuration panel 425, the application management platform 110 can receive similar configurations of the corresponding document part from the terminal user 145, which will not be described in detail here. In some embodiments, the configuration panel 325 can also include a reference material entry 430. The application management platform 110 can receive the preset operation of the terminal user 145 on the entry 430, thereby presenting Figure 3B The reference data source interface 300B is shown to provide an end user 145 with the ability to configure a target document.
[0069] Further, at least through the above-mentioned various configurations, the application management platform 110 can receive the terminal user 145's instruction to generate a document and execute the generation of the target document. For example, in the case of receiving the terminal user 145's preset operation (e.g., trigger) on the document generation control 440, the target document is generated. It should be understood that in other embodiments, the document configuration information may also include other configuration information about the target document. Figure 2 Let’s discuss the specific generation process of the target document in detail.
[0070] By configuring the multiple document parts of the target document in the above various embodiments, the requirements of different users for document generation can be flexibly met, and the quality and efficiency of document generation can be effectively improved.
[0071] Return to reference Figure 2In box 220, based on the relationship between the multiple document parts, the application management platform 110 determines the generation mode of the target document, and the generation mode at least indicates the generation order of the multiple document parts. In some embodiments, the relationship between the multiple document parts may include a hierarchical relationship and / or a dependency relationship. For example, one document part may be the next level of another document part. For another example, one document part may depend on another document part. It should be understood that in other embodiments, there may be any other appropriate relationship between the multiple document parts. In some embodiments, in addition to the generation order of the multiple document parts, the generation mode may also indicate other information about how to generate the target document, such as the reuse of reference data sources (such as whether the reference data source of one document part is applicable to another document part), etc.
[0072] In some embodiments, the relationship between the multiple document parts may include a dependency relationship indicated by the corresponding configuration information of the multiple document parts. Figure 3B , the application management platform 110 may receive a relationship configuration indication for multiple document parts, such as receiving a preset operation of the user 105 or the end user 145 on the dependency configuration entry 338 on the interface 300B. If the application management platform 110 receives the relationship configuration indication, information about at least one of the multiple document parts may be presented. Based on the selection of the target document part in at least one document part by the user 105 or the end user 145, the application management platform 110 may determine that the generation of a certain document part will depend on the target document part as at least a part of the configuration information of the certain document part. Thus, the user 105 or the end user 145 may flexibly configure the dependency of multiple document parts according to specific needs.
[0073] Alternatively or additionally, in some embodiments, the relationship between the multiple document parts may include a dependency relationship determined based on the titles of the multiple document parts using a machine learning model. Exemplarily, the machine learning model may analyze the association relationship between the titles of the multiple document parts to determine the corresponding dependency relationship.
[0074] In some embodiments, in order to determine the generation mode of the target document, if the application management platform 110 determines that there is no dependency between a group of document parts among multiple document parts, it can determine that the generation order of a group of document parts is a concurrent generation order. As an example, for a group of document parts that are determined to need to be generated concurrently, they can be displayed on the interface 130 or the client interface in a concurrent presentation manner. Exemplarily, in such an embodiment, the hierarchical relationship of multiple document parts can be ignored, and the corresponding generation mode can be determined based on the dependency. In other words, for a group of document parts belonging to the same level or belonging to different levels, if there is no dependency between them, the generation order of the group of document parts can be directly determined as a concurrent generation order.
[0075] In some embodiments, if the application management platform 110 determines that a first document part among multiple document parts depends on a second document part, it can be determined that the second document part is generated before the first document part. As an example, for a second document part and a first document part that need to be generated one after the other, the second document part can be presented before the first document part on the interface 130 or the client interface. Exemplarily, in such an embodiment, the hierarchical relationship of multiple document parts can still be ignored, and the corresponding generation mode can be determined based on the dependency relationship. In other words, regardless of whether the first document part and the second document part belong to the same level or different levels, it is determined that the second document part is generated before the first document part based on the fact that the first document part depends on the second document part.
[0076] In some embodiments, the relationship between the multiple document parts may include a hierarchical relationship indicated by the document structure of the target document. The document structure may also be referred to as an outline. In some embodiments, in order to determine the generation mode of the target document, if the hierarchical relationship between the multiple document parts indicates that at least one third document part among the multiple document parts is a sub-part under the fourth document part, the application management platform 110 may determine that the fourth document part is generated after at least one third document part. In such an embodiment, if the dependency relationship is not considered, the generation mode of the target document may be determined based on the hierarchical relationship. For example, referring to Figure 3A , the document portion corresponding to the edit item 312 is a sub-portion of the document portion corresponding to the edit item 311, and the application management platform 110 can determine that the document portion corresponding to the edit item 311 is generated after the document portion corresponding to the edit item 312. However, if the dependency relationship needs to be considered, the priority of the hierarchical relationship and the dependency relationship can be preset. That is, if a conflict occurs when determining the generation mode based on the hierarchical relationship and the dependency relationship of certain document parts, it can be determined based on the preset priority which of the hierarchical relationship and the dependency relationship should be given priority.
[0077] In some embodiments, the fourth document part may be generated in the following manner: based on the main content generated for at least one third document part, the application management platform 110 may determine prompt information for the machine learning model, and the prompt information may instruct the machine learning model to summarize the main content of at least one third document part. The application management platform 110 may provide the prompt information to the machine learning model to obtain the output of the machine learning model, and determine the main content of the fourth document part based on the output of the machine learning model. For example, referring to Figure 4C , document part 453 and document part 454 are sub-parts of document part 452, and application management platform 110 can determine the prompt word for the machine learning model based on the main content of document part 453 and document part 454. For example, the prompt word can instruct the machine learning model to summarize the content of document part 453 and document part 454. Then, the prompt word can be given to the machine learning model, and the machine learning model can generate content according to the prompt word, which can be used as the main content of document part 452. It should be understood that this is only an example. In other embodiments, the main content of the fourth document part can be generated concurrently with the main content of at least one third document part.
[0078] refer to Figure 2 In block 230, the application management platform 110 generates corresponding main contents of the multiple document parts based on the corresponding configuration information of the multiple document parts according to the generation mode. In some embodiments, the application management platform 110 may generate corresponding main contents of the multiple document parts using a machine learning model. Here, based on the corresponding configuration information of the multiple document parts, the corresponding main contents of the multiple document parts may be generated according to the concurrent generation order, the front-to-back generation order, etc. for the multiple document parts related to the dependency relationship and the hierarchical relationship discussed above.
[0079] In some embodiments, in order to generate the corresponding main content of multiple document parts, for the target document part (or any document part) in the multiple document parts, the application management platform 110 can determine the target data source from at least one reference data source indicated by the target configuration information of the target document part. In some embodiments, the application management platform 110 can use a machine learning model to determine the target data source from at least one reference data source indicated by the target configuration information. In some embodiments, at least one reference data source may include a data object specified by the target user. For example, the reference Figure 3B , the target user can select a data object through the local data entry 334. The target user in this embodiment can be the user 105 or the terminal user 145. The data object can include, for example, a document on a local device uploaded by the user 105 or the terminal user 145, or an online document, or other data objects, etc., which are not limited here.
[0080] Alternatively or additionally, in some embodiments, at least one reference data source may include a knowledge base to which a user set to which the target user belongs has access rights. The user set may include, for example, users of the same enterprise, or users of the same department of the enterprise, or user sets of other organizations, etc. In this embodiment, the target user with access rights to the knowledge base may be user 105 or terminal user 105, and the user with configuration knowledge base rights may be user 105. It should be understood that one or more knowledge bases with access rights may correspond to the same user set.
[0081] refer to Figure 3B In some embodiments, the application management platform 110 may receive a knowledge configuration indication for a target document part among the plurality of document parts, and then present information about one or more candidate knowledge bases that may be used for the target template. For example, upon receiving a preset operation (e.g., a trigger) of the data and knowledge entry 336 by the user 105 or the end user 145, a panel 337 is presented to select a knowledge base. Based on the selection of the target knowledge base among the one or more candidate knowledge bases, the application management platform 110 may determine that the generation of the target document part will refer to the target knowledge base as at least a part of the configuration information of the target document part.
[0082] Alternatively or additionally, in some embodiments, at least one reference data source may include a public data source. Exemplarily, the application management platform 110 may receive a preset operation of the user 105 or the end user 145 on the network search portal 333, thereby entering the public data source. In addition to data sources that can be searched through the Internet, public data sources may also include other data sources that can be obtained by the public, which is not limited here.
[0083] In some embodiments, each reference data source in at least one reference data source has a different priority for the generation of a target document, and the priority is related to the degree of association between each reference data source and the target user. In some embodiments, the priority of each reference data source in at least one reference data source can be, from high to low, the following: data objects specified by the target user, knowledge bases to which the user set to which the target user belongs has access rights, and public data sources. For example, in the case of using a machine learning model to determine the target data source, the priority information of each type of data source can be set in the prompt words provided to the machine learning model, so that the machine learning model can select the target data source according to the priority. It should be understood that the priority of each reference data source can also have other different setting methods, which can be set according to actual conditions. In this embodiment, by setting the priority of each reference data source in this way, the flexibility of the configuration of the target document to be generated can be improved, and the user experience can be improved.
[0084] Further, the application management platform 110 can obtain target data that matches the target configuration information from the target data source, and generate the main content of the target document part based on the obtained target data. In some embodiments, in order to obtain the target data from the target data source, based on the target configuration information, the application management platform 110 can use a machine learning model to generate a data query instruction that matches the target data source, and obtain the target data by executing the data query instruction on the target data source. Exemplarily, the machine learning model can be used to query the data that matches the target configuration information from the target data source through the data query instruction, and the queried data can be obtained as the target data. In some embodiments, the application management platform 110 can use a machine learning model to generate the main content of the target document based on the target data. In this embodiment, the generation of the main content is divided into two or more steps. In each step, focus on the execution of a subtask, such as determining the target data source, generating a query instruction, and generating content based on the queried data. In this way, the complex task of content generation can be disassembled to generate content that is more in line with the configuration information.
[0085] In some embodiments, at least one reference data source is configured for the target document portion, and the priority of the at least one reference data source can act on the process of selecting the target data source from the at least one reference data source. For example, in the case of selecting the target data source using a machine learning model, a priority indication of the priority of at least one reference data source can be included in the prompt information provided to the machine learning model. The priority indication may include an explicit indication, such as text for describing the corresponding priority of at least one reference data source. Alternatively or additionally, the priority indication may include an implicit indication, such as the order of the description information of at least one reference data source in the prompt information. Exemplarily, the description information from the parameter data source with a high priority is in the front order in the prompt information. In this way, the priority of the reference data source can act on the process of acquiring the target data, thereby affecting the generation of the main content of the target document portion. For example, the application management platform 110 may preferentially acquire data from a reference data source with a high priority.
[0086] In some embodiments, the priority of the data source can act on or affect the generation of the main content. For example, multiple target data sources can be selected for the target document part. In the case of generating the main content of the target document part based on the output of the machine learning model, the priority of the multiple target data sources can act on the model application process, thereby affecting the generation of the main content of the target document part. In some embodiments, the application management platform 110 can provide prompt information to the machine learning model based on the target data obtained for the multiple target data sources and the corresponding priorities of the multiple target data sources, so as to obtain the output of the machine learning model. Based on the output of the machine learning model, the application management platform 110 can generate the main content of the target document part. In this way, when the machine learning model generates the main content based on the data obtained from each data source, the data of the data source with a higher priority can obtain a higher weight.
[0087] In order to make the machine learning model aware of the priorities of multiple target data sources, in some embodiments, the prompt information may include priority indications for the corresponding priorities of the multiple target data sources. In some embodiments, the priority indication may include an explicit indication, such as text for describing the corresponding priorities of the multiple target data sources. Alternatively or additionally, in some embodiments, the priority indication may include an implicit indication, such as the order of the target data obtained for the multiple target data sources in the prompt information. Exemplarily, the target data obtained from the target data source with a high priority is in the front order in the prompt information.
[0088] The above embodiment provides users with different reference data sources through the application management platform, and uses a machine learning model to perceive the priorities of multiple target data sources, so that users can be configured with multiple reference sources of different priorities when generating documents, thereby bringing greater convenience to users. In addition, based on multiple reference data sources, the quality of the generated target document can be improved to meet user needs.
[0089] refer to Figure 4D In some embodiments, after the corresponding main contents of the multiple document parts are all generated, the configuration information of the multiple document parts can also be changed. As an example, the application management platform 110 can also receive the preset operation of the user 105 or the end user 145 on the configuration entry 420 on the interface 400D, and present the configuration panel 425. Through the configuration panel 425, the application management platform 110 can receive the corresponding configuration of the corresponding document part by the user 105 or the end user 145, which will not be repeated here.
[0090] In the embodiments described above, the implementation of some operations or steps may rely on machine learning models. It should be understood that the machine learning models used in different operations or steps may be the same or different. The embodiments of the present disclosure are not limited to this.
[0091] The disclosed embodiment generates the main contents of multiple document parts by determining the configuration and generation mode of multiple document parts of the target document, which can fully meet the document generation needs of different users. This can improve the flexibility and convenience of document generation, and can improve the quality and efficiency of document generation.
[0092] Example devices and equipment
[0093] Figure 5 A schematic structural block diagram of a document generation apparatus 500 according to some embodiments of the present disclosure is shown. The apparatus 500 may be implemented as or included in a terminal device 110. Each module / component in the apparatus 500 may be implemented by hardware, software, firmware or any combination thereof.
[0094] As shown in the figure, the apparatus 500 includes a configuration information determination module 510, which is configured to determine multiple document parts included in the target document to be generated and document configuration information for the target document, and the document configuration information at least includes corresponding configuration information of the multiple document parts.
[0095] The apparatus 500 further includes a generation mode determination module 520 configured to determine a generation mode of the target document based on the relationship between the plurality of document parts, wherein the generation mode at least indicates a generation order of the plurality of document parts.
[0096] The apparatus 500 further includes a main content generating module 530 configured to generate corresponding main contents of the multiple document parts based on the corresponding configuration information of the multiple document parts according to the generating mode.
[0097] In some embodiments, the generation mode determination module 520 is further configured to, in response to determining that there is no dependency relationship between a group of document parts in the plurality of document parts, determine that the generation order of the group of document parts is a concurrent generation order.
[0098] In some embodiments, the generation mode determination module 520 is further configured to, in response to determining that a first document part among the plurality of document parts is dependent on a second document part, determine that the second document part is generated before the first document part.
[0099] In some embodiments, the generation mode determination module 520 is further configured to determine that the fourth document part is generated after at least one third document part in response to the hierarchical relationship between the multiple document parts indicating that at least one third document part among the multiple document parts is a sub-part under the fourth document part.
[0100] In some embodiments, the device 500 also includes a document part content generation module, which is configured to determine prompt information for the machine learning model based on the main content generated for at least one third document part respectively, the prompt information instructing the machine learning model to summarize the main content of at least one third document part; provide the prompt information to the machine learning model to obtain the output of the machine learning model; and determine the main content of the fourth document part based on the output of the machine learning model.
[0101] In some embodiments, the relationship between multiple document parts includes at least one of the following: a dependency indicated by corresponding configuration information of the multiple document parts, a hierarchical relationship indicated by the document structure of the target document, or a dependency determined based on the titles of the multiple document parts using a machine learning model.
[0102] In some embodiments, the main content generation module 530 is further configured to determine, for a target document part among multiple document parts, a target data source from at least one reference data source indicated by the target configuration information of the target document part; obtain target data matching the target configuration information from the target data source; and generate the main content of the target document part based on the obtained target data.
[0103] In some embodiments, the device 500 also includes a target data acquisition module, which is configured to generate data query instructions that match the target data source based on the target configuration information and using a machine learning model; and acquire the target data by executing the data query instructions on the target data source.
[0104] In some embodiments, the at least one reference data source includes at least one of the following: a data object specified by the target user, a knowledge base to which a user set to which the target user belongs has access rights, or a public data source.
[0105] In some embodiments, each reference data source in the at least one reference data source has a different priority for generating a target document, and the priority is related to the degree of association between each reference data source and the target user.
[0106] In some embodiments, the target data source is one of multiple target data sources, and the device 500 is further configured to provide prompt information to the machine learning model based on the target data respectively obtained for the multiple target data sources and the corresponding priorities of the multiple target data sources to obtain the output of the machine learning model, the prompt information including priority indications for the corresponding priorities of the multiple target data sources; and based on the output of the machine learning model, generate the main content of the target document part.
[0107] In some embodiments, the priority indication includes: text for describing the corresponding priorities of the multiple target data sources, or the order of the target data respectively obtained from the multiple target data sources in the prompt information.
[0108] Figure 6 1 shows a block diagram of an electronic device 600 in which one or more embodiments of the present disclosure may be implemented. It should be understood that Figure 6 The electronic device 600 shown is merely exemplary and should not constitute any limitation on the functionality and scope of the embodiments described herein. Figure 6 The electronic device 600 shown can be used to implement Figure 1 An electronic device 110.
[0109] like Figure 6 As shown, the electronic device 600 is in the form of a general electronic device. The components of the electronic device 600 may include, but are not limited to, one or more processors or processing units 610, a memory 620, a storage device 630, one or more communication units 640, one or more input devices 650, and one or more output devices 660. The processing unit 610 may be an actual or virtual processor and is capable of performing various processes according to a program stored in the memory 620. In a multi-processor system, multiple processing units execute computer executable instructions in parallel to improve the parallel processing capability of the electronic device 600.
[0110] The electronic device 600 typically includes a plurality of computer storage media. Such media may be any accessible media that is accessible to the electronic device 600, including but not limited to volatile and non-volatile media, removable and non-removable media. The memory 620 may be a volatile memory (e.g., registers, caches, random access memory (RAM)), a non-volatile memory (e.g., a read-only memory (ROM), an electrically erasable programmable read-only memory (EEPROM), flash memory), or some combination thereof. The storage device 630 may be a removable or non-removable medium, and may include a machine-readable medium, such as a flash drive, a disk, or any other medium, which may be capable of being used to store information and / or data and may be accessed within the electronic device 600.
[0111] The electronic device 600 may further include additional removable / non-removable, volatile / non-volatile storage media. Figure 6As shown in , a disk drive for reading or writing from a removable, non-volatile disk (e.g., a "floppy disk") and an optical drive for reading or writing from a removable, non-volatile optical disk may be provided. In these cases, each drive may be connected to the bus (not shown) by one or more data media interfaces. The memory 620 may include a computer program product 625 having one or more program modules that are configured to perform various methods or actions of various embodiments of the present disclosure.
[0112] The communication unit 640 implements communication with other electronic devices through a communication medium. Additionally, the functions of the components of the electronic device 600 can be implemented with a single computing cluster or multiple computing machines that can communicate through a communication connection. Therefore, the electronic device 600 can operate in a networked environment using a logical connection with one or more other servers, a network personal computer (PC), or another network node.
[0113] The input device 650 may be one or more input devices, such as a mouse, a keyboard, a tracking ball, etc. The output device 660 may be one or more output devices, such as a display, a speaker, a printer, etc. The electronic device 600 may also communicate with one or more external devices (not shown) through the communication unit 640 as needed, such as a storage device, a display device, etc., communicate with one or more devices that allow a user to interact with the electronic device 600, or communicate with any device that allows the electronic device 600 to communicate with one or more other electronic devices (e.g., a network card, a modem, etc.). Such communication may be performed via an input / output (I / O) interface (not shown).
[0114] According to an exemplary implementation of the present disclosure, a computer-readable storage medium is provided, on which computer-executable instructions are stored, wherein the computer-executable instructions are executed by a processor to implement the method described above. According to an exemplary implementation of the present disclosure, a computer program product is also provided, which is tangibly stored on a non-transitory computer-readable medium and includes computer-executable instructions, and the computer-executable instructions are executed by a processor to implement the method described above.
[0115] Various aspects of the present disclosure are described herein with reference to the flowcharts and / or block diagrams of the methods, devices, equipment, and computer program products implemented according to the present disclosure. It should be understood that each box in the flowchart and / or block diagram and the combination of each box in the flowchart and / or block diagram can be implemented by computer-readable program instructions.
[0116] These computer-readable program instructions can be provided to a processing unit of a general-purpose computer, a special-purpose computer, or other programmable data processing device, thereby producing a machine, so that when these instructions are executed by the processing unit of the computer or other programmable data processing device, a device that implements the functions / actions specified in one or more boxes in the flowchart and / or block diagram is generated. These computer-readable program instructions can also be stored in a computer-readable storage medium, and these instructions cause the computer, programmable data processing device, and / or other equipment to work in a specific manner, so that the computer-readable medium storing the instructions includes a manufactured product, which includes instructions for implementing various aspects of the functions / actions specified in one or more boxes in the flowchart and / or block diagram.
[0117] Computer-readable program instructions can be loaded onto a computer, other programmable data processing apparatus, or other device so that a series of operational steps are performed on the computer, other programmable data processing apparatus, or other device to produce a computer-implemented process, so that the instructions executed on the computer, other programmable data processing apparatus, or other device implement the functions / actions specified in one or more boxes in the flowchart and / or block diagram.
[0118] The flow chart and block diagram in the accompanying drawings show the possible architecture, function and operation of the system, method and computer program product according to multiple implementations of the present disclosure. In this regard, each square box in the flow chart or block diagram can represent a part of a module, program segment or instruction, and a part of a module, program segment or instruction includes one or more executable instructions for realizing the logical function of the specification. In some implementations as replacements, the function marked in the square box can also occur in a sequence different from that marked in the accompanying drawings. For example, two continuous square boxes can actually be executed substantially in parallel, and they can sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each square box in the block diagram and / or flow chart, and the combination of the square boxes in the block diagram and / or flow chart can be realized by a special hardware-based system that performs the function or action of the specification, or can be realized by a combination of special hardware and computer instructions.
[0119] The above descriptions of various implementations of the present disclosure are exemplary, non-exhaustive, and not limited to the disclosed implementations. Many modifications and variations will be apparent to those of ordinary skill in the art without departing from the scope and spirit of the described implementations. The selection of terms used herein is intended to best explain the principles of the implementations, practical applications, or improvements to the technology in the market, or to enable other persons of ordinary skill in the art to understand the various implementations disclosed herein.
Claims
1. A document generation method, comprising: Determine a plurality of document parts included in a target document to be generated and document configuration information for the target document, wherein the document configuration information at least includes corresponding configuration information of the plurality of document parts; Determining a generation mode of the target document based on the relationship between the plurality of document parts, the generation mode at least indicating a generation order of the plurality of document parts; as well as According to the generation mode, the corresponding main contents of the multiple document parts are generated based on the corresponding configuration information of the multiple document parts respectively.
2. The method according to claim 1, wherein determining the generation mode of the target document comprises: In response to determining that there is no dependency relationship between a group of document parts among the plurality of document parts, a generation order of the group of document parts is determined to be a concurrent generation order.
3. The method according to claim 1, wherein determining the generation mode of the target document comprises: In response to determining that a first document part of the plurality of document parts is dependent on a second document part, it is determined that the second document part was generated before the first document part.
4. The method according to claim 1, wherein determining the generation mode of the target document comprises: In response to a hierarchical relationship between the plurality of document parts indicating that at least one third document part among the plurality of document parts is a sub-part under a fourth document part, it is determined that the fourth document part is generated after the at least one third document part.
5. The method according to claim 4, wherein the fourth document part is generated by: Determining prompt information for a machine learning model based on the body content generated for each of the at least one third document parts, the prompt information instructing the machine learning model to summarize the body content of the at least one third document part; Providing the prompt information to the machine learning model to obtain an output of the machine learning model; as well as The main content of the fourth document part is determined based on the output of the machine learning model.
6. The method according to claim 1, wherein the relationship between the plurality of document parts comprises at least one of the following: the dependency relationships indicated by the corresponding configuration information of the plurality of document parts, The hierarchical relationship indicated by the document structure of the target document, or The dependency relationships are determined based on the titles of the plurality of document parts using a machine learning model.
7. The method of claim 1 , wherein generating the respective body contents of the plurality of document parts comprises: For a target document part among the multiple document parts, determining a target data source from at least one reference data source indicated by target configuration information of the target document part; Acquire target data matching the target configuration information from the target data source; as well as Based on the acquired target data, the main content of the target document portion is generated.
8. The method according to claim 7, wherein acquiring the target data from the target data source comprises: Based on the target configuration information, using a machine learning model, generating a data query instruction that matches the target data source; as well as The target data is acquired by executing the data query instruction on the target data source.
9. The method according to claim 7, wherein the at least one reference data source comprises at least one of the following: The target user-specified data object, A knowledge base to which the user set to which the target user belongs has access rights, or Public data sources.
10. The method according to claim 7, wherein each reference data source in the at least one reference data source has a different priority for generating the target document, and the priority is related to the degree of association between each reference data source and the target user.
11. The method according to claim 10, wherein the target data source is one of a plurality of target data sources, and generating the main content of the target document part comprises: Based on the target data respectively obtained for the multiple target data sources and the corresponding priorities of the multiple target data sources, providing prompt information to the machine learning model to obtain an output of the machine learning model, the prompt information including priority indications for the corresponding priorities of the multiple target data sources; as well as Based on the output of the machine learning model, the main content of the target document portion is generated.
12. The method of claim 11, wherein the priority indication comprises: text describing the respective priorities of the plurality of target data sources, or The order of the target data respectively obtained from the multiple target data sources in the prompt information.
13. A document generation device, comprising: A configuration information determination module, configured to determine a plurality of document parts included in a target document to be generated and document configuration information for the target document, wherein the document configuration information at least includes corresponding configuration information of the plurality of document parts; A generation mode determination module, configured to determine a generation mode of the target document based on the relationship between the plurality of document parts, the generation mode at least indicating a generation order of the plurality of document parts; as well as The main content generation module is configured to generate corresponding main contents of the multiple document parts based on the corresponding configuration information of the multiple document parts according to the generation mode.
14. An electronic device comprising: at least one processing unit; as well as At least one memory, the at least one memory being coupled to the at least one processing unit and storing instructions for execution by the at least one processing unit, the instructions causing the electronic device to perform the method according to any one of claims 1 to 12 when executed by the at least one processing unit.
15. A computer-readable storage medium having a computer program stored thereon, wherein the computer program can be executed by a processor to implement the method according to any one of claims 1 to 12.
Citation Information
Patent Citations
Report generation method and device, computer equipment and storage medium
CN115061721A
Test paper generation method and device, equipment and storage medium
CN115828856A
Document management method and device, electronic equipment and computer readable storage medium
CN116149630A
Data resource metadata semantic retrieval method and system based on large model
CN118349690A
Document generation method and device, storage medium and electronic equipment
CN118485065A