Demonstration file generation method and device, storage medium and electronic equipment

By performing structured description and layout recognition on web pages, presentation files are generated, solving the problems of low efficiency and incorrect formatting when converting HTML web pages into PowerPoint files, and achieving efficient and accurate conversion.

CN121835644APending Publication Date: 2026-04-10BEIJING QIHOOD TECHNOLOGY CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
BEIJING QIHOOD TECHNOLOGY CO LTD
Filing Date
2026-02-03
Publication Date
2026-04-10

AI Technical Summary

Technical Problem

In existing technologies, converting HTML web pages into PowerPoint files is inefficient and prone to formatting errors and information omissions.

Method used

The large model generated from the presentation file is used to parse the page data of the target webpage, generate a page structure description model and page content layout information, and determine the layout of the presentation file based on this information and generate the target presentation file.

Benefits of technology

It improves the efficiency of converting web pages into presentation files, ensures accurate formatting, and reduces the time and errors of manual operation.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121835644A_ABST
    Figure CN121835644A_ABST
Patent Text Reader

Abstract

The embodiment of the invention discloses a presentation file generation method and device, a storage medium and electronic equipment, and the method comprises the steps: obtaining a presentation file conversion instruction for a target webpage, then based on the demonstration file conversion instruction, through a demonstration file generation large model, page data analysis processing is carried out on a target webpage to obtain a page structured description model, and page content layout identification processing is carried out on the target webpage to obtain page content layout layout information; determining demonstration file layout information based on the page content layout information, the page structured description model and the target webpage through a demonstration file generation large model, and performing demonstration file generation processing based on the demonstration file layout information and the page structured description model to obtain a target demonstration file, therefore, the target webpage can be accurately converted into the target demonstration file through the demonstration file generation large model, and the conversion efficiency of converting the webpage into the demonstration file is improved.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of computer, and particularly relates to a presentation file generation method and device, a storage medium and an electronic device. BACKGROUND

[0002] With the rapid development of artificial intelligence technology, information acquisition and processing have become more efficient and convenient. Especially in the network environment, a large amount of information exists in the form of HTML, such as HTML format web pages. Users often need to organize HTML format web pages into presentation documents in daily work and study in order to share and display.

[0003] However, in the related art, manual copying and pasting of HTML content into PowerPoint or other presentation software is often relied on, which not only consumes a lot of time, but also easily causes format disorder, information omission and other problems. Therefore, how to improve the conversion efficiency of converting HTML content into a PowerPoint file is a technical problem to be solved. SUMMARY

[0004] The embodiments of the present application provide a presentation file generation method and device, a computer storage medium and an electronic device. The technical solution is as follows: In a first aspect, the embodiments of the present application provide a presentation file generation method, which comprises: Obtaining a presentation file conversion instruction for a target web page, performing page data analysis processing on the target web page based on the presentation file conversion instruction through a presentation file generation large model to obtain a page structured description model, and performing page content format identification processing on the target web page to obtain page content format layout information; Determining presentation file layout information based on the page content format layout information, the page structured description model and the target web page through the presentation file generation large model, and performing presentation file generation processing based on the presentation file layout information and the page structured description model to obtain a target presentation file.

[0005] In some possible implementation manners, the page structured description model obtained by performing page data analysis processing on the target web page based on the presentation file conversion instruction through the presentation file generation large model comprises: Obtaining the website information of the target web page based on the presentation file conversion instruction, and performing web page rendering processing based on the website information through the presentation file generation large model to obtain a page tree structure model; Performing node structure analysis processing on the page tree structure model to obtain page tree node structure information, and performing node identification processing based on the page tree node structure information to obtain a page structured description model.

[0006] In some possible implementation manners, the node recognition processing based on the page tree node structure information comprises: determining node identity information, node geometry information, visual style information of each page tree node, and resource link information, hierarchical relationship information and filling content information corresponding to each page tree node based on the page tree node structure information; generating a node serialization object corresponding to each page tree node based on the node identity information, the node geometry information, the visual style information of each page tree node, and the resource link information, the hierarchical relationship information and the filling content information corresponding to each page tree node; generating a page structured description model based on each node serialization object.

[0007] In some possible implementation manners, the node structure analysis processing on the page tree structure model comprises: obtaining a node type filtering condition, and determining a reference node type based on the node type filtering condition; for each page tree node in the page tree structure model, if the node type of the page tree node does not match the reference node type, determining page tree node structure information based on the page tree structure model.

[0008] In some possible implementation manners, the page content format identification processing on the target web page comprises: determining a page content title density, a page content list depth, a page chart appearance frequency and a page sentence average length of the target web page; generating page content format layout information based on the page content title density, the page content list depth, the page chart appearance frequency and the page sentence average length.

[0009] In some possible implementation manners, the determination of the presentation file layout information by the presentation file large model based on the page content format layout information, the page structured description model and the target web page comprises: extracting web page text content based on the target web page by the presentation file large model, determining a page keyword bag and a page sample sentence based on the web page text content, and determining an image visual semantic label based on the target web page; determining a page presentation diagram based on the page content format layout information, the page keyword bag, the page sample sentence and the image visual semantic label; Based on the page rendering diagram, the presentation file architecture is matched to obtain the presentation file layout architecture. Based on the presentation file layout architecture, the page structure description model, and the target webpage, the presentation file layout information is determined.

[0010] In some possible implementations, determining the presentation file layout information based on the presentation file layout architecture, the page structure description model, and the target webpage includes: Based on the page structured description model, a vertical flow coordinate system corresponding to the target webpage is constructed, and the semantic continuity inertia score between content blocks is determined based on the vertical flow coordinate system and the page structured description model. Based on the preset single-page presentation capacity corresponding to the presentation file layout architecture, multiple candidate page break points are determined in the vertical flow coordinate system. The information entropy loss value at each of the candidate pagination cutting points is determined, and the information entropy loss value is negatively correlated with the semantic continuity inertia score of the content blocks upstream and downstream of the candidate pagination cutting point; The target pagination position is determined based on the candidate pagination cut points with the minimum information entropy loss value, and the layout information of the demo file containing multiple pages is generated based on the target pagination position.

[0011] Secondly, embodiments of this application provide a demonstration file generation apparatus, the apparatus comprising: The webpage content parsing module is used to obtain the presentation file conversion instructions for the target webpage, generate a large model from the presentation file based on the presentation file conversion instructions, perform page data parsing processing on the target webpage to obtain the page structured description model, and perform page content layout recognition processing on the target webpage to obtain page content layout information. The presentation file generation module is used to determine the presentation file layout information based on the page content layout information, the page structured description model, and the target webpage using the presentation file generation model, and to perform presentation file generation processing based on the presentation file layout information and the page structured description model to obtain the target presentation file.

[0012] Thirdly, embodiments of this application provide a computer storage medium having multiple instructions adapted for loading and executing the methods described above by a processor.

[0013] Fourthly, embodiments of this application provide an electronic device, which may include: a memory and a processor; wherein the memory stores a computer program adapted to be loaded by the memory and to execute the above-described method.

