Data processing method, device, terminal and storage medium
By analyzing and mapping presentation templates and dashboard components in data visualization tools, the problem that PPT cannot be edited in the existing technology is solved, and the re-editable PPT generation is realized, which improves work efficiency.
Patent Information
- Application Number
- CN202010758952.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2020-07-31
- Publication Date
- 2025-08-26
- Estimated Expiration
- 2040-07-31
AI Technical Summary
In the prior art, the method of creating PPT based on data visualization tools cannot be performed in secondary editing, and directly drawing PPT may lead to waste of resources and time loss.
By analyzing the dashboard components of the presentation template and data visualization tool, establishing a mapping relationship, receiving the data to be displayed is processed in the dashboard and drawing it into the presentation template, realizing re-editable PPT generation.
Re-editable PPT generation is realized, improving work efficiency, reducing resource waste and time loss.
Smart Images

Figure CN114064564B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to data processing technology, and is related to but not limited to a data processing method, device, terminal and storage medium. Background Art
[0002] In the related art, a method of creating a presentation (PPT) based on a data visualization tool is to have a database administrator (DBA) query the necessary data, then make a business report based on the queried data, and then convert the report into a high-definition image and embed it into the PPT. The PPT obtained by this method cannot be edited again. If the obtained image does not meet the user's needs, the obtained PPT image needs to be redrawn, which is time-consuming. Summary of the Invention
[0003] To solve the above technical problems, the embodiments of the present application provide a data processing method, device, terminal and storage medium.
[0004] This embodiment of the present application provides a data processing method, the method comprising:
[0005] Parsing the imported presentation template to determine the constituent elements of the presentation template;
[0006] determining components included in a dashboard of a data visualization tool hosting the presentation template;
[0007] Converting the components to obtain a data conversion file;
[0008] Establishing a mapping relationship between the constituent elements of the presentation template and the components included in the dashboard based on identical parameters between the constituent elements of the presentation template and the components included in the dashboard;
[0009] When receiving the data to be displayed, the data conversion file is used to process the data to be displayed in the dashboard to obtain element values of the data to be displayed in the dashboard;
[0010] Based on the mapping relationship, the element value is mapped into the presentation template to obtain the presentation of the data to be displayed.
[0011] An embodiment of the present application provides a data processing device, the device comprising:
[0012] A parsing module, configured to parse the imported presentation template and determine the constituent elements of the presentation template;
[0013] A determination module, configured to determine components included in a dashboard of a data visualization tool hosting the presentation template;
[0014] A conversion module, used for converting the components to obtain a data conversion file;
[0015] An establishing module, configured to establish a mapping relationship between the constituent elements of the presentation and the components included in the dashboard based on identical parameters between the constituent elements of the presentation template and the components included in the dashboard;
[0016] a processing module configured to, upon receiving data to be displayed, process the data to be displayed in the dashboard using the data conversion file to obtain element values of the data to be displayed in the dashboard;
[0017] A drawing module is used to draw the element value into the presentation template based on the mapping relationship to obtain a presentation of the data to be displayed.
[0018] An embodiment of the present application provides a terminal, the terminal comprising at least: a controller and a storage medium configured to store executable instructions, wherein:
[0019] The controller is configured to execute stored executable instructions, and the executable instructions are configured to execute the data processing method provided above.
[0020] An embodiment of the present application provides a computer-readable storage medium, wherein the computer-readable storage medium stores computer-executable instructions. The computer-readable storage medium stores computer-executable instructions configured to execute the data processing method provided above.
[0021] The present application provides a data processing method, device, terminal and storage medium. By parsing the imported presentation template and the components of the dashboard of the data visualization tool that carries the presentation template, a mapping relationship between the constituent elements of the presentation template and the components of the dashboard is established. When the data to be displayed is received, the element values of the data to be displayed in the components of the dashboard can be drawn into the presentation template based on the mapping relationship to obtain a presentation of the data to be displayed. In this way, by establishing a mapping relationship between the constituent elements of the presentation and the components of the dashboard, the acquired data to be displayed is displayed in the presentation through the mapping relationship, so that the obtained presentation is re-editable, so that the acquired business data can be drawn in the presentation in real time, and then the presentation can be edited according to business needs and user needs, thereby improving work efficiency. BRIEF DESCRIPTION OF THE DRAWINGS
[0022] Figure 1 This is a flow chart of the data processing method according to an embodiment of the present application;
[0023] Figure 2 This is another flowchart of the data processing method according to an embodiment of the present application;
[0024] Figure 3 For the embodiment of this application Figure 2 Schematic diagram of the process of parsing the imported presentation template in step S201;
[0025] Figure 4 For the embodiment of this application Figure 2 Schematic diagram of the process of parsing the dashboard in step S202;
[0026] Figure 5 For the embodiment of this application Figure 2 Step S203 draws a flow chart of the presentation;
[0027] Figure 6 This is a schematic diagram of the structure of a data processing device according to an embodiment of the present application;
[0028] Figure 7 This is a schematic diagram of the structure of the terminal described in the embodiment of the present application. DETAILED DESCRIPTION
[0029] To facilitate understanding of the technical solutions of the embodiments of the present application, the relevant technologies of the embodiments of the present application are described below.
[0030] The world has entered the era of big data, with vast quantities of data generated daily. This exponential growth has made it increasingly difficult to work with the data itself, driving a growing demand for data visualization tools for data display and report creation. Data visualization tools are being used in fields ranging from telecommunications and retail to public security, tourism, meteorology, and transportation.
[0031] In typical business reporting and presentation scenarios, PowerPoint, with its rich expressiveness and clear presentation structure, has become the most popular office tool for users across various industries. However, with the advent of the big data era, the model of using emerging data visualization tools for operational analysis while using traditional PowerPoint for business presentations is becoming increasingly slow. In today's pursuit of agility, how to seamlessly integrate online operational analysis with rapid offline reporting is becoming increasingly urgent.
[0032] Related big data processing technologies primarily include big data storage, distributed computing, and front-end chart libraries for data warehouses (Extract-Transform-Load (ETL)). Traditionally, creating presentations using data visualization tools involves technicians cleaning business data, loading it into a specific database using ETL tools, and then having the DBA query the necessary data. The database then creates business reports based on the queried data and creates presentations. A more advanced approach involves using data visualization analysis tools for online business analysis, then taking screenshots to generate material for presentations.
[0033] The above technical solution for creating PPTs based on data visualization tools has the following problems:
[0034] (1) The current technology for exporting data visualization tools to PPT has major flaws. It basically converts the visualization report into a high-definition picture and then embeds the picture into the PPT. The biggest disadvantage of this method is that the generated PPT cannot be edited again. When there are special circumstances and the chart needs to be edited, there will be nothing to do.
[0035] (2) Personal technical solution: It supports exporting to PPT, but draws PPT directly based on system data. The disadvantage of this solution is that the PPT drawn after consuming computing resources may not be the desired result. At this time, you can only re-query the data and draw the PPT, which seriously wastes the time of business personnel.
[0036] To this end, the following technical solutions of the embodiments of the present application are proposed. In order to enable a more detailed understanding of the characteristics and technical content of the embodiments of the present application, the implementation of the embodiments of the present application is described in detail below in conjunction with the accompanying drawings. The attached drawings are for reference only and are not used to limit the embodiments of the present application.
[0037] The present application provides a data processing method. Figure 1 This is a flow chart of the data processing method according to the embodiment of the present application, combined with Figure 1 The following steps are explained:
[0038] Step S101: Parse the imported presentation template to determine the constituent elements of the presentation template.
[0039] In this embodiment, the currently used data visualization tool provides an entry for uploading presentation templates. Upon receiving an instruction to upload a PPT template, the tool receives an imported PPT template commonly used by the user and parses the PPT template to reproduce the content of the imported PPT template in the data visualization tool. The components of the presentation template include at least the size of the presentation template, background theme information, and information about various components.
[0040] In some specific examples, the aspect ratio of the PPT template is parsed first. The conventional aspect ratio of PPT is 4:3 or 16:9. Then, the background theme of the PPT template is parsed. The background color, background image, and theme color style of each template are unique and need to be maintained. In addition, the data visualization tool continues to parse the component characteristics of the PPT template. The components include at least text components, chart components, and table components. The information that needs to be maintained for the text component includes at least: the font, font size, and color of the board text; the chart component needs to maintain the chart type of the component, including bar charts, pie charts, line charts, combination charts, radar charts, etc., as well as color schemes; the table component mainly parses the style of the table, the font, font size, color, etc. of the content. In this way, the information of each component element of the PPT template can be obtained.
[0041] Step S102: Determine the components included in the dashboard of the data visualization tool that carries the presentation template.
[0042] In this embodiment, after parsing the presentation template, the content of the presentation template is reproduced in the data visualization tool. That is, the content of the presentation template needs to be carried in the dashboard of the data visualization tool, and the content in the presentation template is displayed accordingly in the dashboard of the data visualization tool. The components of the dashboard include conventional bar charts, line charts, pie charts, radar charts, combination charts, tables, and text, as well as funnel charts, word cloud charts, and Sankey charts. In some feasible implementations, it is also necessary to determine information such as the component name, component type, source data supporting the component display, and component layout.
[0043] Step S103: convert the components to obtain a data conversion file.
[0044] In this embodiment, the data conversion file refers to a file obtained by parsing the component and its information to record the name of the component, the relative position of the component, the business data of the component and the size of the component.
[0045] Step S104: establishing a mapping relationship between the constituent elements of the presentation template and the components included in the dashboard based on the same parameters between the constituent elements of the presentation template and the components included in the dashboard.
[0046] In this embodiment, the same parameters between the constituent elements of the presentation template and the components included in the dashboard mean that when the names of the constituent elements in the presentation template and the components included in the dashboard are the same, the two have the same parameters. For example, if the bar chart in the presentation has the same name as the bar chart of the dashboard of the data visualization tool, the two have the same parameters. In this way, a mapping relationship is established between the bar chart of the presentation and the bar chart of the dashboard. When the bar chart of the dashboard needs to be edited, the mapping relationship can be used to call the information corresponding to the bar chart in the presentation template to complete the editing of the bar chart of the dashboard.
[0047] Step S105: When the data to be displayed is received, the data conversion file is used to process the data to be displayed in the dashboard to obtain element values of the data to be displayed in the dashboard.
[0048] In this embodiment, the data to be displayed is data that will be subsequently displayed in a presentation for operational analysis and business reporting. The element values in the dashboard are the specific business data displayed in the dashboard components, as well as data information such as the names of multiple components of the dashboard and the layout information between components. When the data to be displayed is received, the data conversion file of the dashboard is directly queried, and the dashboard component information corresponding to each of the data to be displayed is determined based on the component information recorded in the data conversion file. The data to be displayed is edited and displayed in the components of the dashboard, and the element values of the data to be displayed in the dashboard can be obtained. In some feasible implementations, after receiving the data to be displayed, the data to be displayed can be directly converted into the element values corresponding to the information of each component in the dashboard based on the data conversion file.
[0049] Step S106: Based on the mapping relationship, the element value is drawn into the presentation template to obtain the presentation of the data to be displayed.
[0050] In this embodiment, when drawing the components corresponding to the data to be displayed in the dashboard, the interface for drawing the component elements corresponding to the presentation template can be called based on the mapping relationship between the constituent elements of the presentation template and the components included in the dashboard, and the operation of drawing the corresponding constituent elements in the presentation template can be started. The element values are drawn into the constituent elements of the presentation template. In this way, a presentation of the data to be displayed can be obtained.
[0051] In an embodiment of the present application, by parsing the imported presentation template and the components of the dashboard of the data visualization tool that hosts the presentation template, a mapping relationship is established between the constituent elements of the presentation template and the components of the dashboard. When the data to be displayed is received, the element values of the data to be displayed in the components of the dashboard can be drawn into the presentation template based on the mapping relationship, thereby obtaining a presentation of the data to be displayed. In this way, by establishing a mapping relationship between the constituent elements of the presentation and the components of the dashboard, the acquired data to be displayed is displayed in the presentation through the mapping relationship, making the obtained presentation editable, so that the acquired business data can be drawn in the presentation in real time, and then the presentation can be edited according to business needs and user needs, thereby improving work efficiency.
[0052] In some feasible implementations, step S101 may be implemented in the following manner:
[0053] The text component, chart component or table component in the presentation template is parsed to determine dictionary data corresponding to the constituent elements of the presentation template.
[0054] In this embodiment, the font, font size and / or color of the text component in the presentation template are parsed; the types of chart components, such as bar charts, pie charts, line charts, combination charts, radar charts and color schemes of the charts, as well as the style of the table corresponding to the table component, the font, font size and color of the content, etc. are parsed to obtain the meta-information of the presentation template, and the meta-information is written as dictionary data for quick query and use.
[0055] In some feasible implementations, after obtaining the dictionary data corresponding to the components of the presentation template, the following operations are required:
[0056] The dictionary data is stored and updated.
[0057] In this embodiment, the dictionary data of the constituent elements of the presentation template are stored and updated through the dictionary (Map) data structure of the Remote Dictionary Server (Redis).
[0058] In some feasible implementations, converting the components of the dashboard to obtain the data conversion file can be achieved by the following steps:
[0059] The data corresponding to the component is persisted to obtain a data conversion file.
[0060] In this embodiment, component data is written and stored in a data exchange format to maintain persistence, resulting in files in a data conversion format corresponding to the dashboard components and their information. This allows dashboards to be edited, migrated, imported, or exported directly by operating on the data conversion files without having to access or modify the database.
[0061] In some feasible implementations, step S105 may be implemented by the following process:
[0062] When the data to be displayed is received, the data conversion file is used to determine the component information corresponding to the data to be displayed, and obtain the element value in the component information corresponding to the data to be displayed.
[0063] In this embodiment, when data to be displayed is received, the component information corresponding to each category of data to be displayed can be determined based on the category of the data to be displayed and the data category in the component information of the dashboard recorded in the data conversion file. The data to be displayed is edited and displayed in the chart of the dashboard component, and the business data displayed in the chart contained in the dashboard component can be obtained, that is, the element value in the component information corresponding to the data to be displayed.
[0064] In this way, when the data to be displayed is received, the element value corresponding to each chart in the dashboard component can be directly obtained according to the data conversion file, that is, the data to be displayed is directly displayed in the component chart corresponding to the dashboard.
[0065] In some embodiments, before step S106 , the method further includes: receiving an operation instruction to draw the element value into the presentation template.
[0066] In this embodiment, when the data to be displayed is received, a dashboard is constructed, an operational analysis is performed on the data to be displayed, the data to be displayed is drawn in the dashboard of the data visualization tool, the element values of the data to be displayed in the dashboard are obtained, and then the dashboard is exported. At this time, a template for exporting the dashboard as a presentation is selected, and in the process of exporting the dashboard, an operation of drawing the dashboard as a presentation is triggered, that is, an operation instruction of drawing the element values of the data to be displayed in the dashboard into the presentation template is triggered.
[0067] Correspondingly, in order to export the operation analysis report in the dashboard corresponding to the data to be displayed into a business report presentation in real time, that is, to draw the element values of the data to be displayed in the dashboard into the presentation template, step S106 can be implemented by the following process:
[0068] Step S1061: In response to the operation instruction, call the interface for drawing the presentation template.
[0069] In this embodiment, in response to the operation instruction, the interface for drawing each component element in the presentation template is called to draw the element value into each component element in the presentation template, such as drawing the element value in the bar chart in the dashboard into the bar chart in the presentation template.
[0070] Step S1062: Based on the mapping relationship, determine the interface parameters for drawing the presentation template.
[0071] In this embodiment, based on the mapping relationship between the constituent elements in the presentation template and the components of the dashboard, interface parameters such as the chart name (chart type), chart business data, chart size, chart relative position and chart style for drawing the presentation template are obtained.
[0072] Step S1063: Determine, based on the interface parameters, that the element value corresponds to a component element in the presentation template, so as to obtain the presentation of the data to be displayed.
[0073] In this embodiment, according to the interface parameters, the element value of the dashboard component is used as the input parameter of the presentation interface, and is passed into the corresponding interface of the presentation template. The element value is drawn into the component element of the presentation template, and the element values of the components in the dashboard are drawn into the charts corresponding to the presentation template in the same way, and a presentation of the data to be displayed can be obtained. The aspect ratio, background image color, chart component style, and text style in the obtained presentation are determined by the presentation template, while the specific business data of the chart, the layout between multiple charts, and the display of pictures that do not support charts are determined by the dashboard of the data visualization tool. With the same parsing and drawing steps, a multi-page visualization dashboard can be obtained to export a multi-page PPT presentation. The exported completed PPT presentation can be directly used in scenarios such as operation analysis reporting.
[0074] In this way, after receiving the data to be displayed, when drawing the dashboard of the data to be displayed, the interface for drawing the presentation template is called, and the component charts of the dashboard corresponding to the data to be displayed can be drawn as charts in the presentation, thereby obtaining the presentation corresponding to the data to be displayed. Since the interface for drawing the presentation template is called during the drawing process, the charts in the presentation can be edited to obtain a real-time business report PPT presentation, thereby improving work efficiency.
[0075] In some embodiments, the drawing mode of the dashboard component in the presentation template may be determined based on whether the dashboard component corresponding to the element value is in a format supported by the presentation template:
[0076] If the component corresponding to the element value is a component supported by the presentation template, the element value is drawn into the presentation template to obtain the presentation of the data to be displayed.
[0077] In this embodiment, the components supported by the presentation template include conventional bar charts, line charts, pie charts, radar charts, combination charts, tables, text, and the like.
[0078] If the component corresponding to the element value is a component not supported by the presentation template, a screenshot of the component corresponding to the element value is stored in the presentation template to obtain a presentation of the data to be displayed.
[0079] In this embodiment, components not supported by the presentation template include funnel charts, word cloud charts, and Sankey charts, etc. According to the relative layout information of such components maintained in the data conversion file, the screenshots are directly displayed at the corresponding positions in the presentation template.
[0080] Components supported by the presentation template can be edited directly within the presentation, while unsupported components are replaced with high-definition screenshots of the chart. This allows you to convert a dashboard of data to a presentation file for business reporting, improving staff efficiency.
[0081] The present application provides a data processing method. Figure 2 This is another flow chart of the data processing method according to the embodiment of the present application, combined with Figure 2 The following steps are explained:
[0082] Step S201: Parse the imported presentation template.
[0083] In this embodiment, based on PPT templates frequently used in business reports, to achieve consistent style and updated content, the PPT templates are imported into a data visualization tool. The tool provides an entry for uploading PPT templates. After receiving the imported PPT templates, the tool first analyzes the template's aspect ratio. The conventional aspect ratio of PPTs is 4:3 or 16:9. Next, the background theme of the template is analyzed. Each template's background color, background image, and theme color style are unique and require maintenance. Furthermore, the data visualization tool continues to analyze the component characteristics of the PPT template. Components include text components, chart components, or table components. The information that needs to be maintained for text components is the font, size, and color of the template text; chart components need to maintain the chart type, which includes bar charts, pie charts, line charts, combination charts, radar charts, and color schemes; and table components mainly analyze the table style and the font, size, and color of the content. Finally, the metadata of each PPT template is maintained as a complete map data, which is stored and updated via Redis's Map data structure.
[0084] In some feasible implementations, the process of importing a PPT template into a data visualization tool and parsing it can be achieved by the following steps: Figure 3 For the embodiment of this application Figure 2 The flow chart of step S201 parsing the imported presentation template, combined with Figure 3 The following instructions are given:
[0085] Step S301: Start.
[0086] Step S302: Import the presentation template.
[0087] Step S303: Rename the template.
[0088] Step S304: Determine whether there is a duplicate name.
[0089] In this embodiment, in the database of the data visualization tool, it is determined whether the imported presentation template has the same name as an existing template. If so, step S303 is executed; if not, step S304 is executed.
[0090] Step S305: Parse the template.
[0091] In this embodiment, the size, background theme, component characteristics, etc. of the template are analyzed to obtain analysis results such as the constituent elements of the template.
[0092] Step S306: Encapsulate the analysis results.
[0093] In this embodiment, the parsing results of the constituent elements of the template are converted into dictionary data and packaged so as to call the packaged data packets of the constituent elements of the template when converting the data to be displayed from the dashboard of the data visualization tool into PPT.
[0094] Step S307: store the analysis result.
[0095] In this embodiment, the parsing result is stored and updated via the dictionary data structure of the remote dictionary service.
[0096] Step S308: End.
[0097] In this way, commonly used PPT templates in business can be imported into the data visualization tool and parsed to obtain the data information of the components of the commonly used PPT templates, and the data information can be stored and updated. This allows the PPT template data information to be directly used when drawing a dashboard to display data, generating a PPT template corresponding to the dashboard to be displayed.
[0098] Step S202: Parse the data visualization dashboard and start the export operation.
[0099] In this embodiment, it is necessary to complete the construction of a data visualization dashboard. The data visualization dashboard is the core unit of the data visualization tool. Generally speaking, the dashboard is used to create a data portal or a data cockpit to intuitively display user operation analysis data and support leadership system decision-making. As a powerful tool for data analysts, data visualization tools will create dashboards with sufficient information and intuitive and clear analysis results for each product, each topic, and each business need. Such a dashboard is the basis of this method, and the method is mainly based on such a dashboard to quickly export a PPT presentation. When performing the export to PPT operation on the constructed dashboard, it is first necessary to parse the components on the dashboard in detail, maintain the component type, the source data supporting the component display, and the layout of the components. This method records the components on the dashboard, source data, and the relative layout information of the components by maintaining a larger json structure of dashboard metadata. Components are divided into those supported by PPT and those not supported by PPT. Supported components include conventional bar charts, line charts, pie charts, radar charts, combination charts, tables, and text. Unsupported components include funnel charts, word cloud charts, and Sankey charts. When taking screenshots of these unsupported components during export, it is necessary to maintain their relative layout information. For chart components supported by PPT, it is necessary to record the component name, relative position, business data, and size in a data conversion format json object. After successfully parsing all components and their information in the dashboard into a json file, you can proceed with PPT drawing operations.
[0100] In some possible implementations, the process of parsing the dashboard of the data visualization tool can be implemented by the following process: Figure 4 For the embodiment of this application Figure 2 Step S202 of the process flow diagram of parsing the dashboard, combined with Figure 4 The following instructions are given:
[0101] S401: Start.
[0102] S402: Build a data visualization tool dashboard.
[0103] In this embodiment, a dashboard of the data visualization tool is built according to the instruction for building a dashboard input by the user.
[0104] S403: Parsing the dashboard.
[0105] In this embodiment, component information of the dashboard, such as component names on the dashboard, types of maintenance components, source data supporting component display, and component layouts are parsed to obtain parsing results such as metadata of the dashboard components.
[0106] S404: Encapsulate the parsing result.
[0107] In this embodiment, the data parsing result, ie, metadata of the dashboard, is parsed into a json file for recording components on the dashboard, source data, and relative layout information of the components.
[0108] In this way, by building a dashboard of a data visualization tool, parsing the dashboard, obtaining metadata of the component information of the dashboard, and encapsulating the metadata, when displaying any data, you can directly query the json file of the dashboard and obtain the element value of the data to be displayed in the dashboard, that is, use the metadata of the dashboard to display the data to be displayed in the dashboard.
[0109] S405: Determine whether the chart is supported by the presentation.
[0110] In this embodiment, it is determined whether the component of the dashboard is a chart supported by the presentation. If it is not a chart supported by the presentation, step S406 is executed; if it is a chart supported by the presentation, step S407 is executed.
[0111] Step S406: Export as a high-definition picture.
[0112] In this embodiment, charts that are not supported by the presentation are replaced with high-definition screenshots of the charts and exported.
[0113] Step S407: Drawing is performed with reference to the presentation template.
[0114] Step S408: Export to a presentation.
[0115] In this embodiment, the drawn dashboard is exported to a presentation, and the application analysis data is exported to a presentation for business reporting.
[0116] Step S409: End.
[0117] In this way, the dashboard of the visualization tool can be parsed to obtain a data conversion format file of the dashboard component for use in drawing a presentation.
[0118] S203: Draw and export the received data to be displayed as a presentation document.
[0119] In this example, PowerPoint presentations are created using a JSON object. By maintaining a mapping between dashboard chart component names and the application programming interface (API) for creating PowerPoint charts, all charts are drawn, restoring the chart content, style, and layout information. After creating a single-page PowerPoint presentation, the same method is used to create a complete PowerPoint presentation from the visual dashboard.
[0120] In some achievable implementations, before the data to be displayed is drawn in PPT, it is necessary to establish a mapping relationship between the dashboard component name and the interface for drawing the PPT chart. The drawing of each chart in the PPT requires an API interface, and the interface parameters include the chart name (chart type), chart business data, chart size, chart relative position and chart style. According to the json object of the dashboard, the element values of each chart to be drawn corresponding to the data to be displayed can be obtained. Combined with the map data of the PPT template stored in Redis, the above element values and the map data are passed to the parameters required for the chart drawing interface, and the chart components supported by PPT can be drawn and the layout on the data dashboard can be maintained. Charts that exist on the dashboard but are not supported by PPT are replaced with high-definition screenshots of the charts, so that a complete page of PPT presentations can be quickly drawn successfully. The aspect ratio, background image color, chart component style and text style of the drawn PPT are determined by the PPT template, while the specific business data of the drawn PPT chart, the layout between multiple charts and the image display of unsupported charts are determined by the data visualization dashboard. Using the same analytical drawing steps, this method supports exporting multi-page PPT presentations based on multi-page visualization dashboards. The exported completed PPT presentations can be directly used in scenarios such as operational analysis reports.
[0121] In some embodiments, when the PPT drawing of the data to be presented is completed, the PPT is directly exported to obtain a PPT file of the editable image of the data to be presented.
[0122] In some feasible implementations, the process of drawing and exporting the received data to be presented in PPT format can be implemented through the following process. Figure 5 Embodiments of the present application Figure 2 Step S203 draws a flow chart of the presentation, combined with Figure 5 The following instructions are given:
[0123] Step S501: Start.
[0124] Step S502: Encapsulate the drawing interface.
[0125] In this embodiment, the drawing of each PPT chart requires an API interface, and the interface parameters include the chart name (chart type), chart business data, chart size, chart relative position and chart style.
[0126] Step S503: receiving drawing parameters.
[0127] In this embodiment, after obtaining the json object, the element value of each chart to be drawn is obtained, and the parameters required for drawing the chart are passed to the chart drawing API interface in combination with the map data of the PPT template stored in Redis.
[0128] Step S504: Draw a single-page presentation.
[0129] In this example, after obtaining drawing parameters, chart components supported by PPT are drawn according to the parameters, maintaining the layout on the data dashboard. Charts that exist on the dashboard but are not supported by PPT are replaced with high-definition screenshots of the charts, allowing a complete PPT presentation to be quickly and successfully drawn. The aspect ratio, background image color, chart component style, and text style of the PPT page are determined by the PPT template. The specific business data for the charts, the layout of multiple charts, and the display of images for unsupported charts are determined by the data visualization dashboard.
[0130] Step S505: Determine whether to continue drawing the presentation.
[0131] In this embodiment, if the presentation continues to be drawn, step S506 is executed; if the presentation does not need to be drawn, step S507 is executed.
[0132] Step S506: Continue drawing.
[0133] Step S507: Complete the presentation drawing.
[0134] In this embodiment, according to the parsing and drawing steps of the method from step S502 to step S505, the drawing of multiple pages of PPT can be completed.
[0135] Step S508: End.
[0136] In this way, the PPT method drawn by the above method can support the export of multi-page PPT presentations based on the multi-page visual dashboard, and the exported completed PPT presentation can be directly used in scenarios such as operation analysis reporting.
[0137] In an embodiment of the present application, by importing a PPT template and parsing the PPT template, a data packet of information on the constituent elements of the PPT template is obtained, and then the dashboard of the visualization tool is parsed to obtain a data conversion file of the metadata of the dashboard. When drawing a dashboard for the data to be displayed, the interface for drawing PPT charts can be called according to the mapping relationship between the constituent elements of the PPT template and the metadata of the components of the dashboard, and the dashboard corresponding to the data to be displayed can be directly drawn into a presentation file, so that the images in the obtained presentation can be edited secondary, thereby improving work efficiency.
[0138] The present invention provides a data processing device. Figure 6 This is a schematic diagram of the structure of the data processing device according to the embodiment of the present application. Figure 6 As shown, the data processing device 600 includes: an analysis module 601, a determination module 602, a conversion module 603, an establishment module 604, a processing module 605 and a drawing module 606, wherein:
[0139] The parsing module 601 is used to parse the imported presentation template and determine the components of the presentation template;
[0140] The determining module 602 is configured to determine components included in a dashboard of a data visualization tool that carries the presentation template;
[0141] The conversion module 603 is used to convert the components to obtain a data conversion file;
[0142] The establishing module 604 is configured to establish a mapping relationship between the constituent elements of the presentation template and the components included in the dashboard based on the same parameters between the constituent elements of the presentation template and the components included in the dashboard;
[0143] The processing module 605 is configured to, upon receiving the data to be displayed, process the data to be displayed in the dashboard using the data conversion file to obtain element values of the data to be displayed in the dashboard;
[0144] The drawing module 606 is configured to draw the element value into the presentation template based on the mapping relationship to obtain the presentation of the data to be displayed.
[0145] In the above device, the parsing module 601 is further used to parse the text component, chart component or table component in the presentation template to determine the dictionary data corresponding to the constituent elements of the presentation template.
[0146] In the above device, the parsing module 601 is also used to store and update the dictionary data.
[0147] In the above device, the conversion module 603 is further used to persist the data corresponding to the component to obtain a data conversion file.
[0148] In the above device, the processing module 605 is further configured to, when receiving the data to be displayed, use the data conversion file to determine the component information corresponding to the data to be displayed, and obtain the element value in the component information corresponding to the data to be displayed.
[0149] In the above device, the device further includes:
[0150] The receiving module is used to receive an operation instruction to draw the element value into the presentation template.
[0151] In the above device, the drawing module includes:
[0152] A calling submodule, configured to call an interface for drawing the presentation template in response to the operation instruction;
[0153] A determination submodule, configured to determine interface parameters for drawing the presentation template based on the mapping relationship;
[0154] The determination submodule is used to determine, based on the interface parameters, that the element value corresponds to a component element in the presentation template, so as to obtain the presentation of the data to be displayed.
[0155] In the above device, the drawing submodule is further configured to draw the element value into the presentation template if the component corresponding to the element value is a component supported by the presentation template, so as to obtain the presentation of the data to be displayed;
[0156] If the component corresponding to the element value is a component not supported by the presentation template, a screenshot of the component corresponding to the element value is stored in the presentation template to obtain a presentation of the data to be displayed.
[0157] An embodiment of the present application further provides a data processing device, which includes the modules included, and the sub-modules and units included in each module, which can be implemented by a processor in a terminal; of course, it can also be implemented by a specific logic circuit; in the implementation process, the processor can be a central processing unit (CPU), a microprocessor (MPU), a digital signal processor (DSP) or a field programmable gate array (FPGA), etc.
[0158] Correspondingly, an embodiment of the present application provides a terminal, Figure 7 This is a schematic diagram of the structure of the terminal described in the embodiment of the present application, as shown in FIG. Figure 7 As shown, the terminal 700 includes at least: a controller 701 and a storage medium 702 configured to store executable instructions, wherein:
[0159] The controller 701 is configured to execute stored executable instructions, where the executable instructions are used to implement the provided data processing method.
[0160] It should be noted that the description of the above terminal embodiment is similar to the description of the above method embodiment and has similar beneficial effects as the method embodiment. For technical details not disclosed in the terminal embodiment of this application, please refer to the description of the method embodiment of this application for understanding.
[0161] Correspondingly, an embodiment of the present application provides a computer storage medium, in which computer-executable instructions are stored, and the computer-executable instructions are configured to execute the data processing method provided in other embodiments of the present application.
[0162] It should be understood that "one embodiment" or "an embodiment" mentioned throughout the specification means that the specific features, structures or characteristics related to the embodiment are included in at least one embodiment of the present application. Therefore, "in one embodiment" or "in an embodiment" appearing throughout the specification does not necessarily refer to the same embodiment. In addition, these specific features, structures or characteristics can be combined in one or more embodiments in any suitable manner. It should be understood that in the various embodiments of the present application, the size of the serial numbers of the above-mentioned processes does not mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present application. The above-mentioned serial numbers of the embodiments of the present application are for description only and do not represent the advantages and disadvantages of the embodiments.
[0163] It should be noted that, in this document, the terms "comprises," "includes," or any other variations thereof are intended to encompass non-exclusive inclusion, such that a process, method, article, or apparatus comprising a series of elements includes not only those elements but also other elements not explicitly listed, or elements inherent to such process, method, article, or apparatus. In the absence of further limitations, an element defined by the phrase "comprising a ..." does not exclude the presence of other identical elements in the process, method, article, or apparatus comprising the element.
[0164] In the several embodiments provided in this application, it should be understood that the disclosed devices and methods can be implemented in other ways. The device embodiments described above are merely schematic. For example, the division of the units is merely a logical function division. In actual implementation, there may be other division methods, such as: multiple units or components can be combined, or can be integrated into another system, or some features can be ignored or not executed. In addition, the coupling, direct coupling, or communication connection between the components shown or discussed can be through some interfaces, and the indirect coupling or communication connection of the devices or units can be electrical, mechanical or other forms.
[0165] The units described above as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units; they may be located in one place or distributed across multiple network units; some or all of the units may be selected according to actual needs to achieve the purpose of the scheme of this embodiment.
[0166] In addition, all functional units in the embodiments of the present application can be integrated into one processing unit, or each unit can be a separate unit, or two or more units can be integrated into one unit; the above-mentioned integrated units can be implemented in the form of hardware or in the form of hardware plus software functional units.
[0167] Those skilled in the art will understand that all or part of the steps of implementing the above-mentioned method embodiment can be completed by hardware related to program instructions, and the aforementioned program can be stored in a computer-readable storage medium. When the program is executed, it executes the steps of the above-mentioned method embodiment; and the aforementioned storage medium includes: mobile storage devices, read-only memories (ROM), magnetic disks or optical disks, and other media that can store program codes.
[0168] Alternatively, if the above-mentioned integrated unit of the present application is implemented in the form of a software function module and sold or used as an independent product, it can also be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the embodiment of the present application can be essentially or in other words, the part that contributes to the relevant technology can be embodied in the form of a software product, which is stored in a storage medium and includes a number of instructions for enabling a computer device (which can be a personal computer, server, or network device, etc.) to execute all or part of the methods described in each embodiment of the present application. The aforementioned storage medium includes: various media that can store program codes, such as mobile storage devices, ROMs, magnetic disks, or optical disks.
[0169] The above is merely an embodiment of the present application, but the scope of protection of the present application is not limited thereto. Any changes or substitutions that can be easily conceived by a person skilled in the art within the technical scope disclosed in this application should be included in the scope of protection of this application. Therefore, the scope of protection of this application should be based on the scope of protection of the claims.
Claims
1. A data processing method, characterized in that: The method comprises: Parsing a presentation template imported into a data visualization tool to determine the constituent elements of the presentation template; wherein the constituent elements of the presentation template include at least: the size of the presentation template, background theme information, and various component information; the component information includes at least: a text component, a chart component, and a table component; Determining components included in a dashboard of a data visualization tool carrying the presentation template; wherein the components included in the dashboard include at least: graphics, tables, and text; Converting the components included in the dashboard to obtain a data conversion file; wherein the data conversion file is a file that records the names, relative positions, business data, and sizes of the components included in the dashboard; Establishing a mapping relationship between the constituent elements of the presentation template and the components included in the dashboard based on identical parameters between the constituent elements of the presentation template and the components included in the dashboard; When receiving the data to be displayed, the data conversion file is used to process the data to be displayed in the dashboard to obtain element values of the data to be displayed in the dashboard; Based on the mapping relationship, the element value is mapped into the presentation template to obtain the presentation of the data to be displayed.
2. The method according to claim 1, characterized in that The step of parsing the imported presentation template to determine the constituent elements of the presentation template includes: The text component, chart component or table component in the presentation template is parsed to determine dictionary data corresponding to the constituent elements of the presentation template.
3. The method according to claim 2, characterized in that After parsing the text component, chart component, or table component in the presentation template to determine dictionary data corresponding to the constituent elements of the presentation template, the method further includes: The dictionary data is stored and updated.
4. The method according to claim 1, wherein The converting of the components included in the dashboard to obtain a data conversion file includes: The data corresponding to the component is persisted to obtain a data conversion file.
5. The method according to claim 1, characterized in that When receiving the data to be displayed, using the data conversion file to process the data to be displayed in the dashboard to obtain element values of the data to be displayed in the dashboard, including: When the data to be displayed is received, the data conversion file is used to determine the component information corresponding to the data to be displayed, and obtain the element value in the component information corresponding to the data to be displayed.
6. The method according to claim 1, characterized in that Before drawing the element value into the presentation template based on the mapping relationship to obtain the presentation of the data to be displayed, the method includes: receiving an operation instruction to draw the element value into the presentation template; The step of drawing the element value into the presentation template to obtain the presentation of the data to be displayed includes: In response to the operation instruction, calling an interface for drawing the presentation template; Based on the mapping relationship, determining interface parameters for drawing the presentation template; According to the interface parameters, it is determined that the element value corresponds to a component element in the presentation template to obtain the presentation of the data to be displayed.
7. The method according to claim 1, characterized in that The step of mapping the element value into the presentation template based on the mapping relationship to obtain the presentation of the data to be displayed includes: If the component corresponding to the element value is a component supported by the presentation template, drawing the element value into the presentation template to obtain the presentation of the data to be displayed; If the component corresponding to the element value is a component not supported by the presentation template, a screenshot of the component corresponding to the element value is stored in the presentation template to obtain a presentation of the data to be displayed.
8. A data processing device, characterized in that: The device comprises: a parsing module, configured to parse a presentation template imported into a data visualization tool and determine the components of the presentation template; wherein the components of the presentation template include at least: the size of the presentation template, background theme information, and various component information; and the component information includes at least: a text component, a chart component, and a table component; A determination module, configured to determine components included in a dashboard of a data visualization tool carrying the presentation template; wherein the components included in the dashboard include at least: graphics, tables, and text; a conversion module, configured to convert the components included in the dashboard to obtain a data conversion file; wherein the data conversion file is a file recording the names, relative positions, business data, and sizes of the components included in the dashboard; An establishing module, configured to establish a mapping relationship between the constituent elements of the presentation and the components included in the dashboard based on identical parameters between the constituent elements of the presentation template and the components included in the dashboard; a processing module, configured to, upon receiving the data to be displayed, process the data to be displayed in the dashboard using the data conversion file to obtain element values of the data to be displayed in the dashboard; A drawing module is used to draw the element value into the presentation template based on the mapping relationship to obtain a presentation of the data to be displayed.
9. A data processing terminal, characterized in that: The terminal includes at least: a controller and a storage medium configured to store executable instructions, wherein: The controller is configured to execute stored executable instructions, wherein the executable instructions are configured to execute the data processing method provided in any one of claims 1 to 7.
10. A computer-readable storage medium, characterized in that The computer-readable storage medium stores computer-executable instructions, and the computer-executable instructions are configured to execute the data processing method provided in any one of claims 1 to 7 above.
Citation Information
Patent Citations
PPT report making method and device
CN106339363A