Presentation generation method and apparatus, device, storage medium, and program product

By identifying and adjusting the fill space on the presentation template page, the problem of text data matching with the template was solved, enabling the efficient generation of high-quality presentations.

CN118690728BActive Publication Date: 2025-10-21BEIJING BAIDU NETCOM SCI & TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410718428.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-06-04
Publication Date
2025-10-21
Estimated Expiration
2044-06-04

AI Technical Summary

Technical Problem

In the prior art, how to adapt text data to a presentation template to generate a high-quality presentation is an urgent problem to be solved.

Method used

By obtaining the presentation template and the text data to be filled, the fill positions are determined based on the attribute information of the template page, and the text data is filled into the fill positions in the target template page. The number and/or position of the fill positions in the target template page are different from those in the initial template page to achieve adaptation.

Benefits of technology

It improves the accuracy and efficiency of presentation generation, ensures the matching of text data with template pages, and enhances the aesthetics and content richness of the generated presentations.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118690728B_ABST
    Figure CN118690728B_ABST
Patent Text Reader

Abstract

The present disclosure provides a presentation generation method and device, equipment, storage medium and program product, and relates to the technical field of computers. The method comprises the following steps: obtaining a presentation template and text data to be filled; determining a filling position in an initial template page based on attribute information of the initial template page in the presentation template; and filling the text data into the filling position in a target template page generated based on the filling position in the initial template page to obtain a presentation; wherein the number and / or position of the filling positions in the target template page and the initial template page are different. The method can match the target template page with the text data.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the field of computer technology, and in particular to a presentation generation method, apparatus, device, storage medium, and program product. Background Art

[0002] With the rapid development of information technology, presentations, as a tool for information dissemination and communication, play an important role in business, education, scientific research and other fields.

[0003] In actual application scenarios, text data is generally obtained through generative artificial intelligence technology and filled into a presentation template provided by the user. However, how to adapt the text data to the presentation template to generate a presentation is a problem that needs to be solved urgently. Summary of the Invention

[0004] The embodiments of the present disclosure provide a presentation generation method, apparatus, device, storage medium, and program product.

[0005] In a first aspect, an embodiment of the present disclosure provides a method for generating a presentation, comprising:

[0006] Get the presentation template and the text data to be filled;

[0007] Determining a fill position in the initial template page based on attribute information of the initial template page in the presentation template;

[0008] The text data is filled into the filling bits in the target template page generated based on the filling bits in the initial template page to obtain a presentation; wherein the number and / or position of the filling bits in the target template page and the initial template page are different.

[0009] In a second aspect, an embodiment of the present disclosure provides a presentation generating device, comprising:

[0010] An acquisition module configured to acquire a presentation template and text data to be filled;

[0011] a determination module configured to determine a fill position in the initial template page based on attribute information of the initial template page in the presentation template;

[0012] The filling module is configured to fill text data into the filling bits in the target template page generated based on the filling bits in the initial template page to obtain a presentation; wherein the number and / or position of the filling bits in the target template page and the initial template page are different.

[0013] In a third aspect, an embodiment of the present disclosure provides an electronic device 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 so that the at least one processor can implement the presentation generation method described in any implementation method in the first aspect when executing the instructions.

[0014] In a fourth aspect, an embodiment of the present disclosure provides a non-transitory computer-readable storage medium storing computer instructions, which are used to enable a computer to implement the presentation generation method described in any implementation method of the first aspect when executed.

[0015] In a fifth aspect, an embodiment of the present disclosure provides a computer program product comprising a computer program, which, when executed by a processor, can implement the presentation generation method described in any implementation manner in the first aspect.

[0016] The padding bits in the target template page are generated based on the padding bits in the initial template page. Compared with the padding bits in the initial template page, the number and / or position of the padding bits in the target template page are changed so as to be compatible with the text data.

[0017] It should be understood that the content described in this section is not intended to identify the key or important features of the embodiments of the present disclosure, nor is it intended to limit the scope of the present disclosure. Other features of the present disclosure will become easily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS

[0018] Other features, objects and advantages of the present disclosure will become more apparent from a reading of the detailed description of non-limiting embodiments made with reference to the following drawings:

[0019] Figure 1 is an exemplary system architecture in which the present disclosure may be applied;

[0020] Figure 2 A flowchart of a presentation generation method provided for one embodiment of the present disclosure;

[0021] Figure 3 A flowchart of a presentation generation method provided for another embodiment of the present disclosure;

[0022] Figure 4 A schematic diagram of a homepage provided for one embodiment of the present disclosure;

[0023] Figure 5 A schematic diagram of a catalog page provided for one embodiment of the present disclosure;

[0024] Figure 6A schematic diagram of a chapter page provided for one embodiment of the present disclosure;

[0025] Figure 7 A schematic diagram of a content page provided for one embodiment of the present disclosure;

[0026] Figure 8 A schematic diagram of a last page provided for an embodiment of the present disclosure;

[0027] Figure 9 A schematic diagram of determining the category of an initial template page provided by an embodiment of the present disclosure;

[0028] Figure 10 A schematic diagram of a classification model voting process provided by one embodiment of the present disclosure;

[0029] Figure 11-13 Schematic diagrams of an initial directory template page arranged vertically, horizontally, and in parallel horizontally provided in accordance with an embodiment of the present disclosure;

[0030] Figure 14-16 The embodiments of the present disclosure provide Figure 11-13 Schematic diagram of the location of catalog elements in the initial catalog template page;

[0031] Figure 17-19 The embodiments of the present disclosure provide Figure 11-13 Schematic diagram of the location of catalog elements in the extended catalog template page;

[0032] Figure 20 A flowchart of a content page filling process provided for one embodiment of the present disclosure;

[0033] Figure 21 A flowchart of a presentation generation method provided for one embodiment of the present disclosure;

[0034] Figure 22 A structural block diagram of a presentation generating device provided in an embodiment of the present disclosure;

[0035] Figure 23 A schematic structural diagram of an electronic device suitable for executing a presentation generation method provided in an embodiment of the present disclosure. DETAILED DESCRIPTION

[0036] 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, which should be considered as merely exemplary. Therefore, it should be recognized by those skilled in the art that various changes and modifications can 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. It should be noted that the embodiments in the present disclosure and the features in the embodiments can be combined with each other unless there is a conflict.