[0014] The beneficial effects of the technical solutions provided in this application include at least the following: The presentation file generation method provided in this application obtains a presentation file conversion instruction for a target webpage, and then, based on the presentation file conversion instruction, performs page data parsing processing on the target webpage using a large presentation file generation model to obtain a page structured description model, and performs page content layout recognition processing on the target webpage to obtain page content layout information. Thus, firstly, the large presentation file generation model automatically parses webpage data and webpage content layout to obtain an accurate page structured description model and page content layout information. Then, based on the page content layout information, page structured description model, and target webpage, the large presentation file generation model determines the presentation file layout information, and performs presentation file generation processing based on the presentation file layout information and page structured description model to obtain the target presentation file. Therefore, the large presentation file generation model can accurately convert the target webpage into the target presentation file, and improves the conversion efficiency of webpage to presentation file. Attached Figure Description

[0015] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0016] Figure 1 This is a schematic diagram of a demonstration file generation system provided in an embodiment of this application; Figure 2 This is a flowchart illustrating a method for generating a demonstration file provided in an embodiment of this application; Figure 3 This is a flowchart illustrating another method for generating demonstration files provided in this application embodiment; Figure 4 This is a schematic diagram of the structure of a demonstration document generation device provided in an embodiment of this application; Figure 5 This is a schematic diagram of the structure of a demonstration file generation module provided in an embodiment of this application; Figure 6 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application. Detailed Implementation

[0017] To make the inventive objectives, features, and advantages of the embodiments of this application more apparent and understandable, the technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.

[0018] In the description of this application, it should be understood that the terms "first," "second," etc., are used for descriptive purposes only and should not be construed as indicating or implying relative importance. In the description of this application, it should be noted that, unless otherwise expressly specified and limited, "comprising" and "having," and any variations thereof, are intended to cover non-exclusive inclusion. For example, a process, method, system, product, or device that includes a series of steps or units is not limited to the listed steps or units, but may optionally include steps or units not listed, or may optionally include other steps or units inherent to these processes, methods, products, or devices. Those skilled in the art can understand the specific meaning of the above terms in this application based on the specific circumstances. Furthermore, in the description of this application, unless otherwise stated, "multiple" means two or more. "And / or" describes the relationship between related objects, indicating that three relationships can exist; for example, A and / or B can represent: A alone, A and B simultaneously, or B alone. The character " / " generally indicates that the preceding and following related objects are in an "or" relationship.

[0019] The present application will now be described in detail with reference to specific embodiments.

[0020] like Figure 1 The image shown is a schematic diagram of a demonstration file generation system provided in an embodiment of this application. Figure 1 As shown, the demonstration file generation system may include at least a client cluster and a service platform 100.

[0021] In some embodiments, the client cluster may include at least one client, such as Figure 1 As shown, it specifically includes client 1 corresponding to user 1, client 2 corresponding to user 2, ..., client n corresponding to user n, where n is an integer greater than 0.

[0022] Each client in a client cluster can be an electronic device with communication capabilities, including but not limited to: wearable devices, handheld devices, personal computers, tablets, in-vehicle devices, smartphones, computing devices, or other processing devices connected to a wireless modem. Electronic devices may have different names in different networks, such as: user equipment, access terminal, user unit, user station, mobile station, mobile station, remote station, remote terminal, mobile device, user terminal, terminal, wireless communication equipment, user agent or user device, cellular phone, cordless phone, personal digital assistant (PDA), and electronic devices in 5G networks or future evolved networks.

[0023] The service platform 100 can be a standalone server device, such as a rack-mounted, blade, tower, or cabinet-type server device, or a workstation, mainframe, or other hardware device with strong computing power; or it can be a server cluster composed of multiple servers. The servers in the service cluster can be composed in a symmetrical manner, wherein each server is functionally and hierarchically equivalent in the transaction chain, and each server can provide services to the outside world independently. The independent provision of services can be understood as not requiring the assistance of other servers.

[0024] In one or more embodiments of this application, the service platform 100 can establish a communication connection with at least one client in the client cluster, and complete data interaction during the file upload process based on the communication connection. For example, the client has a browser application installed. When the user opens the target webpage in the browser application, and the user inputs a presentation file conversion operation for the target webpage, the client generates a presentation file conversion instruction for the target webpage. In this scenario, the presentation file generation system specifically executes the following method: obtaining the presentation file conversion instruction for the target webpage; based on the presentation file conversion instruction, performing page data parsing processing on the target webpage through a large presentation file generation model to obtain a page structured description model; performing page content layout recognition processing on the target webpage to obtain page content layout information; determining the presentation file layout information based on the page content layout information, the page structured description model, and the target webpage through the large presentation file generation model; and performing presentation file generation processing based on the presentation file layout information and the page structured description model to obtain the target presentation file.

[0025] It should be noted that the service platform 100 establishes a communication connection with at least one client in the client cluster via a network for interactive communication. This network can be a wireless network or a wired network. Wireless networks include, but are not limited to, cellular networks, wireless LANs, infrared networks, or Bluetooth networks. Wired networks include, but are not limited to, Ethernet, universal serial bus (USB), or controller area networks. In one or more embodiments of the specification, technologies and / or formats including Hyper Text Markup Language (HTML), Extensible Markup Language (XML), etc., are used to represent data exchanged over the network (such as target compressed packets). Furthermore, conventional encryption technologies such as Secure Socket Layer (SSL), Transport Layer Security (TLS), Virtual Private Network (VPN), and Internet Protocol Security (IPsec) can be used to encrypt all or some links. In other embodiments, customized and / or dedicated data communication technologies can be used to replace or supplement the aforementioned data communication technologies.

[0026] The demonstration file generation system embodiments provided in this specification and the demonstration file generation methods described in one or more embodiments belong to the same concept. The execution entity corresponding to the demonstration file generation methods involved in one or more embodiments of this specification can be an electronic device, which can be the aforementioned client or the aforementioned service platform. The specific implementation process of the demonstration file generation system embodiments can be found in the following method embodiments, and will not be repeated here.

[0027] In one embodiment, such as Figure 2 As shown, a method for generating presentation files is proposed. This method can be implemented using a computer program and can run on a presentation file generation device based on the von Neumann architecture. This computer program can be integrated into applications or run as a standalone utility application.

[0028] Specifically, the method for generating this demo file includes: S201, obtain the presentation file conversion instruction for the target webpage, generate a large model from the presentation file based on the presentation file conversion instruction, perform page data parsing processing on the target webpage to obtain the page structure description model, and perform page content layout recognition processing on the target webpage to obtain page content layout information.

[0029] The target webpage is a webpage created using Hyper Text Markup Language (HTML) as its core technology.

[0030] The presentation file conversion instruction is a user-input instruction in the browser to convert the webpage content of the target webpage into presentation content to generate a presentation file, which is called a PowerPoint file.

[0031] Specifically, browsers can be configured with a presentation file conversion control. Users can use this control to input conversion instructions for the target webpage, causing the browser to generate conversion commands. It's understood that these conversion instructions can be for converting one target webpage into a single presentation file, or for converting multiple target webpages into a single presentation file.

