Powerpoint automatic generation method and device, electronic equipment and readable storage medium

By deeply analyzing PPT elements and using large language models for content understanding, combined with pre-trained typesetting design models, a presentation with clear logical structure and personalized typesetting is generated, which solves the problems of loose generation structure of the existing PPT generator and lacks novelty in the layout design, and achieves more efficient, flexible and personalized automatic PPT generation.

CN119540403AActive Publication Date: 2025-02-28CHENGDU CELIS TECH CO LTD

Patent Information

Application Number
CN202411442058.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-10-16
Publication Date
2025-02-28
Estimated Expiration
2044-10-16

AI Technical Summary

Technical Problem

The PPT generated by the existing AI artificial intelligence PPT generator has loose structure, poor logic, and poor layout design novelty and uniqueness, making it difficult to meet the personalized needs of users.

Method used

By obtaining the presentation outline information or topic information, calling the model interface for analysis, generating a paging prompt content sequence, and inputting a pre-trained layout design model in combination with the target theme style to generate a presentation with compact structure and personalized layout.

Benefits of technology

Ensure that the generated PPT has a clear logical structure and a complete content framework, which improves the structural compactness, content relevance, coherence and logic of PPT, and at the same time enhances the novelty and uniqueness of the layout design to meet the personalized needs of users.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119540403A_ABST
    Figure CN119540403A_ABST
Patent Text Reader

Abstract

The invention relates to the field of artificial intelligence, and provides a presentation file automatic generation method and device, electronic equipment and a readable storage medium. The method comprises the following steps: calling a first model interface, and introducing presentation file outline information or presentation file theme information and typesetting prompt information to obtain a first return result; generating a paging prompt content sequence according to the first return result; the target theme style and the paging prompt content sequence are input into a pre-trained presentation file typesetting design model, a paging typesetting design description sequence is obtained, the paging typesetting design description sequence comprises a plurality of typesetting pages, and one typesetting page corresponds to one typesetting design description; and generating a target presentation file based on the paging typesetting design description sequence and the target theme style, and outputting the target presentation file. The PPT generated by the method is more compact in structure and better in logicality, and the PPT typesetting design has better novelty and uniqueness, so that the personalized requirements of users can be better met.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of artificial intelligence, and in particular to a method, device, electronic device and readable storage medium for automatically generating presentations. Background Art

[0002] In recent years, with the rapid development of artificial intelligence (AI) technology, various AI PPT (Microsoft Office PowerPoint, presentation) generators have emerged.

[0003] The existing AI PPT generators do not have a deep and accurate understanding of the content and structure of PPTs, resulting in a loose structure and weak logic of the generated PPTs. At the same time, they use relatively fixed templates or rules, and the generated PPT layout design is less novel and unique, making it difficult to meet the various personalized needs of users. Summary of the invention

[0004] In view of this, the embodiments of the present application provide a method, device, electronic device and readable storage medium for automatically generating presentations to solve the problem that the PPT generated by the prior art has a loose structure, weak logic, and poor novelty and uniqueness in the generated PPT layout design, making it difficult to meet the various personalized needs of users.

[0005] A first aspect of an embodiment of the present application provides a method for automatically generating a presentation, comprising:

[0006] Get presentation outline information or presentation topic information;

[0007] Calling the first model interface, passing in presentation outline information or presentation theme information, and typesetting prompt information, and obtaining a first return result;

[0008] Generate a paging prompt content sequence according to the first returned result, the paging prompt content sequence includes a plurality of ordered pages, one ordered page corresponds to one page prompt content, pages belonging to the same page category have the same page prompt content, and pages belonging to different page categories have different page prompt contents;

[0009] Determine the target theme style;

[0010] Input the target theme style and paging prompt content sequence into the pre-trained presentation layout design model to obtain a paging layout design description sequence, where the paging layout design description sequence includes multiple layout pages, and one layout page corresponds to one layout design description;

[0011] Based on the page layout design, describe the sequence and target theme style, generate the target presentation, and output it.

[0012] A second aspect of the embodiments of the present application provides a device for automatically generating a presentation, including:

[0013] An acquisition module, configured to acquire presentation outline information or presentation subject information;

[0014] A calling module is configured to call the first model interface, input the presentation outline information or the presentation theme information, and the typesetting prompt information, and obtain a first return result;

[0015] A first generating module is configured to generate a paging prompt content sequence according to the first returned result, wherein the paging prompt content sequence includes a plurality of ordered pages, each ordered page corresponds to a page prompt content, the page prompt contents of pages belonging to the same page category are the same, and the page prompt contents of pages belonging to different page categories are different;

[0016] A determination module, configured to determine a target theme style;

[0017] An input module is configured to input a target theme style and a paging prompt content sequence into a pre-trained presentation layout design model to obtain a paging layout design description sequence, wherein the paging layout design description sequence includes a plurality of layout pages, and one layout page corresponds to one layout design description;

[0018] The second generation module is configured to generate and output a target presentation based on the page layout design description sequence and the target theme style.

[0019] According to a third aspect of an embodiment of the present application, an electronic device is provided, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the steps of the above method when executing the computer program.