[0037] 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.

[0038] Figure 1 An exemplary system architecture 100 is shown to which embodiments of the presentation generation method, apparatus, electronic device, and computer-readable storage medium of the present disclosure can be applied.

[0039] like Figure 1 As shown, system architecture 100 may include terminal devices 101, 102, 103, a network 104, and a server 105. Network 104 is a medium for providing communication links between terminal devices 101, 102, 103 and server 105. Network 104 may include various connection types, such as wired or wireless communication links or fiber optic cables.

[0040] Users can use terminal devices 101 , 102 , 103 to interact with server 105 via network 104 to receive or send messages, etc.

[0041] Terminal devices 101, 102, 103 and server 105 can be either hardware or software. When terminal devices 101, 102, 103 are hardware, they can be various electronic devices with display screens, including but not limited to smartphones, tablet computers, laptop computers, and desktop computers. When terminal devices 101, 102, 103 are software, they can be installed in the electronic devices listed above. They can be implemented as multiple software or software modules, or as a single software or software module, and are not specifically limited here. When server 105 is hardware, it can be implemented as a distributed server cluster consisting of multiple servers, or as a single server. When the server is software, it can be implemented as multiple software or software modules, or as a single software or software module, and are not specifically limited here.

[0042] Server 105 can provide various services through various built-in applications. It should be noted that presentation templates and text data to be filled in, in addition to being obtained from terminal devices 101, 102, and 103 via network 104, can also be pre-stored locally on server 105 in various ways. Therefore, when server 105 detects that this data is already stored locally, it can choose to directly obtain this data locally. In this case, exemplary system architecture 100 may also not include terminal devices 101, 102, 103 and network 104.

[0043] Because presentation generation requires significant computing resources and significant computational power, the presentation generation methods provided in the subsequent embodiments of this disclosure are generally executed by a server 105 possessing significant computing power and resources. Accordingly, the presentation generation apparatus is generally located within server 105. However, it should also be noted that, if terminal devices 101, 102, and 103 also possess sufficient computing power and resources, terminal devices 101, 102, and 103 can also utilize applications installed thereon to perform the aforementioned computations delegated to server 105, thereby outputting the same results as server 105. In particular, in the presence of multiple terminal devices with varying computing power, if an application determines that a terminal device possesses significant computing power and sufficient remaining computing resources, the aforementioned computations can be performed by that terminal device, thereby appropriately alleviating the computational burden on server 105. Accordingly, the presentation generation apparatus can also be located within terminal devices 101, 102, and 103. In this case, exemplary system architecture 100 may also exclude server 105 and network 104.

[0044] It should be understood that Figure 1 The number of terminal devices, networks and servers in the embodiment is merely illustrative. Any number of terminal devices, networks and servers may be provided as required.

[0045] Figure 2 A flowchart of a presentation generation method provided in an embodiment of the present disclosure includes the following steps:

[0046] Step 201: Obtain a presentation template and text data to be filled.