[0032] The large model for generating presentation files can be obtained by pre-training a multimodal large model. This model has the function of converting HTML web pages into presentation files.

[0033] The Page Structured Description Model (PSM) is a structured data model that represents the visual, semantic, and hierarchical information of nodes in a rendered webpage. Its purpose is to store the nodes of a rendered webpage in the browser as serialized objects so that downstream tools can directly reconstruct the page's nodes when converting it into a presentation file. The PSM is not a generalized model that is trained before inference, nor is it a mathematical statistical model based on mathematical formulas. It has no trainable parameters, no inference process, and no probability output.

[0034] Specifically, after obtaining the presentation file conversion instruction, the URL information of the target webpage and the presentation file conversion prompt are input into the presentation file generation model. The presentation file generation model performs page data parsing processing on the target webpage to obtain the page structure description model, and performs page content layout recognition processing on the target webpage to obtain the page content layout information.

[0035] Optionally, the following example illustrates the model training process for generating a large model from a demo file: Model creation: Obtain a multimodal large language model, create an initial demo file generation scenario plugin model for the demo file generation scenario, and assemble an initial demo file generation large model based on the multimodal large language model and the initial demo file generation scenario plugin model; the multimodal large language model may include, but is not limited to, DeepSeek large models, GPT series large models, etc.

[0036] Sample data acquisition: Acquire sample data for the demonstration generation scenario, including sample web pages.

[0037] Sample data annotation: Based on the presentation file generation scenario, the sample data is annotated with the corresponding page structure description model tags, page content layout information tags, presentation text layout information tags, and target presentation file tags.

[0038] Model training process: Input sample data into the initial demo file to generate a large model for at least one round of model training. During the forward training process: The initial demo file is used to generate a large model to process the sample webpages and perform page data parsing to obtain a predicted page structure description model. The sample webpages are also processed to identify page content layout information. Based on the predicted page content layout information, the predicted page structure description model, and the sample webpages, the initial demo file is used to generate a large model to determine the layout information of the predicted demo file. Based on the layout information of the predicted demo file and the predicted page structure description model, the demo file is generated to obtain the predicted demo file. During the reverse training of the model, a first loss value is determined based on the predicted page structure description model and the page structure description model label; a second loss value is determined based on the predicted page content layout information and the page content layout information label; a third loss value is determined based on the predicted presentation file layout information and the presentation text layout information label; a fourth loss value is determined based on the predicted presentation file and the target presentation file label; and a model loss value is determined based on the first, second, third, and fourth loss values. Based on this model loss value, the model parameters are adjusted in the initial presentation file generation model to obtain the trained presentation file generation model.

[0039] As an illustration, the initial demo file generates a scene plugin model that can be created based on a machine learning model.

[0040] Optionally, the model's training termination conditions may include, for example, the loss function value being less than or equal to a preset loss function threshold, or the number of iterations reaching a preset threshold. Specific training termination conditions can be determined based on actual circumstances and are not specifically limited here.

[0041] It should be noted that the machine learning models involved in one or more embodiments of this specification include, but are not limited to, fitting of one or more of the following machine learning models: Convolutional Neural Network (CNN) model, Deep Neural Network (DNN) model, Recurrent Neural Networks (RNN) model, embedding model, Gradient Boosting Decision Tree (GBDT) model, Logistic Regression (LR) model, etc.

[0042] S202: Based on the page content layout information, the page structured description model, and the target webpage, a large model is generated from the presentation file to determine the layout information of the presentation file. Based on the layout information of the presentation file and the page structured description model, the presentation file generation process is performed to obtain the target presentation file.

[0043] Specifically, the process of generating a large model from a demo file first involves inferring a page rendering diagram based on the layout information of the page content. Then, the demo file layout architecture is matched with the page rendering diagram. Next, the demo file layout information is determined based on the demo file layout architecture, the page structured description model, and the target webpage. Finally, a demo page is created based on the demo file layout information. The demo content is then filled into the demo page according to the page structured description model to obtain the target demo page. The target demo file is then generated based on the target demo page.

[0044] The presentation file generation method provided in this application embodiment obtains a presentation file conversion instruction for a target webpage. Then, based on the presentation file conversion instruction, it performs page data parsing processing on the target webpage using a large presentation file generation model to obtain a page structured description model. It then performs page content layout recognition processing on the target webpage to obtain page content layout information. Thus, firstly, the large presentation file generation model automatically parses webpage data and webpage content layout to obtain accurate page structured description models and page content layout information. Then, based on the page content layout information, page structured description model, and target webpage, the large presentation file generation model determines the presentation file layout information. Finally, it performs presentation file generation processing based on the presentation file layout information and page structured description model to obtain the target presentation file. Therefore, the large presentation file generation model can accurately convert the target webpage into a target presentation file, improving the conversion efficiency of webpages into presentation files.

[0045] Please see Figure 3This is a flowchart illustrating another embodiment of a demonstration file generation method proposed in this application.

[0046] Specifically, the method for generating this demo file includes: S301, Obtain the conversion instructions for the demo file of the target webpage.

[0047] For details on how step S301 is implemented, please refer to [link / reference]. Figure 2 The descriptions of the relevant steps in the illustrated embodiments will not be repeated here.

[0048] S302: Obtain the URL information of the target webpage based on the presentation file conversion instruction, generate a large model through the presentation file, and perform webpage rendering processing based on the URL information to obtain the page tree structure model.

[0049] The page tree structure model is a tree-like object that the browser builds in memory for HTML documents; it is also known as the DOM tree.

[0050] In one embodiment, a large model is generated from a demonstration file, and a headless browser is invoked to render the webpage based on the URL information to obtain a page tree structure model. The original HTML file of the target webpage may not contain any reliable visual attributes. The headless browser renders the webpage to obtain the page tree structure model, and saves the rendering result in a rendering tree. The page tree structure model can include node types and hierarchical relationships between nodes, while the visual attributes of the nodes are stored in the rendering tree. The visual display information of the nodes, such as geometric information, appearance information, etc., can be queried through the rendering tree.

[0051] S303, perform node structure parsing on the page tree structure model to obtain page tree node structure information, and perform node recognition processing based on the page tree node structure information to obtain the page structured description model.

[0052] Specifically, this can involve generating a large model from a demo file, parsing the node structure of the page tree structure model to obtain the page tree node structure information, and then performing node recognition processing based on the page tree node structure information to obtain a page structured description model.

[0053] In one embodiment, the step of performing node structure parsing processing on the page tree structure model to obtain page tree node structure information may specifically include: obtaining node type filtering conditions, determining reference node types based on node type filtering conditions, and for each page tree node in the page tree structure model, if the node type of the page tree node does not match the reference node type, then determining page tree node structure information based on the page tree structure model.

[0054] The node type filtering condition is used to store reference node types that do not contribute any pixels to the visible page, thus avoiding traversing nodes of this type and preventing noise and performance waste caused by traversing nodes of this type.

