CN112214981A - Demonstration file generation method and device, electronic equipment and storage medium - Google Patents

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

Info

Publication number
CN112214981A
CN112214981A CN202011068577.8A CN202011068577A CN112214981A CN 112214981 A CN112214981 A CN 112214981A CN 202011068577 A CN202011068577 A CN 202011068577A CN 112214981 A CN112214981 A CN 112214981A
Authority
CN
China
Prior art keywords
component
file
demonstration
components
template
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN202011068577.8A
Other languages
Chinese (zh)
Other versions
CN112214981B (en
Inventor
林庭民
吴淙
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
China Merchants Finance Technology Co Ltd
Original Assignee
China Merchants Finance Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by China Merchants Finance Technology Co Ltd filed Critical China Merchants Finance Technology Co Ltd
Priority to CN202011068577.8A priority Critical patent/CN112214981B/en
Publication of CN112214981A publication Critical patent/CN112214981A/en
Application granted granted Critical
Publication of CN112214981B publication Critical patent/CN112214981B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F40/00Handling natural language data
    • G06F40/10Text processing
    • G06F40/166Editing, e.g. inserting or deleting
    • G06F40/186Templates
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/80Information retrieval; Database structures therefor; File system structures therefor of semi-structured data, e.g. markup language structured data such as SGML, XML or HTML
    • G06F16/81Indexing, e.g. XML tags; Data structures therefor; Storage structures
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/95Retrieval from the web
    • G06F16/955Retrieval from the web using information identifiers, e.g. uniform resource locators [URL]
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Abstract

The invention relates to big data technology, and discloses a method for generating a presentation file, which comprises the following steps: the method comprises the steps of obtaining a demonstration file template, analyzing the demonstration file template to obtain all components and basic attributes of the demonstration file template, establishing object references of all the components by utilizing a pre-constructed fuzzy component according to unique identifiers of all the components, corresponding the object references of all the components and the basic attributes by utilizing a preset reflection technology to obtain object references of all the basic attributes, obtaining an original data set, writing the original data set into the demonstration file template through the object references of all the basic attributes, and generating a demonstration file. The invention also provides a presentation file generation device, electronic equipment and a computer readable storage medium. The invention can solve the problem that the demonstration file cannot be automatically generated through a program.

Description

Demonstration file generation method and device, electronic equipment and storage medium
Technical Field
The invention relates to the technical field of big data, in particular to a method and a device for generating a presentation file, electronic equipment and a computer-readable storage medium.
Background
Presentation files, such as ppt (powerpoint), are a convenient presentation tool, and are used in large quantities in daily life, work, and learning. The traditional method for making the demonstration file has two types: 1. and pre-manufacturing a demonstration file template according to the user requirements, and adding data in the demonstration file template. 2. And acquiring an existing demonstration file template, and adding data into the demonstration file template to manufacture a demonstration file.
The two methods have the following defects: 1. the pre-manufacturing of the demonstration file template wastes time and labor and has low efficiency. 2. By utilizing the existing demonstration file template, the searching, modifying and maintaining are difficult when the data volume is large. Meanwhile, the two methods cannot generate the presentation file with a complex style by writing a program, such as the presentation file which simultaneously comprises different components such as a text box, a chart and a pattern and has an association relation with the different components.
Disclosure of Invention
The invention provides a method and a device for generating a presentation file and a computer readable storage medium, and mainly aims to solve the problem that the presentation file cannot be generated through a program.
In order to achieve the above object, the present invention provides a method for generating a presentation file, comprising:
acquiring a demonstration file template, and analyzing the demonstration file template to obtain all components and basic attributes of the demonstration file template;
establishing object references of the components by utilizing a pre-constructed fuzzy component according to the unique identifiers of the components;
utilizing a preset reflection technology to correspond the object references of the components with the basic attributes to obtain the object reference of each basic attribute;
and acquiring an original data set, and writing the original data set into the demonstration file template through the object reference of each basic attribute to generate a demonstration file.
Optionally, the obtaining a presentation file template, and analyzing the presentation file template to obtain each component and basic attribute of the presentation file template include:
decompressing the demonstration file template by using a preset streaming technology to obtain a decompressed file;
and analyzing the decompressed file by using a preset analysis component to obtain all components and basic attributes of the demonstration file template.
Optionally, the parsing the decompressed file by using a preset parsing component to obtain each component and basic attribute of the presentation file template includes:
analyzing the decompressed file to obtain label information of each component of the demonstration file template;
and extracting the basic attribute under the label information to obtain a basic attribute set.
Optionally, the creating, according to the unique identifier of each component, an object reference of each component by using a pre-constructed fuzzy component includes:
acquiring unique identifiers of the components by using class functions provided by the fuzzy component;
and establishing object references of the fuzzy component to the components according to the unique identifier.
Optionally, before the creating the object reference of the fuzzy component to each component, the method further includes:
comparing the unique identifiers to obtain a comparison result, wherein the comparison result comprises the same unique identifier and different unique identifiers;
and associating the components with the same unique identifier.
Optionally, the corresponding, by using a preset reflection technology, the object reference of each component to the basic attribute to obtain an object reference of each basic attribute includes:
extracting a label hierarchical structure of the basic attribute in each component;
and utilizing the reflection technology to correspond the label hierarchical structure with the API hierarchical structure of each component in the fuzzy component to obtain the object reference of each basic attribute.
Optionally, the obtaining an original data set, writing the original data set into the presentation file template through the object reference of each basic attribute, and generating a presentation file includes:
acquiring an original data set from a pre-constructed database;
and calling an API (application programming interface) of the fuzzy component through the object reference of each basic attribute, writing the original data set into the demonstration file template, and generating the demonstration file.
In order to solve the above problem, the present invention also provides a presentation file generating apparatus, comprising:
the template analysis module is used for acquiring a demonstration file template and analyzing the demonstration file template to obtain all components and basic attributes of the demonstration file template;
the component reference module is used for establishing object reference of each component by utilizing a pre-constructed fuzzy component according to the unique identifier of each component;
the basic attribute reference module is used for corresponding the object reference of each component with the basic attribute by using a preset reflection technology to obtain the object reference of each basic attribute;
and the demonstration file generation module is used for acquiring an original data set, writing the original data set into the demonstration file template through the object reference of each basic attribute, and generating a demonstration file.
In order to solve the above problem, the present invention also provides an electronic device, including:
a memory storing at least one instruction; and
and the processor executes the instructions stored in the memory to realize the presentation file generation method.
In order to solve the above problem, the present invention further provides a computer-readable storage medium, in which at least one instruction is stored, and the at least one instruction is executed by a processor in an electronic device to implement the presentation file generation method described above.
The embodiment of the invention can rapidly obtain each component of the demonstration file template and the basic attribute thereof by analyzing the demonstration file template, utilizes the pre-constructed fuzzy component to establish the object reference of each component by the unique identifier of each component, and combines the reflection technology to obtain the object reference of each basic attribute. Therefore, the presentation file generation method, the presentation file generation device, the electronic equipment and the computer readable storage medium provided by the invention can solve the problem that the presentation file cannot be generated through a program.
Drawings
Fig. 1 is a schematic flowchart of a presentation file generation method according to an embodiment of the present invention;
FIG. 2 is a schematic flow chart showing a detailed implementation of one of the steps in FIG. 1;
FIG. 3 is a schematic flow chart showing another step of FIG. 1;
FIG. 4 is a schematic flow chart showing another step of FIG. 1;
FIG. 5 is a schematic flow chart showing another step in FIG. 1;
fig. 6 is a functional block diagram of a presentation file generating apparatus according to an embodiment of the present invention;
fig. 7 is a schematic structural diagram of an electronic device implementing the presentation file generation method according to an embodiment of the present invention.
The implementation, functional features and advantages of the objects of the present invention will be further explained with reference to the accompanying drawings.
Detailed Description
It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention.
The embodiment of the present application provides a method for generating a presentation file, where an execution subject of the method includes, but is not limited to, at least one of electronic devices such as a server and a terminal that can be configured to execute the method provided by the embodiment of the present application. In other words, the presentation file generation method may be performed by software or hardware installed in a terminal device or a server device, and the software may be a blockchain platform. The server includes but is not limited to: a single server, a server cluster, a cloud server or a cloud server cluster, and the like.
Fig. 1 is a schematic flow chart of a method for generating a presentation file according to an embodiment of the present invention. In this embodiment, the method for generating a presentation file includes:
and S1, acquiring a demonstration file template, and analyzing the demonstration file template to obtain all components and basic attributes of the demonstration file template.
Preferably, referring to fig. 2, the S1 includes:
s10, decompressing the demonstration file template by using a preset streaming technology to obtain a decompressed file;
and S11, analyzing the decompressed file by using a preset analysis component to obtain all components and basic attributes of the demonstration file template.
Preferably, the decompressed file can be a file in xml (eXtensible Markup Language) format, which is a simple data storage structure, the simplicity of xml format makes it easy to read and write data in any application program, which makes xml quickly become the only common Language for data exchange, and different application software supports the xml data exchange format, which means that a program can be more easily combined with information generated under Windows, Mac OS, Linux, and other platforms, and then xml data can be easily loaded into the program and analyzed, and the result can be output in xml format. In the embodiment of the present invention, the presentation file template is suitable for PowerPoint 2007 and above versions, that is, presentation files of pptx.
In this embodiment of the present invention, the preset streaming technology may be a JAVA IO streaming technology. The JAVA IO stream technology may convert input data into data of a fixed format. In order to use the JAVA IO stream technology, the embodiment of the present invention needs to install JDK (JAVA Development kit), which is a software Development kit for JAVA developers and is the core of the entire JAVA Development, and includes a JAVA runtime environment (JVM + JAVA system class library) and JAVA tools. The Integrated Development Environment (IDE) is an application program for providing a program Development Environment, generally includes tools such as a code editor, a debugger, a graphical user interface, and the like, and integrates an Integrated Development software service suite such as a code compiling function, an analyzing function, a compiling function, a debugging function, and the like. The preset parsing component can be a DOM4J component, the DOM4J component is a very excellent JavaXML API, has the characteristics of excellent performance, strong function and extreme usability, and is also software of an open source code for reading and writing an xml file.
In detail, the parsing the decompressed file by using a preset parsing component to obtain each component and basic attribute of the presentation file template includes:
analyzing the decompressed file to obtain label information of each component of the demonstration file template;
and extracting the basic attribute under the label information to obtain a basic attribute set.
Specifically, the presentation file template includes basic formats such as a text box, a chart, a pattern, and the like, and correspondingly, the component parts of the xml file include a plurality of parent tag information such as a text box, a chart, a pattern, and the like. For example, in the gross interest rate table, the parent label information is a chart, and the chart includes basic attributes such as a table header and a table frame.
Furthermore, the decompressed file can be rapidly analyzed by utilizing a preset analysis component, and an analysis result comprising all components of the demonstration file template and the basic attributes of the components is obtained.
And S2, establishing the object reference of each component by using the pre-constructed fuzzy component according to the unique identifier of each component.
Preferably, the pre-constructed fuzzy component may be a POI (point annotation Implementation) component, the POI component is an open source item of Apache, provides an API for Java operation of Microsoft Office suite files such as Excel, Word, Powerpoint, and the like, and the POI provides two classes of function operation presentation files, wherein HSLF is used for operating ppt format and XSLF is used for operating pptx format.
Preferably, referring to fig. 3, the S2 includes:
s20, acquiring the unique identifier of each component by using the class function provided by the fuzzy component;
and S21, establishing the object reference of the fuzzy component to each component according to the unique identifier.
The unique identifier is used to determine a unique identifier of each component, for example, a chart needs to have a unique table title, a text box needs to have a unique text description, for example, in a hair interest rate table, and the unique identifier refers to the table title "hair interest rate".
Further, before the establishing the object reference of the fuzzy component to the components, the method further includes:
comparing the unique identifiers to obtain a comparison result, wherein the comparison result comprises the same unique identifier and different unique identifiers;
and associating the components with the same unique identifier.
In the embodiment of the invention, if a certain text box and a certain pattern have the same unique identifier, the fuzzy component is utilized to establish an association relation between the certain text box and the certain pattern through the same unique identifier. The embodiment of the invention can quickly find different components with the association relationship through the unique identifier, and simultaneously solves the problems of insufficient flexibility of a hard coding mode and difficult modification and maintenance of each component.
And S3, corresponding the object references of the components to the basic attributes by using a preset reflection technology to obtain the object reference of each basic attribute.
In detail, referring to fig. 4, the S3 specifically includes:
s30, extracting the label hierarchical structure of the basic attribute in each component;
and S31, utilizing the reflection technology to correspond the label hierarchical structure with the API hierarchical structure of each component in the fuzzy component to obtain the object reference of each basic attribute.
Preferably, the preset reflection technology may be a JAVA reflection technology, where the JAVA reflection technology refers to a mechanism that can construct an object of any class in the running state of the program, understand the class to which any object belongs, understand member variables and methods of any class, and invoke attributes and methods of any object.
Furthermore, in the embodiment of the invention, the JAVA reflection technology is used for obtaining the object reference of each basic attribute of the POI, and the code of each basic attribute of the POI is not required to be written, so that the same set of code can be repeatedly used for different demonstration file templates, and the development cost is greatly saved.
And S4, acquiring an original data set, writing the original data set into the demonstration file template through the object reference of each basic attribute, and generating a demonstration file.
Preferably, referring to fig. 5, the S4 includes:
s40, acquiring an original data set from a pre-constructed database;
and S41, calling an API (application programming interface) of the fuzzy component through the object reference of each basic attribute, writing the original data set into the demonstration file template, and generating the demonstration file.
Preferably, the raw data set comprises: business data, financial data, and/or product data, etc. For example, in the insurance field, the service data may include: number of applications, amount of applications, sales and management rates, and denominator ROE, etc., and the financial data may include: the fund proportion of the insurance, the profit of the insurance and the return rate of the insurance, and the like, and the product data can comprise: the type of life insurance, the type of car insurance, the type of accident insurance, etc.
Furthermore, in the embodiment of the present invention, the original data set is written into the presentation file template by using the API provided by the POI component, so that a large amount of data can be quickly and accurately imported into a presentation file, and a complex presentation file can be quickly constructed.
According to the embodiment of the invention, by analyzing the demonstration file template, all components and basic attributes of the demonstration file template can be rapidly obtained. And through the unique identifier of each component, the object reference of each component is established by utilizing the pre-established fuzzy component, and the object reference of each basic attribute is obtained by combining the reflection technology, so that the method is suitable for different demonstration file templates, can be repeatedly used, and greatly saves the development cost. Meanwhile, by utilizing the fuzzy component, a large amount of data can be rapidly and accurately imported into the demonstration file template, and the rapid construction of the demonstration file is realized. Therefore, the embodiment of the invention can solve the problem that the demonstration file cannot be generated by a program.
Fig. 6 is a functional block diagram of a presentation file generation apparatus according to an embodiment of the present invention.
The presentation file generating apparatus 100 according to the present invention may be installed in an electronic device. According to the implemented functions, the presentation file generation apparatus 100 may include a template parsing module 101, a component referencing module 102, a basic attribute referencing module 103, and a presentation file generation module 104. The module of the present invention, which may also be referred to as a unit, refers to a series of computer program segments that can be executed by a processor of an electronic device and that can perform a fixed function, and that are stored in a memory of the electronic device.
In the present embodiment, the functions regarding the respective modules/units are as follows:
the template analysis module 101 is configured to obtain a presentation file template, analyze the presentation file template, and obtain each component and a basic attribute of the presentation file template.
Preferably, the template parsing module 101 parses the presentation file template by:
decompressing the demonstration file template by using a preset streaming technology to obtain a decompressed file;
and analyzing the decompressed file by using a preset analysis component to obtain all components and basic attributes of the demonstration file template.
Preferably, the decompressed file can be a file in xml (eXtensible Markup Language) format, which is a simple data storage structure, the simplicity of xml format makes it easy to read and write data in any application program, which makes xml quickly become the only common Language for data exchange, and different application software supports the xml data exchange format, which means that a program can be more easily combined with information generated under Windows, Mac OS, Linux, and other platforms, and then xml data can be easily loaded into the program and analyzed, and the result can be output in xml format. In the embodiment of the present invention, the presentation file template is suitable for PowerPoint 2007 and above versions, that is, presentation files of pptx.
In this embodiment of the present invention, the preset streaming technology may be a JAVA IO streaming technology. The JAVA IO stream technology may convert input data into data of a fixed format. In order to use the JAVA IO stream technology, the embodiment of the present invention needs to install JDK (JAVA Development kit), which is a software Development kit for JAVA developers and is the core of the entire JAVA Development, and includes a JAVA runtime environment (JVM + JAVA system class library) and JAVA tools. The Integrated Development Environment (IDE) is an application program for providing a program Development Environment, generally includes tools such as a code editor, a debugger, a graphical user interface, and the like, and integrates an Integrated Development software service suite such as a code compiling function, an analyzing function, a compiling function, a debugging function, and the like. The preset parsing component can be a DOM4J component, the DOM4J component is a very excellent JavaXML API, has the characteristics of excellent performance, strong function and extreme usability, and is also software of an open source code for reading and writing an xml file.
In detail, the template analysis module 101 obtains the components and basic attributes of the presentation file template by the following operations:
analyzing the decompressed file to obtain label information of each component of the demonstration file template;
and extracting the basic attribute under the label information to obtain a basic attribute set.
Specifically, the presentation file template includes basic formats such as a text box, a chart, a pattern, and the like, and correspondingly, the component parts of the xml file include a plurality of parent tag information such as a text box, a chart, a pattern, and the like. For example, in the gross interest rate table, the parent label information is a chart, and the chart includes basic attributes such as a table header and a table frame.
Furthermore, the decompressed file can be rapidly analyzed by utilizing a preset analysis component, and an analysis result comprising all components of the demonstration file template and the basic attributes of the components is obtained.
The component referencing module 102 is configured to establish an object reference of each component by using a pre-constructed fuzzy component according to the unique identifier of each component.
Preferably, the pre-constructed fuzzy component may be a POI (point annotation Implementation) component, the POI component is an open source item of Apache, provides an API for Java operation of Microsoft Office suite files such as Excel, Word, Powerpoint, and the like, and the POI provides two classes of function operation presentation files, wherein HSLF is used for operating ppt format and XSLF is used for operating pptx format.
Preferably, the component referencing module 102 establishes the object reference of each component by:
acquiring unique identifiers of the components by using class functions provided by the fuzzy component;
and establishing object references of the fuzzy component to the components according to the unique identifier.
The unique identifier is used to determine a unique identifier of each component, for example, a chart needs to have a unique table title, a text box needs to have a unique text description, for example, in a hair interest rate table, and the unique identifier refers to the table title "hair interest rate".
Further, the component referencing module 102 is further configured to:
comparing the unique identifiers to obtain a comparison result, wherein the comparison result comprises the same unique identifier and different unique identifiers;
and associating the components with the same unique identifier.
In the embodiment of the invention, if a certain text box and a certain pattern have the same unique identifier, the fuzzy component is utilized to establish the association relationship between the certain text box and the certain pattern through the same unique identifier.
The basic attribute reference module 103 is configured to use a preset reflection technique to correspond the object references of the components to the basic attributes, so as to obtain an object reference of each basic attribute.
In detail, the basic attribute reference module 103 obtains an object reference of each basic attribute by:
extracting a label hierarchical structure of the basic attribute in each component;
and utilizing the reflection technology to correspond the label hierarchical structure with the API hierarchical structure of each component in the fuzzy component to obtain the object reference of each basic attribute.
Preferably, the preset reflection technology may be a JAVA reflection technology, where the JAVA reflection technology refers to a mechanism that can construct an object of any class in the running state of the program, understand the class to which any object belongs, understand member variables and methods of any class, and invoke attributes and methods of any object.
Furthermore, in the embodiment of the invention, the JAVA reflection technology is used for obtaining the object reference of each basic attribute of the POI, and the code of each basic attribute of the POI is not required to be written, so that the same set of code can be repeatedly used for different demonstration file templates, and the development cost is greatly saved.
The presentation file generating module 104 is configured to obtain an original data set, write the original data set into the presentation file template through the object reference of each basic attribute, and generate a presentation file.
Preferably, the presentation file generation module 104 generates the presentation file by:
acquiring an original data set from a pre-constructed database;
and calling an API (application programming interface) of the fuzzy component through the object reference of each basic attribute, writing the original data set into the demonstration file template, and generating the demonstration file.
Preferably, the raw data set comprises: business data, financial data, and/or product data, etc. For example, in the insurance field, the service data may include: number of applications, amount of applications, sales and management rates, and denominator ROE, etc., and the financial data may include: the fund proportion of the insurance, the profit of the insurance and the return rate of the insurance, and the like, and the product data can comprise: the type of life insurance, the type of car insurance, the type of accident insurance, etc.
Furthermore, in the embodiment of the present invention, the original data set is written into the presentation file template by using the API provided by the POI component, so that a large amount of data can be quickly and accurately imported into a presentation file, and a complex presentation file can be quickly constructed.
Fig. 7 is a schematic structural diagram of an electronic device implementing a presentation file generation method according to an embodiment of the present invention.
The electronic device 1 may comprise a processor 10, a memory 11 and a bus, and may further comprise a computer program, such as a presentation file generation program 12, stored in the memory 11 and executable on the processor 10.
The memory 11 includes at least one type of readable storage medium, which includes flash memory, removable hard disk, multimedia card, card-type memory (e.g., SD or DX memory, etc.), magnetic memory, magnetic disk, optical disk, etc. The memory 11 may in some embodiments be an internal storage unit of the electronic device 1, such as a removable hard disk of the electronic device 1. The memory 11 may also be an external storage device of the electronic device 1 in other embodiments, such as a plug-in mobile hard disk, a Smart Media Card (SMC), a Secure Digital (SD) Card, a Flash memory Card (Flash Card), and the like, which are provided on the electronic device 1. Further, the memory 11 may also include both an internal storage unit and an external storage device of the electronic device 1. The memory 11 may be used not only to store application software installed in the electronic device 1 and various types of data, such as codes of the presentation file generation program 12, but also to temporarily store data that has been output or is to be output.
The processor 10 may be composed of an integrated circuit in some embodiments, for example, a single packaged integrated circuit, or may be composed of a plurality of integrated circuits packaged with the same or different functions, including one or more Central Processing Units (CPUs), microprocessors, digital Processing chips, graphics processors, and combinations of various control chips. The processor 10 is a Control Unit (Control Unit) of the electronic device, connects various components of the electronic device by using various interfaces and lines, and executes various functions and processes data of the electronic device 1 by running or executing programs or modules (e.g., presentation file generation programs, etc.) stored in the memory 11 and calling data stored in the memory 11.
The bus may be a Peripheral Component Interconnect (PCI) bus, an Extended Industry Standard Architecture (EISA) bus, or the like. The bus may be divided into an address bus, a data bus, a control bus, etc. The bus is arranged to enable connection communication between the memory 11 and at least one processor 10 or the like.
Fig. 7 only shows an electronic device with components, and it will be understood by a person skilled in the art that the structure shown in fig. 7 does not constitute a limitation of the electronic device 1, and may comprise fewer or more components than shown, or a combination of certain components, or a different arrangement of components.
For example, although not shown, the electronic device 1 may further include a power supply (such as a battery) for supplying power to each component, and preferably, the power supply may be logically connected to the at least one processor 10 through a power management device, so as to implement functions of charge management, discharge management, power consumption management, and the like through the power management device. The power supply may also include any component of one or more dc or ac power sources, recharging devices, power failure detection circuitry, power converters or inverters, power status indicators, and the like. The electronic device 1 may further include various sensors, a bluetooth module, a Wi-Fi module, and the like, which are not described herein again.
Further, the electronic device 1 may further include a network interface, and optionally, the network interface may include a wired interface and/or a wireless interface (such as a WI-FI interface, a bluetooth interface, etc.), which are generally used for establishing a communication connection between the electronic device 1 and other electronic devices.
Optionally, the electronic device 1 may further comprise a user interface, which may be a Display (Display), an input unit (such as a Keyboard), and optionally a standard wired interface, a wireless interface. Alternatively, in some embodiments, the display may be an LED display, a liquid crystal display, a touch-sensitive liquid crystal display, an OLED (Organic Light-Emitting Diode) touch device, or the like. The display, which may also be referred to as a display screen or display unit, is suitable for displaying information processed in the electronic device 1 and for displaying a visualized user interface, among other things.
It is to be understood that the described embodiments are for purposes of illustration only and that the scope of the appended claims is not limited to such structures.
The presentation file generation program 12 stored in the memory 11 of the electronic device 1 is a combination of instructions that, when executed in the processor 10, may implement:
acquiring a demonstration file template, and analyzing the demonstration file template to obtain all components and basic attributes of the demonstration file template;
establishing object references of the components by utilizing a pre-constructed fuzzy component according to the unique identifiers of the components;
utilizing a preset reflection technology to correspond the object references of the components with the basic attributes to obtain the object reference of each basic attribute;
and acquiring an original data set, and writing the original data set into the demonstration file template through the object reference of each basic attribute to generate a demonstration file.
Specifically, the specific implementation method of the processor 10 for the instruction may refer to the description of the relevant steps in the embodiments corresponding to fig. 1 to fig. 5, which is not repeated herein.
Further, the integrated modules/units of the electronic device 1, if implemented in the form of software functional units and sold or used as separate products, may be stored in a non-volatile computer-readable storage medium. The computer-readable medium may include: any entity or device capable of carrying said computer program code, recording medium, U-disk, removable hard disk, magnetic disk, optical disk, computer Memory, Read-Only Memory (ROM).
In the embodiments provided in the present invention, it should be understood that the disclosed apparatus, device and method can be implemented in other ways. For example, the above-described apparatus embodiments are merely illustrative, and for example, the division of the modules is only one logical functional division, and other divisions may be realized in practice.
The modules described as separate parts may or may not be physically separate, and parts displayed as modules may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of the present embodiment.
In addition, functional modules in the embodiments of the present invention may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit. The integrated unit can be realized in a form of hardware, or in a form of hardware plus a software functional module.
It will be evident to those skilled in the art that the invention is not limited to the details of the foregoing illustrative embodiments, and that the present invention may be embodied in other specific forms without departing from the spirit or essential attributes thereof.
The present embodiments are therefore to be considered in all respects as illustrative and not restrictive, the scope of the invention being indicated by the appended claims rather than by the foregoing description, and all changes which come within the meaning and range of equivalency of the claims are therefore intended to be embraced therein. Any reference signs in the claims shall not be construed as limiting the claim concerned.
Furthermore, it is obvious that the word "comprising" does not exclude other elements or steps, and the singular does not exclude the plural. A plurality of units or means recited in the system claims may also be implemented by one unit or means in software or hardware. The terms second, etc. are used to denote names, but not any particular order.
Finally, it should be noted that the above embodiments are only for illustrating the technical solutions of the present invention and not for limiting, and although the present invention is described in detail with reference to the preferred embodiments, it should be understood by those skilled in the art that modifications or equivalent substitutions may be made on the technical solutions of the present invention without departing from the spirit and scope of the technical solutions of the present invention.

Claims (10)

1. A method for generating a presentation file, the method comprising:
acquiring a demonstration file template, and analyzing the demonstration file template to obtain all components and basic attributes of the demonstration file template;
establishing object references of the components by utilizing a pre-constructed fuzzy component according to the unique identifiers of the components;
utilizing a preset reflection technology to correspond the object references of the components with the basic attributes to obtain the object reference of each basic attribute;
and acquiring an original data set, and writing the original data set into the demonstration file template through the object reference of each basic attribute to generate a demonstration file.
2. The method for generating a presentation file according to claim 1, wherein the obtaining a presentation file template and analyzing the presentation file template to obtain the components and the basic attributes of the presentation file template comprises:
decompressing the demonstration file template by using a preset streaming technology to obtain a decompressed file;
and analyzing the decompressed file by using a preset analysis component to obtain all components and basic attributes of the demonstration file template.
3. The method for generating a presentation file according to claim 2, wherein the parsing the decompressed file by using a preset parsing component to obtain the components and the basic attributes of the presentation file template comprises:
analyzing the decompressed file to obtain label information of each component of the demonstration file template;
and extracting the basic attribute under the label information to obtain a basic attribute set.
4. The presentation file generation method of claim 1, wherein said building an object reference for each component using a pre-built obfuscation component based on the unique identifier of each component comprises:
acquiring unique identifiers of the components by using class functions provided by the fuzzy component;
and establishing object references of the fuzzy component to the components according to the unique identifier.
5. The presentation file generation method of claim 4, wherein prior to establishing the object references of the obfuscation component to the components, further comprising:
comparing the unique identifiers to obtain a comparison result, wherein the comparison result comprises the same unique identifier and different unique identifiers;
and associating the components with the same unique identifier.
6. The method for generating a presentation file according to claim 1, wherein the using a preset reflection technique to correspond the object references of the components to the basic attributes to obtain the object reference of each basic attribute comprises:
extracting a label hierarchical structure of the basic attribute in each component;
and utilizing the reflection technology to correspond the label hierarchical structure with the API hierarchical structure of each component in the fuzzy component to obtain the object reference of each basic attribute.
7. The method of generating a presentation file according to claim 6, wherein said obtaining an original data set, writing said original data set to said presentation file template via said object reference for each basic attribute, and generating a presentation file comprises:
acquiring an original data set from a pre-constructed database;
and calling an API (application programming interface) of the fuzzy component through the object reference of each basic attribute, writing the original data set into the demonstration file template, and generating the demonstration file.
8. A presentation file generation apparatus, characterized in that the apparatus comprises:
the template analysis module is used for acquiring a demonstration file template and analyzing the demonstration file template to obtain all components and basic attributes of the demonstration file template;
the component reference module is used for establishing object reference of each component by utilizing a pre-constructed fuzzy component according to the unique identifier of each component;
the basic attribute reference module is used for corresponding the object reference of each component with the basic attribute by using a preset reflection technology to obtain the object reference of each basic attribute;
and the demonstration file generation module is used for acquiring an original data set, writing the original data set into the demonstration file template through the object reference of each basic attribute, and generating a demonstration file.
9. An electronic device, characterized in that the electronic device comprises:
at least one processor; and the number of the first and second groups,
a memory communicatively coupled to the at least one processor; wherein the content of the first and second substances,
the memory stores instructions executable by the at least one processor to enable the at least one processor to perform a presentation file generation method as claimed in any one of claims 1 to 7.
10. A computer-readable storage medium storing a computer program, wherein the computer program, when executed by a processor, implements the presentation file generation method according to any one of claims 1 to 7.
CN202011068577.8A 2020-09-30 2020-09-30 Presentation file generation method and device, electronic equipment and storage medium Active CN112214981B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011068577.8A CN112214981B (en) 2020-09-30 2020-09-30 Presentation file generation method and device, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011068577.8A CN112214981B (en) 2020-09-30 2020-09-30 Presentation file generation method and device, electronic equipment and storage medium

Publications (2)

Publication Number Publication Date
CN112214981A true CN112214981A (en) 2021-01-12
CN112214981B CN112214981B (en) 2024-02-06

Family

ID=74052783

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011068577.8A Active CN112214981B (en) 2020-09-30 2020-09-30 Presentation file generation method and device, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN112214981B (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6539396B1 (en) * 1999-08-31 2003-03-25 Accenture Llp Multi-object identifier system and method for information service pattern environment
US20040019590A1 (en) * 2002-07-25 2004-01-29 International Business Machines Corporation Programmable use of data extracted from common presentation files
US9311048B1 (en) * 2015-03-06 2016-04-12 Pearson Education, Inc. Electronic template generation, data extraction and response detection
CN108156534A (en) * 2017-12-26 2018-06-12 深圳Tcl新技术有限公司 Generation method, device and the computer readable storage medium of demonstration application
CN109977385A (en) * 2019-03-18 2019-07-05 合肥智慧联接科技有限公司 A kind of data intelligence fill method, device, storage medium and terminal

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6539396B1 (en) * 1999-08-31 2003-03-25 Accenture Llp Multi-object identifier system and method for information service pattern environment
US20040019590A1 (en) * 2002-07-25 2004-01-29 International Business Machines Corporation Programmable use of data extracted from common presentation files
US9311048B1 (en) * 2015-03-06 2016-04-12 Pearson Education, Inc. Electronic template generation, data extraction and response detection
CN108156534A (en) * 2017-12-26 2018-06-12 深圳Tcl新技术有限公司 Generation method, device and the computer readable storage medium of demonstration application
CN109977385A (en) * 2019-03-18 2019-07-05 合肥智慧联接科技有限公司 A kind of data intelligence fill method, device, storage medium and terminal

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
王正敏;张太红;李永可;白涛;: "FreeMarker模板引擎在线动态生成Excel和Word文档技术", 计算机与现代化, no. 04 *

Also Published As

Publication number Publication date
CN112214981B (en) 2024-02-06

Similar Documents

Publication Publication Date Title
CN110347598B (en) Test script generation method and device, server and storage medium
CN112052242A (en) Data query method and device, electronic equipment and storage medium
CN111813963A (en) Knowledge graph construction method and device, electronic equipment and storage medium
CN111428451B (en) Text online editing method and device, electronic equipment and storage medium
CN111061475A (en) Software code generation method and device, computer equipment and storage medium
CN114020256A (en) Front-end page generation method, device and equipment and readable storage medium
CN115048111B (en) Code generation method, device, equipment and medium based on metadata
Bento IoT of Nextion X TFT ILI9341: Experimental Results and Comparative Survey
CN113377661A (en) Interface testing method and device, electronic equipment and storage medium
CN110968294A (en) Business domain model establishing system and method
CN111753140A (en) XML file parsing method and related equipment
CN115129753A (en) Data blood relationship analysis method and device, electronic equipment and storage medium
CN113723063B (en) Method for converting RTF (real time transport format) into HTML (hypertext markup language) and realizing effect in PDF (portable document format) file
CN108874384B (en) Terminal device, server, web page data processing method, and computer storage medium
CN112597171A (en) Table relation visualization method and device, electronic equipment and storage medium
CN113434542A (en) Data relation identification method and device, electronic equipment and storage medium
CN105573763A (en) Embedded system modeling method supporting RTOS
CN113468175A (en) Data compression method and device, electronic equipment and storage medium
CN112882995A (en) Script automatic generation method and device, electronic equipment and storage medium
CN112631903A (en) Task testing method and device, electronic equipment and storage medium
CN111625236A (en) Front-end development method and device based on componentization, electronic equipment and storage medium
CN112214981B (en) Presentation file generation method and device, electronic equipment and storage medium
CN114911479A (en) Interface generation method, device, equipment and storage medium based on configuration
CN115033489A (en) Code resource detection method and device, electronic equipment and storage medium
CN113051171B (en) Interface testing method, device, equipment and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant