Data analysis result presentation method and device, equipment and storage medium

By incorporating a chart generator into the Markdown editor, the Markdown source file is parsed to generate an HTML file and the target chart is drawn. This solves the problem of low processing efficiency in the Markdown editor and enables real-time chart updates and efficient processing of Markdown source file content.

CN115705465BActive Publication Date: 2026-01-02TENCENT TECHNOLOGY (SHENZHEN) CO LTD
View PDF 4 Cites 0 Cited by

Patent Information

Application Number
CN202110924231.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-08-12
Publication Date
2026-01-02
Estimated Expiration
2041-08-12

AI Technical Summary

Technical Problem

Existing Markdown editors cannot clearly and intuitively display the parsing results of Markdown source files in a table format, resulting in low processing efficiency.

Method used

A chart generator is built into the Markdown editor. It generates an HTML file by parsing the Markdown source file and creates the target table in the rendering area. Then, it calls an external chart generation tool to draw the target chart.

Benefits of technology

It simplifies the chart generation process, improves the efficiency of the Markdown editor in processing Markdown source files, and enables real-time chart updates of Markdown source file content.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115705465B_ABST
    Figure CN115705465B_ABST
Patent Text Reader

Abstract

The application relates to the computer field and provides a data analysis result presentation method and device, equipment and a storage medium to solve the problem of low processing efficiency of a Markdown editor. The method comprises the following steps: in response to an input operation triggered in an editing area in an editing operation interface, obtaining an input Markdown source file; obtaining an HTML file based on the analysis result of the Markdown source file, and generating at least one target table in a presentation area of the editing operation interface based on the HTML; reading table data from the at least one target table, and generating a corresponding target chart in the presentation area every time the table data of one target table is read. The client can not only generate a target chart recording the file content of the Markdown source file, but also generate a new target chart in real time when the target object modifies the Markdown source file, so that the processing efficiency of the client is effectively improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of computers and provides a method, apparatus, device, and storage medium for presenting data parsing results. Background Technology

[0002] Markdown is a lightweight markup language that is popular among self-media workers, programmers, and other target groups due to its easy-to-read and easy-to-write plain text characteristics.

[0003] A Markdown editor based on related technologies obtains the Markdown source file input by the target object, parses the Markdown source file, and outputs the parsing results in tabular form.

[0004] However, it is impossible to clearly and intuitively display the parsing results of the file containing the Markdown source file in a table format, which also increases the reading difficulty of the target object and reduces processing efficiency.

[0005] To address the aforementioned issues, the current solution involves having the target object generate a chart-style parsing result in a third-party chart generation tool beforehand, and then pasting the image containing the chart into the preview area of ​​the Markdown editor for display. However, this method of presenting data parsing results is not only cumbersome but also fails to improve the processing efficiency of the Markdown editor. Summary of the Invention

[0006] This application provides a method, apparatus, device, and storage medium for presenting data parsing results, in order to solve the problem of low efficiency in processing Markdown source files by Markdown editors in related technologies.

[0007] In a first aspect, embodiments of this application provide a method for presenting data parsing results, the method being applied to a client, including:

[0008] In response to an input operation triggered within the editing area of ​​the editing interface, the Markdown source file corresponding to the input operation is obtained;

[0009] The Markdown source file is parsed, and a HyperText Markup Language (HTML) file is obtained based on the parsing result. Based on the HTML file, at least one target table is generated in the presentation area, wherein each target table records table data representing the file content of the Markdown source file.

[0010] read table data from the at least one target table, wherein, for each target table, corresponding table data is read, and based on the obtained table data, a corresponding target chart is generated in the presentation area.

[0011] In a second aspect, the embodiments of the present application further provide a presentation device of data analysis result, which is applied to a client and includes:

[0012] an obtaining unit, configured to obtain a Markdown source file corresponding to an input operation triggered in an editing area in an editing operation interface in response to the input operation;

[0013] a table rendering unit, configured to parse the Markdown source file, obtain a HyperText Markup Language (HTML) file based on a parsing result, and generate at least one target table in the presentation area based on the HTML file, wherein each target table records table data representing file content of the Markdown source file;

[0014] a chart rendering unit, configured to read table data from the at least one target table, wherein, for each target table, corresponding table data is read, and based on the obtained table data, a corresponding target chart is generated in the presentation area.

[0015] Optionally, the client further includes an event listener.

[0016] The obtaining unit determines that the input operation is triggered in the editing area by performing the following operations:

[0017] If it is detected by the event listener that the content in the editing area has been updated, it is determined that the input operation is triggered in the editing area.

[0018] Optionally, the obtaining unit is configured to detect at least one of the following operations:

[0019] If it is detected by the event listener that new content is input in the editing area, it is determined that the input operation is triggered in the editing area.