[0055] Each page tree node in the page tree structure model is traversed one by one. For each page tree node, its node type is obtained from the page tree structure model. If the node type does not match the reference node type, it indicates that the page tree node is a node that contributes pixels to the visible page. Then, reference page tree nodes with parent-child relationships with this page tree node are extracted from the page tree structure model. Based on the page tree node, the reference page tree node, and the node type of the page tree node, page tree node structure information is generated. It can be understood that the reference page tree node can include both the parent node and the child node of the page tree node.

[0056] Understandably, when the node type of a page tree node matches the reference node type, the page tree node is skipped, and the next page tree node is used as the page tree node. It is then determined whether the node type of the page tree node matches the reference node type. If the node type of the page tree node does not match the reference node type, the page tree node structure information is determined based on the page tree structure model.

[0057] In one embodiment, performing node identification processing based on the page's tree-like node structure information to obtain a page structured description model may specifically include the following steps A1-A3: A1: Based on the page tree node structure information, determine the node identity information, node geometric information, visual style information, resource link information, hierarchical relationship information, and fill content information of each page tree node; A2: Based on the node identity information, node geometric information, visual style information, resource link information, hierarchical relationship information, and fill content information of the tree nodes of each page, generate the node serialization object corresponding to the tree nodes of each page. A3: Generate a page structured description model based on the serialized objects of each node.

[0058] Understandably, node identity information can characterize the node type. Node geometric information includes the node's pixel position and size on the page. Visual style information includes color fill information, text layout information, border and rounded corner information, shadow and transparency information, and deformation information. Resource link information refers to the visible resource or link information carried by nodes that can carry external resources or respond to clicks. Hierarchical relationship information refers to the node's hierarchy within the tree structure. Fill content information can be the content filled in the node; such nodes are generally text nodes.

[0059] In step A1, the node type of the page tree node and the reference page tree node with a parent-child relationship with the page tree node can be obtained from the page tree node structure information. Through the node type and the reference page tree node, the node identity information, node geometry information, visual style information, resource link information, hierarchical relationship information and filling content information corresponding to each page tree node can be obtained from the rendering tree.

[0060] After executing step A1, the process further includes: if the node type is an element node type, then determine that the page tree node is an element node, query whether there is a first type of pseudo-element before the content inside the element node, and query whether there is a second type of pseudo-element after the content inside the element node. If there are first type and / or second type pseudo-elements, then obtain the pseudo-element identity information, pseudo-element geometric information, pseudo-element visual style information, pseudo-element resource link information, and pseudo-element fill content information of the first type of pseudo-element from the rendering tree, and / or obtain the pseudo-element identity information, pseudo-element geometric information, pseudo-element visual style information, pseudo-element resource link information, and pseudo-element fill content information of the second type of pseudo-element from the rendering tree.

[0061] Understandably, pseudo-element identity information can characterize the pseudo-element type, which includes a first type and a second type. First-type pseudo-elements are located before the content within the element node, while second-type pseudo-elements are located after the content. Pseudo-element geometric information includes the pseudo-element's pixel position and size. Pseudo-element visual style information includes color fill information, text layout information, border and rounded corner information, shadow and transparency information, and deformation information. Pseudo-element resource link information can be the image resource link carried by the pseudo-element. Micro-element fill content information can be the content filled within the micro-element.

[0062] In step A2, the node identity information, node geometry information, visual style information, resource link information, hierarchical relationship information, and fill content information of each page tree node are assembled according to the preset data structure to obtain the node serialization object corresponding to each page tree node.

[0063] After executing step A2, the method further includes: if the page tree node is an element node, and there are pseudo-elements of the first type and / or the second type corresponding to the element node, then according to the preset data structure, the pseudo-element identity information, pseudo-element geometric information, pseudo-element visual style information, pseudo-element resource link information, and pseudo-element fill content information of the first type of pseudo-element are assembled to obtain the first pseudo-element serialization object corresponding to the first type of pseudo-element, and / or, according to the preset data structure, the pseudo-element identity information, pseudo-element geometric information, pseudo-element visual style information, pseudo-element resource link information, and pseudo-element fill content information of the second type of pseudo-element are assembled to obtain the second pseudo-element serialization object corresponding to the second type of pseudo-element.

[0064] In step A3, a page structure description model is generated, including serialized objects of each node, serialized objects of the first pseudo-element, and serialized objects of the second pseudo-element.

[0065] S304, determine the target webpage's page content title density, page content list depth, page chart frequency, and average sentence length.

[0066] Here, page title density represents the number of heading-level elements appearing per thousand words of body text on a webpage. Page content list depth represents the maximum number of nested lists on a webpage. Page chart frequency represents the number of charts and tables appearing per thousand words of body text on a webpage. Average sentence length represents the average number of words per sentence on a webpage.

[0067] Specifically, a large model is generated using the demo file to determine the target webpage's page content title density, page content list depth, page chart frequency, and average sentence length.

[0068] Understandably, page heading density can be used to measure the fragmentation of page information. High heading density indicates the content is broken down into many subheadings, suggesting a higher probability of a lecture or tutorial structure. Conversely, low heading density suggests a higher probability of a lengthy, narrative text. Page content list depth can be used to infer whether the content is suitable for a tiered, animated presentation. High frequency of charts and graphs suggests considering retaining higher-resolution output charts and / or tables when converting to a presentation file.

[0069] S305 generates page content layout information based on page content title density, page content list depth, page chart frequency, and average sentence length.

[0070] Specifically, the large model generated from the demo file generates page content layout information including page content title density, page content list depth, page chart frequency, and average sentence length.

[0071] S306: Extract webpage text content based on the target webpage using the large model of the demonstration file, determine the page keyword bag and page sampling sentences based on the webpage text content, and determine image visual semantic tags based on the target webpage.

[0072] The page keyword bag includes high-frequency words extracted from the webpage text content. The page sampled sentence includes at least one sentence extracted from the webpage text content that best summarizes the entire text.

[0073] Image visual semantic tags include the semantic tags of all images appearing on the target webpage. The semantic tags of images can be obtained through image content mapping.

[0074] Specifically, the keyword bag for the page, the sampled sentences for the page, and the visual semantic tags for the images can all be obtained by generating a large model from the demo file.

[0075] S307, determine the page rendering diagram based on page content layout information, page keyword bags, page sample sentences, and image visual semantic tags.

[0076] Among them, the page rendering diagram can be understood as the rendering of the webpage belonging to the most probable rendering scenario category from a variety of preset rendering scenario categories when converting a webpage into a rendering file.

[0077] Specifically, a large model is generated from the demo file, which is based on page content layout information, page keyword bags, page sample sentences, and image visual semantic tags to perform inference processing to obtain the page rendering diagram.

[0078] S308, based on the page rendering diagram, perform presentation file architecture matching to obtain the presentation file layout architecture, and determine the presentation file layout information based on the presentation file layout architecture, the page structure description model, and the target webpage.

