Method and apparatus for generating presentation document, and electronic device and storage medium
By analyzing document information and multiple rounds of dialogue to generate a presentation document outline, and using a large language model to automatically generate presentation documents, solving the inefficiency problem caused by user manual editing, and achieving more efficient document production and personalized content generation.
Patent Information
- Application Number
- PCT/CN2024/105944
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2024-02-27
- Filing Date
- 2024-07-17
- Publication Date
- 2025-09-04
AI Technical Summary
Users need to manually edit elements such as text and images when making presentations, resulting in inefficient writing and high workload.
Obtain document information by parsing pending documents, generate a presentation document outline based on intent recognition and multiple rounds of dialogue, and automatically generate presentation documents using a large language model, combining user preferences and pre-order prompt information templates.
It improves the production efficiency of presentation documents, reduces the workload of users, and the generated presentation documents are more in line with user needs.
Smart Images

Figure CN2024105944_04092025_PF_FP_ABST
Abstract
Description
Method, device, electronic device and storage medium for generating presentation document
[0001] This application claims priority to Chinese patent application No. 202410216935.7, filed on February 27, 2024, the entire contents of which are incorporated herein by reference. Technical Field
[0002] The present disclosure relates to the field of artificial intelligence technology, in particular to the fields of large models and generative models. More specifically, the present disclosure provides a method, device, electronic device, storage medium and computer program product for generating a presentation document. Background Art
[0003] When users are giving speeches or reports, they sometimes need to create presentation documents. In practice, users need to manually edit the text, images, and other elements in the presentation documents, which results in low presentation document writing efficiency and a high workload for users.
[0004] Summary of the Invention
[0005] The present disclosure provides a method, apparatus, electronic device, storage medium, and computer program product for generating a presentation document.
[0006] According to one aspect of the present disclosure, a method for generating a presentation document is provided, comprising: determining document information based on a document to be processed, the document information representing the content and structure of the document to be processed; when it is determined that the document to be processed satisfies a predetermined condition, outputting at least one question information associated with the document to be processed to obtain response information for the at least one question information; determining dialogue information based on the at least one question information and the response information of the at least one question information; determining a presentation document outline based on the document information and the dialogue information; and generating a presentation document based on the presentation document outline.
[0007] According to another aspect of the present disclosure, a device for generating a presentation document is provided, comprising: a document information determination module, an acquisition module, a dialogue information determination module, an outline determination module, and a generation module. The document information determination module is configured to determine document information based on a document to be processed, wherein the document information represents the content and structure of the document to be processed; the acquisition module is configured to output at least one question associated with the document to be processed, upon determining that the document to be processed meets predetermined conditions, to obtain response information for the at least one question; the dialogue information determination module is configured to determine dialogue information based on the at least one question and the at least one response information; the outline determination module is configured to determine a presentation document outline based on the document information and dialogue information; and the generation module is configured to generate the presentation document based on the presentation document outline.
[0008] According to another aspect of the present disclosure, an electronic device is provided, comprising: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to execute the method provided by the present disclosure.
[0009] According to another aspect of the present disclosure, a non-transitory computer-readable storage medium storing computer instructions is provided, wherein the computer instructions are used to cause a computer to execute the method provided by the present disclosure.
[0010] According to another aspect of the present disclosure, a computer program product is provided, including a computer program, which implements the method provided in the present disclosure when executed by a processor.
[0011] It should be understood that the contents described in this section are not intended to identify the key 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 readily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS
[0012] The accompanying drawings are provided to facilitate a better understanding of the present invention and do not constitute a limitation of the present disclosure.
[0013] FIG1 is a schematic diagram of an application scenario of a method and apparatus for generating a presentation document according to an embodiment of the present disclosure;
[0014] FIG2 is a schematic flow chart of a method for generating a presentation document according to an embodiment of the present disclosure;
[0015] FIG3 is a schematic diagram of a method for generating a presentation document according to an embodiment of the present disclosure;
[0016] 4A to 4E are schematic diagrams of a front-end operation interface for generating a presentation document according to an embodiment of the present disclosure;
[0017] FIG5 is a schematic structural block diagram of an apparatus for generating a presentation document according to an embodiment of the present disclosure; and
[0018] FIG6 is a structural block diagram of an electronic device for implementing the method for generating a presentation document according to an embodiment of the present disclosure. DETAILED DESCRIPTION
[0019] The following description of exemplary embodiments of the present disclosure is made in conjunction with the accompanying drawings, including various details of the embodiments of the present disclosure to facilitate understanding. These details should be considered as merely exemplary. Therefore, those skilled in the art will recognize that various changes and modifications may be made to the embodiments described herein without departing from the scope and spirit of the present disclosure. Similarly, for the sake of clarity and conciseness, descriptions of well-known functions and structures are omitted in the following description.
[0020] FIG1 is a schematic diagram of an application scenario of the method and apparatus for generating a presentation document according to an embodiment of the present disclosure.
[0021] It should be noted that FIG1 is merely an example of a system architecture to which the embodiments of the present disclosure may be applied, to help those skilled in the art understand the technical content of the present disclosure, but it does not mean that the embodiments of the present disclosure cannot be used in other devices, systems, environments or scenarios.
[0022] As shown in FIG1 , a system architecture 100 according to this embodiment may include terminal devices 101, 102, and 103, a network 104, and a server 105. The network 104 is used as a medium for providing communication links between the terminal devices 101, 102, and 103 and the server 105. The network 104 may include various connection types, such as wired and / or wireless communication links.
[0023] Users can use terminal devices 101, 102, and 103 to interact with server 105 via network 104 to receive or send messages, etc. Terminal devices 101, 102, and 103 can be various electronic devices with display screens and support web browsing, including but not limited to smartphones, tablet computers, laptop computers, and desktop computers, etc.
[0024] The server 105 may be a server that provides various services, such as a background management server (for example only) that supports websites browsed by users using the terminal devices 101, 102, and 103. The background management server may analyze and process received data such as user requests, and feed back processing results (e.g., generating a presentation outline and presentation document based on a document uploaded by a user or text information entered by a user) to the terminal device.
[0025] It should be noted that the method for generating a presentation document provided in the embodiment of the present disclosure can generally be executed by the server 105. Accordingly, the apparatus for generating a presentation document provided in the embodiment of the present disclosure can generally be set in the server 105. The method for generating a presentation document provided in the embodiment of the present disclosure can also be executed by a server or server cluster that is different from the server 105 and can communicate with the terminal devices 101, 102, 103 and / or the server 105. Accordingly, the apparatus for generating a presentation document provided in the embodiment of the present disclosure can also be set in a server or server cluster that is different from the server 105 and can communicate with the terminal devices 101, 102, 103 and / or the server 105.
[0026] It should be understood that the number of terminal devices, networks, and servers in Figure 1 is merely illustrative and any number of terminal devices, networks, and servers may be provided as required.
[0027] FIG2 is a schematic flowchart of a method for generating a presentation document according to an embodiment of the present disclosure.
[0028] As shown in FIG. 2 , the method 200 for generating a presentation document may include operations S210 to S250 .
[0029] In operation S210 , document information is determined according to the document to be processed.
[0030] For example, users can upload documents to be processed through the front-end operation page. The documents to be processed can be files in doc, docx, pdf, txt and other formats.
[0031] For example, the document information can be in JSON (JavaScript Object Notation) or other formats. The document information represents the content and structure of the document to be processed. For example, if the document to be processed includes multiple sentences, the document to be processed can be parsed to determine the structure of each sentence in the document to be processed. The structure of a single sentence can include: a headline, a subheading, a body, blank lines, etc., and can also include Chinese, English, numbers, etc., and can also include fonts, font sizes, underlines, etc. The sentence structure can be represented by pre-configured symbols.
[0032] In operation S220 , if it is determined that the document to be processed meets the predetermined condition, at least one question information associated with the document to be processed is output to obtain response information for the at least one question information.
[0033] In one example, the predetermined conditions include: performing intent recognition on the document to be processed, obtaining a target intent for the document to be processed, and matching the target intent with target fields from among multiple predetermined fields. For example, if a pre-configured category is travel guides, and the document to be processed Doc_1 contains content related to travel guides, then the pre-configured condition is met. Furthermore, a mapping relationship between the travel guide category and question information can be pre-configured, so that question information can be output based on this mapping relationship.
[0034] In another example, the predetermined condition includes: inputting the text of the document to be processed into a classification model to obtain the category of the document to be processed, and the category of the document to be processed is a predetermined category. For example, if the category is pre-configured as sports news, and the document to be processed Doc_2 contains content related to sports news, then the predetermined condition is met. Furthermore, a mapping relationship between the sports news category and question information can also be pre-configured, so that the question information can be output based on this mapping relationship.
[0035] For example, a question might be something like "How many pages do you want this PPT to be?" or "What style do you prefer?" After the question is output via the front-end page, the user can respond to it, using the text they entered as the response. It should be noted that multiple questions can be entered, and the user can respond to all or part of the questions, or choose not to respond.
[0036] In operation S230, dialogue information is determined based on the at least one question information and the at least one response information to the question information.
[0037] For example, the question information and the answer information can be combined into data in a predetermined format, and the combined data can be used as the dialogue information. It is understandable that since the user replies to the question information and then combines the question information and the answer information into the dialogue information, the dialogue information can reflect the user's personal preferences.
[0038] In operation S240, a presentation document outline is determined based on the document information and the conversation information.
[0039] For example, document information and dialogue information are input into a large language model, and the large language model is used to generate a presentation document outline.
[0040] In operation S250, a presentation document is generated according to the presentation document outline.
[0041] For example, a presentation document outline may include multiple titles. For each title, a corresponding text, image, or other content can be determined, and then the presentation document can be generated based on the text and image. In practical applications, for example, a large language model can be used to generate text and images. For example, a large language model can be used to expand a title to obtain a text, and then an image can be generated using the text-to-image function. For another example, the correspondence between text, images, and keywords can be pre-configured. Then, keywords can be extracted from the title, and based on the extracted keywords and the correspondence, the text and image can be searched from a database.
[0042] The method for generating a presentation document provided in this embodiment can generate a presentation document based on a document to be processed uploaded by a user. During the process of generating the presentation document, on the one hand, the document information is obtained by parsing the document to be processed, and a presentation document outline is generated based on the document information, thereby generating the presentation document. Therefore, the user does not need to manually edit the various elements in the presentation document, thereby improving the efficiency of presentation document production and reducing the workload. On the other hand, during the process of generating the presentation document, multiple rounds of dialogue are conducted with the user, and the user's response information can reflect the user's personal preferences. Therefore, the generated presentation document can better meet the user's needs.
[0043] In actual applications, users can upload documents to be processed through the front-end page. For example, users can upload files of types such as doc, docx, and pdf. It should be noted that it is possible to detect whether the document uploaded by the user meets the predetermined upload conditions. If not, the user will be prompted to modify the document to be processed. For example, the predetermined upload conditions may include: the document to be processed is encoded using UTF-8 (Universal Character Set / Unicode Transformation Format, 8 bits), and the length is between 1 and 1023 bytes. In addition, if an interruption occurs during the upload process, the upload can be continued within a predetermined time period, which can be 1800 seconds or other time periods. In addition, the STS (Security Token Service) temporary authorization access mechanism or other mechanisms can be used to protect the privacy of documents uploaded by users.
[0044] Next, the process of determining the document information of the document to be processed is described.
[0045] In this embodiment, the method for determining document information includes: parsing a document to be processed to obtain a tree structure; the tree structure includes multiple nodes, each node corresponding to an original tag, the nodes representing the content of the document to be processed, and the original tags representing the structural information of the nodes. Subsequently, based on the multiple nodes, the multiple original tags corresponding to the multiple nodes, and a predetermined mapping relationship between the original tags and the target tags, the tree structure is converted into data in a target format, and the target format data is used as the document information.
[0046] For example, a document to be processed may include tables and special formats, and have a corresponding structure and layout. Optical Character Recognition (OCR) can be used to process the document to extract text data. The text data is then parsed, such as by escaping, to obtain a tree structure in XML (eXtensible Markup Language) or other formats.
[0047] Then the XML tree structure can be traversed to split out the character strings and original tags. The character strings represent the content in the document to be processed. Predefined special characters can also be filtered. By traversing the XML tree structure, the overall structure of the document to be processed can be known. It should be noted that the large model can be used to generate the presentation document outline later, and the interface of the large model cannot recognize the original tags. Therefore, this embodiment also translates the tree structure into an array (Array) based on the predetermined mapping relationship between the original tags and the target tags. The array can then be formatted to form document information in the target format, which can be JSON. It can be seen that this embodiment maps the original tags to target tags that can be recognized by the interface of the large model, ensuring that the large model accurately understands the input information, thereby improving the accuracy of the presentation document outline.
[0048] The above describes the process of determining the document information of the document to be processed. Next, the process of determining the dialogue information will be described.
[0049] In this embodiment, multiple predetermined fields can be pre-configured, each of which corresponds to a question set, and the question set includes at least one question data. Intent recognition can also be performed on the document to be processed to obtain a target intent for the document to be processed, and then it can be determined whether the multiple predetermined fields include a target field that matches the target intent. If so, it can be determined that the document to be processed meets the predetermined conditions. Next, at least one question data in the question set corresponding to the target field can be determined as at least one question information associated with the document to be processed, and at least one question information can be output through the front-end interface so that the user can respond to the question information, thereby collecting response information. Subsequently, the question information and response information can be combined into a dialogue message in a predetermined format.
[0050] This embodiment determines the target intent through intent recognition and conducts multiple rounds of dialogue with the user based on the target intent. Different intentions can display different question information to the user, thereby asking targeted questions based on the text to be processed, so that the response information fully reflects the user's personal preferences, further improving the user's satisfaction with the presentation document.
[0051] For example, the question information includes: "Do you want the PPT outline to be long or short?", "What page length do you want this PPT to have?", "Which one do you want the content of this PPT to be professional, interesting, or simple?", "What style do you want the content of this PPT to be?", etc.
[0052] For example, an example of dialogue information is as follows: {″query″: [″Comic PPT″], ″details″: [{″type″: ″length″, ″button″: [″long″, ″short″], ″choice″: [], ″default″: [″long″], ″is_show″: 1, ″question″: [″How many pages do you want this PPT to have? ″], ″strategy″: [″Multiple rounds″]}, {″type″: ″richness″, ″button″: [″Richness″, ″Simple″], ″choice″ :[],″default″:[″Rich″],″is_show″:1,″question″:[″How rich do you want the content of this PPT to be:″],″strategy″:[″Multi-round″]},{″type″:″style″,″button″:[″Professional″,″Interesting″,″Simple″],″choice″:[],″default″:[″Professional″],″is_show″:1,″question″:[″How rich do you want the content of this PPT to be:″],″strategy″:[″Multi-round″]}]}.
[0053] It should be noted that, in other embodiments, if the multiple predetermined fields do not include the target field that matches the target intent, it can be determined that the document to be processed does not meet the predetermined condition, and therefore question information may not be output to the user.
[0054] The above describes the process of determining the document information and dialogue information of the document to be processed. Next, the process of generating a presentation document outline based on the document information and dialogue information will be described.
[0055] In this embodiment, the document information, the dialogue information and the predetermined prompt information template (Prompt) may be combined into input information, and then the input information is input into the large language model to obtain the presentation document outline.
[0056] For example, the large language model can be an LLM (Large Language Model). The predetermined prompt information template can be a natural language segment. The predetermined prompt information template can express the task of the large language model and require the large language model to generate a presentation document outline based on the document information. The generated presentation document outline must be consistent with the content of the dialogue information. This embodiment utilizes the large language model to generate the presentation document outline, which is highly intelligent.
[0057] In one example, the large language model can output data in JSON or other formats, and then render the data output by the large language model in Markdown (Lightweight Markup Language) format or other methods to show the user the outline of the presentation document.
[0058] Exemplarily, the data structure that can be output by the large language model may include: title title, ppt object text content c, character length limit, line spacing size size, subclass title subType, template type tpl, etc., where, for the title, # can be used to represent the first-level title and * to represent the second-level subtitle.
[0059] For example, the data examples that the large language model can output are as follows: {″title″:″Four Great Classics Reading Report″,″ppt″:{″tempNo″:4,″slide″:[{″c″:[{″c″:″Four Great Classics Reading Report″,″limif″:8,″size″:″48px″,"subType″:″title″,"type″:″textbox″}],″md″:″Four Great Classics Reading Report″,″t″:″title″,″tpl″:″60workreport2312051"},{″c″:[{″c″:″Directory″,″limit”:2 ,″subType″:″title″,″type″:″textbox″},{″c″:″Overview of the Four Great Classical Novels\nIntroduction to the Authors of the Four Great Classical Novels\nReading Report on A Dream of Red Mansions\nReading Report on Romance of the Three Kingdoms\nReading Report on Water Margin\nReading Report on Journey to the West″,″limit":56,″subType″:″catalogue″,″type″:″textbox″}],″md″:″Catalog\nOverview of the Four Great Classical Novels\nIntroduction to the Authors of the Four Great Classical Novels\nReading Report on A Dream of Red Mansions\nReading Report on Romance of the Three Kingdoms\nReading Report on Water Margin\nReading Report on Journey to the West″,″t ″:″catalogue",″tpl″:″60workreport2312051″},{″c″:[{″c″:″01″,"subType″:″number″,"type″:″textbox″},{″c″:″Overview of Four Great Classical Novels″,”limit″:6,”size″:″48px″,”subType″:″title″,”type″:″textbox″}],″md″:″##Overview of Four Great Classical Novels″,”t″:″h2title″,”tpl″:″60workreport2312054″},{″c ″:[{″c″:″Definition and characteristics of the Four Great Classics″,″limit":10,″subType″:″title″,″type″:″textbox″},{″c″:″The Four Great Classics refer to the four classical novels: A Dream of Red Mansions, Journey to the West, Water Margin and Romance of the Three Kingdoms. ″,″limit″:40,″subType″:″item1″,″title″:″Definition″,″type″:″textbox″},{″c″:″The Four Great Classics have profound ideological connotations, rich characters, unique artistic style and extensive social influence, and are classics in the history of Chinese literature.″,″limit″:51,″subType″:″item2″,″title″:″Characteristics″,″type″:″textbox″},{″c″:″http: / / XXXprocess=image / quality,q_75″,″h″:800,"subType″:″img0″,″type″:″pic″,″w″:1200},{″c″:″http: / / XXXprocess=image / quality,q_75″,″h″:800,"subType″:″img1″,″type″:″pic″,″w″:1200}],″md″:″## Definition and characteristics of the Four Great Classics\n### Definition\n- The Four Great Classics refer to the four classical novels "A Dream of Red Mansions", "Journey to the West", "Water Margin" and "Romance of the Three Kingdoms". ### Features - The Four Great Classics possess profound ideological connotations, rich character portrayals, a unique artistic style, and extensive social influence, making them classics in the history of Chinese literature. ","t":"list2","tpl":"Img60workreport2312051"},".
[0060] The above describes the process of generating a presentation document outline. Next, the process of generating a presentation document will be described.
[0061] In this embodiment, multiple candidate templates can be pre-configured, and the candidate templates define the layout of the presentation document. The presentation document includes multiple pages. Taking a page as an example, the layout of the page includes: the position, font, font size, color, maximum text quantity, image position, image size, etc. of the title on the page. The user can select a template from the multiple candidate templates. Based on the user's selection operation, the template selected by the user is used as the target template. It can be seen that after determining the target template, the position of the text to be displayed on the page, the maximum text quantity, and other information can be determined.
[0062] Next, the text to be presented can be generated based on the presentation document outline, the maximum text quantity, and the document information. This operation can be implemented based on a large language model. For example, the presentation document outline can be split into multiple titles, and the target text information corresponding to each title can be determined from the document information. The target text information, the maximum text quantity, and the prompt information template are then combined and input into the large language model. The prompt information template can be a piece of natural language, such as the prompt information template representation: The task of the large language model is to generate a summary based on the target text information, and the number of words in the summary does not exceed the maximum text quantity.
[0063] It should be noted that sometimes the number of texts to be displayed output by the large model does not meet the user requirements. For example, the maximum number of texts to be output is required to be 50, while the number of texts to be displayed actually output by the large language model is 60. Therefore, it is possible to determine whether the number of texts to be displayed is greater than the maximum number of texts. If the number of texts to be displayed is less than or equal to the maximum number of texts, the text to be displayed can be displayed according to the font and font size in the layout. If the number of texts to be displayed is greater than the maximum number of texts, the font of the text to be displayed can be adjusted, or the font size of the text to be displayed can be reduced to obtain the adjusted text to be displayed, and then the adjusted text to be displayed is combined with the target template to obtain a presentation document. By adjusting the font and font size of the text to be displayed, it is possible to avoid the text to be displayed from overflowing the text box due to too many words, thereby ensuring the normal display of the text to be displayed.
[0064] FIG3 is a schematic diagram of a method for generating a presentation document according to an embodiment of the present disclosure.
[0065] As shown in FIG3 , in this embodiment, OCR recognition can be performed on a document to be processed 301 to extract text data. The text data is then parsed, such as by escaping, to obtain an XML tree structure 302 , which includes nodes and original tags. XML tree structure 302 can then be traversed and, based on the mapping relationship between the original tags and the target tags, translated into an array 303 . Array 303 can then be formatted to generate document information 304 in the target format.
[0066] Intent recognition can also be performed on the document to be processed 301 to obtain a target intent 305 for the document to be processed 301. If it is determined that the multiple predetermined fields 306 include a target field 307 that matches the target intent 305, at least one question data in the question set corresponding to the target field 307 is determined as at least one question information 308 associated with the document to be processed 301 and output. The user can then respond to the question information 308, thereby obtaining user-outputted response information 309. The question information 308 and the response information 309 can then be combined into a dialog message 310 in a predetermined format.
[0067] Next, the document information 304 and the dialogue information 310 may be input into a large language model 311, and the large language model 311 outputs a presentation document outline 312. A presentation document 313 is then generated based on the presentation document outline 312.
[0068] 4A to 4E are schematic diagrams of a front-end operation interface for generating a presentation document according to an embodiment of the present disclosure.
[0069] The user can upload documents, edit presentation document outlines, and perform other operations through the front-end operation interface 410 .
[0070] As shown in FIG4A , the operation interface 410 provides two ways to generate a PPT: one is to generate a PPT based on a user-entered theme, and the other is to generate a PPT based on a user-uploaded document. The user can select the PPT generation method through window 411. The user can enter the desired PPT theme in the input box in window 412. In addition, window 412 provides associative words for the user to select.
[0071] As shown in FIG4B , if the user chooses to upload a local document to generate a PPT, a pop-up window 420 will be displayed above the operation interface 410 . The document can be uploaded through a window 421 in the pop-up window 420 . At the same time, a restriction text 422 and a prompt text 423 are displayed in the pop-up window 420 .
[0072] As shown in Figure 4C, if the user chooses to upload a document, a pop-up window 430 will appear above the operation interface 410. In pop-up window 430, documents that do not meet the requirements are grayed out, for example, Document 2, Document 5, and Document 6 are grayed out. Non-compliant documents may include size or type mismatches. After the user selects a document to upload, the upload progress can be displayed.
[0073] As shown in Figure 4D, after the document is successfully uploaded, pop-up window 430 automatically disappears, and the user is prompted on user interface 410 that the document has been uploaded. Furthermore, user interface 410 asks the user whether the PPT content to be created should remain consistent with the original content in the uploaded document or be expanded upon. If the user selects "Stay consistent," the compliant outline is output; if the user selects "Expand upon," the interpreted outline is output.
[0074] As shown in FIG4E , the generated PPT outline can be displayed on page 440 . The number of words created can also be counted. For example, if the user does not edit the PPT outline after generating it, the display will read “Completed, total XX words.” If the user does edit the PPT outline after generating it, the display will read “Completed, total XX words (edited).”
[0075] In addition, restrictions can be pre-configured for the generated PPT outline. These restrictions can include outline editing limits, which can include item count limits, such as displaying 50 first-level and second-level headings combined; length limits, such as limiting each heading to fewer than 30 words; and overrun limits, such as truncating items that exceed the item and word count limits. Restrictions can also include PPT page limits. For example, if a PPT is generated up to 100 pages, and if it reaches page 99 but hasn't been completed, the final page will be rendered directly, and subsequent content will be truncated.
[0076] FIG5 is a schematic structural block diagram of an apparatus for generating a presentation document according to an embodiment of the present disclosure.
[0077] As shown in FIG. 5 , the apparatus 500 for generating a presentation document may include a document information determination module 510 , an acquisition module 520 , a dialogue information determination module 530 , an outline determination module 540 , and a generation module 550 .
[0078] The document information determination module 510 is used to determine document information based on the document to be processed, where the document information represents the content and structure of the document to be processed.
[0079] The obtaining module 520 is configured to output at least one question information associated with the document to be processed, if it is determined that the document to be processed meets a predetermined condition, to obtain response information for the at least one question information.
[0080] The dialogue information determining module 530 is configured to determine dialogue information according to at least one question information and at least one response information to the question information.
[0081] The outline determination module 540 is used to determine the presentation document outline according to the document information and the dialogue information.
[0082] The generating module 550 is used to generate a presentation document according to the presentation document outline.
[0083] In this embodiment, the document information determination module includes a parsing submodule, a conversion submodule, and a determination submodule. The parsing submodule is used to parse the document to be processed to obtain a tree structure; the tree structure includes multiple nodes, each of which corresponds to an original tag. The node represents the content of the document to be processed, and the original tag represents the structural information of the node. The conversion submodule is used to convert the tree structure into data in a target format based on the multiple nodes, the multiple original tags corresponding to the multiple nodes, and the predetermined mapping relationship between the original tags and the target tags. The determination submodule is used to use the data in the target format as document information.
[0084] In this embodiment, the apparatus further includes an identification module and a determination module. The identification module is configured to perform intent recognition on the document to be processed to obtain a target intent for the document to be processed. The determination module is configured to determine that the document to be processed satisfies a predetermined condition if it is determined that the plurality of predetermined fields include a target field that matches the target intent.
[0085] In this embodiment, each of the multiple predetermined fields corresponds to a question set, each of which includes at least one question data. The dialog information determination module includes a question information determination submodule and an output submodule. The question information determination submodule is configured to determine at least one question data in the question set corresponding to the target field as at least one question information associated with the document to be processed. The output submodule is configured to output the at least one question information.
[0086] In this embodiment, the generation module includes: a quantity determination submodule, a text generation submodule, an adjustment submodule, and a first combination submodule. The quantity determination submodule is used to determine the maximum text quantity for the text in the page to be generated based on the target template. The text generation submodule is used to generate the text to be displayed based on the presentation document outline, the maximum text quantity, and the document information. The adjustment submodule is used to adjust at least one of the font and font size of the text to be displayed in response to detecting that the text quantity of the text to be displayed is greater than the maximum text quantity, thereby obtaining the adjusted text to be displayed. The first combination submodule is used to combine the adjusted text to be displayed with the target template to obtain the presentation document.
[0087] In this embodiment, the outline determination module includes: a second combination submodule and an input submodule. The second combination submodule is used to combine document information, dialogue information, and a predetermined prompt information template into input information. The input submodule is used to input the input information into the large language model to obtain a presentation document outline.
[0088] According to an embodiment of the present disclosure, the present disclosure also provides an electronic device, including at least one processor; and a memory communicatively connected to the at least one processor; the memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to execute the above-mentioned method of generating a presentation document.
[0089] According to an embodiment of the present disclosure, the present disclosure further provides a non-transitory computer-readable storage medium storing computer instructions, wherein the computer instructions are used to enable a computer to execute the above-mentioned method for generating a presentation document.
[0090] According to an embodiment of the present disclosure, the present disclosure further provides a computer program product, including a computer program, which implements the above-mentioned method for generating a presentation document when executed by a processor.
[0091] FIG6 shows a schematic block diagram of an example electronic device 600 that can be used to implement an embodiment of the present disclosure. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device can also represent various forms of mobile devices, such as personal digital assistants, cellular phones, smart phones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely examples and are not intended to limit the implementation of the present disclosure described and / or required herein.
[0092] As shown in Figure 6, device 600 includes a computing unit 601, which can perform various appropriate actions and processes according to a computer program stored in a read-only memory (ROM) 602 or a computer program loaded from a storage unit 608 into a random access memory (RAM) 603. Various programs and data required for the operation of device 600 can also be stored in RAM 603. Computing unit 601, ROM 602, and RAM 603 are connected to each other via a bus 604. An input / output (I / O) interface 605 is also connected to bus 604.
[0093] Various components in device 600 are connected to I / O interface 605, including an input unit 606, such as a keyboard, mouse, etc.; an output unit 607, such as various types of displays, speakers, etc.; a storage unit 608, such as a magnetic disk, optical disk, etc.; and a communication unit 609, such as a network card, modem, wireless communication transceiver, etc. The communication unit 609 allows device 600 to exchange information / data with other devices via a computer network such as the Internet and / or various telecommunication networks.
[0094] The computing unit 601 can be a variety of general-purpose and / or specialized processing components with processing and computing capabilities. Some examples of the computing unit 601 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various dedicated artificial intelligence (AI) computing chips, various computing units that run machine learning model algorithms, a digital signal processor (DSP), and any appropriate processor, controller, microcontroller, etc. The computing unit 601 performs the various methods and processes described above, such as the method for generating a presentation document. For example, in some embodiments, the method for generating a presentation document can be implemented as a computer software program that is tangibly contained in a machine-readable medium, such as the storage unit 608. In some embodiments, part or all of the computer program can be loaded and / or installed on the device 600 via the ROM 602 and / or the communication unit 609. When the computer program is loaded into the RAM 603 and executed by the computing unit 601, one or more steps of the method for generating a presentation document described above can be performed. Alternatively, in other embodiments, the computing unit 601 can be configured to perform the method for generating a presentation document by any other appropriate means (e.g., by means of firmware).
[0095] Various embodiments of the systems and techniques described above can be implemented in digital electronic circuit systems, integrated circuit systems, field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), system-on-chip systems (SOCs), complex programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various embodiments can include being implemented in one or more computer programs that are executable and / or interpreted on a programmable system that includes at least one programmable processor, which can be a special purpose or general purpose programmable processor that can receive data and instructions from a storage system, at least one input device, and at least one output device, and transmit data and instructions to the storage system, the at least one input device, and the at least one output device.
[0096] The program code for implementing the method of the present disclosure can be written in any combination of one or more programming languages. These program codes can be provided to a processor or controller of a general-purpose computer, a special-purpose computer, or other programmable data processing device so that when the program code is executed by the processor or controller, the functions / operations specified in the flow chart and / or block diagram are implemented. The program code can be executed entirely on the machine, partially on the machine, as a stand-alone software package, partially on the machine and partially on a remote machine, or entirely on a remote machine or server.
[0097] In the context 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.
[0098] To provide interaction with a user, the systems and techniques described herein can be implemented on a computer having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and pointing device (e.g., a mouse or trackball) through which the user can provide input to the computer. Other types of devices can also be used to provide interaction with the user; for example, the feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including acoustic input, voice input, or tactile input).
[0099] The systems and techniques described herein can be implemented in a computing system that includes back-end components (e.g., as a data server), or a computing system that includes middleware components (e.g., an application server), or a computing system that includes front-end components (e.g., a user computer having a graphical user interface or a web browser through which a user can interact with implementations of the systems and techniques described herein), or a computing system that includes any combination of such back-end components, middleware components, or front-end components. The components of the system can be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include a local area network (LAN), a wide area network (WAN), and the Internet.
[0100] Computer systems may include clients and servers. A client and server are generally remote from each other and typically interact through a communication network. The client and server relationship arises through computer programs running on the respective computers and having a client-server relationship to each other.
[0101] In the technical solutions disclosed herein, the collection, storage, use, processing, transmission, provision and disclosure of user personal information involved comply with the provisions of relevant laws and regulations and do not violate public order and good morals.
[0102] In the technical solution disclosed herein, the user's authorization or consent is obtained before obtaining or collecting the user's personal information.
[0103] It should be understood that the various forms of the processes shown above can be used to reorder, add, or delete steps. For example, the steps described in this disclosure can be performed in parallel, sequentially, or in a different order, as long as the desired results of the technical solutions disclosed in this disclosure can be achieved. This is not limited herein.
[0104] The above specific embodiments do not constitute a limitation on the scope of protection of this disclosure. Those skilled in the art will appreciate that various modifications, combinations, sub-combinations, and substitutions may be made based on design requirements and other factors. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of this disclosure shall be included within the scope of protection of this disclosure.
Claims
1. A method for generating a presentation document, comprising: Determining document information based on the document to be processed, wherein the document information represents the content and structure of the document to be processed; When it is determined that the document to be processed meets a predetermined condition, outputting at least one question information associated with the document to be processed to obtain response information for the at least one question information; determining dialogue information according to the at least one question information and the response information to the at least one question information; Determine a presentation document outline according to the document information and the conversation information; as well as Generate a presentation document according to the presentation document outline.
2. The method according to claim 1, wherein Determining document information according to the document to be processed includes: Parsing the document to be processed to obtain a tree structure; the tree structure includes a plurality of nodes, each node corresponds to an original label, the node represents the content of the document to be processed, and the original label represents the structural information of the node; Converting the tree structure into data in a target format according to the plurality of nodes and the plurality of original labels corresponding to the plurality of nodes, and a predetermined mapping relationship between the original labels and the target labels; and The data in the target format is used as the document information.
3. The method according to claim 1, further comprising: Performing intent recognition on the document to be processed to obtain a target intent for the document to be processed; as well as In a case where it is determined that the plurality of predetermined fields include the target field matching the target intent, it is determined that the document to be processed meets a predetermined condition.
4. The method according to claim 3, wherein: Each of the plurality of predetermined fields corresponds to a question set, and the question set includes at least one question data; The determining of the dialogue information according to the at least one question information and the response information of the at least one question information includes: determining at least one question data in the question set corresponding to the target field as at least one question information associated with the document to be processed; as well as The at least one question information is output.
5. The method according to any one of claims 1 to 4, wherein: Generating a presentation document according to the presentation document outline includes: Determine the maximum number of texts for the text in the to-be-generated page according to the target template; Generate text to be presented according to the presentation document outline, the maximum text quantity and the document information; In response to detecting that the text quantity of the to-be-displayed text is greater than the maximum text quantity, adjusting at least one of the font and the font size of the to-be-displayed text to obtain adjusted text to be displayed; and The adjusted text to be displayed is combined with the target template to obtain the presentation document.
6. The method according to any one of claims 1 to 4, wherein: Determining the presentation document outline according to the document information and the dialogue information includes: combining the document information, the dialogue information, and a predetermined prompt information template into input information; and The input information is input into a large language model to obtain the presentation document outline.
7. A device for generating a presentation document, comprising: A document information determination module, configured to determine document information based on a document to be processed, wherein the document information represents the content and structure of the document to be processed; an obtaining module, configured to output at least one question information associated with the document to be processed, if it is determined that the document to be processed meets a predetermined condition, so as to obtain response information for the at least one question information; a dialogue information determining module, configured to determine dialogue information based on the at least one question information and the response information of the at least one question information; An outline determination module, configured to determine a presentation document outline based on the document information and the dialogue information; as well as A generating module is used to generate a presentation document according to the presentation document outline.
8. The device according to claim 7, wherein The document information determination module includes: A parsing submodule, configured to parse the document to be processed to obtain a tree structure; the tree structure includes a plurality of nodes, each node corresponding to an original label, the node representing the content of the document to be processed, and the original label representing the structural information of the node; a conversion submodule, configured to convert the tree structure into data in a target format according to the plurality of nodes and the plurality of original labels corresponding to the plurality of nodes, and a predetermined mapping relationship between the original labels and the target labels; and A submodule is determined, which is used to use the data in the target format as the document information.
9. The apparatus according to claim 7, further comprising: An identification module, configured to perform intent identification on the document to be processed and obtain a target intent for the document to be processed; as well as The determination module is configured to determine that the document to be processed meets a predetermined condition when it is determined that the plurality of predetermined fields include a target field that matches the target intent.
10. The device according to claim 9, wherein Each of the plurality of predetermined fields corresponds to a question set, and the question set includes at least one question data; The dialogue information determination module includes: a question information determination submodule, configured to determine at least one question data in the question set corresponding to the target field as at least one question information associated with the document to be processed; as well as The output submodule is configured to output the at least one question information.
11. The device according to any one of claims 7 to 10, wherein: The generation module includes: A quantity determination submodule is used to determine the maximum number of texts in the page to be generated according to the target template; A text generation submodule, configured to generate text to be displayed based on the presentation document outline, the maximum text quantity, and the document information; an adjusting submodule, configured to adjust at least one of a font and a font size of the text to be displayed in response to detecting that the text quantity of the text to be displayed is greater than the maximum text quantity, to obtain adjusted text to be displayed; and The first combining submodule is configured to combine the adjusted text to be displayed with the target template to obtain the presentation document.
12. The device according to any one of claims 7 to 10, wherein: The outline determination module includes: A second combining submodule is configured to combine the document information, the dialogue information, and a predetermined prompt information template into input information; and The input submodule is used to input the input information into the large language model to obtain the presentation document outline.
13. An electronic device comprising: at least one processor; as well as a memory communicatively connected to the at least one processor; wherein, The memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to perform the method according to any one of claims 1 to 6.
14. A non-transitory computer-readable storage medium storing computer instructions, wherein: The computer instructions are used to cause the computer to execute the method according to any one of claims 1 to 6.
15. A computer program product comprising a computer program, which, when executed by a processor, implements the method according to any one of claims 1 to 6.
Citation Information
Patent Citations
Provide interactive content generation for document
CN108351868A
Method and device for generating presentation document, electronic equipment and storage medium
CN116306492A
Powerpoint generation method and device, electronic equipment and storage medium
CN116384362A
Document format conversion method and device, storage medium and electronic equipment
CN116795780A
Powerpoint generation method and device, electronic equipment and storage medium
CN117436417A