[0047] This step is intended to be performed by the execution body of the presentation generation method (e.g. Figure 1 The server 105 shown in the figure obtains a presentation template and text data to be filled in. The presentation template is provided by the user, and the text data can be generated by generative artificial intelligence technology or obtained by parsing a pre-written word document.

[0048] To facilitate subsequent processing, the text data obtained in this embodiment is in Markdown format, and the specific style is as follows:

[0049] #PPT Main Title

[0050] ##Secondary chapter title

[0051] ###Third level page title

[0052] - Table of Contents 1

[0053] - Table of Contents 2

[0054] Step 202: Based on the attribute information of the initial template page in the presentation template, determine the fill bits in the initial template page.

[0055] In this embodiment, the presentation template can be parsed using object detection and OCR (Optical Character Recognition) technology to obtain attribute information of the initial template page. To improve the efficiency of subsequent fill-in bit parsing, the attribute information can be in JSON (JavaScript Object Notation) format. JSON-formatted data can be reverse-mapped to a presentation. Therefore, the presentation template can be parsed into JSON-formatted data, which can then be processed to obtain the presentation, thereby improving the efficiency of presentation generation.

[0056] The attribute information may include attribute information of page elements and page layout information, wherein the page layout information is information representing the overall layout of the page, such as the size of the canvas, the link, transparency, and color of the background fill image of the page, etc.

[0057] The attribute information of the page elements is shown in Table 1. It should be noted that the page elements may include any one or more of shapes, text boxes and pictures, and the attribute information of each page element may include one or more of the items shown in Table 1.

[0058] Table 1

[0059]

[0060]

[0061] After parsing and obtaining the attribute information of the initial template page, the fill bits in the initial template page can be determined by the categories of the page elements therein. Specifically, the editable areas contained in the shapes and text boxes are the fill bits.

[0062] Step 203: Fill the text data into the filling bits in the target template page generated based on the filling bits in the initial template page to obtain a presentation; wherein the number and / or position of the filling bits in the target template page and the initial template page are different.

[0063] For example, the main title of the PPT is filled into the home page, and the secondary chapter title is filled into the directory page. In the filling process, the filling can be performed based on the position of the filling position, or based on the category of the filling position.

[0064] The number and / or position of the padding bits in the target template page have changed relative to the padding bits in the initial template page, for example, the number of padding bits has increased from 3 to 4, or the area covered by the padding bits has increased, that is, the position of the padding bits has changed.

[0065] The disclosed embodiments generate filler bits in a target template page based on the filler bits in the initial template page. Compared to the filler bits in the initial template page, the number and / or position of the filler bits in the target template page are modified to accommodate the text data. It should be noted that after filling the filler bits with text data, the resulting data is generally in JSON format, which requires conversion into a presentation.

[0066] Figure 3 A flowchart of a presentation generation method provided in an embodiment of the present disclosure includes the following steps:

[0067] Step 301: Obtain a presentation template and text data to be filled.

[0068] Step 302: Based on the attribute information of the initial template page in the presentation template, determine the fill bits in the initial template page.

[0069] The specific implementation of step 301 and step 302 can refer to the above embodiment and will not be repeated here.

[0070] Step 303: Determine the category of the initial template page based on the attribute information of the initial template page.

[0071] Step 303 may specifically include: obtaining classification results of various classification models based on the attribute information of the initial template page and multiple trained classification models, and selecting the category of the initial template page from the multiple classification results by voting.

[0072] In this embodiment, the attribute information used may include only the attribute information of the page elements, or only the page layout information, or both.

[0073] The various classification models include at least two of the following: a random forest model, a support vector machine, a third-largest language model, and a combination of a BERT (Bidirectional Encoder Representations from Transformers) model and a classifier.

[0074] The classification model is trained based on the attribute information and categories of the sample template pages. The sample template pages are samples of template pages used to train the classification model.

[0075] The following describes the training process of various classification models respectively.

[0076] The training process of the random forest model is as follows: extracting the first feature of the sample template page from the attribute information of the sample template page, preprocessing the first feature of the sample template page, and training the random forest model based on the category of the sample template page and the first feature of the preprocessed sample template page.

[0077] The first feature can be a text feature, such as the number of "title" fields or the number of "table of contents" fields, or a page feature, such as the number of sequential text blocks or page numbers. Preprocessing can include normalization or standardization to ensure that the first feature has a uniform scale and distribution. Furthermore, the trained random forest model can be evaluated using test data to calculate metrics such as classification accuracy and recall. Based on the evaluation results, the random forest model can be fine-tuned and optimized, for example, by adjusting the number and depth of decision trees and the method of feature selection.

[0078] The training process of the support vector machine is as follows: based on TF-IDF (Term Frequency–Inverse Document Frequency), the second feature of the sample template page is extracted from the attribute information of the sample template page, and the support vector machine is trained based on the category and the second feature of the sample template page.

[0079] The second feature may be the frequency, inverse text frequency, etc. of the keyword extracted from the shape or text box.

[0080] The training process of the combination of the BERT model and the classifier is as follows: based on the pre-trained BERT model, the third feature of the sample template page is extracted from the attribute information of the sample template page, the third feature of the sample template page is input into the classifier, and based on the output results of the classifier and the category of the sample template page, the BERT model and the classifier are fine-tuned.

[0081] The classifier may be a fully connected layer, etc., and the third feature may be a text feature, such as keywords extracted from the filler text.

[0082] The training process of the third language model is as follows: based on the attribute information of the sample template page, construct prompt words, based on the category of the sample template page, construct reply results, and train the third language model based on the prompt words and reply results.

[0083] The third largest language model is the general large language model. The prompt word and recovery result are shown below, where the prompt word is the input and the recovery result is the output.

[0084] “Please play the role of an excellent document engineer, and your task is to classify text.

[0085] Input: Text 1

[0086] Output: Label 1

[0087] Input: Text 2

[0088] Output: Label 3

[0089] Input: Text 2

[0090] Output: Label 3

[0091]

[0092] The given text is [PPT text information], please give the output [].

[0093] In actual application scenarios, it is also possible to use only one classification model to determine the category of the initial template page, such as determining the category of the initial template page based on the attribute information of the initial template page and a trained random forest model; it is also possible to determine the category of the initial template page by extracting keywords from the shape or text box of the initial template page.

[0094] The categories of initial template pages include: home page, directory page, chapter page, content page and end page. Figure 4-8 .

[0095] The page classification process can be referred to Figure 9 As shown in the figure, n initial template pages are parsed to obtain n JSON data, each of which includes the attribute information of the initial template page. The category of each initial template page can be obtained through the integrated model, where the integrated model is a multiple classification model. The voting process of multiple classification models can be referred to Figure 10 As shown, the classification results output by the four classification models are home page, home page, content page and home page. Since the home page appears most frequently, the category of the initial template page is determined to be home page.

[0096] Step 304: Based on the category of the initial template page, determine the category of the filler bits in the initial template page.

[0097] In order to improve the efficiency and accuracy of filling bit classification, this embodiment divides the filling bits into categories using a method corresponding to the categories of the initial template page.

[0098] Step 304 may include: in response to the category of the initial template page being the home page, chapter page or last page, extracting characteristics of the fill bits in the initial template page from the attribute information of the initial template page, and determining the category of the fill bits in the initial template page based on the characteristics of the fill bits in the initial template page.

[0099] The features of the filler bit may be keywords extracted from the text box or shape, the position of the filler bit, etc.

[0100] Step 304 may include: in response to the category of the initial template page being a directory page, clustering the fill bits in the initial template page based on attribute information of the initial template page, and determining the category of the fill bits in the initial template page based on the clustering result.

[0101] The clustering process can consider the position of the fill bit, the font of the fill text in the text box or shape, the length of the fill text, etc.

[0102] Step 304 may include: in response to the category of the initial template page being a content page, determining the category of the fill bits in the initial template page based on the attribute information of the initial template page; wherein the category of the fill bits in the initial template page includes subtitle fill bits and content fill bits, or the category of the fill bits in the initial template page includes content fill bits.

[0103] Since the filling bits of the content page are relatively complex, this embodiment can use clustering to determine the category of the filling bits. There must be content filling bits in the content page, but there may not be subtitle filling bits.

[0104] Correspondingly, the text data can contain only the content list without the subtitles:

[0105] ###Page level 3 title

[0106] - Table of Contents 1

[0107] - Table of Contents 2

[0108] - Table of Contents 3

[0109] Text data can also contain both subheadings and a table of contents:

[0110] ###Page level 3 title

[0111] -Page Level 4 Subheading 1: Content List 1

[0112] -Page Level 4 Subheading 1: Content List 2

[0113] -Page Level 4 Subheading 1: Content List 3

[0114] Because content pages are relatively complex in structure, in actual application scenarios, content pages are generally classified into two levels. Specifically, the method further includes: determining the content group to which the fill-in fields in the initial template page belong based on the categories of the fill-in fields in the initial template page. A content group includes content fill-in fields, or includes content fill-in fields and subheading fill-in fields. The number of content groups in the initial template page is equal to the number of content lists that can be filled in the page.

[0115] This embodiment only provides a preferred method for classifying filler bits. Clustering can also be used to classify the filler bits on the homepage, and feature matching can be used to determine the filler bit categories on the content page.

[0116] Table 2 shows the types of padding bits corresponding to the homepage, table of contents, chapter page, and end page. It should be noted that the types of padding bits can be adjusted based on actual business needs. For example, there are also invalid information padding bits filled with invalid information, which can be information filled in due to erroneous operation. The method further includes: in response to the padding bit being an invalid information padding bit, deleting the invalid information padding bit to avoid incorrect padding of text data.

[0117] Table 2

[0118]

[0119]

[0120] Different from the various page categories shown in Table 2, content pages implement two-level classification. First, it is determined whether the filler position is a subtitle filler position or a content filler position, and then the content group to which the filler position belongs is determined.

[0121] As shown in Table 3, pages can be further divided according to the number of content groups contained in the pages. Table 3 only shows some categories.

[0122] Table 3

[0123]

[0124] Step 305: Fill the filling position in the target template page with the content in the text data that corresponds to the category of the filling position in the target template page to obtain a presentation.

[0125] The type of padding bits in the initial template page is the same as the type of padding bits in the target template page generated based on the padding bits in the initial template page. For example, if there are three padding bits in the directory page, four new padding bits are generated based on these three padding bits to fill in four directory entries in the text data.

[0126] The disclosed embodiment takes into account the differences in padding bits between different page categories. By first determining the category of the initial template page, and then determining the category of the padding bits it contains based on the category of the initial template page, the efficiency of identifying the padding bit category is improved. During the padding process, the category of the padding bits is taken into account, improving padding accuracy.

[0127] In one embodiment of the present disclosure, when the category of the target template page is a directory page, step 305 includes: inputting the content in the text data corresponding to the category of the fill-in bits in the target template page and the first layout information into a trained first language model to obtain the directory page of the presentation; wherein the fill-in bits in the directory page of the presentation are filled with text data corresponding to their categories, and the first layout information includes: the fill-in bits of the initial template page and their categories.

[0128] The first language model can be Code Llama, for example. Considering the simpler structure of a catalog page compared to a content page, this embodiment inputs the first layout information and the catalog text to be filled into the first language model. The catalog text is the content in the text data corresponding to the category of the fill-in position in the target template page. This disclosed embodiment improves filling efficiency while ensuring filling accuracy.

[0129] In one embodiment of the present disclosure, the first layout information further includes: a first adjustment area determined based on the attribute information of the initial template page; and the fill bits in the target template page are located in the first adjustment area.

[0130] The first adjustment area is an area used to accommodate the filling bits of the target template page, which can be determined based on the position of the filling bits in the initial template page. The first adjustment area can reasonably arrange the position of the filling bits, thereby improving the accuracy of filling and the aesthetics of the presentation.

[0131] In one embodiment of the present disclosure, a first large language model is trained using an initial catalog template page and an extended catalog template page. The extended catalog template page is obtained by performing data augmentation on the initial catalog template page based on an interpolation function. The first large language model can learn the layout features of page elements in the initial catalog template page and the layout features of page elements in the extended catalog template page, such as the positional relationship between padding bits.

[0132] Since the initial directory template pages may be insufficient in number or have a single style, in order to improve the diversity of the pages, this embodiment increases the number of training samples through data enhancement. Specifically, the initial directory template pages are processed through an interpolation function to obtain extended directory template pages.

[0133] The data enhancement process specifically includes: classifying the initial directory template page, normalizing the directory elements in the initial directory template page according to the classification results, determining whether the directory page needs to be split according to the directory area and directory item size, if splitting is required, calculating the directory splitting information, determining the directory element position based on the directory splitting information, obtaining the extended directory template page based on the interpolation function and the directory element position, and if splitting is not required, obtaining the extended directory template page based on the interpolation function and the directory element position.

[0134] like Figure 11-13 As shown, there are three types of initial catalog template pages obtained by classification, namely vertical, horizontal and horizontal parallel. Figure 14-16 The positions of the directory elements in the three initial directory template pages are obtained by polynomial fitting. Figure 17-19 The location of the directory elements in the extended directory template page obtained through data enhancement corresponds to Figure 11-13 .

[0135] By training the first language model through the extended catalog template page, the training quality of the first language model can be improved.

[0136] In one embodiment of the present disclosure, the first layout information further includes: pictures in the initial template page.

[0137] Considering that the pictures in the initial template page may affect the position of the fill bits, this embodiment further considers the pictures in the initial template page when generating the fill bits in the target template page, which can make the determined fill bit position in the target template page more accurate.

[0138] In one embodiment of the present disclosure, Figure 20 As shown, when the category of the target template page is a content page, step 305 specifically includes:

[0139] Step 2001: Generate multiple content template pages based on the second layout information of the initial template page.

[0140] The second layout information includes: the fill bits and their categories of the initial template page. The second layout information also includes: a second adjustment area determined based on the attribute information of the initial template page; the fill bits in the target template page are located in the second adjustment area.

[0141] Similar to the first layout information, the second layout information may also include: pictures in the initial template page.

[0142] Step 2001 specifically includes: generating a plurality of content template pages based on the second layout information of the initial template page and a preset quantity threshold.

[0143] The quantity threshold is the number of content groups in the target template page, which is equal to the number of content lists populated on the content page of the presentation. For example, four inputs each require a different number of content groups (2, 3, 5, and 6), resulting in four new content template pages.

[0144] Step 2002: Based on the text data, a target template page is selected from a plurality of content template pages.

[0145] Wherein, based on the second layout information of the initial template page and a preset quantity threshold, multiple content template pages are generated, including:

[0146] Inputting the second layout information and the quantity threshold into the trained second language model to obtain multiple content template pages;

[0147] Among them, the second largest language model is trained by the initial content template page and the extended content template page. The extended content template page is obtained by data enhancement of the initial content template page based on the interpolation function.

[0148] Step 2002 may also be: selecting a target template page from an initial template page and a plurality of content template pages based on the text data.

[0149] In actual application scenarios, there are at least the following three logics for filtering target template pages.

[0150] (1) Screening based on the fill rate of the padding bits.

[0151] Step 2002 specifically includes: determining the number of text lines that can be filled in the fill bit of the content template page based on the attribute information of the content template page; calculating the fill rate of the fill bit of the content template page based on the number of text lines that can be filled and the content corresponding to the target template page in the text data; and selecting the target template page from multiple content template pages based on the fill rate and the text data. The number of text lines that can be filled can be calculated based on attribute information such as font size, line spacing, and spacing of text elements in the page.

[0152] Fill rate = number of used lines / number of text lines in the filling position, number of used lines = CEIL (number of characters in the text data to be filled in the filling position / number of characters in each line of the filling position), CEIL is used to represent rounding up.

[0153] If the filling rate is greater than 1, the content template page is filtered out, and the content template page with the highest filling rate is selected from the filtered content template pages as the target template page.

[0154] Through the fill rate, you can give priority to content template pages with higher fill position utilization to improve the aesthetics of the presentation.

[0155] (2) Filter based on the number of content groups.

[0156] Step 2002 specifically includes: determining the number of content groups in the content template page and the number of content lists corresponding to the target template page in the text data, and selecting the target template page from multiple content template pages based on the text data; wherein the number of content groups in the target content template page is the same as the number of content lists.

[0157] Based on this embodiment, the situation where the number of content groups does not match the number of content lists can be avoided, thereby improving the success rate of text data filling and the aesthetics of the presentation.

[0158] (3) Screening based on template repetition distance.

[0159] Step 2002 specifically includes: determining the template repetition distance of the content template page, and selecting a preset number of target template pages from multiple content template pages in descending order of the template repetition distance of the content template pages; wherein the template repetition distance is used to represent the difference in the number of pages between the content page to be currently generated in the presentation and the content page with the same content template page generated previously.

[0160] For example, the templates adapted for the first three pages are (template 1, template 2, template 1), the template repetition distance of template 1 is 4-3=1, and the template repetition distance of template 2 is 4-2=2.

[0161] Through this embodiment, content template pages with a large template repetition distance can be preferentially selected, thereby improving the diversity of content pages of the presentation.

[0162] Step 2003: Fill the filling position in the target template page with the content in the text data that corresponds to the category of the filling position in the target template page, and obtain the content page of the presentation.

[0163] This embodiment generates multiple content template pages based on the second layout information of the initial template page, and selects a target template page adapted to the text data from the content template pages. This embodiment not only enables the target template page to adapt to the text data, but also enriches the presentation style.

[0164] When the category of the target template page is a directory page, this method can also be used, that is, based on the first layout information, multiple directory template pages are generated, the target directory template page is selected from the multiple directory template pages based on the text data, and the directory text in the text data is filled into the target directory template page.

[0165] Similarly, when the category of the target template page is a content page, the content page of the presentation can be obtained by inputting the second layout information and the content in the text data corresponding to the category of the fill-in position in the target template page into the trained large language model.

[0166] For the first page, chapter page and last page, due to their simple structure, in order to speed up the generation efficiency of the presentation, they can be filled directly based on the category of the fill-in position. For example, the main title can be directly filled into the main title fill-in position, and the reporter can be directly filled into the reporter fill-in position.

[0167] Figure 21 A flowchart of a presentation generation method provided in an embodiment of the present disclosure specifically includes the following steps:

[0168] Step 2101: Obtain a presentation template and text data to be filled.

[0169] Step 2102: Based on the attribute information of the initial template page in the presentation template, determine the fill position in the initial template page.

[0170] Step 2103: Determine the category of the initial template page based on the attribute information of the initial template page.

[0171] Step 2104: Based on the category of the initial template page, determine the category of the fill-in position in the initial template page. In response to the category of the target template page being a directory page, execute step 2105. In response to the category of the target template page being a content page, execute step 2106. In response to the category of the target template page being a homepage, chapter page, or last page, execute step 2107.

[0172] Step 2105: Input the content in the text data corresponding to the category of the fill-in position in the target template page and the first typesetting information into the trained first language model to obtain the directory page of the presentation.

[0173] The category of the filling bits in the initial template page is the same as the category of the filling bits in the target template page generated based on the filling bits in the initial template page; the number and / or position of the filling bits in the target template page and the initial template page are different.

[0174] Step 2106: Based on the second layout information of the initial template page, generate multiple content template pages, select a target template page from the multiple content template pages based on the text data, fill the fill bits in the target template page with the content in the text data corresponding to the category of the fill bits in the target template page, and obtain the content page of the presentation.

[0175] The second layout information includes: the fill position of the initial template page and its category.

[0176] Step 2107: Determine the home page content, chapter content, and last page content corresponding to the category of the filling position in the target template page in the text data, and fill the home page content, chapter page content, and last page content into the filling position in the target template page respectively to obtain a presentation.

[0177] This embodiment can parse the initial template pages of each category according to the characteristics of the initial template pages of different categories, and obtain the presentation pages of the corresponding category based on the category of the fill-in bits obtained by the analysis, which can improve the accuracy and efficiency of page filling and ensure that the text data is compatible with the target template page.

[0178] Figure 22 A schematic diagram of a presentation generation device provided for an embodiment of the present disclosure specifically includes: an acquisition module 2201 configured to acquire a presentation template and text data to be filled, a determination module 2202 configured to determine the fill bits in the initial template page based on the attribute information of the initial template page in the presentation template, and a filling module 2203 configured to fill the text data into the fill bits in the target template page generated based on the fill bits in the initial template page to obtain a presentation; wherein the number and / or position of the fill bits in the target template page and the initial template page are different.

[0179] In one embodiment of the present disclosure, the determination module 2202 is configured to determine the category of the initial template page based on the attribute information of the initial template page, and determine the category of the fill bit in the initial template page based on the category of the initial template page.

[0180] The filling module 2203 is configured to fill the fill bits in the target template page with content in the text data corresponding to the category of the fill bits in the target template page, thereby obtaining a presentation. The category of the fill bits in the initial template page is the same as the category of the fill bits in the target template page generated based on the fill bits in the initial template page.

[0181] In one embodiment of the present disclosure, the target template page is a table of contents page; wherein the filling module 2203 is configured to input the content in the text data corresponding to the category of the filler bits in the target template page and the first layout information into a trained first language model to obtain the table of contents page of the presentation. The filler bits in the table of contents page of the presentation are filled with text data corresponding to their category, and the first layout information includes: the filler bits and their category of the initial template page.

[0182] In one embodiment of the present disclosure, the first layout information further includes: a first adjustment area determined based on the attribute information of the initial template page; and the fill bits in the target template page are located in the first adjustment area.

[0183] In one embodiment of the present disclosure, the first large language model is obtained by training the initial directory template page and the extended directory template page, and the extended directory template page is obtained by performing data enhancement on the initial directory template page based on an interpolation function.

[0184] In one embodiment of the present disclosure, the first layout information further includes: pictures in the initial template page.

[0185] In one embodiment of the present disclosure, the target template page is classified as a content page. The filling module 2203 is configured to generate multiple content template pages based on the second layout information of the initial template page, select a target template page from the multiple content template pages based on the text data, and fill the fill bits of the target template page with content in the text data corresponding to the categories of the fill bits in the target template page, thereby obtaining a content page for the presentation. The second layout information includes the fill bits and their categories of the initial template page.

[0186] In one embodiment of the present disclosure, the second layout information further includes: a second adjustment area determined based on the attribute information of the initial template page, and the fill bits in the target template page are located in the second adjustment area.

[0187] In one embodiment of the present disclosure, determination module 2202 is configured to, in response to the initial template page being classified as a content page, determine the category of a filler bit in the initial template page based on the attribute information of the initial template page, and determine the content group to which the filler bit in the initial template page belongs based on the category of the filler bit in the initial template page. Filling module 2203 is configured to generate multiple content template pages based on the second layout information of the initial template page and a preset quantity threshold.

[0188] Among them, the categories of filling bits in the initial template page include subtitle filling bits and content filling bits, or the categories of filling bits in the initial template page include content filling bits; the content group includes content filling bits, or the content group includes content filling bits and subtitle filling bits; the quantity threshold is the number of content groups in the target template page, and is equal to the number of content lists filled into the content page of the presentation.

[0189] In one embodiment of the present disclosure, the filling module 2203 is configured to input the second layout information and the quantity threshold into the trained second language model to obtain multiple content template pages.

[0190] Among them, the second largest language model is trained by the initial content template page and the extended content template page. The extended content template page is obtained by data enhancement of the initial content template page based on the interpolation function.

[0191] In one embodiment of the present disclosure, the second layout information further includes: a picture in the initial template page.

[0192] In one embodiment of the present disclosure, the filling module 2203 is configured to determine the number of text lines that can be filled in the filling position in the content template page based on the attribute information of the content template page, calculate the filling rate of the filling position in the content template page based on the number of fillable text lines and the content corresponding to the target template page in the text data, and select the target template page from multiple content template pages based on the filling rate and the text data.

[0193] In one embodiment of the present disclosure, the filling module 2203 is configured to determine the number of content groups in the content template page and the number of content lists corresponding to the target template page in the text data, and select the target template page from the plurality of content template pages based on the text data. The number of content groups in the target content template page is the same as the number of content lists.

[0194] In one embodiment of the present disclosure, the filling module 2203 is configured to determine the template repetition distance of the content template page and select a preset number of target template pages from the plurality of content template pages in descending order of the template repetition distance of the content template pages. The template repetition distance is used to represent the difference in the number of pages between the content page to be generated in the presentation and the content page previously generated with the same content template page.

[0195] In one embodiment of the present disclosure, the determination module 2202 is configured to obtain classification results from various classification models based on the attribute information of the initial template page and multiple trained classification models, and select the category of the initial template page from the multiple classification results through voting. The attribute information includes: attribute information of page elements and page layout information.

[0196] In one embodiment of the present disclosure, the multiple classification models include at least two of a random forest model, a support vector machine, a third language model, and a combination of a BERT model and a classifier. The classification model is trained based on the attribute information of the sample template page and the category of the sample template page. In one embodiment of the present disclosure, the determination module 2202 is configured to cluster the fill bits in the initial template page based on the attribute information of the initial template page in response to the initial template page being a directory page, and determine the category of the fill bits in the initial template page based on the clustering result.

[0197] In one embodiment of the present disclosure, the determination module 2202 is configured to extract characteristics of the fill bits in the initial template page from the attribute information of the initial template page in response to the category of the initial template page being the home page, chapter page or last page, and determine the category of the fill bits in the initial template page based on the characteristics of the fill bits in the initial template page.

[0198] In one embodiment of the present disclosure, the multiple classification models include at least two of a random forest model, a support vector machine, a third language model, and a combination of a BERT model and a classifier, and the classification model is obtained by training the attribute information of the sample template page and the category of the sample template page.

[0199] According to an embodiment of the present disclosure, the present disclosure also provides an electronic device, which includes: at least one processor; and 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 so that the at least one processor can implement the presentation generation method described in any of the above embodiments when executing.

[0200] According to an embodiment of the present disclosure, the present disclosure further provides a readable storage medium, which stores computer instructions, and the computer instructions are used to enable a computer to implement the presentation generation method described in any of the above embodiments when executed.

[0201] According to an embodiment of the present disclosure, the present disclosure further provides a computer program product, which, when executed by a processor, can implement the presentation generation method described in any of the above embodiments.

[0202] Figure 23A schematic block diagram of an example electronic device 2300 that can be used to implement embodiments of the present disclosure is shown. 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, smartphones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions are provided as examples only and are not intended to limit the implementation of the present disclosure described and / or claimed herein.

[0203] like Figure 23 As shown, the device 2300 includes a computing unit 2301, which can perform various appropriate actions and processes according to a computer program stored in a read-only memory (ROM) 2302 or a computer program loaded from a storage unit 2308 into a random access memory (RAM) 2303. Various programs and data required for the operation of the device 2300 can also be stored in the RAM 2303. The computing unit 2301, the ROM 2302, and the RAM 2303 are connected to each other via a bus 2304. An input / output (I / O) interface 2305 is also connected to the bus 2304.

[0204] Various components in device 2300 are connected to I / O interface 2305, including: an input unit 2306, such as a keyboard, mouse, etc.; an output unit 2307, such as various types of displays, speakers, etc.; a storage unit 2308, such as a magnetic disk, optical disk, etc.; and a communication unit 2309, such as a network card, modem, wireless communication transceiver, etc. The communication unit 2309 allows device 2300 to exchange information / data with other devices via a computer network such as the Internet and / or various telecommunication networks.

[0205] The computing unit 2301 can be a variety of general-purpose and / or specialized processing components with processing and computing capabilities. Some examples of the computing unit 2301 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 2301 performs the various methods and processes described above, such as the presentation generation method. For example, in some embodiments, the presentation generation method can be implemented as a computer software program that is tangibly contained in a machine-readable medium, such as the storage unit 2308. In some embodiments, part or all of the computer program can be loaded and / or installed on the device 2300 via the ROM 2302 and / or the communication unit 2309. When the computer program is loaded into the RAM 2303 and executed by the computing unit 2301, one or more steps of the presentation generation method described above can be performed. Alternatively, in other embodiments, the computing unit 2301 may be configured to execute the presentation generation method in any other appropriate manner (eg, by means of firmware).

[0206] Various embodiments of the systems and techniques described herein 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), 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.

[0207] 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.

[0208] 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.

[0209] 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).

[0210] 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.

[0211] A computer system may include a client and a server. The client and server are generally remote from each other and typically interact via a communication network. The client-server relationship arises through computer programs running on the respective computers and establishing a client-server relationship with each other. The server may be a cloud server, also known as a cloud computing server or cloud host, a host product within a cloud computing service ecosystem that addresses the management difficulties and limited scalability of traditional physical hosts and virtual private server (VPS) services.

[0212] According to the technical solution of the embodiment of the present disclosure, the filling bits in the target template page are generated based on the filling bits in the initial template page. Compared with the filling bits in the initial template page, the number and / or position of the filling bits in the target template page are changed so that they can be adapted to the text data.

[0213] 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 a limitation herein.

[0214] 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, comprising: Get the presentation template and the text data to be filled; Determining fill bits in the initial template page based on attribute information of the initial template page in the presentation template; Determining, based on the attribute information of the initial template page, a first category to which the initial template page belongs, and determining, based on the first category, a second category to which the fill bits in the initial template page belong; Filling the fill bits in the target template page with content corresponding to the third category in the text data to which the fill bits in the target template page belong to, to obtain a presentation, including: in response to the category of the target template page being a directory page, inputting the content corresponding to the third category in the text data and first typesetting information into a trained first large language model to obtain a directory page of the presentation, the first large language model being trained by an initial directory template page and an extended directory template page, and the process of obtaining the extended directory template page based on the initial directory template page including: normalizing the directory elements in the initial directory template page according to the classification result of the initial directory template page, in response to determining that the directory page needs to be split according to the directory area and directory item size, determining the directory element position according to the calculated directory splitting information, and obtaining the extended directory template page based on an interpolation function and the directory element position; the fill bits in the target template page are generated based on the fill bits in the initial template page, and the second category is the same as the third category, and the number and / or position of the fill bits in the target template page and the initial template page are different.