[0079] The presentation file layout structure can be understood as the skeleton directory of the presentation file. This structure can include master page types, the reading order and frequency of each type of master page, fixed information areas within each master page, page transition styles between master pages, and master page color schemes and font hierarchies. Master page types can include cover pages, table of contents pages, content pages, end pages, Q&A pages, etc. Fixed information areas within each master page can include title areas, chart areas, notes areas, and page number areas.

[0080] Specifically, a large model is generated from the presentation file to determine the presentation file layout architecture corresponding to the page presentation diagram from the presentation architecture mapping relationship. The presentation architecture mapping relationship can store at least one reference page presentation diagram and the corresponding reference presentation file layout architecture for each reference page presentation diagram. The reference page presentation diagram can be understood as a preset presentation scenario category divided in the scenario of converting a webpage into a presentation file, such as a teaching presentation category, a sales presentation category, a report presentation category, etc.

[0081] Specifically, a large model is generated from the presentation file, which determines the presentation file layout information based on the presentation file layout architecture, the page structure description model, and the target webpage.

[0082] In one embodiment, determining the presentation file layout information based on the presentation file layout architecture, the page structure description model, and the target webpage may specifically include the following steps B1-B4: B1: Construct a vertical flow coordinate system corresponding to the target webpage based on the page structured description model, and determine the semantic continuity inertia score between content blocks based on the vertical flow coordinate system and the page structured description model; B2: Based on the preset single-page presentation capacity corresponding to the presentation file layout architecture, determine multiple candidate page break points in the vertical flow coordinate system; B3: Determine the information entropy loss value at each candidate pagination cut point. The information entropy loss value is negatively correlated with the semantic continuity inertia score of the upstream and downstream content blocks of the candidate pagination cut point. B4: Determine the target pagination position based on the candidate pagination cut points with the minimum information entropy loss value, and generate the layout information of the demo file containing multiple pages based on the target pagination position.

[0083] The vertical flow coordinate system is a virtual coordinate system with the top edge of the target webpage's first screen as the origin and the vertical scrolling direction of the page as the positive direction (Y-axis). In this vertical flow coordinate system, the tree nodes of the webpage are no longer treated as rectangles in a two-dimensional plane, but are projected as linear intervals on the Y-axis with start and end coordinates. Using the vertical flow coordinate system can eliminate the interference of horizontal webpage layouts (such as left and right columns) on pagination logic, straightening out complex webpage layouts into a single-dimensional content flow.

[0084] A content block is the smallest processing unit with independent semantics, obtained by filtering, projecting, sorting, and merging nodes indicated by the node serialization object in the page structured description model.

[0085] The semantic continuity inertia score is a quantitative value used to characterize the closeness of two adjacent content blocks in terms of logical expression, visual style, or contextual relationship in a vertical flow coordinate system. In the embodiments of this application, the semantic continuity inertia score can be normalized to the interval [0, 1]. The closer the semantic continuity inertia score is to 1, the closer the relationship between the two adjacent content blocks is, and the less they should be physically separated; the closer the semantic continuity inertia score is to 0, the more distant the relationship between the two adjacent content blocks is, and the adjacent boundary of these two adjacent content blocks is suitable as a pagination position.

[0086] The default single-page presentation size is the maximum pixel height and maximum pixel width that the content area of ​​the content page can accommodate under a specific layout ratio in the presentation file structure, after removing the header, footer and margins.

[0087] Candidate pagination cutoff points are the candidate pagination cutoff points for content pages determined in the vertical flow coordinate system. In this embodiment, the candidate pagination cutoff point can specifically be multiple Y-axis coordinates.

[0088] The information entropy loss value is a quantitative comprehensive score characterizing the negative impact of the segmentation behavior that blocks the information flow at the candidate pagination cutting point on the user's reading experience. A higher information entropy loss value means that the candidate pagination cutting point severs the close logical connection between two adjacent content blocks, resulting in reduced information transmission efficiency.

[0089] In step B1, the bounding box coordinates of the nodes indicated by the node serialization object are obtained from the page structured description model. Nodes are filtered based on these bounding box coordinates to obtain target nodes. These target nodes are then projected onto the Y-axis of the vertical flow coordinate system based on their bounding box coordinates. The nodes are then sorted in ascending order according to their starting projection coordinates on the Y-axis and merged to obtain a content block sequence. Next, a preset semantic rule base is used to calculate the semantic continuity inertia score between two adjacent content blocks. It is understood that the preset semantic rule base may include topic validation rules, visual validation rules, context validation rules, and geometric validation rules. The validation rules are as follows: Topic validation rule: This rule checks the probability of topic consistency between two adjacent content blocks. The topic validation result is obtained by applying these rules to the two adjacent content blocks. Visual validation rule: This rule compares the color, font size, line height, border, and background image hash of two adjacent content blocks. The visual validation result is obtained by applying these rules to the two adjacent content blocks. Context validation rule: This rule checks whether there are pronouns with the same meaning between the last line of the preceding content block and the first line of the following content block, and checks for the presence of successive words and sequence numbers. The context validation result is obtained by applying these rules to the two adjacent content blocks. Geometric validation rule: This rule compares a preset threshold with the ratio of the Y-axis gap to the block height of two adjacent content blocks in the vertical flow coordinate system. The geometric validation result is obtained by applying these rules to the two adjacent content blocks. Based on the topic validation result, visual validation result, context validation result, and geometric validation result, the semantic continuity inertia score of two adjacent content blocks is determined.

[0090] Optionally, the preset semantic rule base can be as follows: if two adjacent content blocks are direct child nodes of the same strong semantic container (such as a list container or table container), the semantic continuity inertia score is determined to be higher; if the preceding content block is a title tag and the following content block is not a title tag, the two adjacent content blocks are determined to have a "title-body" structure, and the semantic continuity inertia score can be determined to be higher; if the above specific rules are not met, the score can be calculated inversely based on the vertical distance between the two adjacent content blocks, and the larger the vertical distance, the lower the semantic continuity inertia score. The vertical distance between two adjacent content blocks can be the top coordinate of the following content block minus the bottom coordinate of the preceding content block. The top coordinate is the top Y-axis coordinate of the content block in the vertical flow coordinate system, and the bottom coordinate is the bottom Y-axis coordinate of the content block in the vertical flow coordinate system.

[0091] In step B2, the maximum pixel height within the preset single-page presentation capacity is first obtained as the standard step size, and the starting coordinates of the current content page are initialized to zero. When generating candidate points for each page, the current starting coordinates are added to the standard step size to obtain the theoretical physical pagination baseline. Subsequently, a backtracking search window of a preset proportion is drawn upwards from this physical pagination baseline. Within the defined backtracking search window, the sequence of content blocks in the vertical streaming coordinate system is traversed, and the gap positions between each adjacent content block are detected. Any gap coordinates that fall within the backtracking search window and do not cross any indivisible content block (such as inside an image) are marked as candidate pagination cut points for that content page. If no gap is found within the window (e.g., encountering an excessively long table), forced truncation or scaling logic is triggered, and the forced truncation position is used as a candidate pagination cut point. The backtracking search window refers to a preset distance (e.g., 20% of the page height) extending towards the top of the page from the position of the maximum pixel height. This backtracking search window provides an effective search range for finding the optimal pagination cut point.

