Data-driven ppt generation and image conversion method and readable medium

By adaptively selecting PPT templates and converting them to images within the 6S management system, problems such as reliance on manual PPT report creation, inconsistent formats, and delayed data updates are solved, achieving automated processing and efficient reporting.

CN122197851APending Publication Date: 2026-06-12HUAHONG INTEGRATED CIRCUIT (CHENGDU) CO LTD

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
HUAHONG INTEGRATED CIRCUIT (CHENGDU) CO LTD
Filing Date
2026-03-30
Publication Date
2026-06-12

AI Technical Summary

Technical Problem

The creation of PPT reports in the existing 6S management system relies on manual operation, which results in problems such as low efficiency, inconsistent formats, delayed data updates, lack of automated processing capabilities, and inconvenient file viewing.

Method used

By acquiring target data from the 6S management system, adaptively selecting PPT templates, generating PPT files, converting each page into images, and binding them to system content, the entire process is automated.

🎯Benefits of technology

It improves the efficiency and standardization of PPT report production, reduces labor costs, enhances the timeliness of data updates, improves the document viewing experience, and significantly improves reporting efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122197851A_ABST
    Figure CN122197851A_ABST
Patent Text Reader

Abstract

The application provides a data-driven PPT generation and picture conversion method and readable medium, the data-driven PPT generation and picture conversion method comprises the following steps: obtaining target data needing to generate PPT from a 6S management system; adaptively selecting a PPT template from a pre-configured PPT template library according to the characteristics of the target data; generating a PPT file based on the selected PPT template and the target data; converting the generated PPT file into pictures page by page; and binding the converted pictures with corresponding content of the 6S management system. This configuration can realize full-process automation from data acquisition, document generation and image conversion, thereby improving the production efficiency and standardization degree of 6S management reports, reducing labor costs, improving data update timeliness and improving file viewing experience. Since the converted pictures are bound with corresponding content of the 6S management system, it is not necessary to open multiple PPT files one by one as in the traditional way, and the reporting efficiency is significantly improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of computer software technology, and in particular to a data-driven method for generating PPT presentations and converting images, as well as a readable medium. Background Technology

[0002] Currently, the editing of PPT reports in the 6S management system relies entirely on traditional manual operation, which has exposed many pain points that urgently need to be addressed: significant bottlenecks in production efficiency, inconsistent formatting standards, high rates of human error, and increasingly prominent issues such as lagging data synchronization and updates. The main core problems at this stage are as follows:

[0003] 1. The entire process is done manually: From data collection and layout design to PPT production, everything needs to be done manually, which not only consumes a lot of human resources, but also has a long production cycle.

[0004] 2. Lack of format standardization: Due to the lack of unified production standards, PPTs produced by different operators have significant differences in visual presentation and structural layout, making it difficult to ensure the consistency and professionalism of PPT file quality.

[0005] 3. Insufficient data real-time performance: Faced with dynamically changing data information in the 6S management system, the existing model cannot achieve synchronous updates of PPT content, which seriously restricts the timeliness of decision-making.

[0006] 4. Lack of automation capabilities: For high-frequency, repetitive report generation tasks, the existing technology system has failed to provide effective automation solutions.

[0007] 5. Poor content presentation experience: In actual presentation scenarios, it is necessary to open each PPT file one by one to view the content, which is cumbersome and complicated, significantly reducing work efficiency.

[0008] Given that 6S management reports serve as the core carrier of an enterprise's safety production management system and are frequently required to be presented, the traditional manual production method is no longer sufficient to meet the high standards of modern enterprises for refined safety management and intelligent office efficiency. Summary of the Invention

[0009] The purpose of this invention is to provide a data-driven PPT generation and image conversion method and a readable medium to solve the problems in existing 6S management systems, such as PPT reports relying on manual production, low efficiency, inconsistent formats, delayed data updates, lack of automated processing capabilities, and inconvenient file viewing.

[0010] To address the aforementioned technical problems, this invention provides a data-driven method for PPT generation and image conversion, comprising:

[0011] Obtain the target data needed to generate the PPT from the 6S management system;

[0012] Based on the characteristics of the target data, a PPT template is adaptively selected from a pre-configured PPT template library;

[0013] Based on the selected PPT template and the target data, generate a PPT file;

[0014] Convert the generated PPT file into images page by page;

[0015] The converted images are then bound to the corresponding content in the 6S management system.

[0016] Optionally, the step of generating a PPT file based on the selected PPT template and the target data includes:

[0017] Extract the text pages and table pages from the PPT template as template pages;

[0018] The template page is dynamically copied based on the amount of text and tabular data.

[0019] Save the PPT to a temporary file and then reload it;

[0020] The target data is filled into the corresponding position of the copied template page by manipulating the XML source code.

[0021] Optionally, if any type of data in the text data and the table data is empty, then the corresponding template page is deleted.

[0022] Optionally, the steps for generating a PPT file may also include:

[0023] Obtain the position information of the placeholder image in the template page;

[0024] After parsing and processing the images contained in the target data, the placeholder images in the corresponding positions of the template page are replaced.

[0025] Optionally, the step of filling the target data into the corresponding position of the copied template page through XML source code manipulation includes:

[0026] Convert the template page into XML source code format;

[0027] Use regular expressions to match data markers and populate the data;

[0028] Loop through the XML string to find data placeholders;

[0029] Replace the data with placeholders to generate the slide content.

[0030] Optionally, the steps for generating a PPT file may also include:

[0031] The homepage is processed separately and populated with time data.

[0032] Optionally, after generating the PPT file, the data-driven PPT generation and image conversion method further includes:

[0033] Close the input and output streams and delete the temporary template file.

[0034] Optionally, the step of converting the generated PPT file page by page into images includes:

[0035] Build the PPT file path;

[0036] PPT initialization;

[0037] Get the dimensions of the PPT slides and render the images according to the magnification factor;

[0038] Save the image file;

[0039] Close the stream object;

[0040] The system returns image file response data to be bound to the corresponding content in the 6S management system.

[0041] Optionally, after obtaining the target data for generating the PPT, the data-driven PPT generation and image conversion method further includes:

[0042] The target data is then classified and processed.

[0043] To address the aforementioned technical problems, the present invention also provides a readable storage medium storing a program thereon, which, when executed, implements the steps of the data-driven PPT generation and image conversion method described above.

[0044] In summary, the data-driven PPT generation and image conversion method and readable medium provided by this invention include: obtaining target data for generating a PPT from a 6S management system; adaptively selecting a PPT template from a pre-configured PPT template library based on the characteristics of the target data; generating a PPT file based on the selected PPT template and the target data; converting the generated PPT file into images page by page; and binding the converted images to corresponding content in the 6S management system.

[0045] This configuration automates the entire process from data collection, document generation, and image conversion, thereby improving the efficiency and standardization of 6S management report production, reducing labor costs, enhancing data update timeliness, and improving the document viewing experience. Furthermore, by binding the converted images to corresponding content within the 6S management system, it eliminates the need to open multiple PowerPoint files individually, significantly improving reporting efficiency. Attached Figure Description

[0046] Those skilled in the art will understand that the accompanying drawings are provided to better understand the invention and do not constitute any limitation on the scope of the invention.

[0047] Figure 1 This is a flowchart of a data-driven PPT generation and image conversion method according to an embodiment of the present invention. Detailed Implementation

[0048] To make the objectives, advantages, and features of this invention clearer, the invention will be further described in detail below with reference to the accompanying drawings and specific embodiments. It should be noted that the drawings are all in a very simplified form and are not drawn to scale, and are only used to facilitate and clarify the explanation of the embodiments of this invention. Furthermore, the structures shown in the drawings are often part of the actual structures. In particular, different figures may emphasize different aspects and may sometimes use different scales.

[0049] As used in this invention, the singular forms “a,” “an,” “one,” and “the” include plural objects; the term “or” is generally used to mean “and / or”; the term “a number” is generally used to mean “at least one”; and the term “at least two” is generally used to mean “two or more”. Furthermore, the terms “first,” “second,” and “third” are used for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the number of indicated technical features. Thus, a feature defined as “first,” “second,” or “third” may explicitly or implicitly include one or at least two of that feature; “one end” and “the other end,” and “proximal end” and “distal end” generally refer to two corresponding parts, which include not only endpoints. Furthermore, the terms "installed," "connected," and "attached," as used in this invention, and the term "set" on one element from another, should be interpreted broadly. They generally only indicate a connection, coupling, cooperation, or transmission relationship between the two elements, which can be direct or indirect through an intermediate element. They should not be construed as indicating or implying a spatial relationship between the two elements, meaning one element can be located inside, outside, above, below, or to one side of another element, unless otherwise explicitly stated. Those skilled in the art can understand the specific meaning of these terms in this invention based on the specific circumstances. Additionally, directional terms such as above, below, up, down, upward, downward, left, and right are used relative to exemplary embodiments as shown in the figures, with upward or upper directions pointing towards the top of the corresponding figure, and downward or lower directions pointing towards the bottom of the corresponding figure.