2. The method according to claim 1, wherein The filling bits in the catalog page of the presentation are filled with text data corresponding to their categories, and the first typesetting information includes: the filling bits of the initial template page and their categories.

3. The method according to claim 2, wherein: The first layout information further includes: a first adjustment area determined based on the attribute information of the initial template page; and the fill bits in the target template page are located in the first adjustment area.

4. The method according to claim 2, wherein: The first layout information also includes: pictures in the initial template page.

5. The method according to claim 1, wherein The category of the target template page is content page; Filling the fill-in position in the target template page with the content corresponding to the third category in the text data to which the fill-in position in the target template page belongs, to obtain a presentation, includes: generating a plurality of content template pages based on the second layout information of the initial template page; selecting the target template page from the plurality of content template pages based on the text data; Filling the content corresponding to the third category in the text data into the filling position in the target template page to obtain the content page of the presentation; The second layout information includes: the fill position and category of the initial template page.

6. The method according to claim 5, wherein: The second layout information further includes: a second adjustment area determined based on the attribute information of the initial template page; and the fill bits in the target template page are located in the second adjustment area.

7. The method according to claim 5, in, The determining, based on the first category, to which the filler bits in the initial template page belong, includes: in response to the first category being a content page, determining the second category based on attribute information of the initial template page; The method further includes: determining, based on the second category, a content group where the fill bit in the initial template page is located; The generating of the plurality of content template pages based on the second layout information of the initial template page includes: generating the plurality of content template pages based on the second layout information of the initial template page and a preset quantity threshold; Wherein, the second category includes subtitle filling bits and content filling bits, or the second category includes the content filling bits; the content group includes the content filling bits, or the content group includes the content filling bits and the subtitle filling bits; the quantity threshold is the number of content groups in the target template page, and is equal to the number of content lists filled in the content page of the presentation.