[0092] In step B3, the semantic penalty value is calculated using the natural constant e as the base and the semantic continuity inertia score multiplied by the sensitivity coefficient as the exponent. Here, as the semantic continuity inertia score increases linearly, the semantic penalty value increases exponentially, thus imposing a significant penalty on the act of cutting strongly coherent content. The proportion of the remaining blank height of a single page after cutting at the candidate pagination point and then filling the page with content is calculated, and the logarithm of this proportion is used as the spatial entropy component. Finally, the semantic penalty value and the spatial entropy component are weighted and fused to generate the information entropy loss value of the candidate pagination point. In this calculation mode, once the candidate pagination point is located between the title and the body text (with extremely high coherence scores), its loss value will approach infinity, thus being absolutely excluded in subsequent steps, ensuring the rigor of the presentation's logical structure.

[0093] In step B4, the target pagination position refers to the Y-axis coordinate value ultimately selected from the candidate pagination cut point set for physical segmentation. First, the candidate pagination cut point set and its corresponding entropy loss value for the current content page are read. This set is then iterated and compared to identify the candidate pagination cut point with the minimum entropy loss value, which is then marked as the target pagination position for the current content page. If multiple candidate pagination cut points with the same minimum entropy loss value exist, the point with the largest Y-axis coordinate value (i.e., the point closest to the bottom of the page) is selected first to maximize single-page space utilization.

[0094] After determining the target pagination position, extract all content blocks from the current starting coordinate to the target pagination position in the vertical flow coordinate system. For each extracted content block, convert its absolute Y-coordinate in the vertical flow coordinate system to a relative Y-coordinate relative to the current content page (i.e., relative Y-coordinate = absolute Y-coordinate - current starting coordinate + top margin). Encapsulate the converted relative Y-coordinate, the width and height dimensions of the content block, and the corresponding node serialization object into a content page element object. Based on the content page element object and the page content layout information, generate the presentation file layout information.

[0095] S309, The target presentation file is obtained by generating the presentation file based on the presentation file layout information and the page structure description model.

[0096] Specifically, a demo page is created based on the layout information of the demo file. The demo content is then populated into the demo page according to the page structure description model to obtain the target demo page. Finally, the target demo file is generated based on the target demo page. For example, for text elements, text boxes are added according to their style information in the page structure description model, and attributes such as font, color, and alignment are set. For non-text elements (such as rectangles, rounded rectangles, etc.), corresponding shapes are added according to their style information, and attributes such as fill color and border are set.

[0097] The demonstration file generation method provided in this application first obtains a demonstration file conversion instruction for a target webpage. Based on the demonstration file conversion instruction, it obtains the URL information of the target webpage. Then, using a large demonstration file generation model, it performs webpage rendering based on the URL information to obtain a page tree structure model. Next, it performs node structure parsing on the page tree structure model to obtain page tree node structure information. Finally, it performs node recognition processing based on the page tree node structure information to obtain a page structured description model. This method, by first rendering the webpage and then parsing and recognizing the nodes, accurately obtains the style and attribute information of each displayed element in the webpage. Then, it determines the page content title density, page content list depth, page chart frequency, and average sentence length of the target webpage. Based on these parameters, it generates page content layout information and uses the large demonstration file model to generate the page content layout information. The process involves extracting the webpage text content, determining the page keyword bags and sample sentences based on the text, identifying image visual semantic tags based on the target webpage, and determining the page rendering diagram based on the page content layout information, keyword bags, sample sentences, and image visual semantic tags. This allows for accurate parsing of the page rendering diagram from both text and image perspectives. Next, a presentation file architecture matching process is performed based on the page rendering diagram to obtain the presentation file layout architecture. Based on the presentation file layout architecture, the page structured description model, and the target webpage, the presentation file layout information is determined. Finally, based on the presentation file layout information and the page structured description model, a presentation file generation process is performed to obtain the target presentation file. This process allows for precise matching of the presentation file layout information to the webpage content based on the page rendering diagram, enabling efficient and accurate conversion of webpage content into the target presentation file. This ensures that the target presentation file is highly consistent with the original webpage content, improving the display effect of the target presentation file.

[0098] The following will combine Figure 4 This application provides a detailed description of the demonstration file generation apparatus provided in its embodiments. It should be noted that... Figure 4 The demonstration file generation apparatus shown is used to execute this application. Figure 2~Figure 3 The methods shown in the embodiments are for illustrative purposes only, illustrating the parts relevant to the embodiments of this application. For specific technical details not disclosed, please refer to this application. Figure 2~Figure 3 The example shown.

[0099] Please see Figure 4 This diagram illustrates the structure of a presentation file generation device according to an embodiment of this application. The presentation file generation device 40 can be implemented as all or part of a device through software, hardware, or a combination of both. According to some embodiments, the presentation file generation device 40 includes a webpage content parsing module 410 and a presentation file generation module 420, specifically used for: The web page content parsing module 410 is used to obtain the presentation file conversion instruction for the target web page, generate a large model of the presentation file based on the presentation file conversion instruction, perform page data parsing processing on the target web page to obtain the page structured description model, and perform page content layout recognition processing on the target web page to obtain page content layout information. The presentation file generation module 420 is used to determine the presentation file layout information based on the page content layout information, the page structured description model, and the target webpage through the presentation file generation model, and to perform presentation file generation processing based on the presentation file layout information and the page structured description model to obtain the target presentation file.

[0100] Optionally, the webpage content parsing module 410 includes: The web page rendering unit is used to obtain the URL information of the target web page based on the presentation file conversion instructions, generate a large model from the presentation file, and perform web page rendering processing based on the URL information to obtain a page tree structure model. The node parsing unit is used to perform node structure parsing processing on the page tree structure model to obtain page tree node structure information, and to perform node recognition processing based on the page tree node structure information to obtain a page structured description model.

[0101] Optional, node resolution units include: The first parsing subunit is used to determine the node identity information, node geometric information, visual style information, resource link information, hierarchical relationship information, and fill content information of each page tree node based on the page tree node structure information. The second parsing subunit is used to generate a node serialization object corresponding to each page tree node based on the node identity information, node geometric information, visual style information, resource link information, hierarchical relationship information and fill content information corresponding to each page tree node. The third parsing subunit is used to generate a page structured description model based on the serialized objects of each node.

[0102] Optional, web page rendering units include: The first rendering subunit is used to obtain node type filtering conditions and determine the reference node type based on the node type filtering conditions. The second rendering subunit is used to determine the page tree node structure information based on the page tree structure model if the node type of the page tree node does not match the reference node type for each page tree node in the page tree structure model.

[0103] Optionally, the webpage content parsing module 410 includes: The first layout recognition unit is used to determine the page content title density, page content list depth, page chart frequency, and average sentence length of the target webpage. The second layout recognition unit is used to generate page content layout information based on the page content title density, the page content list depth, the page chart occurrence frequency, and the page sentence average length.