[0050] The purpose of this invention is to provide a data-driven method for generating PPT presentations and converting images, along with a readable medium, to address the problems in existing 6S management systems, such as reliance on manual PPT report creation, low efficiency, inconsistent formats, delayed data updates, lack of automated processing capabilities, and inconvenient file viewing. The following description refers to the accompanying drawings.

[0051] Please refer to Figure 1 This invention provides a data-driven PPT generation and image conversion method, which includes:

[0052] Step S1: Obtain the target data for generating the PPT from the 6S management system;

[0053] Step S2: Based on the characteristics of the target data, adaptively select a PPT template from the pre-configured PPT template library;

[0054] Step S3: Generate a PPT file based on the selected PPT template and the target data;

[0055] Step S4: Convert the generated PPT file into images page by page;

[0056] Step S5: Bind the converted image to the corresponding content in the 6S management system.

[0057] In one example, the data-driven PPT generation and image conversion method can employ a client-server (C / S) architecture to achieve cross-platform collaborative processing. Optionally, step S1 may include the following steps:

[0058] Step S11: The client extracts the target data (such as structured JSON format) to be generated from the 6S management system.

[0059] Step S12: Remotely call the PPT generation interface of the server (implemented in Java) via HTTP protocol to achieve decoupling between the front end and the back end;

[0060] Step S13: Process the PPT file stream returned by the interface. Step S13 may include:

[0061] Step S131: Write the data stream to a local temporary file to provide a physical file basis for subsequent image conversion;

[0062] Step S132: Set a delay mechanism (e.g., 100ms) to ensure that the operating system completes file I / O buffering and disk writing, and avoid conversion failure due to files not being ready;

[0063] Step S133: After the target data is successfully exported, actively delete the temporary PPT file to achieve closed-loop resource management.

[0064] Preferably, after step S1, the data-driven PPT generation and image conversion method further includes: classifying the target data. The server receives JSON format data transmitted via HTTP, parses it through deserialization, and then performs intelligent classification, processing, and formatting encapsulation of text data, table data, and image data.

[0065] Step S2 is the step of adaptively matching PPT templates based on the features of the target data. In one example, the system loads a pre-configured PPT template library and automatically selects the optimal PPT template based on feature analysis of the target data. The default strategy uses multi-page templates (including cover pages, text pages, table pages, etc.); when the features of the target data detect a high-priority issue (such as the security level "urgent") and the first issue is marked as "single page", the system automatically switches to a single-page template to highlight the key issues.

[0066] Step S3 is the core process of PPT file generation. An intelligent mapping algorithm accurately fills text data into text areas, structurally fills table data into table areas, and dynamically inserts image path data into specified positions after parsing and processing. PPT file generation uses slide cloning technology to copy the basic template pages, persistently saving and reloading the template pages to achieve seamless integration of data and templates. Batch data filling operations are performed according to preset layout rules to ensure the professionalism and consistency of the generated PPT files.

[0067] In one example, the steps to generate a PPT file include:

[0068] Step S31: Extract the text pages and table pages from the PPT template as template pages;

[0069] Step S32: Dynamically copy the template page based on the amount of text data and table data;

[0070] Step S33: Save the PPT to a temporary file and then reload it;

[0071] Step S34: Fill the target data into the corresponding position of the copied template page by manipulating the XML source code.

[0072] Steps S31 and S32 involve dynamically copying the slides. For example, the text page (second page) and table page (third page) from the PPT template can be extracted as the base template pages. Based on the amount of text and table data contained in the target data obtained in step S1, the corresponding template pages are dynamically copied. For example, if there are 3 pieces of text data, then 3 copies of the text page will be made.

[0073] Optionally, if a certain type of data in the text data and the table data is empty, the corresponding template page is deleted to eliminate blank pages and optimize the document structure.

[0074] Step S33 saves the initially constructed PPT to a temporary file and closes the stream; then reloads the file to create a new stream, effectively avoiding image loss or rendering abnormalities caused by image resource loading delays, and significantly improving generation stability.

[0075] Step S34 is a data population step based on the target data. In one example, it includes the following steps:

[0076] Step S341: Process the homepage separately and populate it with time data.

[0077] Step S342: Text style control, setting differentiated font colors for specific text.

[0078] Step S343: XML source code manipulation, including:

[0079] Step S3431: Convert the template page into XML source code format;

[0080] Step S3432: Use regular expressions to match data markers and fill in the data;

[0081] Step S3433: Loop through the XML string to find data placeholders;