[0020] According to a fourth aspect of an embodiment of the present application, a readable storage medium is provided, which stores a computer program, and when the computer program is executed by a processor, the steps of the above method are implemented.

[0021] Compared with the prior art, the beneficial effects of the embodiment of the present application include at least the following: by calling the first model interface, the incoming presentation outline information or presentation theme information, as well as the typesetting prompt information are parsed, so that the subsequently generated PPT can be ensured to have a clear logical structure and a complete content framework. By generating a paging prompt content sequence according to the first return result, the PPT content and structure can be further parsed into a natural language-like expression, so that the presentation typesetting design model can understand the content and structure of the PPT more comprehensively and accurately, thereby making the structure of the generated PPT more compact, and the relevance, coherence and logic of the content better. In addition, the presentation typesetting design model adopted in the embodiment of the present application can learn and integrate diverse design styles and elements, and can generate a more novel and unique PPT typesetting design, which greatly improves the innovation of the generated PPT and can better meet the various personalized needs of users. BRIEF DESCRIPTION OF THE DRAWINGS

[0022] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.

[0023] Figure 1 It is a flowchart of a method for automatically generating a presentation provided in an embodiment of the present application;

[0024] Figure 2 It is a flowchart of another method for automatically generating a presentation provided in an embodiment of the present application;

[0025] Figure 3 It is a structural schematic diagram of a presentation automatic generation device provided in an embodiment of the present application;

[0026] Figure 4 It is a structural schematic diagram of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0027] In the following description, specific details such as specific system structures, technologies, etc. are provided for the purpose of illustration rather than limitation, so as to provide a thorough understanding of the embodiments of the present application. However, it should be clear to those skilled in the art that the present application may also be implemented in other embodiments without these specific details. In other cases, detailed descriptions of well-known systems, devices, circuits, and methods are omitted to prevent unnecessary details from obstructing the description of the present application.

[0028] A method and device for automatically generating a presentation according to an embodiment of the present application will be described in detail below with reference to the accompanying drawings.

[0029] In the prior art, a preset template library is used to automatically fill in the corresponding positions according to the content input by the user. Although this method can quickly generate PPT, it lacks flexibility and innovation. The generated PPT is often stereotyped and difficult to meet personalized needs. Extract key information from the text provided by the user through predefined rules and layout it according to fixed layout rules. The limitation of this method is that the coverage of the rules is limited and it is difficult to handle complex and changeable content structures. Some tools have begun to introduce AI technology to assist PPT design, such as automatic color adjustment, intelligent chart generation, etc., but these functions are often isolated and lack a deep understanding and optimization of the overall PPT structure and content.

[0030] In view of this, an embodiment of the present application provides a method for automatically generating presentations, which overcomes some limitations of the prior art through innovative means such as deep analysis of PPT elements, use of a large language model to understand the content, and construction of a specialized PPT design model, thereby achieving smarter, more flexible, and more personalized automatic generation of PPTs, significantly improving the efficiency and quality of PPT production, and providing users with a better experience.

[0031] Furthermore, an embodiment of the present application provides a method for automatically generating a presentation, which can ensure that the subsequently generated PPT has a clear logical structure and a complete content framework by calling a first model interface to parse the incoming presentation outline information or presentation theme information, as well as the layout prompt information. By generating a paging prompt content sequence based on the first return result, the PPT content and structure can be further parsed into a natural language-like expression, so that the presentation layout design model can understand the content and structure of the PPT more comprehensively and accurately, thereby making the structure of the generated PPT more compact, and the relevance, coherence and logic of the content better. In addition, the presentation layout design model used in the embodiment of the present application can learn and integrate diverse design styles and elements, and can generate a more novel and unique PPT layout design, which greatly improves the innovation of the generated PPT and can better meet the various personalized needs of users.

[0032] Figure 1 It is a flowchart of a method for automatically generating a presentation provided in an embodiment of the present application. Figure 1 The automatic presentation generation method can be executed by a terminal device or a server. Figure 1 As shown, the method for automatically generating a presentation includes the following steps:

[0033] Step S101, obtaining presentation outline information or presentation subject information.

[0034] Specifically, the presentation outline information or presentation theme information can be obtained by using a general model (such as a GPT-4o model, etc.), or by other means, such as a user inputting the presentation outline information or presentation theme information through a terminal device.

[0035] As an example, the format of the presentation outline information may be in markdown format, as follows:

[0036] #Main title

[0037] ##First level title

[0038] ###Secondary Directory

[0039] content.

[0040] The presentation theme information can be determined by the user according to his or her actual needs.

[0041] Step S102, calling the first model interface, inputting presentation outline information or presentation theme information, and typesetting prompt information, and obtaining a first return result.

[0042] The first model interface may be a general model interface such as a GPT-4o model.

[0043] The typesetting prompt information is information that instructs a general model such as the GPT-4o model to perform paging planning for the PPT based on the presentation outline information or the presentation theme information.