[0020] If it is detected by the event listener that the existing content in the editing area is modified, it is determined that the input operation is triggered in the editing area.

[0021] Optionally, the client at least includes an event listener and a chart generator.

[0022] After the at least one target table is generated in the presentation area, before the table data is read from the at least one target table, the chart rendering unit is further configured to:

[0023] reading table data from the at least one target table, generating a corresponding target chart in the presentation area based on the obtained table data each time the table data of one target table is read.

[0024] In a third aspect, an embodiment of the present application further provides a computer device, including a processor and a memory, wherein the memory stores program code, when the program code is executed by the processor, the processor executes the steps of the data analysis result presentation method.

[0025] In a fourth aspect, an embodiment of the present application further provides a computer readable storage medium, including program code, when the program product is run on a computer device, the program code is used to make the computer device execute the steps of the data analysis result presentation method.

[0026] The present application has the following beneficial effects:

[0027] The embodiment of the present application provides a data analysis result presentation method, device, equipment and storage medium, the method comprises the following steps: in response to an input operation triggered in an editing area in an editing operation interface, obtaining a Markdown source file corresponding to the input operation; parsing the Markdown source file, obtaining an HTML file based on the parsing result, and generating at least one target table in a presentation area of the editing operation interface based on the HTML; reading table data from the at least one target table, and generating a corresponding target chart in the presentation area based on the obtained table data each time the table data of one target table is read. By embedding a chart generator in the client, the client has the ability to directly call an external chart generation tool, so that the client can not only directly call the external chart generation tool to generate a target chart recording the file content of the Markdown source file, but also can call the external chart generation tool in real time to generate a new target chart when the target object modifies the Markdown source file, thereby effectively improving the work efficiency of the client in processing the Markdown source file.

[0028] Other features and advantages of the present application will be set forth in the following description, and in part will become apparent to those skilled in the art from the description, or can be learned by practice of the present application. The objects and other advantages of the present application can be realized and achieved by means of the structures particularly pointed out in the written description, claims, and drawings. BRIEF DESCRIPTION OF DRAWINGS

[0029] The accompanying drawings, which are included to provide a further understanding of the application and are incorporated in and constitute a part of this application, illustrate embodiments of the application and together with the description serve to explain the application. In the drawings:

[0030] Figure 1a An optional schematic diagram of an application scenario in an embodiment of the application;

[0031] Figure 1b A schematic diagram of the architecture of a Markdown editor in an embodiment of the application;

[0032] Figure 2a A flowchart of a presentation method of a data analysis result provided in an embodiment of the application;

[0033] Figure 2b A logic diagram of a Markdown editor presenting a target chart in a chart form provided in an embodiment of the application;

[0034] Figure 2c An interface diagram of writing a Markdown source file in a blank editing area provided in an embodiment of the application;

[0035] Figure 2d An interface diagram of modifying a Markdown source file in an editing area provided in an embodiment of the application;

[0036] Figure 2e An interface diagram of presenting an analysis result in a table form provided in an embodiment of the application;

[0037] Figure 2f An interface diagram of presenting an analysis result in a chart form provided in an embodiment of the application;

[0038] Figure 2g A chart comparison diagram of a chart before and after table metadata modification provided in an embodiment of the application;

[0039] Figure 2h A chart comparison diagram of a chart before and after chart format information modification provided in an embodiment of the application;

[0040] Figure 3 A structural diagram of a presentation device of a data analysis result provided in an embodiment of the application;

[0041] Figure 4 A structural diagram of a computer device provided in an embodiment of the application;

[0042] Figure 5 A structural diagram of a computing device in an embodiment of the application. DETAILED DESCRIPTION

[0043] In order to make the purposes, technical solutions and advantages of the embodiments of the present application clearer, the technical solutions of the present application will be described clearly and completely below with reference to the drawings in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, rather than all the embodiments. Based on the embodiments described in the present application document, all other embodiments obtained by a person of ordinary skill in the art without creative labor fall within the scope of protection of the technical solutions of the present application.

[0044] Some terms in the embodiments of the present application are explained below to facilitate understanding by those skilled in the art.

[0045] 1. Markdown: a lightweight markup language. Markdown is welcomed by self-media workers, programmers and other object groups due to its own lightweight, simple and clear syntax, easy-to-read and easy-to-write characteristics, and support for presentation of special expression forms such as pictures, charts and mathematical formulas, and is widely used for writing documents and publishing forum information.

[0046] 2. Hyper Text Markup Language (HTML): a markup language for web page production. HTML includes a header part and a body part, wherein the header part is used to provide web-related information, and the body part is used to provide specific content of the web page.

[0047] 3. Source file: also known as source code or source program, refers to a text file written in accordance with a certain program design language specification but not compiled, which is a series of human-readable computer language instructions.