[0082] Step S3434: Replace the data with placeholders, and finally append the unprocessed XML content to the processed XML string; use the XML string to generate the slide content.

[0083] It should be noted that the XML source code operation in step S343 can be processed separately for text pages and table pages. Taking the text page as an example, firstly, step S3431 converts the text page into XML source code format, and then steps S3432 to S3434 directly operate on the source code. For the table page, after step S3433, redundant table rows can be optionally deleted according to the amount of table data to achieve adaptive table structure.

[0084] Optionally, the steps for generating a PPT file may also include:

[0085] Step S35: Smart replacement of the image. In one example, step S35 includes:

[0086] Step S351: Obtain the position information of the placeholder image in the template page;

[0087] Step S352: After parsing and processing the images contained in the target data, replace the placeholder images in the corresponding positions in the template page.

[0088] The template page contains placeholder images, and the positions and identifiers of all placeholder images in the template page can be pre-recorded. Step S351 obtains the position and identifier information of these placeholder images. Then, step S352 parses, processes, and replaces the images in the text page and table page according to the data type. For example, for the text page, placeholder images can be replaced sequentially, and the original template images are retained if the number is insufficient. For the table page, two images can be replaced per row; if a table row is deleted, the corresponding template image needs to be deleted simultaneously. Optionally, if image loading fails, the placeholder images in the template page can be automatically used to ensure the robustness of the process.

[0089] Optionally, after generating the PPT file in step S3, the data-driven PPT generation and image conversion method further includes:

[0090] Step S3A: Close input / output streams and delete temporary template files. Step S3A is a resource optimization and management step. After generating the PPT file, close all input / output streams (such as PPT file streams, image streams, etc.); delete the temporary template files and intermediate temporary files generated on the server. The generated PPT file is securely saved to the system temporary directory, and PPT object instances are closed in a timely manner through the resource reclamation mechanism to release occupied system memory and file handle resources, ensuring the stability and efficiency of system operation.

[0091] Understandably, based on the steps S1 to S3A above, PPT files can be automatically generated. In some application scenarios, the automatic PPT file generation steps S1 to S3A can be applied independently. For example, in a 6S management report, clicking on the issue number (ID) column will automatically generate the corresponding PPT file.

[0092] In other application scenarios, the generated PPT file can be further converted into a high-fidelity image format, and then bound to the corresponding content of the 6S management system to ensure that the issue records of the 6S management system always correspond to the latest image content.

[0093] Optionally, step S4 includes:

[0094] Step S41: Construct the PPT file path;

[0095] Step S42: PPT initialization;

[0096] Step S43: Obtain the dimensions of the PPT page and render the image according to the magnification factor;

[0097] Step S44: Save the image file;

[0098] Step S45: Close the stream object;

[0099] Step S46: Return image file response data to bind it with the corresponding content in the 6S management system.

[0100] In one example, step S41 can construct the complete path of the PPT file based on the serial number (ID) extracted from the issue record in the 6S management system. This mechanism ensures accurate location of the PPT file, avoids path conflicts, and establishes a connection with the issue record in the 6S management system, providing a path basis for subsequent image binding.

[0101] Step S42 may specifically include the following steps: creating an input stream and a list of image paths, opening a PPT file stream; creating an object to load the PPT file; and setting a preset magnification factor N for image rendering to improve image clarity.

[0102] Step S43 may specifically include the following steps:

[0103] Step S431: Obtain the original dimensions of the PPT page (i.e., the slide) and create an object with a size N times the original dimensions.

[0104] Step S432: Create a Graphics2D drawing object and set a white background;

[0105] Step S433: Apply N times scaling to enlarge the content;

[0106] Step S434: Call the vector scaling rendering function slide.draw(graphics) to draw the slide content onto the buffer image;

[0107] Step S435: Release drawing resources.

[0108] Step S44 may specifically include the following steps:

[0109] Step S441: Create the output file and parent directory (create them if they do not exist);

[0110] Step S442: Use write to write the BufferedImage to a jpeg file;

[0111] Step S443: Extract the filename from the full path and add it to the data object.

[0112] Step S45 is a resource cleanup step. After the previous steps are completed, the stream object is closed to prevent it from occupying resources.

[0113] Step S46 is the response return step. In one example, the generated image file data object (such as one containing a list of image paths) can be concatenated into a string using commas, and a ResponseEntity object can be returned with its content set to APPLICATION_OCTET_STREAM. The concatenated string is the response body. This design ensures that the generated images can be accurately associated with the corresponding issue records by the 6S management system.