[0044] As an example, the layout prompt information can be: "Plan the paging of the PPT and the content of each page according to the currently provided presentation outline information or presentation theme information and production requirements, and output the following format of json: {"Cover": PPT title, "Table of Contents": [Table of Contents list], "Contents page 1" {'Table of Contents': the first-level title to which this page belongs, 'Secondary Table of Contents' (optional): subtitle, 'content': complete content}}". Among them, "{"Cover": PPT title, "Table of Contents": [Table of Contents list], "Contents page 1" {'Table of Contents': the first-level title to which this page belongs, 'Secondary Table of Contents' (optional): subtitle, 'content': complete content}}" is the first returned result.

[0045] Step S103, generating a paging prompt content sequence according to the first returned result, the paging prompt content sequence including a plurality of ordered pages, one ordered page corresponding to one page prompt content, pages belonging to the same page category have the same page prompt content, and pages belonging to different page categories have different page prompt contents.

[0046] Ordered pages refer to slide pages arranged in order, for example, slide page 1, slide page 2, slide page 3... slide page i.

[0047] The page category includes at least one of a cover page, a directory page, a content page, or an end page. For example, the page category includes a cover page, a directory page, a content page, and an end page. For another example, the page category includes a cover page, a content page, and an end page.

[0048] As an example, the paging prompt content sequence can be expressed as [prompt 1 ,…,prompt i ], where prompt 1 Indicates the page prompt content corresponding to slide page 1, prompt i Indicates the page prompt content corresponding to slide page i.

[0049] Different page categories have different page prompts. For example, for the cover page, the page prompt can be: 'Please design a Powerpoint cover for {title}.' For the directory page, the page prompt can be: 'Please design a Powerpoint directory page, and its directory list is as follows: {directory list}'. For the content page, the page prompt can be: 'Please design a Pointpoint content page, the first-level title of this content is {first-level title}, the second-level directory of this content is {subtitle}, and the content is {complete content}'. For the end page, the page prompt can be: 'Please design a Powerpoint end page with the title {title} according to the provided theme.'

[0050] Step S104, determining the target theme style.

[0051] Theme styles include but are not limited to minimalism, mechanisticism, extreme simplicity, postmodernism, naturalism, Mediterranean style, neoclassical style, etc.

[0052] The target theme style can be a theme style selected by the user according to his or her personal preference, or a theme style randomly selected by the system.

[0053] Step S105, input the target theme style and paging prompt content sequence into a pre-trained presentation layout design model to obtain a paging layout design description sequence, which includes multiple layout pages, and one layout page corresponds to one layout design description.

[0054] As an example, the pagination layout design description sequence can be expressed as [discribe 1,…,discribe i ], where discribe 1 Indicates the layout design description corresponding to the first layout page, discribe i Represents the layout design description corresponding to the i-th layout page.

[0055] The layout design description is a description of the page elements of the layout page.

[0056] Step S106, generating a target presentation based on the page layout design description sequence and the target theme style, and outputting it.

[0057] As an example, the pagination layout design description sequence and the target theme style can be decoded to obtain a decoding result (PPT layout), and then the Python-pptx library can be used to render the decoding result as a whole to obtain the target presentation and output it.

[0058] The technical solution provided in the embodiment of the present application can ensure that the subsequently generated PPT has a clear logical structure and a complete content framework by calling the first model interface to parse the incoming presentation outline information or presentation theme information, as well as the layout prompt information. By generating a paging prompt content sequence based on the first return result, the PPT content and structure can be further parsed into a natural language-like expression, so that the presentation layout design model can understand the content and structure of the PPT more comprehensively and accurately, thereby making the structure of the generated PPT more compact, and the relevance, coherence and logic of the content better. In addition, the presentation layout design model adopted in the embodiment of the present application can learn and integrate diverse design styles and elements, and can generate a more novel and unique PPT layout design, which greatly improves the innovation of the generated PPT and can better meet the personalized needs of users.

[0059] In some embodiments, the presentation layout design model is trained by the following training method:

[0060] Obtain multiple training samples, where one training sample is a complete finished presentation;

[0061] For each training sample, the training sample is parsed once to obtain a first parsed file;

[0062] Perform secondary parsing on the first parsed file to obtain a theme style file, a page element file and a text content file;

[0063] Create the first prompt information, call the second model interface, input the first prompt information, theme style file, page element file and text content file, and obtain the first model output result;

[0064] Create the second prompt information, call the second model interface, input the second prompt information and the first model output result, and obtain the second model output result;

[0065] The initial model is trained using the output results of the first model and the output results of the second model until the preset model convergence conditions are met, thereby obtaining a presentation layout design model.

[0066] Specifically, the finished presentation (finished PPT) can be obtained through the Internet or other channels and saved in a folder named "PPT".

[0067] Take a complete finished presentation as a training sample. You can use the python-pptx library to parse each training sample saved in the "PPT" folder and get the first parsed file in json format. The first parsed file can be represented as A, where all distance units are cm (centimeter) and all angle units are ° (degree).

[0068] A can be expressed as:

[0069] A={

[0070] "Slide_shape": [H, W],

[0071] "Theme_color":T_C,

[0072] “Slides”: 1 ,S 2 ,…,S i ]

[0073] }.

[0074] Among them, H and W are the height and width of the PPT page; T_C is the theme color dictionary; S 1 Represents the list of elements in the first slide; S 2 Represents the list of elements in the second slide; S i Represents the list of elements in the i-th slide, where i is the total number of slides in this PPT.

[0075] T_C can be expressed as:

[0076] T_C={

[0077] Theme color code 1: code 1 RGB value,

[0078] Theme color code 2: code 2 RGB value,

[0079] …

[0080] }.

[0081] S i It can be expressed as:

[0082] S i =[sp 1 ,sp 2 ,…,sp n ]; sp is a dictionary representing the page elements in the slide. sp 1 Indicates the first page element in the i-th slide, sp 2 Indicates the second page element in the i-th slide, sp n Indicates the nth page element in the i-th slide. There are n page elements in the i-th slide. The earlier the page element is, the lower its level in the slide.

[0083] Page elements include but are not limited to: auto_shape (PPT built-in shape), line (PPT built-in connector), place_holder (placeholder), image (picture element), freeform (free shape) and textbox (text box). Placeholder is a symbol that occupies a fixed position and waits for users to add content to it.

[0084] The six page elements listed above have some common properties, including: left, top (the distance between the leftmost and topmost sides of the element and the upper left corner of the screen), height (element height), width (element width), shadow (element shadow parameter), fill (filling attribute), line (edge ​​attribute), text (paragraph, text and its attributes), and the saving format can be customized.

[0085] After the parsing is completed, the first parsed file may be saved in a separate json folder, which may be named as a "PPT+.json" folder.

[0086] In some embodiments, the first parsed file is parsed again to obtain a theme style file, a page element file, and a text content file, specifically including:

[0087] Extracting theme style parameters and page size parameters of the training sample from the first parsed file and saving them as a theme style file;

[0088] Extracting page elements of each page of the training sample from the first parsed file and saving them as page element files;

[0089] Traverse the page elements of each page of the training sample, extract the text content of each page, and save it as a text content file.

[0090] As an example, the first parsed file stored in the "PPT.json" folder is parsed again, and the theme style parameters (parameters included in "Theme_color") and page size parameters (parameters included in "Slide_shape") except "Slides" in A are extracted and saved separately as a file named "theme.txt", which is the theme style file. The format of the "theme.txt" file is as follows: 'height:H / width:W / theme color:[code 1 RGB value|code 2 RGB value...]'.

[0091] For the i-th member S of "Slides" in A i , traverse its sp, and save the page elements separately as a file named "slide_i.txt", which is the page element file. Multiple sps are connected in sequence, with the following format: {element type / [left, top, height, width] / shadow:[…] / fill[…] / line[…] / text[…]}{…}.

[0092] For the i-th member S of "Slides" in A i , traverse its sp and record its text content into variable T i , the text content of different sp is separated by line breaks, and the page elements are separated by '----------+line breaks', and T is obtained. i ={T 1 ,T 2 ,…} and save it as a file named "PPT.json+.txt", which is a text content file.

[0093] Next, create the first prompt information. Exemplarily, the first prompt information is as follows:

[0094] "\nThe above is the content of a multi-page ppt. Please determine whether there is a table of contents page, and then classify each page according to (cover, table of contents, content page, end page), and then output it in the following format. {'Cover':[{'slide_xxx':title},...], 'Content page':['slide_xxx',...], end page:['slide_xxx',...]}. If there is a table of contents page, add {'table of contents':[{'slide_xxx':[table of contents list]},...]} in json; if there is no table of contents page, add {'table of contents':[inferred table of contents list]} in json. Please do not output other content besides this."

[0095] Call the second model interface (which can be a model interface of a general model such as the GPT 4o model), pass in the above-mentioned first prompt information, theme style file, page element file and text content file, and obtain the first model output result in json format. The first model output result can be named as a "PPT+Res1.json" file.

[0096] Create a second prompt message. For example, the second prompt message is as follows:

[0097] "Filter out text that does not belong to the content page, determine which directory the content belongs to, and then output the complete content of the content page (pay attention to line breaks and special character escapes). If there is a second-level directory, output the second-level directory. The output format is json: {slide_xxx:{'Directory': the first-level title to which this page belongs, 'Second-level directory' (optional): subtitle, 'content': complete content}}".

[0098] Call the second model interface, pass in the above second prompt information and the first model output result, and obtain the second model output result in json format. The second model output result can be named as a file "PPT+Res2.json".

[0099] In some embodiments, the initial model is trained using the first model output result and the second model output result until a preset model convergence condition is met to obtain a presentation layout design model, specifically including:

[0100] Parse the output results of the first model and the output results of the second model to obtain a training paging prompt content sequence;

[0101] Using the page element file as the training label and the training paging prompt content sequence to train the initial model, the training model parameters are obtained;

[0102] If the preset model convergence conditions are met, the training model parameters are determined as the final model parameters, and the initial model parameters of the initial model are updated to the final model parameters to obtain the presentation layout design model.

[0103] The initial model may adopt some pre-trained open source PPT generation algorithm models published on the Internet, or may be a cloned copyrighted pre-trained PPT generation private model, or may be an algorithm model that has not been pre-trained.

[0104] If the number of training samples is large enough, then an algorithm model that has not been pre-trained can be used as the initial model. If the number of training samples is small, then a pre-trained open source PPT generation algorithm model or a PPT generation private model can be used as the initial model.