[0048] 4. Cloud computing: a computing mode that can distribute computing tasks on a resource pool composed of a large number of computers, so that various application systems can obtain computers, storage spaces and information services according to needs. The network used to provide resources is called "cloud", and the resources in the "cloud" are infinitely expandable, on-demand available, and a certain fee is paid for each use behavior.

[0049] As a basic capability provider of cloud computing, a cloud computing resource pool platform (also known as a cloud platform, and generally also known as an Infrastructure as a Service (IaaS) platform) is established, and a plurality of types of virtual resources are deployed in the resource pool for external customers to select and use. Among them, the cloud computing resource pool mainly includes computing devices (virtualized machines containing operating systems), storage devices and network devices.

[0050] According to logical function division, a platform as a service (PaaS) layer is deployed on the IaaS layer, a software as a service (SaaS) layer is deployed on the PaaS layer, and the SaaS layer can also be directly deployed on the IaaS layer. Generally, SaaS and PaaS are upper layers relative to IaaS, PaaS refers to a platform for software running, such as a database, a network Web container, and the like, and SaaS refers to software running on a platform, such as a Web portal, a short message massager, and the like.

[0051] The design idea of the embodiments of the present application is briefly introduced as follows:

[0052] Markdown is a lightweight markup language, and is very popular among self-media workers, programmers, and the like due to its easy-to-read and easy-to-write pure text characteristics.

[0053] The Markdown editor under the related art acquires a Markdown source file input by a target object, and outputs a parsing result in a table form by parsing the Markdown source file.

[0054] However, the parsing result of the file content recorded in the Markdown source file cannot be clearly and intuitively displayed in a table form, which increases the reading difficulty of the target object and reduces the processing efficiency.

[0055] To solve the above problems, the current solution is to let the target object generate a parsing result in a chart form in a third-party chart generation tool in advance, and then paste a picture containing the chart into a preview area of the Markdown editor for display. However, this method of presenting a data parsing result is not only cumbersome, but also cannot improve the processing efficiency of the Markdown editor.

[0056] Therefore, the embodiments of the present application provide a new method, device, equipment, and storage medium for presenting a data parsing result. The method comprises the following steps: in response to an input operation triggered in an editing area of an editing operation interface, acquiring a Markdown source file corresponding to the input operation; parsing the Markdown source file, obtaining an HTML file based on a parsing result, and generating at least one target table in a presentation area of the editing operation interface based on the HTML; reading table data from the at least one target table, and generating a corresponding target chart in the presentation area based on the obtained table data each time the table data of one target table is read.

[0057] The preferred embodiments of the present application are described below in conjunction with the accompanying drawings. It should be understood that the preferred embodiments described herein are only used to explain and illustrate the present application, and are not used to limit the present application, and the embodiments in the present application and the features in the embodiments can be combined with each other without conflict.

[0058] As shown in Figure 1a , which is an application scenario diagram of the embodiments of the present application. The application scenario diagram includes two physical terminal devices 110 and a server 130, and the physical terminal devices 110 and the server 130 can be connected and communicated through a communication network.

[0059] For convenience of description, taking one physical terminal device as an example, a method for presenting a data analysis result provided by the embodiments of the present application is briefly introduced, and the application of the method on the physical terminal device 110 is introduced.

[0060] The physical terminal device 110 is installed with a client that can provide a Markdown editing function, which can also be referred to as a Markdown editor. As shown in Figure 1b , according to the architecture diagram, the editor includes an editing operation interface 120, an event listener, a syntax analysis engine, a chart generator, a storage, and other modules.

[0061] The physical terminal device 110 presents the editing operation interface 120 on the display screen of the physical terminal device 110 in response to a login operation triggered by a user. The editing operation interface 120 includes an editing area and a presentation area. The editing area is used to provide the user with a Markdown editing function, and the presentation area is used to present the user with the analysis result in the form of a corresponding table and chart corresponding to the file content of the Markdown source file.

[0062] The event listener is used to listen to various events triggered in the client and call corresponding modules to perform operations. For example, when the event listener detects that the content in the editing area has been updated, it is determined that the user has triggered an input operation in the editing area, and the Markdown source file in the editing area is sent to the syntax analysis engine for analysis through the event listener itself.

[0063] The syntax analysis engine is used to analyze the Markdown source file input by the user, and convert the pure text format document written based on the Markdown syntax into an HTML format document.

[0064] By embedding the chart generator in the client, the client has the ability to directly call the external chart generation tool. Specifically, when it is determined that at least one target table has been generated in the presentation area, the chart generator is called by the event listener to send the table data to the external chart generation tool for chart drawing processing to draw the corresponding target chart. In this way, the Markdown editor not only simplifies the chart generation step, directly calls the external chart generation tool, and generates the target chart recording the file content of the Markdown source file, but also can call the external chart generation tool in real time when the target object modifies the Markdown source file to generate a new target chart, effectively improving the work efficiency of the Markdown editor in processing the Markdown source file.