8. The method according to claim 7, in, The generating of multiple content template pages based on the second layout information of the initial template page and a preset quantity threshold comprises: Inputting the second layout information and the quantity threshold into a trained second language model to obtain the multiple content template pages; The second language model is obtained by training an initial content template page and an extended content template page, and the extended content template page is obtained by performing data enhancement on the initial content template page based on an interpolation function.

9. The method of claim 5, wherein: The second layout information also includes: pictures in the initial template page.

10. The method according to claim 5, in, The selecting the target template page from the plurality of content template pages based on the text data includes: Determining the number of text lines that can be filled in the fill position in the content template page based on the attribute information of the content template page; Calculating a fill rate of fill bits in the content template page based on the number of fillable text rows and the content in the text data corresponding to the target template page; The target template page is selected from the plurality of content template pages based on the fill rate and based on the text data.

11. The method according to claim 5, in, The selecting the target template page from the plurality of content template pages based on the text data includes: determining the number of content groups in the content template page and the number of content lists corresponding to the target template page in the text data; selecting the target template page from the plurality of content template pages based on the text data; The number of content groups in the target content template page is the same as the number of content lists.

12. The method according to claim 5, in, The selecting the target template page from the plurality of content template pages based on the text data includes: Determining a template repetition distance of the content template page; Selecting a preset number of target template pages from the plurality of content template pages in descending order of template repetition distances of the content template pages; The template repetition distance is used to represent the difference in the number of pages between the content page currently to be generated in the presentation and the content page previously generated with the same content template page.