[0105] As an example, the output results of the first model and the second model are parsed to obtain a training paging prompt content sequence. The training paging prompt content sequence can be expressed as: [train_prompt 1 ,train_prompt 2 ...,train_prompt j ], train_prompt 1 Indicates the training prompt content corresponding to the first slide, train_prompt 2 Indicates the training prompt content corresponding to the second slide, train_prompt j Indicates the training prompt content corresponding to the jth slide. j is the index of the slide page. train_prompt in the training paging prompt content sequence j Prompt with paging content sequence i The structure is the same.

[0106] As an example, take the "slide_i.txt" file as the training label, prepare the LoRA (Low-Rank Adaptation, a lightweight and efficient large language model fine-tuning method) fine-tuning training environment, and each time send the initial model (pre-trained open source PPT generation algorithm model or PPT generation private model as the initial model) train_prompt j and "theme.txt" files, and use tools such as DeepSpeed ​​to perform iterative training to obtain training model parameters. DeepSpeed ​​is a distributed training tool provided by Microsoft, designed to support larger models and provide more optimization strategies and tools. For training larger models, DeepSpeed ​​provides more strategies, such as Zero, Offload, etc.

[0107] The preset model convergence condition can be that the number of training rounds reaches a preset round number threshold (for example, 5 rounds, 10 rounds, etc.), or that the model accuracy reaches a preset accuracy threshold (for example, 80%, 85%, etc.).

[0108] When there are fewer training samples, using the LoRA fine-tuning method for model training can improve model training efficiency and model quality.

[0109] In some embodiments, generating a target presentation based on the pagination layout design description sequence and the target theme style includes:

[0110] Decoding the target theme style and the pagination layout design description sequence to obtain a second parsed file, wherein the second parsed file has the same file structure as the first parsed file;

[0111] generating an initial presentation according to the second parsed file;

[0112] Render the initial presentation to obtain the target presentation.

[0113] As an example, a code can be written to describe the target theme style (for example, the theme style file corresponding to training sample 1) and the pagination layout design sequence [divide 1 ,…,discribe i ] to decode and obtain a second parsed file in json format. The second parsed file has the same file structure as the first parsed file. Then, the Python-pptx library can be used to generate an initial presentation based on the second parsed file, and then the initial presentation is rendered as a whole to obtain a target presentation, which can be saved as a file named "result.pptx".

[0114] In some embodiments, the method further comprises:

[0115] Obtaining modification instructions for the target presentation, the modification instructions including modifying the page index and modifying the prompt content;

[0116] Based on the modified page index, determine the target modified page and its corresponding first page layout design description;

[0117] According to the modification prompt content, the layout design description of the first page is modified to obtain a revised presentation.

[0118] The modification prompt content can be determined by the user based on personal preferences for PPT layout design. For example, it can be 'move the image down a little' or 'lower the overall transparency'.

[0119] As an example, assuming that the modified page index is 5, the target modified page is the 5th slide of the currently generated target presentation, and the first page layout design description is the page layout design description of the 5th slide, that is, discribe 5 . Assume that the modification prompt is 'lower the overall transparency', then lower the overall transparency of the 5th slide in the target presentation to obtain a revised presentation.

[0120] Through the above method, the user can modify one or more slides in the target presentation to obtain a revised presentation that better meets his or her personalized needs.

[0121] In some embodiments, the page layout design description is modified according to the modification prompt content to obtain a revised presentation, including:

[0122] Input the modified page index and modification prompt content into the presentation layout design model to obtain a second page layout design description corresponding to the target modified page;

[0123] The first page layout design description is replaced with the second page layout design description to obtain a revised presentation.

[0124] As an example, assuming that the modified page indexes are 1, 4, 6, and 7, the target modified pages include the 1st, 4th, 6th, and 7th slides of the currently generated target presentation, and the modification prompt content is 'Move the image down a little bit', then the modified page indexes 1, 4, 6, and 7 and the modification prompt content 'Move the image down a little bit' can be input into the presentation layout design model to obtain the second page layout design description, i.e., discribe' 1 、discribe' 4 、discribe' 6 、discribe' 7 . Discribe the first page layout design description of slides 1, 4, 6, and 7 in the target presentation 1 、discribe 4 、discribe 6 、discribe 7 Corresponding replacement is the second page layout design description discribe' 1 、discribe' 4 、discribe' 6 、discribe' 7 , get the corrected presentation.

[0125] Through the above method, the user can modify one or more slides in the target presentation to obtain a revised presentation that better meets his or her personalized needs.

[0126] All the above optional technical solutions can be arbitrarily combined to form optional embodiments of the present application, which will not be described one by one here.

[0127] Figure 2 It is a flowchart of another method for automatically generating a presentation provided in an embodiment of the present application.

[0128] See also Figure 2 ,This method may include four steps, the first is the data construction process, the second is the training process, the third is the PPT layout generation process, and the fourth is the PPT layout modification process.