[0065] The Markdown editor in the embodiments of the present application can be used online or offline. When the physical terminal device 110 running the Markdown editor and the server 130 perform network communication, the function of using the Markdown editor online can be realized. In an optional embodiment, the communication network is any one of a wired network or a wireless network. Therefore, each physical terminal device 110 can directly or indirectly establish a communication connection with the server 130 through a wired network or a wireless network, which will not be limited herein.

[0066] In addition, the physical terminal device 110 in the embodiments of the present application is an electronic device used by a user. The electronic device can be a personal computer, a mobile phone, a tablet computer, a notebook computer, or other computer devices with text writing and multimedia rendering capabilities. The server 130 in the embodiments of the present application can be a standalone physical server, a server cluster composed of multiple physical servers, or a distributed system. It can also be a cloud server 130 providing basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communication, middleware services, domain name services, security services, content delivery networks (CDN), big data, and artificial intelligence platforms, which will not be limited herein.

[0067] Referring to Figure 2a The flowchart and the logic diagram shown in Figure 2b The presentation method of the data analysis result proposed by the embodiments of the present application is specifically introduced.

[0068] S201: The client acquires a Markdown source file corresponding to an input operation in response to the input operation triggered in the editing area in the editing operation interface.

[0069] According to the foregoing introduction, the Markdown editor in the embodiment of the application includes an event listener. If it is detected through the event listener that the content in the editing area has been updated, it is determined that an input operation is triggered in the editing area.

[0070] The input operation includes at least one of the following operations.

[0071] (1) If it is detected through the event listener that new content is input in the editing area, the input operation is triggered in the editing area.

[0072] For example, the user writes a Markdown source file as shown in Figure 2c in the blank editing area according to the syntax of the Markdown markup language.

[0073] (2) If it is detected through the event listener that the existing content in the editing area is modified, it is determined that the input operation is triggered in the editing area.

[0074] For another example, the user modifies the Markdown source file in the editing area, modifies the page view (PV) from 30,000,000 times to 15,000,000 times, and obtains a modified Markdown source file as shown in Figure 2d .

[0075] In this way, when the event listener detects at least one of the input operation of inputting new content and the input operation of modifying the existing content in the editing area, the Markdown source file input by the target object is obtained from the editing area, and the Markdown source file is sent to the syntax parsing engine for parsing, so that the corresponding table form parsing result and chart form parsing result are generated in the presentation area. In addition, the detection of the above two input operations by the event listener is also conducive to realizing the function of updating the corresponding target chart in real time as the file content of the Markdown source file is changed in the embodiment of the application.

[0076] S202: The client parses the Markdown source file, obtains an HTML file based on the parsing result, and generates at least one target table in the presentation area based on the HTML file, wherein each target table records table data representing the file content of the Markdown source file.

[0077] In step 202, the syntax parsing engine in the Markdown editor is called through the event listener to parse the obtained Markdown source file based on the parsing result, and an HTML file is obtained based on the parsing result.

[0078] The specific analysis process is as follows:

[0079] In order to facilitate subsequent syntax parsing engine unified reading Markdown source file by line, a newline character \n will be added at the end of the text byte array of the Markdown source file. When the syntax parsing engine works, in order to reduce memory allocation, the lexical analysis algorithm is called to perform lexical analysis on the Markdown source file, and the text in the Markdown source file is converted into a token array, so as to obtain a certain number of token arrays.

[0080] Then, the syntax parsing engine calls the syntax parsing algorithm to perform syntax parsing on the processed Markdown source file to obtain the corresponding HTML file, which roughly includes the following four types of nodes: root node, block container node, block node and line node.

[0081] The syntax parsing engine sends the parsed HTML file to the presentation area in the Markdown editor, so that the Markdown editor performs first page rendering processing on the presentation area based on the HTML file, and generates at least one target table in the presentation area as shown in Figure 2e When the Markdown source file specifies that there are multiple target tables in the presentation area, the Markdown editor can render all target tables at a time, or render each target table from top to bottom, which will not be limited in this application.

[0082] After the rendering of the presentation area is completed, the rendering message will be sent to the event listener. When the event listener receives the rendering message sent by the presentation area, if it is determined that at least one target table has been generated in the presentation area, the chart generator will be called through the event listener to read the table data from the at least one target table.

[0083] Since the external chart generation tool cannot understand the computer language instructions in the Markdown source file, it is necessary to first convert the Markdown source file into table data readable by the external chart generation tool through the syntax parsing engine and the presentation area. However, the editing operation interface in the Markdown editor cannot directly call the external chart generation tool, so when the event listener determines that at least one target table has been generated in the presentation area, the chart generator will be called to send the read table data to the external chart generation tool for chart drawing processing.

[0084] S203: The client reads table data from at least one target table, wherein, for each target table, corresponding table data is read, and based on the obtained table data, a corresponding target chart is generated in the presentation area.

[0085] In step 203, the chart generator can send the obtained table data to an external chart generation tool for chart drawing processing to draw a corresponding target chart for each target table. Then, the target chart returned by the external chart generation tool is obtained, and a second page rendering process is performed in the presentation area based on the obtained table data to generate the target chart in the presentation area.

[0086] In the embodiment, the chart generator reads the table data of each target table in the presentation area from top to bottom, and sends the obtained table data to the external chart generation tool for chart drawing processing for each target table. After the target chart returned by the external chart generation tool is rendered in the presentation area, the chart generator reads the table data of the next target table. In this way, even if the Markdown editor is in a weak network state, the network load of the Markdown editor can be reduced by rendering each target chart one by one, and the final rendering effect can be ensured.

[0087] However, in the embodiment, multiple target tables can be generated in the presentation area. In order to determine which table data has been rendered into a corresponding target chart and which table data has not been processed by chart drawing and second page rendering, the data label generated by the chart generator is matched with the data label stored in the memory to filter out the table data in the presentation area that has not been processed by chart drawing and second page rendering.

[0088] Specifically, the table data in the presentation area that has not been processed by chart drawing and second page rendering is filtered out by performing the following operations:

[0089] Specifically, if at least one target table is generated in the presentation area, the Markdown editor can read the table data of each target table one by one by the chart generator. Taking any one target table as an example (hereinafter referred to as target table i), after reading the table data i corresponding to the target table i, the chart generator generates a corresponding data label i based on the obtained table data i.

[0090] For table data i and data label i, the Markdown editor can use the following two ways, but not limited to:

[0091] Method 1: If the data label i is not stored in the memory of the client, the chart generator determines that the table data i is not rendered into the corresponding target chart, and stores the data label i into the memory.

[0092] In method 1, the table data i obtained by the chart generator can be sent to the external chart generation tool by performing the following operations:

[0093] First, the chart generator generates a chart drawing request carrying the table data i based on the obtained table data i, and then the chart generator calls the transmission interface of the external chart generation tool to send the chart drawing request to the external chart generation tool, so that the external chart generation tool draws the corresponding target chart based on the table data i carried by the chart drawing request.

[0094] For example, the chart generator generates the corresponding data label c based on the table data as shown in Table 1. If the data label c is not stored in the memory of the Markdown editor, it means that the table data is not rendered into the corresponding target chart. Then, the chart generator sends the table data to the external chart generation tool for chart drawing processing to obtain the target chart as shown in Figure 2f The DAU refers to the daily active user, the UV refers to the unique visitor, and the PV refers to the page view.

[0095] Table 1

[0096]

[0097]

[0098] Method 2: If the data label i is stored in the memory of the client, the Markdown editor will discard the table data i and stop the current round of chart drawing processing and second page rendering processing, and then read the table data i+1 corresponding to the next target chart through the chart generator.

[0099] In method 2, if the chart generator determines that the table data i has been rendered into the corresponding target chart, the table data i will be discarded, and the table data i+1 corresponding to the next target chart will be read. In the previous chart generation task, the table data i obtained by the chart generator is sent to the external chart generation tool by performing the following operations:

[0100] The chart generator generates a chart drawing request carrying the table data i based on the obtained table data i, and then sends the chart drawing request to an external chart generation tool through a transmission interface of the chart generator, so that the external chart generation tool draws a corresponding target chart based on the table data i carried by the chart drawing request.

[0101] In the embodiments of the present application, the table data at least includes chart format information, table header content and table cell content. The chart format information specifies the chart format, which can be various, and the chart format in the embodiments of the present application includes but is not limited to column chart, line chart, pie chart, percentage chart, bubble chart and bar chart. For example, bar represents that the chart format is column chart, and line represents that the chart format is line chart. The table header content specifies the content represented by the horizontal and vertical axes of the chart. For example, bar(x, y) represents that the horizontal axis of the column chart represents the year, and the vertical axis of the column chart represents the quantity. The table cell content specifies the content in each cell. For example, the DAU in 2019 is 100000.

[0102] In addition, if the HTML file further includes table hiding information, after generating the corresponding at least one target table based on the HTML file, the at least one target table is hidden in the presentation area, wherein the table hiding information is obtained by parsing the Markdown source file. In this way, the target object can make the Markdown editor only present the target chart in the presentation area by adding the table hiding information, or present the target table and the corresponding target chart in the presentation area by deleting the table hiding information.

[0103] On the other hand, if the target object modifies the existing content in the editing area before the Markdown editor presents the corresponding target chart in the presentation area, the Markdown editor will re-execute the process shown in Figure 2a to regenerate the corresponding target chart.