13. The method of claim 1, in, The determining, based on the attribute information of the initial template page, the first category to which the initial template page belongs includes: Based on the attribute information of the initial template page and the trained multiple classification models, obtaining classification results of the various classification models; Selecting the first category from a plurality of the classification results by voting; The attribute information includes: attribute information of page elements and page layout information.

14. The method of claim 13, wherein: The multiple classification models include: at least two of a random forest model, a support vector machine, a third language model, and a combination of a Transformer-based bidirectional encoder BERT model and a classifier; The classification model is obtained by training the attribute information of the sample template page and the category of the sample template page.

15. The method according to claim 1, in, The determining, based on the first category, a second category to which the fill bits in the initial template page belong includes: In response to the first category being a catalog page, clustering the fill bits in the initial template page based on the attribute information of the initial template page; The second category is determined based on the clustering result.

16. The method of claim 1, in, The determining, based on the first category, a second category to which the fill bits in the initial template page belong includes: In response to the first category being a home page, a chapter page, or a last page, extracting features of fill bits in the initial template page from attribute information of the initial template page; The second category is determined based on characteristics of the fill bits in the initial template page.

17. A presentation document generating device, comprising: An acquisition module configured to acquire a presentation template and text data to be filled; a determination module configured to determine, based on attribute information of an initial template page in the presentation template, fill bits in the initial template page, determine a first category to which the initial template page belongs based on the attribute information of the initial template page, and determine, based on the first category, a second category to which the fill bits in the initial template page belong; A filling module is configured to fill the filling bits in the target template page with content corresponding to a third category in the text data and to which the filling bits in the target template page belong, to obtain a presentation, comprising: in response to the category of the target template page being a directory page, inputting the content corresponding to the third category in the text data and first typesetting information into a trained first large language model to obtain a directory page of the presentation, wherein the first large language model is trained by an initial directory template page and an extended directory template page, and a process of obtaining the extended directory template page based on the initial directory template page comprises: normalizing the directory elements in the initial directory template page according to a classification result of the initial directory template page, in response to determining that the directory page needs to be split according to the directory area and directory item size, determining the directory element position according to the calculated directory splitting information, and obtaining the extended directory template page based on an interpolation function and the directory element position; the filling bits in the target template page are generated based on the filling bits in the initial template page, and the second category is the same as the third category, and the number and / or position of the filling bits in the target template page and the initial template page are different.