[0129] The data construction process mainly includes the following steps: 1. Make and collect finished PPTs. Specifically, you can make or collect complete finished PPTs from the Internet and other channels as training samples. 2. Completely parse the elements in the PPT to generate json. Specifically, for each training sample, completely parse the elements in the PPT to generate the first parsed file in json format. 3. Encode json into a natural language description. Specifically, encode the first parsed file to obtain a theme style file and a page element file. 4. Extract all text content. Specifically, extract all text content in the first parsed file to obtain a text content file.

[0130] The training process mainly includes the following steps: 1. Training the initial model. Specifically, the theme style files, page element files and text content files obtained in the above data construction process can be used to train the initial model (such as the LLAMA3 large language model) and output the training model parameters. 2. Adjust the model parameters. Specifically, the training model parameters can be fine-tuned based on the LoRA+ optimization algorithm. 3. Save the model. Specifically, when the preset model convergence conditions are met, the training process is ended, the presentation layout design model is obtained, and it is saved.

[0131] The PPT layout generation process mainly includes the following steps: 1. Get the PPT outline. 2. Paginate the PPT outline. Specifically, you can call the large model interface, plan the pagination of the PPT outline based on the language theme prompts, and get the pagination prompt content sequence. 3. Input the pagination prompt content sequence and the selected target theme style into the above-mentioned saved presentation layout design model. 4. Obtain the second parsed file. Specifically, the content output by the presentation layout design model can be parsed into a PPT representation based on a natural language description, and then the natural language can be decoded into json representing the PPT elements to obtain a second parsed file. 5. Generate a PPT file. Specifically, based on the second parsed file, render and generate a PPT file.

[0132] The PPT layout modification process mainly includes the following steps: 1. Get the modification prompt instruction and input it into the above-mentioned saved presentation layout design model. 2. Select the page to be modified and input it into the above-mentioned saved presentation layout design model.

[0133] The technical solution provided by the embodiment of the present application includes at least the following beneficial effects:

[0134] 1) By parsing various elements in the PPT into natural language-like expressions, the large language model (LLM) can understand the content and structure of the PPT more comprehensively and accurately. This deep understanding makes the generated PPT more consistent with the intention and logic of the original content, significantly improving the relevance and coherence of the content.

[0135] 2) Use the large model interface to parse the saved text content by pages and generate a PPT outline, which can ensure that the generated PPT has a clear logical structure and a complete content framework. This not only improves the quality of the PPT, but also helps viewers better understand and remember the presentation content.

[0136] 3) Through the above training method, the initial model can learn and integrate diverse design styles and elements. The presentation layout design model trained in this way can generate more novel and unique PPT designs, which greatly improves the innovation of generated PPT and can better meet the various personalized needs of users.

[0137] 4) The presentation layout design model trained in this application has strong language understanding and generation capabilities, and can adapt to the PPT needs of various fields and styles. At the same time, through continuous learning and updating, the model can continuously improve and expand its capabilities and maintain long-term advancement.

[0138] 5) By breaking down the PPT design generation process into steps such as parsing, outline generation, and design, the system’s decision-making process becomes more transparent and explainable, helping users understand and trust the results generated by AI.

[0139] 6) The embodiments of the present application can realize automatic generation of PPT, which greatly reduces the time of manual design and editing, especially for enterprises and individuals who need to make PPT frequently, which can significantly reduce time and labor costs.

[0140] 7) The embodiments of the present application combine deep content understanding and intelligent design generation. Users only need to provide a basic outline or idea to obtain a high-quality PPT, which greatly simplifies the PPT production process and improves the user experience.

[0141] In summary, this application improves the quality, efficiency and personalization of PPT generation by deeply integrating natural language processing, large language models and design intelligence, while also enhancing the adaptability, interpretability and user interaction capabilities of the system. These advantages make this application significantly innovative and practical in the field of AI-assisted PPT generation, and help promote technological progress and application development in this field.

[0142] The following is an embodiment of the device of the present application, which can be used to execute the embodiment of the method of the present application. For details not disclosed in the embodiment of the device of the present application, please refer to the embodiment of the method of the present application.

[0143] Figure 3 Schematic diagram of a device for automatically generating presentations provided in an embodiment of the present application. Figure 3 As shown, the automatic presentation generation device includes:

[0144] The acquisition module 301 is configured to acquire presentation outline information or presentation subject information;

[0145] The calling module 302 is configured to call the first model interface, input the presentation outline information or the presentation theme information, and the typesetting prompt information, and obtain the first return result;

[0146] The first generating module 303 is configured to generate a paging prompt content sequence according to the first returned result, wherein the paging prompt content sequence includes a plurality of ordered pages, each ordered page corresponds to a page prompt content, the page prompt content of pages belonging to the same page category is the same, and the page prompt content of pages belonging to different page categories is different;

[0147] A first determination module 304 is configured to determine a target theme style;

[0148] The input module 305 is configured to input the target theme style and the paging prompt content sequence into the pre-trained presentation layout design model to obtain a paging layout design description sequence, wherein the paging layout design description sequence includes a plurality of layout pages, and one layout page corresponds to one layout design description;

[0149] The second generation module 306 is configured to generate and output a target presentation based on the page layout design description sequence and the target theme style.

[0150] In some embodiments, the presentation layout design model is trained by the following training method:

[0151] Obtain multiple training samples, where one training sample is a complete finished presentation;

[0152] For each training sample, the training sample is parsed once to obtain a first parsed file;

[0153] Perform secondary parsing on the first parsed file to obtain a theme style file, a page element file and a text content file;

[0154] Create the first prompt information, call the second model interface, input the first prompt information, theme style file, page element file and text content file, and obtain the first model output result;

[0155] Create the second prompt information, call the second model interface, input the second prompt information and the first model output result, and obtain the second model output result;

[0156] The initial model is trained using the output results of the first model and the output results of the second model until the preset model convergence conditions are met, thereby obtaining a presentation layout design model.

[0157] In some embodiments, the first parsed file is parsed again to obtain a theme style file, a page element file, and a text content file, including:

[0158] Extracting theme style parameters and page size parameters of the training sample from the first parsed file and saving them as a theme style file;

[0159] Extracting page elements of each page of the training sample from the first parsed file and saving them as page element files;

[0160] Traverse the page elements of each page of the training sample, extract the text content of each page, and save it as a text content file.

[0161] In some embodiments, the initial model is trained using the first model output result and the second model output result until a preset model convergence condition is met to obtain a presentation layout design model, including:

[0162] Parse the output results of the first model and the output results of the second model to obtain a training paging prompt content sequence;

[0163] Using the page element file as the training label and the training paging prompt content sequence to train the initial model, the training model parameters are obtained;

[0164] If the preset model convergence conditions are met, the training model parameters are determined as the final model parameters, and the initial model parameters of the initial model are updated to the final model parameters to obtain the presentation layout design model.

[0165] In some implementations, the second generation module 306 includes:

[0166] A decoding unit is configured to decode the target theme style and the pagination typesetting design description sequence to obtain a second parsed file, wherein the second parsed file has the same file structure as the first parsed file;

[0167] A generating unit, configured to generate an initial presentation according to the second parsed file;

[0168] The rendering unit is configured to render the initial presentation to obtain a target presentation.

[0169] In some embodiments, the above device further comprises:

[0170] An instruction acquisition module is configured to acquire a modification instruction for a target presentation, wherein the modification instruction includes modifying a page index and modifying a prompt content;

[0171] A second determination module is configured to determine a target modification page and its corresponding first page layout design description based on the modification page index;

[0172] The modification module is configured to modify the first page layout design description according to the modification prompt content to obtain a revised presentation.

[0173] In some embodiments, the modification module includes:

[0174] An input unit is configured to input the modified page index and the modification prompt content into the presentation layout design model to obtain a second page layout design description corresponding to the target modified page;

[0175] The replacement unit is configured to replace the first page layout design description with the second page layout design description to obtain a revised presentation.

[0176] It should be understood that the size of the serial numbers of the steps in the above embodiments does not mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present application.

[0177] Figure 4 Schematic diagram of an electronic device 4 provided in an embodiment of the present application. Figure 4 As shown, the electronic device 4 of this embodiment includes: a processor 401, a memory 402, and a computer program 403 stored in the memory 402 and executable on the processor 401. When the processor 401 executes the computer program 403, the steps in the above-mentioned method embodiments are implemented. Alternatively, when the processor 401 executes the computer program 403, the functions of the modules / units in the above-mentioned device embodiments are implemented.

[0178] The electronic device 4 may be a desktop computer, a notebook, a PDA, a cloud server, or other electronic device. The electronic device 4 may include, but is not limited to, a processor 401 and a memory 402. Those skilled in the art will appreciate that Figure 4 The electronic device 4 is merely an example and does not limit the electronic device 4 , and may include more or less components than those shown in the figure, or different components.

[0179] The processor 401 may be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc.

[0180] The memory 402 may be an internal storage unit of the electronic device 4, for example, a hard disk or memory of the electronic device 4. The memory 402 may also be an external storage device of the electronic device 4, for example, a plug-in hard disk, a smart media card (SMC), a secure digital (SD) card, a flash card, etc. equipped on the electronic device 4. The memory 402 may also include both an internal storage unit and an external storage device of the electronic device 4. The memory 402 is used to store computer programs and other programs and data required by the electronic device.

[0181] Those skilled in the art can clearly understand that for the convenience and simplicity of description, only the division of the above-mentioned functional units and modules is used as an example. In actual applications, the above-mentioned functions can be assigned to different functional units and modules as needed, that is, the internal structure of the device can be divided into different functional units or modules to complete all or part of the functions described above. The functional units and modules in the embodiments can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The above-mentioned integrated unit can be implemented in the form of hardware or in the form of software functional units.

[0182] If the integrated module / unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a readable storage medium (e.g., a computer-readable storage medium). Based on this understanding, the present application implements all or part of the processes in the above-mentioned embodiment method, and can also be completed by instructing the relevant hardware through a computer program. The computer program can be stored in a computer-readable storage medium, and the computer program can implement the steps of the above-mentioned various method embodiments when executed by the processor. The computer program may include computer program code, which may be in source code form, object code form, executable file or some intermediate form. Computer-readable storage media may include: any entity or device capable of carrying computer program code, recording medium, U disk, mobile hard disk, disk, optical disk, computer memory, read-only memory (ROM), random access memory (RAM), electric carrier signal, telecommunication signal and software distribution medium, etc.

