Automatic method and device for PowerPoint file, equipment and storage medium
By analyzing and updating the template page and interface request parameters in the presentation file, the automatic generation of presentation files is achieved, solving the problems of traditional manual editing inefficiency and information loss, and improving the generation efficiency and accuracy.
Patent Information
- Application Number
- CN202411185796.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-27
- Publication Date
- 2024-12-17
AI Technical Summary
Traditional presentation file production relies on manual editing, resulting in low generation efficiency and easy information loss, affecting the accuracy of the file.
By parsing multiple local presentation pages in the local presentation file, obtaining the presentation template file and interface request parameters, calling the interface to obtain target information, updating variable information to generate the target presentation file, and achieving automated generation.
Improve the efficiency of the production of presentation files, ensure the accuracy of the files, and avoid the loss of information during the generation process.
Smart Images

Figure CN119149499A_ABST
Abstract
Description
Technical Field
[0001] Embodiments of the present disclosure relate to the field of data processing, and in particular, to an automatic method, apparatus, device and storage medium for presentation files. Background Art
[0002] Presentations (PowerPoint, PPT) are widely used in daily work as one of the reporting media for daily meetings and summaries. When making PPTs, different companies or content synchronization departments of companies usually have some prescribed PPT format templates, and the writers only need to insert the corresponding content, such as pictures, tables and / or texts, into the corresponding positions of the corresponding presentation pages as needed.
[0003] Traditional presentation file production relies on manual editing, resulting in low efficiency in presentation file generation. Summary of the invention
[0004] The embodiments described herein provide an automatic method, apparatus, device, and storage medium for generating presentation files, which can improve the efficiency of generating presentation files and also improve the accuracy of presentation files.
[0005] In a first aspect, the present disclosure provides a method for automatically generating a presentation file, comprising:
[0006] Parse multiple local presentation pages in a local presentation file to obtain a presentation template file, wherein the presentation template file includes multiple presentation template pages; parse each presentation template page in the presentation template file to obtain an interface request parameter corresponding to each presentation template page; according to the interface request parameter corresponding to each presentation template page in the presentation template file, call a corresponding interface to obtain target information corresponding to each presentation template page in the presentation template file; according to the target information corresponding to each presentation template page, update variable information corresponding to each presentation template page to generate a target presentation file.
[0007] In some embodiments of the present disclosure, parsing multiple local presentation pages in a local presentation file to obtain a presentation template file includes:
[0008] All shape elements in each of the local presentation pages are read, and the shape elements include text boxes, tables and pictures; the attribute information of the shape elements corresponding to each of the local presentation pages is parsed to obtain each of the presentation template pages, and the attribute information includes position information, size information and style information.
[0009] In some embodiments of the present disclosure, the parsing of each presentation template page in the presentation template file to obtain the interface request parameter corresponding to each presentation template page includes:
[0010] Read and parse each presentation template page in the presentation template file to obtain the variable information corresponding to each presentation template page; determine the corresponding interface request parameter according to the variable information corresponding to each presentation template page.
[0011] In some embodiments of the present disclosure, determining the corresponding interface request parameter according to the variable information corresponding to each presentation template page includes:
[0012] Generate original interface request parameters corresponding to each presentation template page according to the variable information corresponding to each presentation template page; adjust the original interface request parameters corresponding to each presentation template page according to business requirements to obtain the interface request parameters corresponding to each presentation template page.
[0013] In some embodiments of the present disclosure, parsing multiple local presentation pages in a local presentation file to obtain a presentation template file includes:
[0014] The multiple local presentation pages of each local presentation file in the multiple local presentation files are parsed to obtain the multiple presentation template files and their corresponding template identifiers.
[0015] Before calling the corresponding interface to obtain the target information corresponding to each presentation template page in the presentation template file according to the interface request parameter corresponding to each presentation template page in the presentation template file, the method further includes:
[0016] Send the multiple template identifiers and their corresponding presentation template files and all interface request parameters to the database for storage; update the corresponding presentation template files according to business needs.
[0017] In some embodiments of the present disclosure, before calling the corresponding interface to obtain the target information corresponding to each presentation template page in the presentation template file according to the interface request parameter corresponding to each presentation template page in the presentation template file, the method further includes:
[0018] Receive a target presentation file generation instruction, the target presentation file generation instruction includes a target template identifier, and the multiple template identifiers stored in the database include the target template identifier; according to the target template identifier, obtain the target presentation template file and all target interface request parameters from the database.
[0019] In some embodiments of the present disclosure, the calling of the corresponding interface to obtain the target information corresponding to each presentation template page in the presentation template file according to the interface request parameter corresponding to each presentation template page in the presentation template file includes:
[0020] According to the target interface request parameters corresponding to each target presentation template page in the target presentation template file, the target request parameters are sent to the target interface; and the target information corresponding to each target presentation template page in the target presentation template file returned by the target interface is received.
[0021] In a second aspect, the present disclosure provides an automatic generation device for a presentation file, comprising:
[0022] A parsing module, used for parsing a plurality of local presentation pages in a local presentation file to obtain a presentation template file, wherein the presentation template file includes a plurality of presentation template pages; parsing each of the presentation template pages in the presentation template file to obtain an interface request parameter corresponding to each of the presentation template pages;
[0023] A calling module, used for calling a corresponding interface to obtain target information corresponding to each presentation template page in the presentation template file according to an interface request parameter corresponding to each presentation template page in the presentation template file;
[0024] An updating module is used to update the variable information corresponding to each presentation template page according to the target information corresponding to each presentation template page to generate a target presentation file.
[0025] In a third aspect, the present disclosure provides an electronic device, comprising a processor, wherein the processor is configured to execute a computer program stored in a memory, wherein the computer program, when executed by the processor, implements the steps of any one of the methods provided in the first aspect.
[0026] In a fourth aspect, the present disclosure provides a computer-readable storage medium having a computer program stored thereon, and when the computer program is executed by a processor, the steps of any method provided in the first aspect are implemented.
[0027] In the technical solution provided by the present disclosure, a presentation template file including multiple presentation template pages is obtained by parsing multiple local presentation pages in a local presentation file, and each presentation template page in the presentation template file is parsed to obtain the interface request parameters corresponding to each presentation template page. According to the interface request parameters corresponding to each presentation template page in the presentation template file, the corresponding interface is called to obtain the target information corresponding to each presentation template page in the presentation template file, and according to the target information corresponding to each presentation template page, the variable information corresponding to each presentation template page is updated to generate the target presentation file, so that the presentation file can be automatically generated, thereby improving the generation efficiency of the presentation file. Since the presentation template file is obtained based on the local presentation file, there is no need to manually make the template file separately, which can further improve the generation efficiency of the presentation file. In addition, the presentation file is obtained by replacing the variable information in the presentation template file, so the information in the presentation template file will not be lost during the generation process of the presentation file, which can improve the accuracy of the presentation file. BRIEF DESCRIPTION OF THE DRAWINGS
[0028] In order to more clearly illustrate the technical solutions of the embodiments of the present disclosure, the drawings of the embodiments will be briefly described below. It should be noted that the drawings described below only relate to some embodiments of the present disclosure, but are not intended to limit the present disclosure, wherein:
[0029] Figure 1 A flowchart of a method for automatically generating a presentation file provided by an embodiment of the present disclosure;
[0030] Figure 2 A flowchart of another method for automatically generating a presentation file provided by an embodiment of the present disclosure;
[0031] Figure 3 A flowchart of another method for automatically generating a presentation file provided in an embodiment of the present disclosure;
[0032] Figure 4 A schematic diagram of the structure of an automatic generation device for a presentation document provided in an embodiment of the present disclosure;
[0033] Figure 5 A schematic diagram of the structure of an electronic device provided in an embodiment of the present disclosure. DETAILED DESCRIPTION
[0034] In order to make the purpose, technical solution and advantages of the embodiments of the present disclosure clearer, the technical solution of the embodiments of the present disclosure will be clearly and completely described below in conjunction with the accompanying drawings. Obviously, the described embodiments are part of the embodiments of the present disclosure, rather than all of the embodiments. Based on the described embodiments of the present disclosure, all other embodiments obtained by those skilled in the art without creative work also fall within the scope of protection of the present disclosure.
[0035] Unless otherwise defined, all terms (including technical and scientific terms) used herein have the same meaning as commonly understood by those skilled in the art to which the subject matter of the present disclosure belongs. It will be further understood that terms such as those defined in commonly used dictionaries should be interpreted as having a meaning consistent with their meanings in the context of the specification and the relevant art, and will not be interpreted in an idealized or overly formal form unless otherwise explicitly defined herein. In addition, terms such as "first" and "second" are only used to distinguish one component (or a portion of a component) from another component (or another portion of a component).
[0036] Figure 1 A flowchart of a method for automatically generating a presentation file provided by an embodiment of the present disclosure is shown in FIG. Figure 1 As shown, the specific steps of the method for automatically generating a presentation file include:
[0037] S101, parsing multiple local presentation pages in a local presentation file to obtain a presentation template file.
[0038] The presentation template file includes multiple presentation template pages.
[0039] Exemplarily, a local presentation file in ppt format or pptx format is obtained by locally uploading or receiving remote transmission, wherein the local presentation file may include at least three local presentation pages, and the at least three local presentation pages here may include a title page, an end page and at least one middle content page.
[0040] For example, the title page may include body text, pictures, headers and footers. The body text may be the title of the local presentation file, or the title and report time of the local presentation file, the header may be the company name and / or department name, the footer may be the page number of the title page, and the picture may be a background picture.
[0041] For example, the end page may include body text, pictures, headers and footers, wherein the body text may include a thank you note, the header is the same as the header of the title page, the footer is the page number of the end page, and the picture may be a background picture.
[0042] For example, the middle content page may include at least one of a picture, a body text, and a table, as well as a header and a footer, wherein the header is the same as the header of the title page, the footer is the page number of the corresponding middle content page, and the picture includes a background picture and a content picture.
[0043] A specific description of a possible implementation method when executing S101 is as follows:
[0044] All shape elements in each local presentation page are read, wherein the shape elements include text boxes, tables and pictures. Attribute information of the shape elements corresponding to each local presentation page is parsed to obtain each presentation template page, wherein the attribute information includes position information, size information and style information.
[0045] Exemplarily, all local presentation pages in the local presentation file are read through the open source POI technology provided by Apache, all text boxes, all tables and all pictures in each local presentation page are read in turn, and the shape elements corresponding to each local presentation page are determined.
[0046] The shape element corresponding to each local presentation page may be any one of a text box, a table and a picture. For example, the shape element corresponding to each local presentation page may be a text box, a table or a picture. The shape element corresponding to each local presentation page may be two of a text box, a table and a picture. For example, the shape element corresponding to each local presentation page may be a text box and a table, or a table and a picture, or a text box and a picture. The shape element corresponding to each local presentation page may also be a text box, a table and a picture.
[0047] If the shape element corresponding to a local presentation page in the local presentation file includes a text box, the lower left corner position information of the text box can be used as the position information of the text box. By parsing the position information of the text box, the horizontal and vertical coordinates of the text box in the current local presentation page can be obtained. By parsing the size information of the text box, the length and width, or radius of the text box in the current local presentation page can be obtained. By parsing the style information of the text box, the font, font size, font style, font color and other information of the text box can be obtained.
[0048] In other implementations, the upper left corner position information, the upper right corner position information, or the lower right corner position information of the text box may also be used as the position information of the text box, and the present disclosure does not impose any specific limitation on this.
[0049] If the shape element corresponding to a local presentation page in a local presentation file includes a table, the position information of the lower left corner of the table can be used as the position information of the table. By parsing the position information of the table, the horizontal and vertical coordinates of the table in the current local presentation page can be obtained. By parsing the size information of the table, the length and width of the table in the current local presentation page, as well as the row height and column width of the table can be obtained. By parsing the style information of the table, the font, font size, font style, font color and automatic adjustment format of the cell can be obtained.
[0050] In other implementations, the upper left corner position information, the upper right corner position information, or the lower right corner position information of the table may also be used as the position information of the table, and the present disclosure does not impose any specific limitation on this.
[0051] If the shape element corresponding to a local presentation page in the local presentation file includes a picture, the position information of the lower left corner of the picture can be used as the position information of the picture. By parsing the position information of the picture, the horizontal and vertical coordinates of the picture in the current local presentation page can be obtained. By parsing the size information of the picture, the length and width of the picture in the current local presentation page can be obtained. By parsing the style information of the picture, the format and resolution of the picture can be obtained.
[0052] Based on the attribute information of all shape elements corresponding to each local presentation page in the local presentation file, each local presentation page is converted into a corresponding presentation template page, thereby obtaining multiple presentation template pages corresponding to the local presentation file, that is, obtaining a presentation template file. The presentation template file is in a structured JSON format.
[0053] S102, parsing each presentation template page in the presentation template file to obtain an interface request parameter corresponding to each presentation template page.
[0054] Exemplarily, each shape element in a presentation template page includes fixed information and variable information, wherein the fixed information may include position information, size information and partial style information, and the variable information may include element content, such as data in a table, text and image content in a text box, or may also include partial style information.
[0055] Figure 2 A flowchart of another method for automatically generating a presentation file provided by an embodiment of the present disclosure is provided. Figure 2 for Figure 1 Based on the illustrated embodiment, a possible implementation method for executing S102 is specifically described as follows:
[0056] S201, reading and parsing each presentation template page in the presentation template file to obtain variable information corresponding to each presentation template page.
[0057] Exemplarily, all shape elements of each presentation template page in the presentation template file are read and parsed to obtain variable information corresponding to all shape elements of each presentation template page in the presentation template file.
[0058] S202: Determine corresponding interface request parameters according to variable information corresponding to each presentation template page.
[0059] Exemplarily, firstly, the original interface request parameters corresponding to each presentation template page are generated according to the variable information corresponding to each presentation template page, and then the original interface request parameters corresponding to each presentation template page are adjusted according to business needs to obtain the interface request parameters corresponding to each presentation template page.
[0060] In actual business needs, the shape element content of some shape elements of each presentation template page in the presentation template file can be unchanged, for example, the text in the text box, background image and header in the end page. Based on this, it can be set whether the shape element content adjustment in the original interface request parameters of all shape elements of each presentation template page in the presentation template file is required to obtain the interface request parameters corresponding to each presentation template page.
[0061] For example, if the shape element content in the interface request parameters of a shape element is adjusted to be optional, the shape element content is defaulted or the corresponding shape element content in the presentation template page is used. If it is required, the shape element content in the presentation template page is replaced and updated.
[0062] In other implementations, the original interface request parameters corresponding to each presentation template page in the presentation template file may be adjusted based on other actual business requirements to obtain the interface request parameters corresponding to each presentation template page.
[0063] S103: According to the interface request parameters corresponding to each presentation template page in the presentation template file, a corresponding interface is called to obtain target information corresponding to each presentation template page in the presentation template file.
[0064] Exemplarily, the target information is replacement information of the variable information, and the target information is the content of the shape element, for example, the data in a table, the text in a text box, and the content of a picture.
[0065] When a target presentation file needs to be generated, the interface request parameters corresponding to each presentation template page in the presentation template file are sent to the corresponding interface to call the corresponding interface, thereby receiving the target information corresponding to each presentation template page in the presentation template file sent by the interface.
[0066] S104, updating variable information corresponding to each presentation template page according to target information corresponding to each presentation template page to generate a target presentation file.
[0067] Exemplarily, the presentation template file is read and opened, and all variable information corresponding to each received presentation template page is replaced with corresponding target information to obtain each target presentation page, thereby obtaining a target presentation file.
[0068] For example, the variable information that needs to be replaced in a presentation template page in a presentation template file is text W1 in the text box. After the corresponding interface request parameter is sent to the corresponding interface, the target information obtained is text W2. Then, text W1 is replaced with text W2 to obtain the corresponding target presentation page.
[0069] In the disclosed embodiment, a presentation template file including multiple presentation template pages is obtained by parsing multiple local presentation pages in a local presentation file, and each presentation template page in the presentation template file is parsed to obtain the interface request parameters corresponding to each presentation template page. According to the interface request parameters corresponding to each presentation template page in the presentation template file, the corresponding interface is called to obtain the target information corresponding to each presentation template page in the presentation template file. According to the target information corresponding to each presentation template page, the variable information corresponding to each presentation template page is updated to generate the target presentation file. The presentation file can be automatically generated, thereby improving the generation efficiency of the presentation file. Since the presentation template file is obtained based on the local presentation file, there is no need to manually make the template file separately, which can further improve the generation efficiency of the presentation file. In addition, the presentation file is obtained by replacing the variable information in the presentation template file, so the information in the presentation template file will not be lost during the generation process of the presentation file, which can improve the accuracy of the presentation file.
[0070] In some embodiments, Figure 3 A flowchart of another method for automatically generating a presentation file provided in an embodiment of the present disclosure is provided. Figure 3 for Figure 1 Based on the illustrated embodiment, a possible implementation method for executing S101 is specifically described as follows:
[0071] S101', parsing a plurality of local presentation pages of each local presentation file in a plurality of local presentation files to obtain a plurality of presentation template files and their corresponding template identifiers.
[0072] Exemplarily, the local end can obtain multiple local presentation files, each local presentation file corresponds to a different presentation template file, and each presentation template file corresponds to a template identifier. Multiple local presentation files can be parsed separately to obtain multiple presentation template files and their corresponding template identifiers.
[0073] For example, the local end includes local presentation files PPT1 and PPT2, parses multiple local presentation pages in the local presentation file PPT1, obtains template identifier ID1 and presentation template file JSON1, parses multiple local presentation pages in the local presentation file PPT2, obtains template identifier ID2 and presentation template file JSON2.
[0074] The embodiment of the present disclosure only illustrates an example in which the local end includes two local presentation files. In actual applications, the local end may include three or more local presentation files, and the three or more local presentation files are parsed to obtain three or more template identifiers and their corresponding presentation template files.
[0075] Continue to see Figure 3 , before executing S103, the method further includes:
[0076] S301, sending multiple template identifiers and their corresponding presentation template files and all interface request parameters to a database for storage.
[0077] Exemplarily, based on the above embodiment, the template identifier ID2 and its corresponding presentation template file JSON2 are sent to the database, and the template identifier ID1 and its corresponding presentation template file JSON1 are sent to the database.
[0078] Based on the above embodiment, by parsing each presentation template page in the presentation template file JSON1, all interface request parameters R1 corresponding to the presentation template file JSON1 can be obtained, all interface request parameters R1 are sent to the database, and are bound to the presentation template file JSON1. By parsing each presentation template page in the presentation template file JSON2, all interface request parameters R2 corresponding to the presentation template file JSON2 can be obtained, all interface request parameters R2 are sent to the database, and are bound to the presentation template file JSON2.
[0079] In this way, multiple template identifiers, presentation template files corresponding to each template identifier, and all interface request parameters can be saved based on the database.
[0080] S302: Update the corresponding presentation template file according to business needs.
[0081] For example, in actual business needs, it may be necessary to modify the fixed information of the shape elements of some presentation template pages in the presentation template file, for example, modify the position information, size information and / or part of the style information of the shape elements of a presentation template page in the presentation template file. Based on this, the fixed information to be modified in the presentation template file can be modified to update the presentation template file.
[0082] In the disclosed embodiment, multiple local presentation pages of each local presentation file in multiple local presentation files are parsed to obtain multiple presentation template files and their corresponding template identifiers, and the multiple template identifiers and their corresponding presentation template files and all interface request parameters are sent to the database for storage. The corresponding presentation template files are updated according to business needs, and new presentation template files can be quickly generated, thereby improving the generation efficiency of presentation files.
[0083] In some embodiments, see Figure 3 , before executing S103, the method further includes:
[0084] S303, receiving a target presentation file generation instruction.
[0085] The target presentation file generation instruction includes a target template identifier, and the multiple template identifiers stored in the database include the target template identifier.
[0086] Exemplarily, the target template identifier may be one of all template identifiers stored in the database, or may be a plurality of all template identifiers stored in the database. When the user needs to generate a target presentation file, an instruction for generating the target presentation file, ie, a target presentation file generating instruction, is triggered.
[0087] S304, acquiring the target presentation template file and all target interface request parameters from the database according to the target template identifier.
[0088] Exemplarily, if the target presentation file generation instruction includes the target template identifier ID1, all template identifiers in the database are traversed based on the target template identifier ID1, and the obtained target presentation template file is the presentation template file JSON1, and the target interface request parameter is the interface request parameter R1.
[0089] If the target presentation file generation instruction includes target template identifiers ID1 and ID2, all template identifiers in the database are traversed based on the target template identifier ID1, and all template identifiers in the database are traversed based on the target template identifier ID2, the obtained target presentation template files are presentation template files JSON1 and JSON2, and the target interface request parameters are interface request parameters R1 and R2.
[0090] Exemplarily, the interface request parameter includes an interface parameter and a request parameter, wherein the interface parameter represents a receiving interface of the request parameter, and the request parameter represents a parameter requested to the receiving interface.
[0091] Based on the above embodiment, a possible implementation method of executing S103 is specifically described as follows:
[0092] According to the target interface request parameters corresponding to each target presentation template page in the target presentation template file, the target request parameters are sent to the target interface, and the target information corresponding to each target presentation template page in the target presentation template file returned by the target interface is received.
[0093] Based on the above embodiment, if the target presentation template file obtained is the presentation template file JSON1, the target interface request parameter is the interface request parameter R1, the target interface request parameter R1 includes the target interface parameter IP1 and the target request parameter RP1, the target request parameter IP1 is sent to the target interface API1 corresponding to the target interface parameter IP1, and the target information corresponding to each target presentation template page in the target presentation template file returned by the target interface API1 is received.
[0094] If the target presentation template files obtained are presentation template files JSON1 and JSON2, the target interface request parameters are interface request parameters R1 and R2, the target interface request parameter R1 includes target interface parameter IP1 and target request parameter RP1, and the target interface request parameter R2 includes target interface parameter IP2 and target request parameter RP2.
[0095] The target request parameter IP1 is sent to the target interface API1 corresponding to the target interface parameter IP1, and the target information corresponding to each target presentation template page in the target presentation template file returned by the target interface API1 is received. The target request parameter IP2 is sent to the target interface API2 corresponding to the target interface parameter IP2, and the target information corresponding to each target presentation template page in the target presentation template file returned by the target interface API2 is received.
[0096] In this way, multiple target presentation files can be generated simultaneously, which can further improve the generation efficiency of presentation files.
[0097] Based on the above embodiment, the task result and task process of each target presentation file generation task are monitored in real time, and the failure reason when the task fails is recorded, so as to improve the success rate of generating presentation files.
[0098] The present disclosure also provides an automatic device for presentation files. Figure 4 A schematic diagram of a structure of an automatic generation device for a presentation file provided by an embodiment of the present disclosure, such as Figure 4 As shown, the automatic generation device of the presentation file includes:
[0099] The parsing module 110 is used to parse multiple local presentation pages in a local presentation file to obtain a presentation template file, wherein the presentation template file includes multiple presentation template pages; parse each presentation template page in the presentation template file to obtain the interface request parameters corresponding to each presentation template page.
[0100] The calling module 120 is used to call the corresponding interface according to the interface request parameters corresponding to each presentation template page in the presentation template file to obtain the target information corresponding to each presentation template page in the presentation template file.
[0101] The updating module 130 is used to update the variable information corresponding to each presentation template page according to the target information corresponding to each presentation template page to generate a target presentation file.
[0102] In some embodiments, the parsing module 110 is further used to read all shape elements in each of the local presentation pages, the shape elements including text boxes, tables and pictures; parse the attribute information of the shape elements corresponding to each of the local presentation pages to obtain each of the presentation template pages, the attribute information including position information, size information and style information.
[0103] In some embodiments, the parsing module 110 is further used to read and parse each of the presentation template pages in the presentation template file to obtain the variable information corresponding to each of the presentation template pages; and determine the corresponding interface request parameters based on the variable information corresponding to each of the presentation template pages.
[0104] In some embodiments, the parsing module 110 is further used to generate original interface request parameters corresponding to each presentation template page based on the variable information corresponding to each presentation template page; adjust the original interface request parameters corresponding to each presentation template page according to business needs to obtain the interface request parameters corresponding to each presentation template page.
[0105] In some embodiments, the parsing module 110 is further used to parse multiple local presentation pages of each local presentation file in the multiple local presentation files to obtain multiple presentation template files and their corresponding template identifiers.
[0106] The automatic generation device of the presentation file also includes:
[0107] The sending module is used to send the multiple template identifiers and their corresponding presentation template files and all interface request parameters to the database for storage.
[0108] The updating module 130 is also used to update the corresponding presentation template file according to business requirements.
[0109] In some embodiments, the automatic generation device of the presentation file further includes:
[0110] A receiving module, configured to receive a target presentation file generation instruction, wherein the target presentation file generation instruction includes a target template identifier, and the plurality of template identifiers stored in the database include the target template identifier;
[0111] The acquisition module is used to acquire the target presentation template file and all target interface request parameters from the database according to the target template identifier.
[0112] In some embodiments, the calling module 120 is further used to send a target request reference to the target interface according to the target interface request parameters corresponding to each target presentation template page in the target presentation template file; and receive the target information corresponding to each target presentation template page in the target presentation template file returned by the target interface.
[0113] The device provided in the embodiment of the present disclosure is used to execute the steps provided in any of the above method embodiments, has functional modules corresponding to the method embodiments, and has the beneficial effects of the method embodiments, which will not be repeated here.
[0114] The present disclosure further provides an electronic device, comprising: a processor, wherein the processor is used to execute a computer program stored in a memory, and the computer program implements the steps of the method embodiment of the present disclosure when executed by the processor.
[0115] Figure 5 A schematic diagram of the structure of an electronic device provided by the present disclosure is shown in FIG. Figure 5 A block diagram of an exemplary electronic device suitable for implementing the embodiments of the present disclosure is shown. Figure 5 The electronic device shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present disclosure.
[0116] like Figure 5 As shown, the electronic device 12 is in the form of a general purpose computing device. The components of the electronic device 12 may include, but are not limited to: one or more processors 16, a system memory 28, and a bus 18 that connects various system components (including the system memory 28 and the processor 16).
[0117] Bus 18 represents one or more of several types of bus structures, including a memory bus or memory controller, a peripheral bus, an accelerated graphics port, a processor or a local bus using any of a variety of bus architectures. By way of example, these architectures include, but are not limited to, an Industry Standard Architecture (ISA) bus, a Micro Channel Architecture (MAC) bus, an Enhanced ISA bus, a Video Electronics Standards Association (VESA) local bus, and a Peripheral Component Interconnect (PCI) bus.
[0118] The electronic device 12 typically includes a variety of computer system readable media. These media can be any media that can be accessed by the electronic device 12, including volatile and non-volatile media, removable and non-removable media.
[0119] The system memory 28 may include computer system readable media in the form of volatile memory, such as random access memory (RAM) 30 and / or cache memory 32. The electronic device 12 may further include other removable / non-removable, volatile / non-volatile computer system storage media. By way of example only, the storage system 34 may be used to read and write non-removable, non-volatile magnetic media (commonly referred to as "hard drives"). A disk drive for reading and writing removable non-volatile disks (such as "floppy disks"), and an optical disk drive for reading and writing removable non-volatile optical disks (such as CD-ROMs, DVD-ROMs, or other optical media) may be provided. In these cases, each drive may be connected to the bus 18 via one or more data media interfaces. The system memory 28 may include at least one program product having a set (e.g., at least one) of program modules that are configured to perform the functions of the various embodiments of the present disclosure.
[0120] A program / utility 40 having a set (at least one) of program modules 42 may be stored, for example, in system memory 28, such program modules 42 including, but not limited to, an operating system, one or more application programs, other program modules, and program data, each of which or some combination thereof may include an implementation of a network environment. Program modules 42 generally perform the functions and / or methods of the embodiments described in the embodiments of the present disclosure.
[0121] The processor 16 executes various functional applications and data processing by running at least one program among a plurality of programs stored in the system memory 28 , such as implementing the method embodiment provided in the embodiment of the present disclosure.
[0122] The present disclosure also provides a computer-readable storage medium having a computer program stored thereon, and the computer program implements the steps of the above method embodiment when executed by a processor.
[0123] Any combination of one or more computer-readable media can be used. Computer-readable media can be computer-readable signal media or computer-readable storage media. Computer-readable storage media can be, for example, but not limited to, electrical, magnetic, optical, electromagnetic, infrared, or semiconductor systems, devices or devices, or any combination of the above. More specific examples (non-exhaustive list) of computer-readable storage media include: electrical connections with one or more wires, portable computer disks, hard disks, random access memories (RAM), read-only memories (ROM), erasable programmable read-only memories (EPROM or flash memory), optical fibers, portable compact disk read-only memories (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination of the above. In this document, computer-readable storage media can be any tangible medium containing or storing a program, which can be used by an instruction execution system, device or device or used in combination with it.
[0124] Computer-readable signal media may include data signals propagated in baseband or as part of a carrier wave, which carry computer-readable program code. Such propagated data signals may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. Computer-readable signal media may also be any computer-readable medium other than a computer-readable storage medium, which may send, propagate, or transmit a program for use by or in conjunction with an instruction execution system, apparatus, or device.
[0125] The program code embodied on the computer readable medium may be transmitted using any appropriate medium, including but not limited to wireless, wireline, optical fiber cable, RF, etc., or any suitable combination of the foregoing.
[0126] Computer program code for performing the operations of the present disclosure may be written in one or more programming languages or a combination thereof, including object-oriented programming languages, such as Java, Smalltalk, C++, and conventional procedural programming languages, such as "C" or similar programming languages. The program code may be executed entirely on the user's computer, partially on the user's computer, as a separate software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN) domain, or may be connected to an external computer (e.g., via the Internet using an Internet service provider).
[0127] The present disclosure also provides a computer program product. When the computer program product is run on a computer, the computer is enabled to execute the steps of implementing the above method embodiments.
[0128] The flow chart and block diagram in the accompanying drawings show the possible architecture, function and operation of the device and method according to multiple embodiments of the present disclosure. In this regard, each square box in the flow chart or block diagram can represent a part of a module, a program segment or an instruction, and a part of the module, a program segment or an instruction includes one or more executable instructions for realizing the specified logical function. In some alternative implementations, the functions marked in the square box can also occur in a sequence different from that marked in the accompanying drawings. For example, two continuous square boxes can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each square box in the block diagram and / or flow chart, and the combination of the square boxes in the block diagram and / or flow chart can be implemented with a dedicated hardware-based system that performs a specified function or action, or can be implemented with a combination of special hardware and computer instructions.
[0129] Unless the context clearly indicates otherwise, the singular form of the words used herein and in the appended claims includes the plural and vice versa. Thus, when referring to the singular, the plural form of the corresponding term is generally included. Similarly, the words "comprise" and "include" are to be interpreted as inclusive rather than exclusive. Likewise, the terms "include" and "or" should be interpreted as inclusive unless such interpretation is expressly prohibited herein. Where the term "example" is used herein, particularly when it is located after a group of terms, the "example" is merely exemplary and illustrative and should not be considered exclusive or comprehensive.
[0130] Further aspects and scopes of adaptability become apparent from the description provided herein. It should be understood that various aspects of the present disclosure can be implemented individually or in combination with one or more other aspects. It should also be understood that the description and specific embodiments herein are intended for purposes of illustration only and are not intended to limit the scope of the present disclosure.
[0131] Several embodiments of the present disclosure are described in detail above, but it is obvious that those skilled in the art can make various modifications and variations to the embodiments of the present disclosure without departing from the spirit and scope of the present disclosure. The protection scope of the present disclosure is defined by the attached claims.
Claims
1. A method for automatically generating a presentation document, characterized in that: include: Parsing multiple local presentation pages in a local presentation file to obtain a presentation template file, wherein the presentation template file includes multiple presentation template pages; Parsing each of the presentation template pages in the presentation template file to obtain interface request parameters corresponding to each of the presentation template pages; According to the interface request parameters corresponding to each presentation template page in the presentation template file, calling the corresponding interface to obtain the target information corresponding to each presentation template page in the presentation template file; According to the target information corresponding to each of the presentation template pages, the variable information corresponding to each of the presentation template pages is updated to generate a target presentation file.
2. The method according to claim 1, characterized in that The parsing of the multiple local presentation pages in the local presentation file to obtain the presentation template file includes: Reading all shape elements in each of the local presentation pages, the shape elements including text boxes, tables and pictures; Analyze the attribute information of the shape element corresponding to each local presentation page to obtain each presentation template page, wherein the attribute information includes position information, size information and style information.
3. The method according to claim 1, characterized in that The parsing of each presentation template page in the presentation template file to obtain the interface request parameters corresponding to each presentation template page includes: Reading and parsing each of the presentation template pages in the presentation template file to obtain the variable information corresponding to each of the presentation template pages; The corresponding interface request parameters are determined according to the variable information corresponding to each presentation template page.
4. The method according to claim 3, characterized in that: Determining the corresponding interface request parameter according to the variable information corresponding to each presentation template page includes: Generate original interface request parameters corresponding to each presentation template page according to the variable information corresponding to each presentation template page; The original interface request parameters corresponding to each presentation template page are adjusted according to business requirements to obtain the interface request parameters corresponding to each presentation template page.
5. The method according to claim 1, characterized in that The parsing of the multiple local presentation pages in the local presentation file to obtain the presentation template file includes: Parsing a plurality of local presentation pages of each of the plurality of local presentation files to obtain a plurality of presentation template files and their corresponding template identifiers; Before calling the corresponding interface to obtain the target information corresponding to each presentation template page in the presentation template file according to the interface request parameter corresponding to each presentation template page in the presentation template file, the method further includes: Sending the plurality of template identifiers and their corresponding presentation template files and all interface request parameters to a database for storage; Update the corresponding presentation template file according to business needs.
6. The method according to claim 5, characterized in that Before calling the corresponding interface to obtain the target information corresponding to each presentation template page in the presentation template file according to the interface request parameter corresponding to each presentation template page in the presentation template file, the method further includes: receiving a target presentation file generation instruction, wherein the target presentation file generation instruction includes a target template identifier, and the plurality of template identifiers stored in the database include the target template identifier; According to the target template identifier, the target presentation template file and all target interface request parameters are obtained from the database.
7. The method according to claim 6, characterized in that The step of calling a corresponding interface to obtain target information corresponding to each presentation template page in the presentation template file according to the interface request parameter corresponding to each presentation template page in the presentation template file includes: Sending target request parameters to the target interface according to the target interface request parameters corresponding to each target presentation template page in the target presentation template file; Receive the target information corresponding to each target presentation template page in the target presentation template file returned by the target interface.
8. An automatic generation device for presentation files, characterized in that: include: A parsing module, used for parsing a plurality of local presentation pages in a local presentation file to obtain a presentation template file, wherein the presentation template file includes a plurality of presentation template pages; Parsing each of the presentation template pages in the presentation template file to obtain interface request parameters corresponding to each of the presentation template pages; A calling module, used for calling a corresponding interface to obtain target information corresponding to each presentation template page in the presentation template file according to an interface request parameter corresponding to each presentation template page in the presentation template file; An updating module is used to update the variable information corresponding to each presentation template page according to the target information corresponding to each presentation template page to generate a target presentation file.
9. An electronic device, characterized in that: include: A processor, wherein the processor is used to execute a computer program stored in a memory, wherein the computer program, when executed by the processor, implements the steps of the method according to any one of claims 1 to 7.
10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 7 are implemented.
Citation Information
Patent Citations
Implementation method of 3D presentation file and 3D presentation file
CN110059199A
Data processing method and device, terminal and storage medium
CN114064564A
Method and device for automatically generating PowerPoint and system for managing PowerPoint
CN116610827A
Method for automatically creating user-customized document, and device and server for same
WO2021045547A1
Cited By
Method, system and equipment for automatically updating PowerPoint and storage medium
CN119988654A
Method, system, device and storage medium for automatically updating a presentation
CN119988654B
