Demonstration document generation method and device, electronic equipment and storage medium
By identifying and transforming the content-carrying units to be configured in the presentation document configuration template, dynamic association between data and template is achieved, solving the problems of time-consuming, labor-intensive, and error-prone configuration in existing technologies, and realizing automated updates and consistency of presentation documents.
Patent Information
- Application Number
- CN202511806168.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-12-03
- Publication Date
- 2026-02-27
AI Technical Summary
In existing technologies, configuring presentation document templates is time-consuming, labor-intensive, and prone to errors, resulting in generated presentation documents that fail to meet display requirements.
By identifying the content-carrying units in the presentation document configuration template, data is transformed and mapped to the target location to generate the target presentation document template. When a trigger operation is detected, the data is rendered and displayed, realizing the dynamic association and automatic update of data and template.
It reduces repetitive manual maintenance of configuration structures and templates, ensures real-time updates and consistency of presentation documents, improves template reusability, and is suitable for application scenarios involving batch or regular production.
Smart Images

Figure CN121581007A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the technical field of generating presentation documents, and more particularly to a method, apparatus, electronic device, and storage medium for generating presentation documents. Background Technology
[0002] With the popularization of information technology in office work, presentation documents (PowerPoint, PPT) have become an indispensable tool in scenarios such as work reports, data visualization, and project planning.
[0003] Currently, when it's necessary to build corresponding presentation documents based on document usage scenarios, it's usually necessary to manually modify the presentation document configuration template and then create the target presentation document based on the built template. However, since the template configuration structure and template configuration information are typically stored separately, manual configuration requires manually modifying both the template configuration structure and configuration information simultaneously, while maintaining the logical mapping relationship between them to ensure the accurate construction of the presentation document configuration template. However, this method is time-consuming, labor-intensive, and error-prone, and can even lead to presentation documents generated from templates that do not meet document display requirements.
[0004] To solve the above problems, the method for generating presentation documents needs to be improved. Summary of the Invention
[0005] This invention provides a method, apparatus, electronic device, and storage medium for generating presentation documents, in order to solve the problem that in the prior art, when synchronizing the template structure and configuration information of the presentation document configuration template manually, it is time-consuming, labor-intensive, and prone to errors, resulting in the presentation document template generating a presentation document that does not meet the document display requirements.
[0006] In a first aspect, embodiments of the present invention provide a method for generating a demonstration document, comprising:
[0007] In response to a triggering operation of the presentation document configuration template, at least one content carrier unit to be configured in the presentation document configuration template is identified;
[0008] Based on the type of the bearer unit, the data of each of the content bearer units to be configured is converted to obtain standardized configuration data corresponding to each of the content bearer units to be configured.
[0009] The standardized configuration data of each of the content-carrying units to be configured is mapped to the target location of the demonstration document configuration template and saved to obtain the target demonstration document template;
[0010] When the trigger operation of the target presentation document template is detected, the target presentation data associated with each item to be displayed in the target presentation document template is rendered to generate the target presentation document; wherein, the item to be displayed is associated with the content carrier unit to be configured.
[0011] Secondly, embodiments of the present invention also provide a demonstration document generation apparatus, comprising:
[0012] The identification module is used to identify at least one content carrier unit to be configured in the presentation document configuration template in response to the triggering operation of the presentation document configuration template.
[0013] The conversion module is used to perform data conversion on each of the content carrier units to be configured according to the carrier unit type, so as to obtain standardized configuration data corresponding to each of the content carrier units to be configured.
[0014] The document template determination module is used to map the standardized configuration data of each of the content carrier units to be configured to the target location of the demonstration document configuration template and save it to obtain the target demonstration document template.
[0015] The presentation document generation module is used to render the target presentation data associated with each item to be displayed in the target presentation document template and generate a target presentation document when a trigger operation of the target presentation document template is detected; wherein, the item to be displayed is associated with the content carrier unit to be configured.
[0016] Thirdly, embodiments of the present invention also provide an electronic device, comprising:
[0017] At least one processor; and
[0018] A memory communicatively connected to the at least one processor; wherein,
[0019] The memory stores a computer program that can be executed by the at least one processor, the computer program being executed by the at least one processor to enable the at least one processor to perform the demonstration document generation method according to any embodiment of the present invention.
[0020] Fourthly, embodiments of the present invention also provide a computer-readable storage medium storing computer instructions that, when executed by a processor, implement the method for generating a demonstration document as described in any embodiment of the present invention.
[0021] Fifthly, embodiments of the present invention also provide a computer program product, including a computer program that, when executed by a processor, implements the method for generating a demonstration document as described in any of the embodiments of the present invention.
[0022] The technical solution of this invention, in response to a trigger operation of a presentation document configuration template, identifies at least one content carrier unit to be configured in the presentation document configuration template; performs data conversion on each content carrier unit to be configured according to its type to obtain standardized configuration data corresponding to each content carrier unit; maps the standardized configuration data of each content carrier unit to be configured to a target location in the presentation document configuration template and saves it to obtain a target presentation document template; when a trigger operation of the target presentation document template is detected, renders the target display data associated with each item to be displayed in the target presentation document template to generate a target presentation document; wherein, the items to be displayed are associated with the content carrier units to be configured. In this technical solution, by associating the corresponding data source and related configuration information with the content carrier units to be configured in the presentation document configuration template, and converting the content carrier units to be configured to obtain standardized configuration data, the standardized configuration data is embedded in the presentation document configuration template to obtain a target presentation document template. On this basis, through the data interface associated with the items to be displayed in the target presentation document template, the latest target display data corresponding to each item to be displayed is automatically retrieved and rendered to obtain the target presentation document, ensuring that the data in the target presentation document is updated in real time to follow changes in actual data. This solution addresses the problems of existing technologies that require manual synchronization of configuration structure and information during the presentation document template configuration phase. These methods are time-consuming, error-prone, and result in the presentation data generated from the template not being updated in a timely manner. By binding the presentation document configuration template structure with the configuration information and embedding it within the template, configuration information and template are integrated. This reduces repetitive manual maintenance of the configuration structure and template, and the embedded mechanism automatically ensures consistency, enhancing the reusability of the presentation document template. Furthermore, by directly configuring data interfaces in each content-carrying unit, dynamic association between data and presentation content is achieved. During the generation of the target presentation document, the system automatically retrieves the target presentation data corresponding to the items to be displayed, resulting in the target presentation document and enabling automated updates. This approach is more suitable for application scenarios involving the batch or periodic creation of presentation documents. Attached Figure Description
[0023] To more clearly illustrate the technical solutions in the embodiments of the present invention, the accompanying drawings used in the description of the embodiments of the present invention will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on the content of the embodiments of the present invention and these drawings without creative effort.
[0024] Figure 1 This is a flowchart of a method for generating a demonstration document according to Embodiment 1 of the present invention;
[0025] Figure 2 This is a flowchart of a method for generating a demonstration document according to Embodiment 2 of the present invention;
[0026] Figure 3 This is a schematic diagram of the structure of a demonstration document generation device according to Embodiment 3 of the present invention;
[0027] Figure 4 This is a schematic diagram of the structure of an electronic device that implements the method for generating demonstration documents according to embodiments of the present invention. Detailed Implementation
[0028] To enable those skilled in the art to better understand the present invention, the technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings of the embodiments of the present invention. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort should fall within the scope of protection of the present invention. The acquisition, transmission, storage, use, and processing of data in the technical solutions of this application comply with the relevant provisions of national laws and regulations. It should be noted that in the embodiments of this application, certain software, components, or models and other existing solutions in the industry may be mentioned. These should be considered as exemplary, and their purpose is only to illustrate the feasibility of implementing the technical solutions of this application, but it does not mean that the applicant has or necessarily used such solutions.
[0029] It should be noted that the terms "first," "second," etc., in the specification, claims, and accompanying drawings of this invention are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of the invention described herein can be implemented in sequences other than those illustrated or described herein.
[0030] Before elaborating on this technical solution in detail, let's briefly introduce its application scenarios to help us understand it more clearly.
[0031] With the widespread adoption of IT-based office work, presentation documents (PowerPoint, PPT) have become indispensable tools in scenarios such as work reports, data visualization, and project planning. Especially in scenarios requiring the regular or batch generation of similar presentation PPT content, such as weekly / monthly reports, project progress updates, or business analysis meetings, manually editing presentation documents is not only highly repetitive and inefficient, but also prone to data errors and formatting inconsistencies due to human factors. Therefore, this technical solution addresses the issue of recurring or batch PPT applications by associating presentation document templates with the data within them. This allows for the targeted generation of presentation document templates corresponding to specific PPT application scenarios. When a presentation document for a given scenario is needed, triggering the template automatically imports the required data and directly generates the presentation document.
[0032] Example 1
[0033] Figure 1 This is a flowchart of a method for generating a presentation document according to Embodiment 1 of the present invention. This embodiment is applicable to binding the content carrier unit to be configured and the corresponding configuration content in the presentation document configuration template to automatically generate the presentation document template. When presentation documents need to be created periodically or in batches, the presentation document template can be directly retrieved, and the target display data can be automatically obtained based on the data source associated with each item to be displayed in the presentation document template to generate the target presentation document. This method can be executed by a presentation document generation device, which can be implemented in hardware and / or software. The presentation document generation device can be configured in a computing device capable of executing the presentation document generation method.
[0034] like Figure 1 As shown, the method includes:
[0035] S110. In response to the triggering operation of the presentation document configuration template, identify at least one content carrier unit to be configured in the presentation document configuration template.
[0036] The presentation document configuration template refers to a pre-designed framework template containing standardized configurations such as layout, style, and elements, used during the configuration phase of the presentation document template. This template is used to quickly unify the visual and structural specifications of presentations. The presentation document configuration template is used to configure the configuration items and content within the presentation document template. The presentation document template refers to a template that has been configured but has not yet imported the target display data. The content-carrying unit to be configured can be understood as an element in the presentation document configuration template used as a temporary placeholder, awaiting replacement with actual content. For example, the content-carrying unit to be configured is a placeholder in the presentation document configuration template. This placeholder can be a placeholder for text data, a placeholder for table data, or a placeholder for graphic data. For instance, the content-carrying unit to be configured can be a text box or an image box, etc.
[0037] In a specific example, when it is detected that the presentation document configuration template is opened, optionally, at least one content carrier unit to be configured in the presentation document configuration template is identified, including: traversing the native code of the presentation document configuration template and determining at least one content carrier unit to be configured in the presentation document configuration template based on at least one unit attribute tag in the native code.
[0038] Here, "native code" refers to the programming language or markup language, such as XML format code, within the underlying structure of the presentation document configuration template. Unit attribute tags are identifiers in the native code used to describe the attributes of the unit containing the content to be configured. For example, unit attribute tags contain... <p:sp>Time indicates shape, and the cell attribute tag contains <a:t>(Represents text).
[0039] Specifically, during the configuration of the presentation document configuration template, the native code corresponding to the presentation document configuration template is detected to obtain at least one unit attribute tag, and based on the key fields in the unit attribute tag, at least one content-carrying unit in the presentation document configuration template is determined.
[0040] S120. Perform data conversion on each content carrier unit to be configured according to the carrier unit type to obtain standardized configuration data corresponding to each content carrier unit to be configured.
[0041] The standardized configuration data can be a JSON string corresponding to the content carrier unit to be configured.
[0042] Based on the above example, in order to standardize the storage and cross-platform transmission of configuration information in the demo document configuration template, and to facilitate programmatic parsing and processing, it is necessary to convert each unit carrying the content to be configured into the corresponding JSON string.
[0043] It is understandable that when the carrier unit types of the content to be configured are different, the process of converting them into JSON strings will not be exactly the same. Therefore, it is necessary to first determine the type of each content carrier unit to be configured, so as to convert the corresponding content carrier unit according to the carrier unit type and obtain the corresponding standardized configuration data.
[0044] S130. Map the standardized configuration data of each content carrier unit to be configured to the target location of the demonstration document configuration template and save it to obtain the target demonstration document template.
[0045] The target location refers to the pre-configured storage space used to store standardized configuration data. For example, the target location could be the storage location corresponding to a custom file storage path used to store standardized configuration data. The target presentation document template refers to the presentation document template obtained by dynamically associating the presentation document configuration template with each content-carrying unit to be configured.
[0046] Specifically, a presentation document template typically includes multiple configurable items, such as titles, body text, table frames, or graphic frames. By performing data transformation on the configurable content carrier units corresponding to each configurable item in the presentation document template, standardized configuration data corresponding to each configurable content carrier unit is obtained. The standardized configuration data is then loaded into the target location in the presentation document configuration template to obtain the target presentation document template.
[0047] The advantage of this setup is that loading the standardized configuration data corresponding to the content unit to be configured into the target location within the presentation document configuration template dynamically binds the template file and configuration information of the presentation document, forming an integrated configuration template corresponding to the presentation document. By storing the originally external, structured, standardized configuration data (JSON string) directly as text within the presentation document configuration template file, a single presentation document template can simultaneously contain a presentation layer (such as style layout) and a data logic layer (i.e., the presentation document generation rules). This avoids version inconsistencies, path errors, or key name mismatches caused by the separation of the presentation document configuration template from the standardized accessory data of the content unit to be configured, which can lead to poor universality and reusability of the presentation document template due to file transfer, sharing, and version management issues. Simultaneously, it fundamentally eliminates the risk of presentation document generation failure due to users manually editing incorrect JSON formats, increasing the difficulty of configuring the presentation document template while simplifying the configuration process.
[0048] S140. When the trigger operation of the target presentation document template is detected, the target presentation data associated with each item to be displayed in the target presentation document template is rendered to generate the target presentation document.
[0049] The item to be displayed is associated with the content carrier unit to be configured.
[0050] Based on this, the target presentation data associated with each item to be presented in the target presentation document template is rendered to generate the target presentation document. This includes: traversing all items to be presented in the target presentation document template and obtaining the target presentation data corresponding to each item from the data interface corresponding to each item based on data parsing rules; and rendering the target presentation data corresponding to each item to obtain the target presentation document.
[0051] The items to be displayed are associated with the content-carrying units to be configured. For example, the data interface can be a REST API interface, a database connection interface, or a local storage path.
[0052] The "item to be displayed" refers to the logical area in the target presentation document that needs to be filled with content, such as title boxes, body paragraphs, or charts. The "target display data" refers to the specific content actually filled into the item to be displayed. For example, the text "Annual Plan" corresponding to the title box, or the specific chart content corresponding to the chart placeholder.
[0053] In a specific example, if the target presentation document a user needs to create is an "Annual Plan Report," then each display page of the target presentation document template includes at least one item to be displayed, such as a title, body text, and charts. The items to be displayed in the target presentation document template correspond to the content-carrying units to be configured in the presentation document configuration template. It should be noted that when configuring the presentation document configuration template, the configuration content of each content-carrying unit includes a data source. Accordingly, the items to be displayed can directly obtain the corresponding target display data through the pre-bound data source. Therefore, when the user opens the target presentation document template, the target display data associated with each item to be displayed is automatically retrieved from the corresponding data source and rendered to obtain the target presentation document.
[0054] Optionally, the target display data corresponding to each item to be displayed is rendered, including: if the target display data corresponding to the item to be displayed is text data, then the target display data is directly filled into the display area corresponding to the item to be displayed and rendered; and / or if the target display data corresponding to the item to be displayed is tabular data, then at least one tabular data is iterated through according to preset fields to generate a table to be displayed and rendered; and / or if the target display data corresponding to the item to be displayed is graphical data, then the target display data is constrained based on the graphical constraint information of the item to be displayed to obtain the target display graphic and rendered.
[0055] For example, if the item to be displayed is plain text data, the obtained or configured text content is directly filled in; if the item to be displayed is chart data, the chart generated based on the chart data is inserted into the presentation document template, accurately replacing the original placeholder chart. In this case, for tables with configuration items, the obtained data is looped through according to the preset field names to generate different row content, so as to ensure that the size, position and format of the generated chart and the placeholder image are completely consistent, and to ensure that the layout is not messed up.
[0056] The advantage of this setup is that, for scenarios requiring batch creation or regular updates of presentation documents, by associating the corresponding data source—such as sales volume changes of a product over a period of time—with the content-carrying unit in the presentation document configuration template, the file storage path (url) corresponding to this information is associated with the content-carrying unit. The standardized configuration data converted from the content-carrying unit is then directly stored in the presentation document configuration template, resulting in the target presentation document template. Based on this, when a user opens the target presentation document template, each item to be displayed can directly retrieve the target display data from the associated data source. In other words, this technical solution, by combining presentation document template configuration with dynamic data rendering, solves the problem of cumbersome manual operations such as organizing, importing, or pasting data in the target presentation document. Furthermore, it requires repeatedly executing the "export-save" process when data updates are needed, making it difficult to handle application scenarios with high data real-time requirements for presentation documents. This achieves the effect of automated real-time updates of data in the target presentation document.
[0057] The technical solution of this invention, in response to a trigger operation of a presentation document configuration template, identifies at least one content carrier unit to be configured in the presentation document configuration template; performs data conversion on each content carrier unit to be configured according to its type to obtain standardized configuration data corresponding to each content carrier unit; maps the standardized configuration data of each content carrier unit to be configured to a target location in the presentation document configuration template and saves it to obtain a target presentation document template; when a trigger operation of the target presentation document template is detected, renders the target display data associated with each item to be displayed in the target presentation document template to generate a target presentation document; wherein, the items to be displayed are associated with the content carrier units to be configured. In this technical solution, by associating the corresponding data source and related configuration information with the content carrier units to be configured in the presentation document configuration template, and converting the content carrier units to be configured to obtain standardized configuration data, the standardized configuration data is embedded in the presentation document configuration template to obtain a target presentation document template. On this basis, through the data interface associated with the items to be displayed in the target presentation document template, the latest target display data corresponding to each item to be displayed is automatically retrieved and rendered to obtain the target presentation document, ensuring that the data in the target presentation document is updated in real time to follow changes in actual data. This solution addresses the problems of existing technologies that require manual synchronization of configuration structure and information during the presentation document template configuration phase. These methods are time-consuming, error-prone, and result in the presentation data generated from the template not being updated in a timely manner. By binding the presentation document configuration template structure with the configuration information and embedding it within the template, configuration information and template are integrated. This reduces repetitive manual maintenance of the configuration structure and template, and the embedded mechanism automatically ensures consistency, enhancing the reusability of the presentation document template. Furthermore, by directly configuring data interfaces in each content-carrying unit, dynamic association between data and presentation content is achieved. During the generation of the target presentation document, the system automatically retrieves the target presentation data corresponding to the items to be displayed, resulting in the target presentation document and enabling automated updates. This approach is more suitable for application scenarios involving the batch or periodic creation of presentation documents.
[0058] Example 2
[0059] Figure 2 This is a flowchart of a method for generating a demonstration document according to Embodiment 2 of the present invention. Optionally, the process of performing data conversion on each of the content carrier units to be configured according to the carrier unit type to obtain standardized configuration data corresponding to each of the content carrier units to be configured is refined.
[0060] like Figure 2 As shown, the method includes:
[0061] S210. In response to the triggering operation of the presentation document configuration template, identify at least one content carrier unit to be configured in the presentation document configuration template.
[0062] S220. Based on the carrier unit type of each content carrier unit to be configured, determine the configuration editing page of the content carrier unit in the configuration conversion engine.
[0063] In this context, a configuration conversion engine refers to a tool that automatically converts the configuration content corresponding to the user-input configuration unit into a parsable, standardized format. For example, a configuration conversion engine can be a web tool within a browser. The configuration editing page is essentially the visual information input page for the configuration conversion engine.
[0064] For example, if the content carrier unit to be configured is a text data carrier unit, then the configuration editing page corresponding to the data carrier unit of the configuration conversion engine will be opened; if the content carrier unit to be configured is a table data carrier unit, then the configuration editing page corresponding to the table data carrier unit of the configuration conversion engine will be opened.
[0065] S230. On the configuration editing page, enter the configuration information to be used corresponding to the content carrier unit to be configured, so as to perform tabular data conversion on the configuration information to be used and obtain the standardized configuration data corresponding to the content carrier unit to be configured.
[0066] Among them, the configuration information to be used refers to the specific configuration content of the content carrier unit to be configured, such as the text, chart style, graphic size, display position and data source to be replaced by the content carrier unit to be configured.
[0067] Optionally, on the configuration editing page, the user enters the configuration information to be used corresponding to the content carrier unit to be configured, including: if the carrier unit type is a text data carrier unit, then the text constraint information is used as the configuration information to be used corresponding to the content carrier unit to be configured, and the configuration information to be used is entered into the configuration editing page; if the carrier unit type is a tabular data carrier unit, then the structured constraint information is used as the configuration information to be used for the content carrier unit to be configured, and the configuration and information to be used are entered into the configuration editing page; if the carrier unit type is a graphical data carrier unit, then the graphical constraint information is used as the configuration information to be used for the content carrier unit to be configured, and the configuration and information to be used are entered into the configuration editing page.
[0068] The text constraint information includes at least one of the following: character length threshold, text topic, text style, and text data source; the structured constraint information includes at least one of the following: dynamic dimension expansion range, cell data type, position constraints, and table data source. The graphics constraint information includes at least one of the following: graphics size, graphics style, animation effects, and graphics data source.
[0069] For example, users open the corresponding configuration editing page in the configuration conversion engine based on the carrier unit type of each content carrier unit to be configured. If the carrier unit type is a text data carrier unit, the user can enter the interface address of the field to be replaced (i.e., the data source) and other configuration items (i.e., the configuration information to be used) on the configuration editing page. If the carrier unit type is a tabular data carrier unit, the user can enter the interface address of the tabular data source and other possible configuration items (i.e., the configuration information to be used) on the configuration editing page. If the carrier unit type is a graphical data carrier unit, the user can enter the data source interface address of the chart to be generated, the width and height of the chart, the title of the chart, the chart type (line chart, bar chart, or pie chart, etc.), and even rich configuration items of the chart (i.e., the configuration information to be used) on the configuration editing page.
[0070] Optionally, if the bearer unit type is a table data bearer type, then generate the configuration information to be used corresponding to the table data bearer type according to the table data construction requirements.
[0071] Table data construction requirements can be understood as the user's requirements for the style, content, and presentation of the table. For example, table data construction requirements may include line type, animation effects for data presentation, and table display background.
[0072] It should be noted that in existing technologies, when displaying chart-like data in a target presentation document, page rendering is typically based on the rendering engine built into the presentation document. However, due to user permission restrictions or limitations of the rendering engine's built-in display modes, page rendering cannot fully meet the user's requirements for constructing table data. Therefore, in this technical solution, the user can query standardized configuration data corresponding to the content carrier unit to be configured from third-party chart generation software, or customize and generate standardized configuration data, and load this standardized configuration data into the target presentation document configuration template to obtain the target presentation document template. Based on this, when the user opens the target presentation document template, the corresponding table data is directly obtained according to the data source associated with the content carrier unit to be configured, and rendered to obtain the target presentation document.
[0073] The advantage of this setting is that the display style of charts in the target presentation document is no longer limited to the rendering engine inherent in the target presentation document template, and can be more flexibly adapted to the user's table data construction needs.
[0074] S240. Map the standardized configuration data of each content carrier unit to be configured to the target location of the demonstration document configuration template and save it to obtain the target demonstration document template.
[0075] S250. When the trigger operation of the target presentation document template is detected, the target presentation data associated with each item to be displayed in the target presentation document template is rendered to generate the target presentation document.
[0076] The technical solution of this invention, in response to a trigger operation of a presentation document configuration template, identifies at least one content carrier unit to be configured in the presentation document configuration template; performs data conversion on each content carrier unit to be configured according to its type to obtain standardized configuration data corresponding to each content carrier unit; maps the standardized configuration data of each content carrier unit to be configured to a target location in the presentation document configuration template and saves it to obtain a target presentation document template; when a trigger operation of the target presentation document template is detected, renders the target display data associated with each item to be displayed in the target presentation document template to generate a target presentation document; wherein, the items to be displayed are associated with the content carrier units to be configured. In this technical solution, by associating the corresponding data source and related configuration information with the content carrier units to be configured in the presentation document configuration template, and converting the content carrier units to be configured to obtain standardized configuration data, the standardized configuration data is embedded in the presentation document configuration template to obtain a target presentation document template. On this basis, through the data interface associated with the items to be displayed in the target presentation document template, the latest target display data corresponding to each item to be displayed is automatically retrieved and rendered to obtain the target presentation document, ensuring that the data in the target presentation document is updated in real time to follow changes in actual data. This solution addresses the problems of existing technologies that require manual synchronization of configuration structure and information during the presentation document template configuration phase. These methods are time-consuming, error-prone, and result in the presentation data generated from the template not being updated in a timely manner. By binding the presentation document configuration template structure with the configuration information and embedding it within the template, configuration information and template are integrated. This reduces repetitive manual maintenance of the configuration structure and template, and the embedded mechanism automatically ensures consistency, enhancing the reusability of the presentation document template. Furthermore, by directly configuring data interfaces in each content-carrying unit, dynamic association between data and presentation content is achieved. During the generation of the target presentation document, the system automatically retrieves the target presentation data corresponding to the items to be displayed, resulting in the target presentation document and enabling automated updates. This approach is more suitable for application scenarios involving the batch or periodic creation of presentation documents.
[0077] Example 3
[0078] Figure 3 This is a schematic diagram of a demonstration document generation device provided in Embodiment 3 of the present invention. Figure 3 As shown, the device includes: an identification module 310, a conversion module 320, a document template determination module 330, and a presentation document generation module 340.
[0079] The identification module 310 is used to identify at least one content carrier unit to be configured in the presentation document configuration template in response to the triggering operation of the presentation document configuration template.
[0080] The conversion module 320 is used to convert the data of each content carrier unit to be configured according to the carrier unit type, so as to obtain the standardized configuration data corresponding to each content carrier unit to be configured.
[0081] The document template determination module 330 is used to map the standardized configuration data of each content carrier unit to be configured to the target location of the demonstration document configuration template and save it to obtain the target demonstration document template.
[0082] The presentation document generation module 340 is used to render the target presentation data associated with each item to be displayed in the target presentation document template when a trigger operation is detected, and generate the target presentation document; wherein, the items to be displayed are associated with the content carrier unit to be configured.
[0083] The technical solution of this invention, in response to a trigger operation of a presentation document configuration template, identifies at least one content carrier unit to be configured in the presentation document configuration template; performs data conversion on each content carrier unit to be configured according to its type to obtain standardized configuration data corresponding to each content carrier unit; maps the standardized configuration data of each content carrier unit to be configured to a target location in the presentation document configuration template and saves it to obtain a target presentation document template; when a trigger operation of the target presentation document template is detected, renders the target display data associated with each item to be displayed in the target presentation document template to generate a target presentation document; wherein, the items to be displayed are associated with the content carrier units to be configured. In this technical solution, by associating the corresponding data source and related configuration information with the content carrier units to be configured in the presentation document configuration template, and converting the content carrier units to be configured to obtain standardized configuration data, the standardized configuration data is embedded in the presentation document configuration template to obtain a target presentation document template. On this basis, through the data interface associated with the items to be displayed in the target presentation document template, the latest target display data corresponding to each item to be displayed is automatically retrieved and rendered to obtain the target presentation document, ensuring that the data in the target presentation document is updated in real time to follow changes in actual data. This solution addresses the problems of existing technologies that require manual synchronization of configuration structure and information during the presentation document template configuration phase. These methods are time-consuming, error-prone, and result in the presentation data generated from the template not being updated in a timely manner. By binding the presentation document configuration template structure with the configuration information and embedding it within the template, configuration information and template are integrated. This reduces repetitive manual maintenance of the configuration structure and template, and the embedded mechanism automatically ensures consistency, enhancing the reusability of the presentation document template. Furthermore, by directly configuring data interfaces in each content-carrying unit, dynamic association between data and presentation content is achieved. During the generation of the target presentation document, the system automatically retrieves the target presentation data corresponding to the items to be displayed, resulting in the target presentation document and enabling automated updates. This approach is more suitable for application scenarios involving the batch or periodic creation of presentation documents.
[0084] Optionally, an identification module is used to traverse the native code of the presentation document configuration template and determine at least one content-carrying unit in the presentation document configuration template based on at least one unit attribute tag in the native code.
[0085] Optionally, the conversion module includes: a page determination unit, used to determine the configuration editing page of the content carrier unit to be configured in the configuration conversion engine according to the carrier unit type of each content carrier unit to be configured;
[0086] The conversion unit is used to input the configuration information to be used corresponding to the content carrier unit to be configured in the configuration editing page, so as to convert the configuration information to be used into tabular data and obtain the standardized configuration data corresponding to the content carrier unit to be configured.
[0087] Optionally, the conversion unit includes: a first subunit, used to, if the carrier unit type is a text data type, use the text constraint information as the configuration information to be used corresponding to the carrier unit of the content to be configured, and input the configuration information to be used into the configuration editing page; wherein, the text constraint information includes at least one of character length threshold, text theme, text style and text data source;
[0088] The second sub-unit is used to use structured constraint information as the configuration information to be used for the content carrier unit to be configured if the carrier unit type is a table data carrier unit, and input the configuration information to be used and the information into the configuration editing page; the structured constraint information includes at least one of the following: dynamic expansion range of dimensions, cell data type, position constraints, and table data source;
[0089] The third sub-unit is used to use the graphic constraint information as the configuration information to be used by the content carrier unit to be configured if the carrier unit type is a graphical data carrier unit, and input the configuration information to be used and the information into the configuration editing page; wherein, the graphic constraint information includes at least one of graphic size, graphic style, animation effect and graphical data source.
[0090] Optionally, the demonstration document generation device is also used to generate configuration information corresponding to the table data carrying type based on the table data construction requirements if the carrying unit type is a table data carrying type.
[0091] Optionally, the demo document generation module includes: a target display data acquisition unit, which is used to traverse all items to be displayed in the target demo document template and obtain the target display data corresponding to each item from the data interface corresponding to each item based on the data parsing rules;
[0092] The presentation document generation unit is used to render the target presentation data corresponding to each item to be displayed, and obtain the target presentation document.
[0093] Optionally, the presentation document generation unit includes: a first rendering subunit, used to directly fill the display area corresponding to the item to be displayed with the target display data if the target display data corresponding to the item to be displayed is text data, and then render it; and / or
[0094] The second rendering subunit is used to generate and render a table if the target display data corresponding to the item to be displayed is tabular data, by iterating through at least one table data according to preset fields; and / or
[0095] The third rendering subunit is used to constrain the target display data based on the graphic constraint information of the item to be displayed if the target display data corresponding to the item to be displayed is graphical data, so as to obtain the target display graphic and render it.
[0096] The demonstration document generation apparatus provided in this embodiment of the invention can execute the demonstration document generation method provided in any embodiment of the invention, and has the corresponding functional modules and beneficial effects of the execution method.
[0097] Example 4
[0098] Figure 4 A schematic diagram of the structure of an electronic device 10 according to an embodiment of the present invention 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 may also represent various forms of mobile devices, such as personal digital processors, cellular phones, smartphones, wearable devices (such as helmets, glasses, watches, etc.), and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely illustrative and are not intended to limit the implementation of the invention described and / or claimed herein.
[0099] like Figure 4 As shown, the electronic device 10 includes at least one processor 11 and a memory, such as a read-only memory (ROM) 12 or a random access memory (RAM) 13, communicatively connected to the at least one processor 11. The memory stores computer programs executable by the at least one processor. The processor 11 can perform various appropriate actions and processes based on the computer program stored in the ROM 12 or loaded from storage unit 18 into the RAM 13. The RAM 13 can also store various programs and data required for the operation of the electronic device 10. The processor 11, ROM 12, and RAM 13 are interconnected via a bus 14. An input / output (I / O) interface 15 is also connected to the bus 14.
[0100] Multiple components in electronic device 10 are connected to I / O interface 15, including: input unit 16, such as keyboard, mouse, etc.; output unit 17, such as various types of displays, speakers, etc.; storage unit 18, such as disk, optical disk, etc.; and communication unit 19, such as network card, modem, wireless transceiver, etc. Communication unit 19 allows electronic device 10 to exchange information / data with other devices through computer networks such as the Internet and / or various telecommunications networks.
[0101] Processor 11 can be a variety of general-purpose and / or special-purpose processing components with processing and computing capabilities. Some examples of processor 11 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various special-purpose artificial intelligence (AI) computing chips, various processors running machine learning model algorithms, a digital signal processor (DSP), and any suitable processor, controller, microcontroller, etc. Processor 11 performs the various methods and processes described above, such as the method for generating demonstration documents.
[0102] In some embodiments, the method for generating the presentation document may be implemented as a computer program tangibly contained in a computer-readable storage medium, such as storage unit 18. In some embodiments, part or all of the computer program may be loaded and / or installed on the electronic device 10 via ROM 12 and / or communication unit 19. When the computer program is loaded into RAM 13 and executed by processor 11, one or more steps of the method for generating the presentation document described above may be performed. Alternatively, in other embodiments, processor 11 may be configured to execute the method for generating the presentation document by any other suitable means (e.g., by means of firmware).
[0103] Various embodiments of the systems and techniques described above 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-a-chip (SoCs), complex programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various embodiments may include implementations in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which may be a dedicated or general-purpose programmable processor, capable of receiving data and instructions from a storage system, at least one input device, and at least one output device, and transmitting data and instructions to the storage system, the at least one input device, and the at least one output device.
[0104] Computer programs used to implement the method for generating demonstration documents of the present invention can be written in any combination of one or more programming languages. These computer programs can be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device, such that when executed by the processor, the computer programs cause the functions / operations specified in the flowcharts and / or block diagrams to be implemented. The computer programs can be executed entirely on a machine, partially on a machine, as a standalone software package partially on a machine and partially on a remote machine, or entirely on a remote machine or server.
[0105] In the context of this invention, a computer-readable storage medium can be a tangible medium that may contain or store a computer program for use by or in conjunction with an instruction execution system, apparatus, or device. A computer-readable storage medium may include, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatus, or devices, or any suitable combination thereof. Alternatively, a computer-readable storage medium may be a machine-readable signal medium. More specific examples of machine-readable storage media include electrical connections based on one or more wires, portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fibers, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination thereof.
[0106] To provide interaction with a user, the systems and techniques described herein can be implemented on an electronic device 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 provides input to the electronic device. Other types of devices can also be used to provide interaction with the user; for example, 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 sound input, voice input, or tactile input).
[0107] The systems and technologies described herein can be implemented in computing systems that include backend components (e.g., as data servers), or middleware components (e.g., application servers), or frontend components (e.g., user computers with graphical user interfaces or web browsers through which users can interact with implementations of the systems and technologies described herein), or any combination of such backend, middleware, or frontend components. The components of the system can be interconnected via digital data communication of any form or medium (e.g., communication networks). Examples of communication networks include local area networks (LANs), wide area networks (WANs), blockchain networks, and the Internet.
[0108] A computing system can include clients and servers. Clients and servers are generally located far apart and typically interact through communication networks. The client-server relationship is created by computer programs running on the respective computers and having a client-server relationship with each other. The server can be a cloud server, also known as a cloud computing server or cloud host, which is a hosting product within the cloud computing service system to address the shortcomings of traditional physical hosts and VPS services, such as high management difficulty and weak business scalability.
[0109] Example 5
[0110] This invention also provides a computer program product, including a computer program that, when executed by a processor, implements the method for generating demonstration documents as provided in any embodiment of this application.
[0111] In implementing the computer program product, computer program code for performing the operations of this invention can be written in one or more programming languages or a combination thereof. Programming languages include object-oriented programming languages such as Java, Smalltalk, and C++, as well as conventional procedural programming languages such as C or similar languages. The program code can be executed entirely on the user's computer, partially on the user's computer, as a standalone software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving remote computers, the remote computer can be connected to the user's computer via any type of network—including a local area network (LAN) or a wide area network (WAN)—or can be connected to an external computer (e.g., via the Internet using an Internet service provider).
[0112] It should be understood that the various forms of processes shown above can be used, with steps reordered, added, or deleted. For example, the steps described in this invention can be executed in parallel, sequentially, or in different orders, as long as the desired result of the technical solution of this invention can be achieved, and this is not limited herein.
[0113] The specific embodiments described above do not constitute a limitation on the scope of protection of this invention. Those skilled in the art should understand that various modifications, combinations, sub-combinations, and substitutions can be made according to design requirements and other factors. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of this invention should be included within the scope of protection of this invention.< / a:t> < / p:sp>
Claims
1. A method for generating a presentation document, characterized in that, include: In response to a triggering operation of the presentation document configuration template, at least one content carrier unit to be configured in the presentation document configuration template is identified; Based on the type of the bearer unit, the data of each of the content bearer units to be configured is converted to obtain standardized configuration data corresponding to each of the content bearer units to be configured. The standardized configuration data of each of the content-carrying units to be configured is mapped to the target location of the demonstration document configuration template and saved to obtain the target demonstration document template; When the trigger operation of the target presentation document template is detected, the target presentation data associated with each item to be displayed in the target presentation document template is rendered to generate the target presentation document; wherein, the item to be displayed is associated with the content carrier unit to be configured.
2. The method according to claim 1, characterized in that, The process of identifying at least one content-carrying unit to be configured in the presentation document configuration template includes: Traverse the native code of the presentation document configuration template and determine at least one content-carrying unit in the presentation document configuration template based on at least one unit attribute tag in the native code.
3. The method according to claim 1, characterized in that, The step of performing data conversion on each of the content carrier units to be configured according to the carrier unit type to obtain standardized configuration data corresponding to each of the content carrier units to be configured includes: Based on the carrier unit type of each content carrier unit to be configured, determine the configuration editing page of the content carrier unit to be configured in the configuration conversion engine; On the configuration editing page, input the configuration information to be used corresponding to the content carrier unit to be configured, and perform tabular data conversion on the configuration information to obtain standardized configuration data corresponding to the content carrier unit to be configured.
4. The method according to claim 3, characterized in that, The step of entering the configuration information to be used corresponding to the content carrier unit to be configured on the configuration editing page includes: If the type of the carrying unit is a text data carrying unit, then the text constraint information is used as the configuration information to be used corresponding to the content carrying unit to be configured, and the configuration information to be used is input into the configuration editing page; wherein, the text constraint information includes at least one of character length threshold, text theme, text style and text data source; If the carrying unit type is a table data carrying unit, then the structured constraint information is used as the configuration information to be used for the content carrying unit to be configured, and the configuration information to be used is entered into the configuration editing page; wherein, the structured constraint information includes at least one of the following: dynamic expansion range of dimensions, cell data type, position constraints, and table data source; If the type of the carrying unit is a graphical data carrying unit, then the graphical constraint information is used as the configuration information to be used for the content carrying unit to be configured, and the configuration information to be used is input into the configuration editing page; wherein, the graphical constraint information includes at least one of graphical size, graphical style, animation effect and graphical data source.
5. The method according to claim 4, characterized in that, Also includes: If the bearer unit type is the table data bearer type, then configuration information to be used corresponding to the table data bearer type is generated according to the table data construction requirements.
6. The method according to claim 1, characterized in that, The step of rendering the target display data associated with each item to be displayed in the target presentation document template to generate the target presentation document includes: Iterate through all the items to be displayed in the target presentation document template, and obtain the target display data corresponding to each item from the data interface corresponding to each item based on the data parsing rules; The target display data corresponding to each of the items to be displayed is rendered to obtain the target demonstration document.
7. The method according to claim 6, characterized in that, The rendering process for the target display data corresponding to each of the items to be displayed includes: If the target display data corresponding to the item to be displayed is text data, then the target display data is directly filled into the display area corresponding to the item to be displayed, and rendered; and / or If the target display data corresponding to the item to be displayed is tabular data, then at least one tabular data is iterated through according to preset fields to generate a table to be displayed and render it; and / or If the target display data corresponding to the item to be displayed is graphical data, then the target display data is constrained based on the graphical constraint information of the item to be displayed to obtain the target display graphic, and then rendered.
8. A device for generating a presentation document, characterized in that, include: The identification module is used to identify at least one content carrier unit to be configured in the presentation document configuration template in response to the triggering operation of the presentation document configuration template. The conversion module is used to perform data conversion on each of the content carrier units to be configured according to the carrier unit type, so as to obtain standardized configuration data corresponding to each of the content carrier units to be configured. The document template determination module is used to map the standardized configuration data of each of the content carrier units to be configured to the target location of the demonstration document configuration template and save it to obtain the target demonstration document template. The presentation document generation module is used to render the target presentation data associated with each item to be displayed in the target presentation document template and generate a target presentation document when a trigger operation of the target presentation document template is detected; wherein, the item to be displayed is associated with the content carrier unit to be configured.
9. An electronic device, characterized in that, The electronic device includes: At least one processor; and A memory communicatively connected to the at least one processor; wherein, The memory stores a computer program that can be executed by the at least one processor, the computer program being executed by the at least one processor to enable the at least one processor to perform the method for generating the presentation document according to any one of claims 1-7.
10. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer instructions that, when executed by a processor, implement the method for generating the demonstration document according to any one of claims 1-7.