[0183] The above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit them. Although the present application has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. These modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present application, and should all be included in the protection scope of the present application.

Claims

1. A method for automatically generating a presentation, characterized in that: include: Get presentation outline information or presentation topic information; Calling the first model interface, passing in the presentation outline information or presentation theme information, and typesetting prompt information, and obtaining a first return result; Generate a paging prompt content sequence according to the first returned result, wherein the paging prompt content sequence includes a plurality of ordered pages, one ordered page corresponds to one page prompt content, pages belonging to the same page category have the same page prompt content, and pages belonging to different page categories have different page prompt contents; Determine the target theme style; Input the target theme style and the paging prompt content sequence into a pre-trained presentation layout design model to obtain a paging layout design description sequence, wherein the paging layout design description sequence includes a plurality of layout pages, and one layout page corresponds to one layout design description; Based on the pagination layout design description sequence and the target theme style, a target presentation is generated and output.

2. The method according to claim 1, characterized in that The presentation layout design model is trained by the following training method: Acquire multiple training samples, one of the training samples is a complete finished product presentation; For each training sample, the training sample is parsed once to obtain a first parsed file; Performing secondary analysis on the first analysis file to obtain a theme style file, a page element file and a text content file; Create the first prompt information, call the second model interface, input the first prompt information, theme style file, page element file and text content file, and obtain the first model output result; Create second prompt information, call the second model interface, pass in the second prompt information and the first model output result, and obtain the second model output result; The initial model is trained using the first model output result and the second model output result until a preset model convergence condition is met, thereby obtaining a presentation layout design model.

3. The method according to claim 2, characterized in that The first parsed file is parsed again to obtain a theme style file, a page element file and a text content file, including: Extracting the theme style parameters and page size parameters of the training sample from the first parsed file, and saving them as a theme style file; Extracting page elements of each page of the training sample from the first parsed file and saving them as a page element file; The page elements of each page of the training sample are traversed, the text content of each page is extracted, and the text content is saved as a text content file.

4. The method according to claim 2, characterized in that: The initial model is trained using the output results of the first model and the output results of the second model until a preset model convergence condition is met, thereby obtaining a presentation layout design model, including: Parse the output results of the first model and the output results of the second model to obtain a training paging prompt content sequence; Using the page element file as a training label and the training paging prompt content sequence to train the initial model, and obtaining training model parameters; If the preset model convergence conditions are met, the training model parameters are determined as final model parameters, and the initial model parameters of the initial model are updated to the final model parameters to obtain a presentation layout design model.

5. The method according to claim 2, characterized in that: Based on the pagination layout design description sequence and the target theme style, a target presentation is generated, including: Decoding the target theme style and the pagination layout design description sequence to obtain a second parsed file, wherein the second parsed file has the same file structure as the first parsed file; Generate an initial presentation according to the second parsed file; The initial presentation is rendered to obtain a target presentation.

6. The method according to claim 1, characterized in that The method further comprises: Obtaining a modification instruction for the target presentation, wherein the modification instruction includes modifying a page index and modifying prompt content; Based on the modified page index, determining a target modified page and its corresponding first page layout design description; According to the modification prompt content, the first page layout design description is modified to obtain a revised presentation.

7. The method according to claim 6, characterized in that According to the modification prompt content, the page layout design description is modified to obtain a revised presentation, including: Input the modified page index and modification prompt content into the presentation layout design model to obtain a second page layout design description corresponding to the target modified page; The first page layout design description is replaced with the second page layout design description to obtain a revised presentation.

8. A device for automatically generating presentation manuscripts, characterized in that: include: An acquisition module, configured to acquire presentation outline information or presentation subject information; A calling module is configured to call the first model interface, input the presentation outline information or presentation theme information, and typesetting prompt information, and obtain a first return result; a first generating module configured to generate a paging prompt content sequence according to the first returned result, wherein the paging prompt content sequence includes a plurality of ordered pages, each ordered page corresponds to a page prompt content, the page prompt contents of pages belonging to the same page category are the same, and the page prompt contents of pages belonging to different page categories are different; A determination module, configured to determine a target theme style; An input module is configured to input the target theme style and the paging prompt content sequence into a pre-trained presentation layout design model to obtain a paging layout design description sequence, wherein the paging layout design description sequence includes a plurality of layout pages, and one layout page corresponds to one layout design description; The second generation module is configured to generate and output a target presentation based on the pagination layout design description sequence and the target theme style.

9. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 7 are implemented.

10. A readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 7 are implemented.

Citation Information

Patent Citations

  • Powerpoint generation method and device, electronic equipment and storage medium

    CN117436414A

  • Method for realizing document content generation based on text keywords

    CN117952067A

  • Powerpoint generation method based on large model and training method of large model

    CN118428332A

  • Method and system of generating a document template

    US11775747B1

  • Transforming Content Across Visual Mediums Using Artificial Intelligence and User Generated Media

    US20240257420A1

Cited By

  • Page structure optimization method and system for PowerPoint

    CN120493879A

  • Method and system for optimizing page structure of presentation

    CN120493879B