[0104] For example, when the event listener listens that the user modifies part of the table cell data in the Markdown source file (i.e., modifies the PV in 2021 from 30,000,000 times to 15,000,000 times), the Markdown editor stops the current target chart generation task, and generates a new target table as shown in Table 2 based on the Markdown source file modified by the user. Then, the Markdown editor calls the external chart generation tool to draw a new target chart based on the table data in the new target table, and performs a second page rendering process on the presentation area to present the new target chart as shown in Figure 2g .

[0105] Table 2

[0106] 2019 2020 2021 DAU 100,000 200,000 300,000 UV 1,000,000 2,000,000 3,000,000 PV 10,000,000 20,000,000 15,000,000

[0107] For another example, after the Markdown editor completes the current target chart generation task, when the event listener again listens to that the user modifies the chart format information of the Markdown source file (i.e., modifies the chart format information from bar(x, y) to line(x, y)), the Markdown editor generates a new target table based on the Markdown source file modified by the user; and then, based on the table data in the new target table, calls the external chart generation tool to draw a new target chart, and performs a second page rendering process on the presentation area to present the new target chart as shown in Figure 2h Due to the modification of the chart format information, the target chart is updated from the original column chart to the corresponding line chart in real time.

[0108] In different application scenarios such as self-media, network forums, and presentation, the presentation method of the data analysis result as shown in Figure 2a The Markdown editor can obtain the ability of directly calling the external chart generation tool through the built-in chart generator. In this way, not only can the chart generation steps be simplified, but also the new target chart can be generated by directly calling the external chart generation tool in the presentation area of the Markdown editor, and the processing efficiency of the Markdown editor is effectively improved when the target object modifies the Markdown source file.

[0109] Based on the same inventive concept as the method embodiments, the embodiments of the present application also provide a structural diagram of a data analysis result presentation device. As shown in Figure 3 The device 300 is applied to a client, and the device 300 can include:

[0110] An acquisition unit 301, configured to acquire a Markdown source file corresponding to an input operation triggered in an editing area in an editing operation interface in response to the input operation;

[0111] A table rendering unit 302, configured to parse the Markdown source file, obtain a HyperText Markup Language (HTML) file based on a parsing result, and generate at least one target table in a presentation area based on the HTML file, where table data representing file content of the Markdown source file is recorded in each target table;

[0112] The chart rendering unit 303 is configured to read table data from at least one target table, and generate a corresponding target chart in the presentation area based on the obtained table data for each reading of the table data corresponding to a target table.

[0113] Optionally, the client includes at least a chart generator, and the chart rendering unit 303 is configured to:

[0114] The chart generator is configured to, for each reading of the table data corresponding to a target table, send the obtained table data to an external chart generation tool for chart drawing processing to draw a corresponding target chart.

[0115] The chart rendering unit 303 is configured to obtain the target chart returned by the external chart generation tool, and generate the target chart in the presentation area based on the obtained table data.

[0116] Optionally, the chart rendering unit 303 is configured to:

[0117] The chart generator is configured to generate a chart drawing request carrying the table data based on the obtained table data.

[0118] The chart generator is configured to call a transmission interface of the external chart generation tool to send the chart drawing request to the external chart generation tool, so that the external chart generation tool draws a corresponding target chart based on the table data carried in the chart drawing request.

[0119] Optionally, the client includes at least a chart generator.

[0120] After reading the table data corresponding to a target table, before generating a corresponding target chart in the presentation area based on the obtained table data, the chart rendering unit 303 is further configured to:

[0121] The chart generator is configured to generate a corresponding data label based on the obtained table data.

[0122] If the data label is not stored in the memory of the client, the chart generator determines that the table data is not rendered into the corresponding target chart, and stores the data label in the memory.

[0123] Optionally, the table rendering unit 302 is further configured to:

[0124] If the HTML file contains table hiding information, after generating the at least one target table in the presentation area based on the HTML file, the at least one target table is hidden in the presentation area, wherein the table hiding information is obtained by parsing the Markdown source file.

[0125] Optionally, the client further includes an event listener.

[0126] The obtaining unit 301 determines that the input operation is triggered in the editing area by performing the following operations:

[0127] If the event listener detects that the content in the editing area has been updated, it is determined that the input operation is triggered in the editing area.

[0128] Optionally, the obtaining unit 301 is configured to monitor at least one of the following operations:

[0129] If the event listener detects that new content is input in the editing area, it is determined that the input operation is triggered in the editing area;

[0130] If the event listener detects that the existing content in the editing area is modified, it is determined that the input operation is triggered in the editing area.

[0131] Optionally, the client includes at least an event listener and a chart generator;

[0132] After generating the corresponding at least one target table in the presentation area, before reading the table data from the at least one target table, the chart rendering unit 303 is further configured to:

[0133] When the event listener receives the rendering message sent by the presentation area, if it is determined that the at least one target table has been generated in the presentation area, the chart generator is called by the event listener to read the table data from the at least one target table.

[0134] For the sake of description, each part is divided into modules (or units) according to functions and described respectively. Of course, when implementing the present application, the functions of each module (or unit) can be implemented in the same or multiple software or hardware.

[0135] After introducing the data analysis result presentation method and device of the exemplary embodiment of the present application, next, the computer device according to another exemplary embodiment of the present application is introduced.

[0136] Those skilled in the art can understand that each aspect of the present application can be implemented as a system, a method or a program product. Therefore, each aspect of the present application can be specifically implemented as a complete hardware embodiment, a complete software embodiment (including firmware, microcode, etc.), or an embodiment combined with hardware and software, which can be collectively referred to as "circuit", "module" or "system".

[0137] Based on the same inventive concept as the above method embodiment, the present embodiment also provides a computer device, which is described in detail with reference to Figure 4As shown, the computer device 400 may include at least a processor 401 and a memory 402. The memory 402 stores program code, which, when executed by the processor 401, causes the processor 401 to perform the steps of any of the aforementioned methods for presenting the data parsing results.

[0138] In some possible implementations, the computing device according to this application may include at least one processor and at least one memory. The memory stores program code that, when executed by the processor, causes the processor to perform the steps in the data parsing result presentation method according to various exemplary embodiments of this application described above. For example, the processor may perform actions such as... Figure 2a The steps are shown in the figure.

[0139] The following reference Figure 5 To describe a computing device 500 according to this embodiment of the present application. Figure 5 The computing device 500 is merely an example and should not impose any limitations on the functionality and scope of use of the embodiments of this application.

[0140] like Figure 5 As shown, the computing device 500 is presented in the form of a general-purpose computing device. The components of the computing device 500 may include, but are not limited to: at least one processing unit 501, at least one storage unit 502, and a bus 503 connecting different system components (including storage unit 502 and processing unit 501).

[0141] Bus 503 represents one or more of several bus structures, including a memory bus or memory controller, peripheral bus, processor, or local bus using any of the various bus structures.

[0142] Storage unit 502 may include a readable medium in the form of volatile memory, such as random access memory (RAM) 5021 and / or cache memory unit 5022, and may further include read-only memory (ROM) 5023.

[0143] Storage unit 502 may also include a program / utility 5025 having a set (at least one) program module 5024, such program module 5024 including but not limited to: operating system, one or more application programs, other program modules and program data, each or some combination of these examples may include an implementation of a network environment.

[0144] The computing device 500 can also be communicably coupled to one or more devices 504, such as a keyboard, a pointing device, etc. that enables a user to interact with the computing device 500, and / or one or more devices that enables the computing device 500 to communicate with one or more other computing devices. Such communication can be via input / output (I / O) interface 505. Further, the computing device 500 can communicate with one or more networks, such as a local area network (LAN), a wide area network (WAN), and / or a public network, such as the Internet, via network adapter 506. As depicted, network adapter 506 is in communication with the other components of the computing device 500 through bus 503. It should be appreciated that although not shown, other hardware and / or software modules could be used in connection with the computing device 500. These include, but are not limited to, microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, and data archival storage systems, etc.

[0145] Based on the same inventive concept as the method embodiments described above, each aspect of the method for presenting the data analysis result provided in the present application can also be implemented in the form of a program product, which includes program codes for causing a computer device to perform the steps of the method for presenting the data analysis result according to various exemplary embodiments of the present application described above in the specification when the program product is run on the computer device. For example, the electronic device can perform the steps as shown in Figure 2a FIG. 6.

[0146] The program product can adopt any combination of one or more readable media. The readable medium can be a readable signal medium or a readable storage medium. The readable storage medium, for example, can be, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, device, or apparatus, or any suitable combination of the above. More specific examples (a non-exhaustive list) of the readable storage medium include an electrical connection having one or more wires, a portable disc, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above.

[0147] Although the preferred embodiments of the present application have been described, those skilled in the art can make additional changes and modifications to these embodiments once they get the basic inventive concept. Therefore, the appended claims are intended to cover all changes and modifications falling within the scope of the present application.

[0148] Obviously, many modifications and variations of the present application are possible in light of the above teachings. It is, therefore, to be understood that within the scope of the appended claims and their equivalents, the application can be practiced otherwise than as specifically described.

Claims

1. A method of presenting a data parsing result, characterized by, The method is applied to a client, and comprises: In response to an input operation triggered in an editing area in an editing operation interface, obtaining a Markdown source file corresponding to the input operation; Parsing the Markdown source file, obtaining a HyperText Markup Language (HTML) file based on a parsing result, and generating at least one target table in a presentation area based on the HTML file, wherein each target table records table data representing file content of the Markdown source file; When a rendering message sent by the presentation area is received through an event listener, if it is determined that the at least one target table has been generated in the presentation area, calling a chart generator through the event listener to read table data from the at least one target table; Reading table data from the at least one target table, wherein for each target table, a corresponding target chart is generated in the presentation area based on the obtained table data.

