CN117406973B - Interactive data analysis method and device - Google Patents

Interactive data analysis method and device Download PDF

Info

Publication number
CN117406973B
CN117406973B CN202311703997.2A CN202311703997A CN117406973B CN 117406973 B CN117406973 B CN 117406973B CN 202311703997 A CN202311703997 A CN 202311703997A CN 117406973 B CN117406973 B CN 117406973B
Authority
CN
China
Prior art keywords
preset
execution
paragraph
state
display area
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202311703997.2A
Other languages
Chinese (zh)
Other versions
CN117406973A (en
Inventor
王永浩
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shanghai Qunzhimai Information Technology Co ltd
Original Assignee
Shanghai Qunzhimai Information Technology Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Shanghai Qunzhimai Information Technology Co ltd filed Critical Shanghai Qunzhimai Information Technology Co ltd
Priority to CN202311703997.2A priority Critical patent/CN117406973B/en
Publication of CN117406973A publication Critical patent/CN117406973A/en
Application granted granted Critical
Publication of CN117406973B publication Critical patent/CN117406973B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/30Creation or generation of source code
    • G06F8/33Intelligent editors
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F40/00Handling natural language data
    • G06F40/10Text processing
    • G06F40/12Use of codes for handling textual entities
    • G06F40/151Transformation
    • G06F40/154Tree transformation for tree-structured or markup documents, e.g. XSLT, XSL-FO or stylesheets
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/40Transformation of program code
    • G06F8/41Compilation
    • G06F8/42Syntactic analysis
    • G06F8/427Parsing
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Abstract

The invention discloses a method and a device for interactive data analysis, which aim to find a more effective implementation scheme for the interactive data analysis, and the method comprises the following steps: acquiring a preset paragraph, wherein the preset paragraph is input content of a user in a preset universal code editor; analyzing preset paragraphs line by line in a preset universal code editor, comparing the preset paragraphs analyzed line by line with preset legal rules, and judging whether the preset paragraphs meet the preset legal rules or not; if the preset paragraph meets the preset legal rule, configuring a preset auxiliary control component above the preset paragraph; and generating instruction information based on the preset auxiliary control component, and displaying the execution result of the preset paragraph in a result viewer. The invention uses the mode of storing the Notebook file by using the Markdown dialect in the preset universal code editor, thereby not only fully utilizing the powerful capability of the code editor, but also being convenient for the version control and iteration perfection of the Notebook file.

Description

Interactive data analysis method and device
Technical Field
The invention relates to the technical field of data processing, in particular to a method and a device for interactive data analysis.
Background
With the development of society, big data has become one of the most interesting hot spots in the field of information technology. Big data is also bringing a data-based opportunity for exploration, discovery and innovation for various industries in human society.
Big data processing is to process massive data efficiently and rapidly by various technical means and obtain value and useful information from the massive data. In the existing big data processing field, commonly used interactive data analysis tools such as Project Jupyter and Apache Zeppelin are mostly used through a special Web UI, and do not have the capability of utilizing a mature code editor, so that user experience is affected. Meanwhile, the file format in the existing interactive data analysis tool is not friendly to users, which reduces development efficiency to some extent. In addition, the existing interactive data analysis tool lacks built-in visual support, a user is required to write a visual processing code by himself, and the use cost is high.
Disclosure of Invention
In order to find a more effective implementation scheme of interactive data analysis, the invention provides a method and a device for interactive data analysis.
Scheme one:
there is provided a method of interactive data analysis, the method of interactive data analysis comprising the steps of:
acquiring a preset paragraph, wherein the preset paragraph is input content of a user in a preset universal code editor; the preset universal code editor is Visual Studio Code;
analyzing the preset paragraphs line by line in the preset universal code editor, comparing the preset paragraphs analyzed line by line with preset legal rules, and judging whether the preset paragraphs meet the preset legal rules or not, wherein the preset legal rules are created based on MarkDown dialects;
if the preset paragraph meets the preset legal rule, configuring a preset auxiliary control component above the preset paragraph;
and generating instruction information based on the preset auxiliary control component, and displaying the execution result of the preset paragraph in a result viewer.
Preferably, the prefabrication legal rules include:
a title of the Markdown dialect exists in the paragraph;
a programming language declaration of the Markdown code blocks exists in the paragraph;
paragraph layout information exists in the paragraphs;
the presence of a unique paragraph identifier in a paragraph;
there is a Markdown code block in the paragraph.
Preferably, the preset auxiliary control component is sequentially arranged from left to right as a debugging button, a status button, a clone button for copying the content of the preset paragraph, a clearing button for clearing the content of the preset paragraph, a deleting button for deleting the preset paragraph, an execution progress display area, an execution ending time display area and an execution time-consuming display area;
the display information of the execution progress display area, the display information of the execution ending time display area and the display information of the execution time consuming display area are matched with the running state of the debugging button and the running state of the debugging button.
Preferably, the running state of the debugging button comprises a debugging state and a stopping state; the running state of the state button comprises an initial state representing never-executed, a state to be executed, an executing state, a completing state, a failure state and a cancelled state; the display information of the execution progress display area, the display information of the execution ending time display area and the display information of the execution time consuming display area are adapted to the running state of the debugging button and the running state of the debugging button, and the method comprises the following steps:
when the running state of the debugging button is in a stop state and the running state of the state button is in an initial state, the execution progress display area, the execution ending time display area and the execution time consuming display area are not displayed with information;
when the running state of the debugging button is a debugging state and the running state of the state button is a state to be executed, the execution progress display area, the execution ending time display area and the execution time consuming display area are all free of information display;
when the running state of the debugging button is a debugging state and the running state of the state button is an executing state, the display information of the executing progress display area is an executing real-time progress value, the executing ending time display area is not displayed with information, and the display information of the executing time consuming display area is executing real-time consuming;
when the running state of the debugging button is recovered from the debugging state to the stopping state and the running state of the state button is the finishing state, the display information of the execution progress display area is an execution progress finishing value, the display information of the execution ending time display area is an execution ending time, and the display information of the execution consuming time display area is the total execution consuming time;
when the running state of the debugging button is in a stop state and the running state of the state button is in a failure state, the execution progress display area is not displayed with information, and the display information of the execution ending time display area is the last execution ending time; the display information of the execution time-consuming display area is the total time consumption of the last execution;
when the running state of the debugging button is recovered from the debugging state to the stopped state and the running state of the state button is cancelled, the execution progress display area is not displayed with information, and the display information of the execution ending time display area is the last execution ending time; and displaying information of the execution time-consuming display area is the total time consumed by the last execution.
Preferably, the result viewer is a Web viewer created based on a Web front end framework, the step of generating instruction information based on the preset auxiliary control component and displaying the execution result of the preset paragraph in the result viewer includes the following steps:
a preset universal code editor generates an execution debugging instruction based on a debugging button in the preset auxiliary control component, and calls a REST API to upload the preset paragraph to a server;
and displaying the execution result of the preset paragraph executed and issued by the server by using a Web viewer.
Preferably, after the execution result of the preset paragraph is displayed in the result viewer, the method includes the following steps:
and adjusting the execution result of the preset paragraph in the result viewer and automatically synchronizing to the preset paragraph.
Preferably, before the obtaining the preset paragraph, the method includes the following steps:
a notbook file is created in a preset universal code editor and saved using Markdown dialect.
Scheme II:
there is provided an apparatus for interactive data analysis, the apparatus comprising:
the system comprises an acquisition module, a storage module and a storage module, wherein the acquisition module is used for acquiring a preset paragraph, wherein the preset paragraph is input content of a user in a preset universal code editor; the preset universal code editor is Visual Studio Code;
the analysis judging module is used for analyzing the preset paragraphs line by line in the preset universal code editor and comparing the preset paragraphs analyzed line by line with preset legal rules to judge whether the preset paragraphs meet the preset legal rules or not, wherein the preset legal rules are created based on Markdown dialects;
the configuration module is used for configuring a preset auxiliary control component above the preset paragraph if the preset paragraph meets the preset legal rule;
and the display module is used for generating instruction information based on the preset auxiliary control component and displaying the execution result of the preset paragraph in a result viewer.
Preferably, the prefabrication legal rules include:
a title of the Markdown dialect exists in the paragraph;
a programming language declaration of the Markdown code blocks exists in the paragraph;
paragraph layout information exists in the paragraphs;
the presence of a unique paragraph identifier in a paragraph;
there is a Markdown code block in the paragraph.
Preferably, the preset auxiliary control component is sequentially arranged from left to right as a debugging button, a status button, a clone button for copying the content of the preset paragraph, a clearing button for clearing the content of the preset paragraph, a deleting button for deleting the preset paragraph, an execution progress display area, an execution ending time display area and an execution time-consuming display area;
the display information of the execution progress display area, the display information of the execution ending time display area and the display information of the execution time consuming display area are matched with the running state of the debugging button and the running state of the debugging button.
Compared with the prior art, the interactive data analysis method and device have the following beneficial effects:
according to the interactive data analysis method and device, the Notebook file is stored in the preset universal code editor by using the Markdown dialect, so that the powerful capability of the code editor can be fully utilized, the version control and iteration perfection of the Notebook file can be facilitated, the development efficiency is improved, in addition, the visual support is improved by configuring the result viewer, and the use cost of interactive data analysis is greatly reduced to a certain extent.
Additional aspects and advantages of the invention will be set forth in part in the description which follows, and in part will be obvious from the description, or may be learned by practice of the invention.
Drawings
The foregoing and/or additional aspects and advantages of the invention will become apparent and readily appreciated from the following description of the embodiments, taken in conjunction with the accompanying drawings, in which:
FIG. 1 is a flow chart of a method for interactive data analysis according to an embodiment of the present invention;
FIG. 2 is a schematic diagram showing the results of execution of a Markdown paragraph of a two-row two-column table according to one embodiment of the present invention;
fig. 3 is a schematic structural diagram of an apparatus for interactive data analysis according to another embodiment of the present invention.
Detailed Description
In order to enable those skilled in the art to better understand the present invention, the following description will make clear and complete descriptions of the technical solutions according to the embodiments of the present invention with reference to the accompanying drawings.
In some of the flows described in the specification and claims of the present invention and in the foregoing figures, a plurality of operations occurring in a particular order are included, but it should be understood that the operations may be performed out of order or performed in parallel, with the order of operations such as 101, 103, etc., being merely used to distinguish between the various operations, the order of the operations themselves not representing any order of execution. In addition, the flows may include more or fewer operations, and the operations may be performed sequentially or in parallel. The method is convenient for users to use to a certain extent, and the user experience is greatly improved relative to the method.
The following description of the embodiments of the present invention will be made clearly and completely with reference to the accompanying drawings, in which it is apparent that the embodiments described are only some embodiments of the present invention, but not all embodiments. All other embodiments, which can be made by those skilled in the art based on the embodiments of the invention without making any inventive effort, are intended to fall within the scope of the invention.
Referring to fig. 1-2, fig. 1 is a flow chart illustrating a method of interactive data analysis according to an embodiment of the present invention, and as shown in fig. 1, a method of interactive data analysis according to an embodiment of the present invention includes the following steps:
step S101: acquiring a preset paragraph, wherein the preset paragraph is input content of a user in a preset universal code editor; the preset universal code editor is Visual Studio Code.
Visual Studio Code is a relatively sophisticated code editor, which is a cross-platform source code editor running on Mac OS X, windows and Linux for writing modern Web and cloud applications, which is formally announced by microsoft corporation at 30 th 4 th, and which can be run on a desktop and used for Windows, macOS and Linux. It has built-in support for JavaScript, typeScript and node. Js, and has a rich ecosystem of other languages and runtime extensions. Visual Studio Code integrates the features that all a modern editor should possess, including grammar highlighting, customizable hotkey binding, bracket matching, and code segment collection, as well as providing rich shortcuts. Compared with interactive data analysis tools such as Project Jupyter and Apache Zeppelin which are used by a special Web UI, the interactive data analysis tool is greatly convenient for users to use, avoids the problem of blocking frequently encountered by Web pages, and improves the user experience to a certain extent.
In some embodiments, before obtaining the preset paragraph, the method includes the following steps: a notbook file is created in a preset universal code editor and saved using Markdown dialect.
A notbook file is a file type. Markdown is a lightweight markup language that allows people to write documents in a legible and writable plain text format and then convert to a valid XHTML or HTML document. In practice, to enhance Markdown grammar, one typically does not satisfy the original limited functionality of the markup characters, but extends a wide variety of variants, which are commonly referred to as Markdown dialects. Therefore, the Markdown language characteristics are considered, the Markdown dialect is adopted to store the documents, so that the documents are relatively friendly to users, the version control and the iteration perfection of the Notebook document are facilitated, and the development efficiency is improved to a certain extent.
Step S103: analyzing the preset paragraphs line by line in the preset universal code editor, comparing the preset paragraphs analyzed line by line with preset legal rules, and judging whether the preset paragraphs meet the preset legal rules or not, wherein the preset legal rules are created based on MarkDown dialects.
In some embodiments, the pre-made legal rules include:
a title of the Markdown dialect exists in the paragraph;
a programming language declaration of the Markdown code blocks exists in the paragraph;
paragraph layout information exists in the paragraphs;
the presence of a unique paragraph identifier in a paragraph;
there is a Markdown code block in the paragraph.
It should be noted that, the above-mentioned prefabricated legal rules are defined based on the grammar rules of Markdown, and the user may flexibly set based on specific requirements, which is not limited by the embodiment of the present invention.
To further understand the syntax of Markdown, one embodiment of the present invention is specifically illustrated herein as a Markdown paragraph for displaying a table of two rows and two columns as follows:
table of # # #)
、、、yaml SETTING 0,0,36,4
type: table
、、、
、、、sql SPARK_SQL 1623208762
DROP TABLE IF EXISTS demoChartsA;
CHEATE TABLE demoChartsA( year INT,size INT );
INSERT INTO demoChartsA VALUES
… .(2013,320)
… .(2012,220)`
SELECT *FORM demoChartsA ORDER BY year;
、、、
Wherein, the # # table is the header part in the grammar of Markdown; the MarkDown code blocks are used, wrapped; yaml is a programming language statement of a Markdown code block, and a specific Markdown code block is paragraph layout information, wherein the statement visualization type is a table, namely 'table', '0,0,36,4' represents the longitudinal and transverse coordinates of layout coordinates and the width and the height of display; SQL is another programming language declaration of Markdown code blocks for triggering proper code highlighting effect, and the specific Markdown code block is an instantiation of a two-row two-column table and data display, wherein "spark_sql" indicates that the code should be executed by SPARK SQL parser; "1623208762" is a unique paragraph identifier, generated by a preset universal code editor.
It is noted that in practice, markdown dialect supports not only spark_sql, but also other types that may be supported, such as PYSPARK. The examples of the present invention are presented herein by way of example only and are not to be construed as limiting the scope of the invention.
Step S105: and if the preset paragraph meets the preset legal rule, configuring a preset auxiliary control component above the preset paragraph.
In some embodiments, the preset auxiliary control component is sequentially arranged from left to right as a debugging button, a status button, a clone button for copying the content of the preset paragraph, a clear button for clearing the content of the preset paragraph, a delete button for deleting the preset paragraph, an execution progress display area, an execution end time display area and an execution time consuming display area; the display information of the execution progress display area, the display information of the execution ending time display area and the display information of the execution time-consuming display area are matched with the running state of the debugging button and the running state of the debugging button.
Specifically, the running state of the debug button includes a debug state and a stop state; the running states of the state buttons comprise an initial state representing never-executed, a state to be executed, an executing state, a completing state, a failure state and a cancelled state; the display information of the execution progress display area, the display information of the execution ending time display area and the display information of the execution time-consuming display area are matched with the running state of the debugging button and the running state of the debugging button, and the steps comprise:
when the running state of the debugging button is in a stop state and the running state of the state button is in an initial state, the execution progress display area, the execution ending time display area and the execution time consuming display area are all free of information display;
when the running state of the debugging button is the debugging state and the running state of the state button is the state to be executed, the execution progress display area, the execution ending time display area and the execution time consuming display area are all free of information display;
when the running state of the debugging button is the debugging state and the running state of the state button is the executing state, the display information of the executing progress display area is an executing real-time progress value, the executing ending time display area is not displayed with information, and the display information of the executing time consuming display area is executing real-time consuming;
when the running state of the debugging button is recovered from the debugging state to the stopping state and the running state of the state button is the finishing state, the display information of the execution progress display area is an execution progress finishing value, the display information of the execution ending time display area is an execution ending time, and the display information of the execution consuming time display area is the total execution consuming time;
when the running state of the debugging button is in a stop state and the running state of the state button is in a failure state, the execution progress display area is not displayed with information, and the display information of the execution ending time display area is the last execution ending time; the display information of the execution time-consuming display area is the total time consumed by the last execution;
when the running state of the debugging button is recovered from the debugging state to the stopped state and the running state of the state button is cancelled, the execution progress display area is not displayed with information, and the display information of the execution ending time display area is the last execution ending time; the display information of the execution time-consuming display area is the total time consumed by the last execution.
It is noted that the preset auxiliary control component is auxiliary information that can help the user debug the code but is not present in the code content, and its display effect is as a code information indicator, typically shown in a line, but not in a true line, which is a specific behavior directly displayed in the preset universal code editor and is not duplicated when the code is duplicated.
Step S107: and generating instruction information based on the preset auxiliary control component, and displaying the execution result of the preset paragraph in a result viewer.
In some embodiments, the result viewer is a Web viewer created based on a Web front end framework, the instruction information is generated based on a preset auxiliary control component, and the execution result of the preset paragraph is displayed in the result viewer, and the method comprises the following steps:
the preset universal code editor generates an execution debugging instruction based on a debugging button in the preset auxiliary control component, and calls a REST API to upload a preset paragraph to the server;
and displaying the execution result of the preset paragraph executed and issued by the server by using the Web viewer.
The application program interface (Application Programming Interface, API for short) is a number of predefined functions that are intended to provide the application and developer the ability to access a set of routines based on certain software or hardware without having to access source code or understand the details of the internal operating mechanisms. The role of the representational state transfer (Representational State Transfer, REST for short) is to map the view, create, edit and DELETE directly to the GET, POST, PUT and DELETE methods already implemented in HTTP. REST APIs are simply APIs built based on REST.
Specifically, when the debug button is in an active state, the contents of the notbook may be submitted to the server by Visual Studio Code extensions using REST API. The server firstly analyzes the contents of the Notebook into structured data according to the agreed format, then selects a proper code interpreter to asynchronously execute the submitted codes, and informs the result viewer through a full duplex communication protocol, such as WebSocket, after the result is obtained. And the result viewer displays the execution result in real time.
In some implementations, the Web viewer is built by a Vue framework in the Web front end framework. The Vue is a progressive framework for constructing a data-driven Web interface, and aims to realize corresponding data binding and combined view components through an API as simple as possible, so that an application scene is flexible, common visual requirements such as configuration and display of tables, line diagrams, column diagrams, pie charts, heat diagrams, maps and the like can be met, visual support is improved to a certain extent, and the use cost of interactive data analysis is greatly reduced.
In some embodiments, in order to better synchronize the Web viewer with the code in the preset paragraph and better improve the user experience, the embodiment of the present invention includes the following steps after the execution result of the preset paragraph is displayed in the result viewer:
and adjusting the execution result of the preset paragraph in the result viewer and automatically synchronizing the execution result to the preset paragraph.
By way of example, FIG. 2 shows a schematic diagram of the results of execution of a MarkDown paragraph for displaying a two-row two-column table in one embodiment of the invention. The adjusting the execution result of the preset paragraph in the result viewer and automatically synchronizing to the preset paragraph may specifically be:
when the execution result is dragged in the result viewer, "yaml SETTING 0,0,36,4" of the paragraph layout information in the preset paragraph will automatically adjust synchronously.
Compared with the prior art, the interactive data analysis method provided by the embodiment of the invention has the following beneficial effects:
according to the interactive data analysis method, the Notebook file is stored in the preset universal code editor by using the Markdown dialect, so that the powerful capability of the code editor can be fully utilized, the version control and iteration perfection of the Notebook file can be facilitated, the development efficiency is improved, in addition, the visual support is improved by configuring the result viewer, and the use cost of interactive data analysis is greatly reduced to a certain extent.
Referring to fig. 3, based on the same inventive concept as a method of interactive data analysis according to one embodiment of the present invention, another embodiment of the present invention provides an apparatus for interactive data analysis, comprising:
the obtaining module 2002 is configured to obtain a preset paragraph, where the preset paragraph is an input content of a user in a preset universal code editor; presetting a universal code editor as Visual Studio Code;
an analysis judging module 2004, configured to analyze the preset paragraph line by line in a preset universal code editor and compare the preset paragraph after the line by line analysis with a preset legal rule, and judge whether the preset paragraph meets the preset legal rule, where the preset legal rule is created based on a Markdown dialect;
a configuration module 2006, configured to configure a preset auxiliary control component above a preset paragraph if the preset paragraph meets the preset legal rule;
the display module 2008 is configured to generate instruction information based on the preset auxiliary control component, and display an execution result of the preset paragraph in the result viewer.
Wherein, prefabrication legal rules include:
a title of the Markdown dialect exists in the paragraph;
a programming language declaration of the Markdown code blocks exists in the paragraph;
paragraph layout information exists in the paragraphs;
the presence of a unique paragraph identifier in a paragraph;
there is a Markdown code block in the paragraph.
In some embodiments, the preset auxiliary control component is sequentially arranged from left to right as a debugging button, a status button, a clone button for copying the content of the preset paragraph, a clear button for clearing the content of the preset paragraph, a delete button for deleting the preset paragraph, an execution progress display area, an execution end time display area and an execution time consuming display area; the display information of the execution progress display area, the display information of the execution ending time display area and the display information of the execution time-consuming display area are matched with the running state of the debugging button and the running state of the debugging button.
Specifically, the running state of the debug button includes a debug state and a stop state; the running states of the state buttons comprise an initial state representing never-executed, a state to be executed, an executing state, a completing state, a failure state and a cancelled state; the display information of the execution progress display area, the display information of the execution ending time display area and the display information of the execution time consuming display area are adapted to the running state of the debugging button and the running state of the debugging button, and the method comprises the following steps:
when the running state of the debugging button is in a stop state and the running state of the state button is in an initial state, the execution progress display area, the execution ending time display area and the execution time consuming display area are not displayed with information;
when the running state of the debugging button is a debugging state and the running state of the state button is a state to be executed, the execution progress display area, the execution ending time display area and the execution time consuming display area are all free of information display;
when the running state of the debugging button is the debugging state and the running state of the state button is the executing state, the display information of the executing progress display area is an executing real-time progress value, the executing ending time display area is not displayed with information, and the display information of the executing time consuming display area is executing real-time consuming;
when the running state of the debugging button is recovered from the debugging state to the stopping state and the running state of the state button is the finishing state, the display information of the execution progress display area is an execution progress finishing value, the display information of the execution ending time display area is an execution ending time, and the display information of the execution consuming time display area is the total execution consuming time;
when the running state of the debugging button is in a stop state and the running state of the state button is in a failure state, the execution progress display area is not displayed with information, and the display information of the execution ending time display area is the last execution ending time; the display information of the execution time-consuming display area is the total time consumed by the last execution;
when the running state of the debugging button is recovered from the debugging state to the stopped state and the running state of the state button is cancelled, the execution progress display area is not displayed with information, and the display information of the execution ending time display area is the last execution ending time; the display information of the execution time-consuming display area is the total time consumed by the last execution.
In some implementations, the results viewer is a Web viewer created based on a Web front end framework, and the display module 2008 includes:
the generation calling unit is used for presetting a general code editor to generate an execution debugging instruction based on a debugging button in the preset auxiliary control component and calling a REST API to upload the preset paragraph to the server;
and the receiving display unit is used for displaying the execution result of the preset paragraphs executed and issued by the server side by using the Web viewer.
In some implementations, another embodiment of the present invention provides an apparatus for interactive data analysis, further comprising:
an automatic synchronization module for displaying the execution result of the preset paragraph in the result viewer,
and adjusting the execution result of the preset paragraph in the result viewer and automatically synchronizing the execution result to the preset paragraph.
In some implementations, another embodiment of the present invention provides an apparatus for interactive data analysis, further comprising:
and the creation and storage module is used for creating a Notebook file in a preset universal code editor and storing the Notebook file by using a MarkDown dialect before acquiring the preset paragraph.
It will be clearly understood by those skilled in the art that, for convenience and brevity of description, specific working processes of the apparatus, modules and units described above may refer to corresponding processes in the foregoing method embodiments, which are not repeated herein.
Compared with the prior art, the device for interactive data analysis has the following beneficial effects:
according to the interactive data analysis device, through the arrangement of the acquisition module 2002, the analysis judging module 2004 and the configuration module 2006, the powerful capability of a code editor can be fully utilized, the version control and the iteration perfection of a Notebook file can be facilitated, the development efficiency is improved, in addition, the visual support is improved through the arrangement of the display module 2008, and the use cost of interactive data analysis is greatly reduced to a certain extent.
In the several embodiments provided in this application, it should be understood that the disclosed apparatus and method may be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative, e.g., the division of the units is merely a logical function division, and there may be additional divisions when actually implemented, e.g., multiple units or components may be combined or integrated into another system, or some features may be omitted or not performed.
Those of ordinary skill in the art will appreciate that all or part of the steps in the various methods of the above embodiments may be implemented by a program to instruct related hardware, the program may be stored in a computer readable storage medium, and the storage medium may include: read Only Memory (ROM), random access Memory (RAM, randomAccess Memory), magnetic disk or optical disk, and the like.
The foregoing is only a partial embodiment of the present invention, and it should be noted that it will be apparent to those skilled in the art that modifications and adaptations can be made without departing from the principles of the present invention, and such modifications and adaptations are intended to be comprehended within the scope of the present invention.

Claims (7)

1. A method of interactive data analysis, the method comprising the steps of:
acquiring a preset paragraph, wherein the preset paragraph is input content of a user in a preset universal code editor; the preset universal code editor is Visual Studio Code;
analyzing the preset paragraphs line by line in the preset universal code editor, comparing the preset paragraphs analyzed line by line with preset legal rules, and judging whether the preset paragraphs meet the preset legal rules or not, wherein the preset legal rules are created based on MarkDown dialects; the prefabricated legal rules comprise:
a title of the Markdown dialect exists in the paragraph;
a programming language declaration of the Markdown code blocks exists in the paragraph;
paragraph layout information exists in the paragraphs;
the presence of a unique paragraph identifier in a paragraph;
there are Markdown code blocks in the paragraph;
if the preset paragraph meets the preset legal rule, configuring a preset auxiliary control component above the preset paragraph;
generating instruction information based on the preset auxiliary control component, and displaying an execution result of the preset paragraph in a result viewer;
after the execution result of the preset paragraph is displayed in the result viewer, the method comprises the following steps: and adjusting the execution result of the preset paragraph in the result viewer and automatically synchronizing to the preset paragraph.
2. The method of interactive data analysis according to claim 1, wherein the preset auxiliary control component is sequentially set from left to right as a debug button, a status button, a clone button for copying preset paragraph contents, a clear button for clearing preset paragraph contents, a delete button for deleting preset paragraphs, an execution progress display area, an execution end time display area, and an execution time-consuming display area;
the display information of the execution progress display area, the display information of the execution ending time display area and the display information of the execution time consuming display area are matched with the running state of the debugging button and the running state of the state button.
3. The method of interactive data analysis of claim 2, wherein the operational state of the debug button comprises a debug state and a stop state; the running state of the state button comprises an initial state representing never-executed, a state to be executed, an executing state, a completing state, a failure state and a cancelled state; the display information of the execution progress display area, the display information of the execution ending time display area and the display information of the execution time consuming display area are adapted to the running state of the debugging button and the running state of the status button, and the method comprises the following steps:
when the running state of the debugging button is in a stop state and the running state of the state button is in an initial state, the execution progress display area, the execution ending time display area and the execution time consuming display area are not displayed with information;
when the running state of the debugging button is a debugging state and the running state of the state button is a state to be executed, the execution progress display area, the execution ending time display area and the execution time consuming display area are all free of information display;
when the running state of the debugging button is a debugging state and the running state of the state button is an executing state, the display information of the executing progress display area is an executing real-time progress value, the executing ending time display area is not displayed with information, and the display information of the executing time consuming display area is executing real-time consuming;
when the running state of the debugging button is recovered from the debugging state to the stopping state and the running state of the state button is the finishing state, the display information of the execution progress display area is an execution progress finishing value, the display information of the execution ending time display area is an execution ending time, and the display information of the execution consuming time display area is the total execution consuming time;
when the running state of the debugging button is in a stop state and the running state of the state button is in a failure state, the execution progress display area is not displayed with information, and the display information of the execution ending time display area is the last execution ending time; the display information of the execution time-consuming display area is the total time consumption of the last execution;
when the running state of the debugging button is recovered from the debugging state to the stopped state and the running state of the state button is cancelled, the execution progress display area is not displayed with information, and the display information of the execution ending time display area is the last execution ending time; and displaying information of the execution time-consuming display area is the total time consumed by the last execution.
4. The method of interactive data analysis according to claim 3, wherein the result viewer is a Web viewer created based on a Web front end framework, the generating instruction information based on the preset auxiliary control component, and displaying the execution result of the preset paragraph in the result viewer comprises the steps of:
a preset universal code editor generates an execution debugging instruction based on a debugging button in the preset auxiliary control component, and calls a REST API to upload the preset paragraph to a server;
and displaying the execution result of the preset paragraph executed and issued by the server by using a Web viewer.
5. The method of interactive data analysis according to claim 1, wherein prior to said obtaining a preset paragraph, comprising the steps of:
a notbook file is created in a preset universal code editor and saved using Markdown dialect.
6. An apparatus for interactive data analysis, the apparatus comprising:
the system comprises an acquisition module, a storage module and a storage module, wherein the acquisition module is used for acquiring a preset paragraph, wherein the preset paragraph is input content of a user in a preset universal code editor; the preset universal code editor is Visual Studio Code;
the analysis judging module is used for analyzing the preset paragraphs line by line in the preset universal code editor and comparing the preset paragraphs analyzed line by line with preset legal rules to judge whether the preset paragraphs meet the preset legal rules or not, wherein the preset legal rules are created based on Markdown dialects; the prefabricated legal rules comprise:
a title of the Markdown dialect exists in the paragraph;
a programming language declaration of the Markdown code blocks exists in the paragraph;
paragraph layout information exists in the paragraphs;
the presence of a unique paragraph identifier in a paragraph;
there are Markdown code blocks in the paragraph;
the configuration module is used for configuring a preset auxiliary control component above the preset paragraph if the preset paragraph meets the preset legal rule;
the display module is used for generating instruction information based on the preset auxiliary control component and displaying the execution result of the preset paragraph in a result viewer;
an automatic synchronization module for displaying the execution result of the preset paragraph in the result viewer,
and adjusting the execution result of the preset paragraph in the result viewer and automatically synchronizing the execution result to the preset paragraph.
7. The apparatus for interactive data analysis according to claim 6, wherein the preset auxiliary control component is sequentially configured from left to right as a debug button, a status button, a clone button for copying the content of the preset paragraph, a clear button for clearing the content of the preset paragraph, a delete button for deleting the preset paragraph, an execution progress display area, an execution end time display area, and an execution time-consuming display area;
the display information of the execution progress display area, the display information of the execution ending time display area and the display information of the execution time consuming display area are matched with the running state of the debugging button and the running state of the state button.
CN202311703997.2A 2023-12-13 2023-12-13 Interactive data analysis method and device Active CN117406973B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202311703997.2A CN117406973B (en) 2023-12-13 2023-12-13 Interactive data analysis method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202311703997.2A CN117406973B (en) 2023-12-13 2023-12-13 Interactive data analysis method and device

Publications (2)

Publication Number Publication Date
CN117406973A CN117406973A (en) 2024-01-16
CN117406973B true CN117406973B (en) 2024-03-12

Family

ID=89496440

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202311703997.2A Active CN117406973B (en) 2023-12-13 2023-12-13 Interactive data analysis method and device

Country Status (1)

Country Link
CN (1) CN117406973B (en)

Citations (14)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20120050883A (en) * 2010-11-11 2012-05-21 김경중 Application program
CN108376127A (en) * 2018-03-15 2018-08-07 武汉斗鱼网络科技有限公司 A kind of method, apparatus and computer readable storage medium of document structure tree
CN108846069A (en) * 2018-06-07 2018-11-20 阿里巴巴集团控股有限公司 A kind of document execution method and device based on markup language
US10437568B1 (en) * 2017-05-18 2019-10-08 Palantir Technologies Inc. Real-time rendering based on efficient device and server processing of content updates
CN110390063A (en) * 2019-07-03 2019-10-29 北京字节跳动网络技术有限公司 A kind of data analysis method, device, medium and electronic equipment
WO2020023951A1 (en) * 2018-07-27 2020-01-30 The University Of Chicago Bidirectional evaluation for general-purpose programming
CN111736812A (en) * 2020-06-16 2020-10-02 北京三快在线科技有限公司 Document code execution method and device, computer equipment and storage medium
CN112087370A (en) * 2020-09-04 2020-12-15 北京明略昭辉科技有限公司 Method, system, electronic device and computer-readable storage medium for issuing GitHub Issues
CN112699637A (en) * 2021-01-08 2021-04-23 中南大学 Paragraph type identification method and system and document structure identification method and system
CN113885846A (en) * 2021-10-09 2022-01-04 上海通联金融服务有限公司 Data layer code generation method based on markdown format data dictionary
CN115437608A (en) * 2022-08-08 2022-12-06 赞同科技股份有限公司 Intelligent research and development assisting method and device
CN115705465A (en) * 2021-08-12 2023-02-17 腾讯科技(深圳)有限公司 Data analysis result presentation method, device, equipment and storage medium
CN116050354A (en) * 2023-01-03 2023-05-02 深圳华为云计算技术有限公司 Configuration method and device of experimental manual
CN116540986A (en) * 2023-04-23 2023-08-04 寂山智工(苏州)科技有限公司 Method for constructing text programming language code editor based on Web end

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9639382B2 (en) * 2014-05-15 2017-05-02 Microsoft Technology Licensing, Llc. Interactive viewer of intermediate representations of client side code
CN106980504B (en) * 2017-03-28 2022-07-01 腾讯科技(深圳)有限公司 Application program development method and tool and equipment thereof
US11526350B2 (en) * 2020-03-18 2022-12-13 Red Hat, Inc. Providing code editor documentation pages using a lightweight text formatting language and platform-agnostic command links
US11868589B2 (en) * 2021-11-04 2024-01-09 Luminate Universal Education Systems, Ltd Document data structure for linking a text editor with integrated editing tools

Patent Citations (14)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20120050883A (en) * 2010-11-11 2012-05-21 김경중 Application program
US10437568B1 (en) * 2017-05-18 2019-10-08 Palantir Technologies Inc. Real-time rendering based on efficient device and server processing of content updates
CN108376127A (en) * 2018-03-15 2018-08-07 武汉斗鱼网络科技有限公司 A kind of method, apparatus and computer readable storage medium of document structure tree
CN108846069A (en) * 2018-06-07 2018-11-20 阿里巴巴集团控股有限公司 A kind of document execution method and device based on markup language
WO2020023951A1 (en) * 2018-07-27 2020-01-30 The University Of Chicago Bidirectional evaluation for general-purpose programming
CN110390063A (en) * 2019-07-03 2019-10-29 北京字节跳动网络技术有限公司 A kind of data analysis method, device, medium and electronic equipment
CN111736812A (en) * 2020-06-16 2020-10-02 北京三快在线科技有限公司 Document code execution method and device, computer equipment and storage medium
CN112087370A (en) * 2020-09-04 2020-12-15 北京明略昭辉科技有限公司 Method, system, electronic device and computer-readable storage medium for issuing GitHub Issues
CN112699637A (en) * 2021-01-08 2021-04-23 中南大学 Paragraph type identification method and system and document structure identification method and system
CN115705465A (en) * 2021-08-12 2023-02-17 腾讯科技(深圳)有限公司 Data analysis result presentation method, device, equipment and storage medium
CN113885846A (en) * 2021-10-09 2022-01-04 上海通联金融服务有限公司 Data layer code generation method based on markdown format data dictionary
CN115437608A (en) * 2022-08-08 2022-12-06 赞同科技股份有限公司 Intelligent research and development assisting method and device
CN116050354A (en) * 2023-01-03 2023-05-02 深圳华为云计算技术有限公司 Configuration method and device of experimental manual
CN116540986A (en) * 2023-04-23 2023-08-04 寂山智工(苏州)科技有限公司 Method for constructing text programming language code editor based on Web end

Also Published As

Publication number Publication date
CN117406973A (en) 2024-01-16

Similar Documents

Publication Publication Date Title
CN107844299B (en) Method for implementing Web application development tool
US10338893B2 (en) Multi-step auto-completion model for software development environments
US7992088B2 (en) Method and system for copy and paste technology for stylesheet editing
US9501459B2 (en) Detecting influence caused by changing the source code of an application from which a document object model tree and cascading style sheet may be extracted
CN112416339A (en) Page development method and device and computer equipment
CN105893014A (en) Project development method and system for front end
KR101950126B1 (en) Mathematical formula processing method, device, apparatus and computer storage medium
CN108170409B (en) Development method and system of WEB front-end control
Sampath et al. Accessibility of command line interfaces
CN112269576A (en) Component display method and device, server and storage medium
CN110727429A (en) Front-end page generation method, device and equipment
US20070262991A1 (en) Arabic input output method and font model
CN117406973B (en) Interactive data analysis method and device
US11416526B2 (en) Editing and presenting structured data documents
CN106469050B (en) A kind of case generation method, page generation method and device
CN114237560A (en) Data storage method, storage device, electronic equipment and storage medium
CN113946336A (en) Design draft conversion method and device, computer equipment and storage medium
JP5458065B2 (en) Device and program for supporting structural analysis of module
CN116127926B (en) Method, device, equipment and medium for generating XSLT file of data body
JP2009151613A (en) Program source conversion apparatus
JP2000029677A (en) Automatic generating device for screen constitution
CN116009863B (en) Front-end page rendering method, device and storage medium
CN113971024B (en) Interface management method, device, electronic equipment and readable storage medium
US20240126978A1 (en) Determining attributes for elements of displayable content and adding them to an accessibility tree
CN112612701B (en) Program fault positioning method, device, equipment and readable storage medium

Legal Events

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