[0104] Optional, see Figure 5 The diagram shows the structure of a presentation file generation module. The presentation file generation module 420 includes a webpage semantic extraction unit 421, a presentation diagram reasoning unit 422, and a presentation layout generation unit 423, specifically used for: The webpage semantic extraction unit 421 is used to extract webpage text content based on the target webpage through the large model of the demonstration file, determine page keyword bags and page sampling sentences based on the webpage text content, and determine image visual semantic tags based on the target webpage. The page evolution diagram reasoning unit 422 is used to determine the page evolution diagram based on the page content layout information, the page keyword bag, the page sampled sentence and the image visual semantic tag; The presentation layout generation unit 423 is used to perform presentation file architecture matching processing based on the page presentation diagram to obtain the presentation file layout architecture, and to determine the presentation file layout information based on the presentation file layout architecture, the page structured description model and the target webpage.

[0105] Optionally, the demonstration layout generation unit 423 is specifically used for: Based on the page structured description model, a vertical flow coordinate system corresponding to the target webpage is constructed, and the semantic continuity inertia score between content blocks is determined based on the vertical flow coordinate system and the page structured description model. Based on the preset single-page presentation capacity corresponding to the presentation file layout architecture, multiple candidate page break points are determined in the vertical flow coordinate system. The information entropy loss value at each of the candidate pagination cutting points is determined, and the information entropy loss value is negatively correlated with the semantic continuity inertia score of the content blocks upstream and downstream of the candidate pagination cutting point; The target pagination position is determined based on the candidate pagination cut points with the minimum information entropy loss value, and the layout information of the demo file containing multiple pages is generated based on the target pagination position.

[0106] Please refer to Figure 6 , Figure 6This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application. The electronic device may include one or more of the following components: a processor 110, a memory 120, an input device 130, an output device 140, and a bus 150. The processor 110, the memory 120, the input device 130, and the output device 140 can be connected via the bus 150.

[0107] Processor 110 may include one or more processing cores. Processor 110 connects to various parts of the electronic device using various interfaces and lines, and performs various functions and processes data by running or executing instructions, programs, code sets, or instruction sets stored in memory 120, and by calling data stored in memory 120. Optionally, processor 110 may be implemented using at least one hardware form of digital signal processing (DSP), field-programmable gate array (FPGA), or programmable logic array (PLA). Processor 110 may integrate one or more of a central processing unit (CPU), graphics processing unit (GPU), and modem. The CPU primarily handles the operating system, user interface, and applications; the GPU is responsible for rendering and drawing the displayed content; and the modem handles wireless communication. It is understood that the modem may also not be integrated into processor 110 and may be implemented separately using a communication chip.

[0108] The memory 120 may include random access memory (RAM) or read-only memory (ROM). Optionally, the memory 120 may include a non-transitory computer-readable storage medium. The memory 120 may be used to store instructions, programs, code, code sets, or instruction sets. The memory 120 may include a program storage area and a data storage area, wherein the program storage area may store instructions for implementing an operating system, instructions for implementing at least one function (e.g., touch function, sound playback function, image playback function, etc.), instructions for implementing the various method embodiments described below, etc. The operating system may be the Android system, including systems deeply developed based on the Android system, the iOS system developed by Apple Inc., including systems deeply developed based on the iOS system, or other systems.

[0109] In order for the operating system to distinguish the specific application scenarios of third-party applications, it is necessary to establish data communication between the third-party applications and the operating system. This would allow the operating system to obtain the current scenario information of the third-party applications at any time, and then perform targeted system resource adaptation based on the current scenario.

[0110] The input device 130 is used to receive input instructions or data, and includes, but is not limited to, a keyboard, mouse, camera, microphone, or touch device. The output device 140 is used to output instructions or data, and includes, but is not limited to, a display device and a speaker. In one example, the input device 130 and the output device 140 can be combined, and the input device 130 and the output device 140 can be a touch display screen.

[0111] The touch display screen can be designed as a full-screen, curved screen, or irregularly shaped screen. It can also be designed as a combination of a full-screen and a curved screen, or a combination of an irregularly shaped screen and a curved screen; however, this application does not limit the specific design of the touch display screen.

[0112] In addition, those skilled in the art will understand that the structure of the electronic device shown in the above figures does not constitute a limitation on the electronic device. The electronic device may include more or fewer components than shown, or combine certain components, or have different component arrangements. For example, the electronic device may also include radio frequency circuits, input units, sensors, audio circuits, Wireless Fidelity (WiFi) modules, power supplies, Bluetooth modules, etc., which will not be described in detail here.

[0113] In some embodiments, Figure 6 In the illustrated electronic device, the processor 110 can be used to call a program for generating a demonstration file stored in the memory 120, and specifically perform the following operations: Obtain the presentation file conversion instruction for the target webpage; based on the presentation file conversion instruction, generate a large model from the presentation file to perform page data parsing processing on the target webpage to obtain a page structured description model; and perform page content layout recognition processing on the target webpage to obtain page content layout information. The large model generated from the presentation file determines the layout information of the presentation file based on the page content layout information, the page structured description model, and the target webpage. Based on the presentation file layout information and the page structured description model, the presentation file generation process is performed to obtain the target presentation file.

[0114] In one embodiment, when the processor 110 executes the page data parsing processing of the target webpage to obtain a page structured description model by generating a large model from the presentation file based on the presentation file conversion instruction, it specifically performs the following operations: Based on the presentation file conversion instructions, the URL information of the target webpage is obtained, and a large model is generated from the presentation file. Based on the URL information, the webpage is rendered to obtain a page tree structure model. The page tree structure model is parsed to obtain page tree node structure information, and node recognition is performed based on the page tree node structure information to obtain a page structured description model.

[0115] In one embodiment, when the processor 110 performs node recognition processing based on the page tree node structure information to obtain a page structured description model, it specifically performs the following operations: Based on the page tree node structure information, determine the node identity information, node geometric information, visual style information, resource link information, hierarchical relationship information, and fill content information corresponding to each page tree node; Based on the node identity information, node geometric information, visual style information, resource link information, hierarchical relationship information, and fill content information of each page tree node, a node serialization object corresponding to each page tree node is generated. A page structured description model is generated based on the serialized objects of each node.

[0116] In one embodiment, when the processor 110 performs node structure parsing processing on the page tree structure model to obtain page tree node structure information, it specifically performs the following operations: Obtain node type filtering conditions, and determine the reference node type based on the node type filtering conditions; For each page tree node in the page tree structure model, if the node type of the page tree node does not match the reference node type, the page tree node structure information is determined based on the page tree structure model.

[0117] In one embodiment, when the processor 110 performs the page content layout recognition processing on the target webpage to obtain page content layout information, it specifically performs the following operations: Determine the page content title density, page content list depth, page chart frequency, and average sentence length of the target webpage; Page content layout information is generated based on the page content title density, the page content list depth, the page chart occurrence frequency, and the page sentence average length.