[0114] In some application scenarios, you can click on the H / L column of the Issue record in the 6S management report to convert the automatically generated PPT file into a high-fidelity image format, and then bind it with the corresponding content in the 6S management system.

[0115] The data-driven PPT generation and image conversion method provided in this embodiment offers several advantages. Firstly, it enables centralized data management. This unifies data, establishes a centralized data display, effectively solves the problem of information fragmentation, and achieves high data integration. It also enables an efficient reporting mechanism, eliminating the tedious process of opening multiple PPT files individually, significantly improving reporting efficiency. Secondly, it significantly improves work efficiency. It allows for seamless information retrieval; access to problem records from the 6S management system requires no manual entry and can be done with a single click, greatly enhancing ease of use. The automatic generation of PPT files replaces traditional manual creation, significantly shortening production time and improving work efficiency.

[0116] This invention also provides a readable storage medium storing a program thereon, which, when executed, implements the steps of the data-driven PPT generation and image conversion method described above.

[0117] In summary, the data-driven PPT generation and image conversion method and readable medium provided by this invention include: obtaining target data for generating a PPT from a 6S management system; adaptively selecting a PPT template from a pre-configured PPT template library based on the characteristics of the target data; generating a PPT file based on the selected PPT template and the target data; converting the generated PPT file into images page by page; and binding the converted images to corresponding content in the 6S management system.

[0118] This configuration automates the entire process from data collection, document generation, and image conversion, thereby improving the efficiency and standardization of 6S management report production, reducing labor costs, enhancing data update timeliness, and improving the document viewing experience. Furthermore, by binding the converted images to corresponding content within the 6S management system, it eliminates the need to open multiple PowerPoint files individually, significantly improving reporting efficiency.

[0119] It should be noted that the above embodiments can be combined with each other. The above description is only a description of preferred embodiments of the present invention and is not intended to limit the scope of the present invention in any way. Any changes or modifications made by those skilled in the art based on the above disclosure shall fall within the protection scope of the present invention.

Claims

1. A data-driven method for PPT generation and image conversion, characterized in that, include: Obtain the target data needed to generate the PPT from the 6S management system; Based on the characteristics of the target data, a PPT template is adaptively selected from a pre-configured PPT template library; Based on the selected PPT template and the target data, generate a PPT file; Convert the generated PPT file into images page by page; The converted images are then bound to the corresponding content in the 6S management system.

2. The data-driven PPT generation and image conversion method according to claim 1, characterized in that, The steps for generating a PPT file based on the selected PPT template and the target data include: Extract the text pages and table pages from the PPT template as template pages; The template page is dynamically copied based on the amount of text and tabular data. Save the PPT to a temporary file and then reload it; The target data is filled into the corresponding position of the copied template page by manipulating the XML source code.

3. The data-driven PPT generation and image conversion method according to claim 2, characterized in that, If any type of data in the text data and the table data is empty, then the corresponding template page is deleted.

4. The data-driven PPT generation and image conversion method according to claim 2, characterized in that, The steps to generate a PPT file also include: Obtain the position information of the placeholder image in the template page; After parsing and processing the images contained in the target data, the placeholder images in the corresponding positions of the template page are replaced.

5. The data-driven PPT generation and image conversion method according to claim 2, characterized in that, The steps of filling the target data into the corresponding positions of the copied template page through XML source code manipulation include: Convert the template page into XML source code format; Use regular expressions to match data markers and populate the data; Loop through the XML string to find data placeholders; Replace the data with placeholders to generate the slide content.

6. The data-driven PPT generation and image conversion method according to claim 2, characterized in that, The steps to generate a PPT file also include: The homepage is processed separately and populated with time data.

7. The data-driven PPT generation and image conversion method according to claim 1, characterized in that, After generating the PPT file, the data-driven PPT generation and image conversion method further includes: Close the input and output streams and delete the temporary template file.

8. The data-driven PPT generation and image conversion method according to claim 1, characterized in that, The steps to convert the generated PPT file page by page into images include: Build the PPT file path; PPT initialization; Get the dimensions of the PPT slides and render the images according to the magnification factor; Save the image file; Close the stream object; The system returns image file response data to be bound to the corresponding content in the 6S management system.

9. The data-driven PPT generation and image conversion method according to claim 1, characterized in that, After obtaining the target data for generating the PPT, the data-driven PPT generation and image conversion method further includes: The target data is then classified and processed.

10. A readable storage medium having a program stored thereon, characterized in that, When the program is executed, it implements the steps of the data-driven PPT generation and image conversion method according to any one of claims 1 to 9.