2. The method of claim 1, wherein, The client comprises at least a chart generator; For each target table, a corresponding target chart is generated in the presentation area based on the obtained table data, comprising: Through the chart generator, for each target table, the obtained table data is sent to an external chart generation tool for chart drawing processing to draw a corresponding target chart; Obtaining a target chart returned by the external chart generation tool, and generating the target chart in the presentation area based on the obtained table data.

3. The method of claim 2, wherein, The chart drawing processing of the obtained table data sent to the external chart generation tool comprises: Through the chart generator, a chart drawing request carrying the table data is generated based on the obtained table data; Through the chart generator, a transmission interface of the external chart generation tool is called to send the chart drawing request to the external chart generation tool, so that the external chart generation tool draws a corresponding target chart based on the table data carried in the chart drawing request.

4. The method of claim 1, wherein, The client comprises at least a chart generator; After reading table data corresponding to a target table, before generating a corresponding target chart in the presentation area based on the obtained table data, the method further comprises: Through the chart generator, a corresponding data label is generated based on the obtained table data; If the data label is not stored in the memory of the client, the chart generator determines that the table data is not rendered into a corresponding target chart, and stores the data label in the memory.

5. The method of claim 1, wherein, The method further comprises: If the HTML file contains table hiding information, after generating the at least one target table based on the HTML file, the at least one target table is hidden in the presentation area; wherein the table hiding information is obtained by parsing the Markdown source file.

6. The method of claim 1, wherein, The client further comprises an event listener; If it is determined that the content in the editing area has been updated through the event listener, it is determined that an input operation is triggered in the editing area. If it is determined that the content in the editing area has been updated through the event listener, it is determined that an input operation is triggered in the editing area.

7. The method of claim 6, wherein, If it is determined that the content in the editing area has been updated through the event listener, it is determined that an input operation is triggered in the editing area. If it is determined that the content in the editing area has been updated through the event listener, it is determined that an input operation is triggered in the editing area. If it is determined that the content in the editing area has been updated through the event listener, it is determined that an input operation is triggered in the editing area.

8. A data analysis result presentation device characterized by comprising: The device is applied to a client, and comprises: An obtaining unit is configured to, in response to an input operation triggered in an editing area in an editing operation interface, obtain a Markdown source file corresponding to the input operation. A table rendering unit is configured to parse the Markdown source file, obtain a HyperText Markup Language (HTML) file based on a parsing result, and generate at least one target table in a presentation area based on the HTML file, wherein each target table records table data representing file content of the Markdown source file. A chart rendering unit is configured to, when receiving a rendering message sent by the presentation area through an event listener, if it is determined that the at least one target table has been generated in the presentation area, call a chart generator through the event listener, and read table data from the at least one target table. The chart rendering unit is configured to:

9. The apparatus of claim 8, wherein, read table data from the at least one target table, wherein for each target table, based on the obtained table data, a corresponding target chart is generated in the presentation area. The chart rendering unit is configured to: generate, through the chart generator, a chart drawing request carrying the table data based on the obtained table data; 10. The apparatus of claim 9, wherein, call, through the chart generator, a transmission interface of the external chart generation tool, and send the chart drawing request to the external chart generation tool, so that the external chart generation tool draws a corresponding target chart based on the table data carried in the chart drawing request. The client comprises at least a chart generator. After reading the table data corresponding to one target table, before generating a corresponding target chart in the presentation area based on the obtained table data, the chart rendering unit is further configured to:

11. The apparatus of claim 8, wherein, generate, through the chart generator, a corresponding data label based on the obtained table data. ​ ​ If the data tag is not stored in the memory of the client, the chart generator determines that the table data is not rendered into a corresponding target chart, and stores the data tag into the memory.

12. The apparatus of claim 8, wherein, The table rendering unit is further configured to: If the HTML file contains table hiding information, after generating the at least one target table based on the HTML file, the at least one target table is hidden in the presentation area; wherein the table hiding information is obtained by parsing the Markdown source file.

13. A computer device, comprising: The computer device comprises a processor and a memory, wherein the memory stores program code, and when the program code is executed by the processor, the processor executes the steps of the method in any one of claims 1-7.

14. A computer-readable storage medium, characterized in that, The program product comprises program code, and when the program product runs on the computer device, the program code is used to make the computer device execute the steps of the method in any one of claims 1-7.

Citation Information

Patent Citations

  • Chart generation method and apparatus

    CN105608065A

  • Method and system for generating PowerPoint, computing device and storage medium

    CN110765284A

  • Page content display method and device, storage medium and electronic device

    CN112765516A

  • Document processing device and document processing method

    CN1977260A