[0118] In one embodiment, when the processor 110 executes the step of determining the presentation file layout information based on the page content layout information, the page structure description model, and the target webpage using the presentation file large model, it specifically performs the following operations: Based on the target webpage, the large model of the demonstration file extracts the webpage text content, determines the page keyword bag and page sampling sentence based on the webpage text content, and determines the image visual semantic tags based on the target webpage. Based on the page content layout information, the page keyword bag, the page sampled sentences, and the image visual semantic tags, a page evolution diagram is determined. Based on the page rendering diagram, the presentation file architecture is matched to obtain the presentation file layout architecture. Based on the presentation file layout architecture, the page structure description model, and the target webpage, the presentation file layout information is determined.

[0119] In one embodiment, when the processor 110 executes the step of determining the presentation file layout information based on the presentation file layout architecture, the page structure description model, and the target webpage, it specifically performs the following operations: Based on the page structured description model, a vertical flow coordinate system corresponding to the target webpage is constructed, and the semantic continuity inertia score between content blocks is determined based on the vertical flow coordinate system and the page structured description model. Based on the preset single-page presentation capacity corresponding to the presentation file layout architecture, multiple candidate page break points are determined in the vertical flow coordinate system. The information entropy loss value at each of the candidate pagination cutting points is determined, and the information entropy loss value is negatively correlated with the semantic continuity inertia score of the content blocks upstream and downstream of the candidate pagination cutting point; The target pagination position is determined based on the candidate pagination cut points with the minimum information entropy loss value, and the layout information of the demo file containing multiple pages is generated based on the target pagination position.

[0120] This application also provides a computer-readable storage medium storing at least one instruction that is executed by a processor to implement the demonstration file generation method as described in the above embodiments.

[0121] This application also provides a computer program product that stores at least one instruction, which is loaded and executed by the processor to implement the demonstration file generation method described in the above embodiments.

[0122] Those skilled in the art will recognize that the functions described in the embodiments of this application in one or more of the above examples can be implemented using hardware, software, firmware, or any combination thereof. When implemented using software, these functions can be stored in a computer-readable medium or transmitted as one or more instructions or code on a computer-readable medium. Computer-readable media include computer storage media and communication media, wherein communication media include any medium that facilitates the transfer of a computer program from one place to another. Storage media can be any available medium that can be accessed by a general-purpose or special-purpose computer.

[0123] The above description is merely an optional embodiment of this application and is not intended to limit this application. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this application should be included within the protection scope of this application.

Claims

1. A method for generating a demonstration file, characterized in that, The method includes: Obtain the presentation file conversion instruction for the target webpage; based on the presentation file conversion instruction, generate a large model from the presentation file to perform page data parsing processing on the target webpage to obtain a page structured description model; and perform page content layout recognition processing on the target webpage to obtain page content layout information. The large model generated from the presentation file determines the layout information of the presentation file based on the page content layout information, the page structured description model, and the target webpage. Based on the presentation file layout information and the page structured description model, the presentation file generation process is performed to obtain the target presentation file.

2. The method according to claim 1, characterized in that, The step of generating a large model from the presentation file based on the presentation file conversion instructions and then parsing the page data of the target webpage to obtain a structured description model of the page includes: Based on the presentation file conversion instructions, the URL information of the target webpage is obtained, and a large model is generated from the presentation file. Based on the URL information, the webpage is rendered to obtain a page tree structure model. The page tree structure model is parsed to obtain page tree node structure information, and node recognition is performed based on the page tree node structure information to obtain a page structured description model.

3. The method according to claim 2, characterized in that, The process of obtaining a page structured description model by performing node recognition processing based on the page tree node structure information includes: Based on the page tree node structure information, determine the node identity information, node geometric information, visual style information, resource link information, hierarchical relationship information, and fill content information corresponding to each page tree node; Based on the node identity information, node geometric information, visual style information, resource link information, hierarchical relationship information, and fill content information of each page tree node, a node serialization object corresponding to each page tree node is generated. A page structured description model is generated based on the serialized objects of each node.

4. The method according to claim 2, characterized in that, The step of parsing the node structure of the page tree structure model to obtain the page tree node structure information includes: Obtain node type filtering conditions, and determine the reference node type based on the node type filtering conditions; For each page tree node in the page tree structure model, if the node type of the page tree node does not match the reference node type, the page tree node structure information is determined based on the page tree structure model.

5. The method according to claim 1, characterized in that, The step of performing page content layout recognition processing on the target webpage to obtain page content layout information includes: Determine the page content title density, page content list depth, page chart frequency, and average sentence length of the target webpage; Page content layout information is generated based on the page content title density, the page content list depth, the page chart occurrence frequency, and the page sentence average length.

6. The method according to claim 1, characterized in that, The step of determining the presentation file layout information based on the page content layout information, the page structure description model, and the target webpage using the presentation file large model includes: Based on the target webpage, the large model of the demonstration file extracts the webpage text content, determines the page keyword bag and page sampling sentence based on the webpage text content, and determines the image visual semantic tags based on the target webpage. Based on the page content layout information, the page keyword bag, the page sampled sentences, and the image visual semantic tags, a page evolution diagram is determined. Based on the page rendering diagram, the presentation file architecture is matched to obtain the presentation file layout architecture. Based on the presentation file layout architecture, the page structure description model, and the target webpage, the presentation file layout information is determined.

7. The method according to claim 6, characterized in that, The process of determining the presentation file layout information based on the presentation file layout architecture, the page structure description model, and the target webpage includes: Based on the page structured description model, a vertical flow coordinate system corresponding to the target webpage is constructed, and the semantic continuity inertia score between content blocks is determined based on the vertical flow coordinate system and the page structured description model. Based on the preset single-page presentation capacity corresponding to the presentation file layout architecture, multiple candidate page break points are determined in the vertical flow coordinate system. The information entropy loss value at each of the candidate pagination cutting points is determined, and the information entropy loss value is negatively correlated with the semantic continuity inertia score of the content blocks upstream and downstream of the candidate pagination cutting point; The target pagination position is determined based on the candidate pagination cut points with the minimum information entropy loss value, and the layout information of the demo file containing multiple pages is generated based on the target pagination position.

8. A presentation file generation device, characterized in that, The device includes: The webpage content parsing module is used to obtain the presentation file conversion instructions for the target webpage, generate a large model from the presentation file based on the presentation file conversion instructions, perform page data parsing processing on the target webpage to obtain the page structured description model, and perform page content layout recognition processing on the target webpage to obtain page content layout information. The presentation file generation module is used to determine the presentation file layout information based on the page content layout information, the page structured description model, and the target webpage using the presentation file generation model, and to perform presentation file generation processing based on the presentation file layout information and the page structured description model to obtain the target presentation file.

9. A computer storage medium, characterized in that, The computer storage medium stores a plurality of instructions, which are adapted to be loaded by a processor and executed as described in any one of claims 1 to 7.

10. An electronic device, characterized in that, include: A processor and a memory; wherein the memory stores a computer program adapted to be loaded by the processor and executed as described in any one of claims 1 to 7.