18. The apparatus of claim 17, wherein: The filling bits in the catalog page of the presentation are filled with text data corresponding to their categories, and the first typesetting information includes: the filling bits of the initial template page and their categories.

19. The apparatus of claim 18, wherein: The first layout information further includes: a first adjustment area determined based on the attribute information of the initial template page; and the fill bits in the target template page are located in the first adjustment area.

20. The apparatus of claim 18, wherein The first layout information also includes: pictures in the initial template page.

21. The apparatus of claim 17, wherein: The category of the target template page is content page; The filling module is configured to generate a plurality of content template pages based on the second layout information of the initial template page; Based on the text data, the target template page is selected from the plurality of content template pages; content corresponding to the third category in the text data is filled into a fill position in the target template page to obtain a content page of the presentation; The second layout information includes: the fill position and category of the initial template page.

22. The apparatus of claim 21, wherein: The second layout information further includes: a second adjustment area determined based on the attribute information of the initial template page; and the fill bits in the target template page are located in the second adjustment area.

23. The device according to claim 21, in, The determining module is configured to determine the second category based on the attribute information of the initial template page in response to the first category being a content page; Based on the second category, determining a content group where the fill bit in the initial template page is located; The filling module is configured to generate a plurality of content template pages based on the second layout information of the initial template page and a preset quantity threshold; Wherein, the second category includes subtitle filling bits and content filling bits, or the second category includes the content filling bits; the content group includes the content filling bits, or the content group includes the content filling bits and the subtitle filling bits; the quantity threshold is the number of content groups in the target template page, and is equal to the number of content lists filled in the content page of the presentation.

24. The device according to claim 23, in, The filling module is configured to input the second typesetting information and the quantity threshold into a trained second language model to obtain the plurality of content template pages; The second language model is obtained by training an initial content template page and an extended content template page, and the extended content template page is obtained by performing data enhancement on the initial content template page based on an interpolation function.

25. The apparatus of claim 23, wherein: The second layout information also includes: pictures in the initial template page.

26. The device according to claim 23, in, The filling module is configured to determine the number of text lines that can be filled in the filling position in the content template page based on the attribute information of the content template page; calculate the filling rate of the filling position in the content template page based on the number of fillable text lines and the content corresponding to the target template page in the text data; and select the target template page from the multiple content template pages based on the filling rate and the text data.

27. The device according to claim 23, in, The filling module is configured to determine the number of content groups in the content template page and the number of content lists corresponding to the target template page in the text data; selecting the target template page from the plurality of content template pages based on the text data; The number of content groups in the target content template page is the same as the number of content lists.

28. The device according to claim 23, in, The filling module is configured to determine the template repetition distance of the content template page; select a preset number of target template pages from the multiple content template pages in descending order of the template repetition distance of the content template page; wherein the template repetition distance is used to represent the difference in the number of pages between the content page to be currently generated in the presentation and the content page with the same content template page generated previously.

29. The device according to claim 17, in, The determination module is configured to obtain classification results of various classification models based on the attribute information of the initial template page and multiple trained classification models; Selecting the first category from a plurality of the classification results by voting; The attribute information includes: attribute information of page elements and page layout information.

30. The apparatus of claim 29, wherein: The multiple classification models include: at least two of a random forest model, a support vector machine, a third language model, and a combination of a BERT model and a classifier; The classification model is obtained by training the attribute information of the sample template page and the category of the sample template page.

31. The device of claim 17, in, The determining module is configured to cluster the fill bits in the initial template page based on the attribute information of the initial template page in response to the first category being a catalog page; The second category is determined based on the clustering result.

32. The device of claim 17, in, The determining module is configured to extract features of fill bits in the initial template page from the attribute information of the initial template page in response to the first category being the home page, chapter page, or last page; The second category is determined based on characteristics of the fill bits in the initial template page.

33. 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 presentation generation method according to any one of claims 1 to 16.

34. A non-transitory computer-readable storage medium storing computer instructions, wherein the computer instructions are used to cause the computer to execute the presentation generation method according to any one of claims 1 to 16.

35. A computer program product, comprising a computer program, wherein when the computer program is executed by a processor, the computer program implements the steps of the presentation generation method according to any one of claims 1 to 16.