A method for implementing a custom data visualization large screen based on the Vue framework

By decomposing the data visualization large screen system into data sources, charts and layout modules, multiple data sources and chart components are realized, and the problems of cumbersome code changes and inflexible user experience in the existing technology are solved, and development efficiency and user experience are improved , adapt to the data visualization needs of different enterprises.

CN114048111BActive Publication Date: 2024-12-03JIANGSU FUTURE NETWORKS INNOVATION
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202111351529.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-11-16
Publication Date
2024-12-03
Estimated Expiration
2041-11-16

AI Technical Summary

Technical Problem

Existing data visualization large-screen systems require extensive code changes when demand changes, resulting in low development efficiency, inflexible user experience, and inconsistent requirements for data visualization of different companies, resulting in cumbersome and inrelative customization development.

Method used

Using a custom data visualization method based on the vue framework, the large-screen module is deconstructed into three modules: data source, chart, and layout, realizing multi-data source scalability, chart componentization, interface unified and layout data, and supporting drag-down Drag layout, real-time data selection and interactive customization operations.

Benefits of technology

It improves the flexibility and scalability of page layout, supports dynamic expansion of multiple data sources and the reusability of chart components, shortens the cycle of design changes and data joint debugging, and improves development efficiency and user experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114048111B_ABST
    Figure CN114048111B_ABST
Patent Text Reader

Abstract

The present invention provides a method for implementing a custom data visualization large screen based on a vue framework, characterized in that it includes the following steps: step 1: deconstruction of large screen modules; step 2: expandable multiple data sources; step 3: componentization of charts; step 4: unification of interfaces; step 5: dataization of layout; step 6: asynchronous transmission / real-time update of chart data; step 7: interactive custom large screen. The present invention digitizes the page layout: abstracts all describable properties of the front-end component element modules that form a web page into object data storage, supports editing and operating object data to dynamically change the page layout, and increases the flexibility and scalability of page layout development; the front end can instantly query and display the corresponding interface support configuration; greatly increases the reusability of components; can support multiple parties to operate custom display page layout and analyze data configuration, greatly shortening the product response time of page design changes and data joint debugging tests.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of the Internet, and in particular to a method for realizing a custom data visualization large screen based on a Vue framework. Background Art

[0002] In the era of rapid development of Internet technology and rapid expansion of information data, data visualization technology is also growing stronger. Data visualization mainly aims to convey and communicate information clearly and effectively with the help of graphical means, making data easier to understand, more vivid and more meaningful and valuable. Independent data visualization large-screen system display has also become the choice of more and more companies. Because the characteristics of various data objects are quite different, data analysis needs are rich and varied, and the front-end page design is diverse, the data visualization large-screen page layout implemented in the general "demand design-custom development" mode is solidified, and the coding is fixed. Once the demand changes, the code changes involved are relatively wide, including layout CSS, static pages, interface data analysis and data chart configuration. Changes are required for the entire system. Different companies and different systems have inconsistent design and analysis data sources for data visualization large screens, and they need to be fully redeveloped according to the new design. This coding style is cumbersome, heavily customized and non-reusable large-screen implementation method is not conducive to developer expansion and maintenance, the coding output efficiency is low, the user's sense of use is not flexible enough, and the product adjustment response cycle corresponding to demand changes is long.

[0003] In response to the data analysis information of multiple indicators and multiple data sources on the front-end web page and the users' changing chart display needs, the present invention provides a data visualization large-screen implementation solution with multi-source real-time data selection, draggable layout, rich visual charts, interactive custom operations, and multi-dimensional and extensible development. Summary of the invention

[0004] The purpose of the present invention is to provide a method for implementing a custom data visualization large screen based on a Vue framework to solve the problems raised in the above background technology.

[0005] To achieve the above object, the present invention adopts the following technical solutions:

[0006] A method for implementing a custom data visualization large screen based on a Vue framework, characterized in that it includes the following steps:

[0007] Step 1: Deconstruction of large screen modules: Use the concept of Vue components to deconstruct the large screen page, mainly decomposing it into three modules: data source, chart, and layout, to achieve scalability of multiple data sources, componentization of charts, unified interfaces, and data-based layout;

[0008] Step 2: Multiple data sources are expandable: All data sources that need to display / to display data analysis indicators are persisted in the database according to the agreed format, namely: request address - url, request type - method, data source name - name, data source unique identification - ID. The front-end page lists the currently stored data source array according to the dynamic query results, supports users to define the data feature display chart module, and adds the corresponding database table record when adding a new analyzable data source. The page can display the support selection and configuration of the visual chart in real time;

[0009] Step 3: Chart componentization: All charts use vue to define independent components, provide open component name references, and define common properties for components, namely, layout module index - chartIndex, chart display data - chartData, and layout module object container - chartInstancesBox; the chartIndex attribute distinguishes and defines different objects to increase component reusability, and the chartInstancesBox attribute supports caching the current layout instance object to support parent component call operations, such as triggering the resize mechanism inside the component after dragging the scaling unit component in the parent container, and the component's built-in data interface filter supports differential conversion of unified format data to the corresponding chart;

[0010] Step 4: Interface unification: unify the data source request to return the data analysis information result interface format. All target analysis data information needs to be rendered on the big screen through the chart component;

[0011] Step 5: Layout data: Abstract each chart unit module in the page layout and encapsulate it as a data object for storage. All unit modules in the specified parent container are parsed into a JSON object array LIST_A for storage. Use jQuery's drag.js to drag the module framework to load the layout data and render it, that is, define the container. <power-drag>Traverse the LIST_A array, load the layout attribute parameters and render them;

[0012] Step 6: Asynchronous transmission / real-time update of chart data: When traversing the layout array LIST_A in step 5, load the corresponding chart component rendering according to chartType, obtain the data source address stored in the cache dataSourceMap according to dataSourceType, initiate an asynchronous request to the data source interface, obtain the data response result RESULT_A in the request callback function, and establish an eventBus information channel according to the unique layout ID of chartIndex to deliver RESULT_A to the corresponding component rendering display; support defining a timer to request to refresh some real-time data sources regularly;

[0013] Step 7: Interactively customize the main screen: After clicking on the main screen to enter the customization mode, you can click to add a new chart module, select a new data source and chart type to define the visual display. Each chart display button includes edit, delete and theme switching. It supports switching between different chart types or deleting existing modules. You can also drag and drop existing chart modules to layout them according to your preferences. It supports layout preview and takes effect after saving the layout data.

[0014] In step 3, the chart components are divided into:

[0015] Customized components, that is, specially designed customized data charts or display modules, are named "ComChart0_Drag Module ID";

[0016] (2) Reusable general components, i.e. common data display charts such as bar charts and radar charts, are named using "ComChart_chart component ID".

[0017] In step 4, according to the classification type of the chart component, the data analysis information interface format is also divided into:

[0018] Customized component data interface, that is, providing an adapted data format in JSON array / object according to the design, with unfixed structure and attributes, specifically: when statistical data is listed: [{name:'TEST_A',value:'0'},{name:'TEST_A',value:'1'},{name:'TEST_A',value:'3'}];

[0019] Reusable general component data interface, i.e. JSON array, with fixed structure and properties: [{legend:”,data:[{name:”,value:”}]}], this structure is suitable for all general chart components, including line chart, area chart, bar chart, doughnut chart, radar and dashboard. Specifically: when displaying the system CPU and memory usage in each time period: [{legend:'CPU',data:[{name:'12:00',value:'0.80'},{name:'13:00',value:'0.75'}]},{legend:'Memory',data:[{name:'12:00',value:'0.60'},{name:'13:00',value:'0.85'}]}], this data format supports multi-group object and multi-dimensional data description and expression.

[0020] In step 5, the main object attribute description of the chart layout unit includes but is not limited to:

[0021] The x and y parameters locate the coordinates of the upper left vertex, and sizex and sizey define the module size;

[0022] chartType defines the corresponding chart component type: 0 is a customized component, non-0 is a general component (1, 2, 3...n supports custom extensions);

[0023] dataSourceType defines the referenced data source ID (1,2,3,....n);

[0024] chartIndex defines the layout chart index ID (1,2,3,....n), and defines the unique reference instance object example;

[0025] borderType defines the chart border type, 8 predefined border styles are available for selection, and custom expansion is supported;

[0026] titleType defines whether the unit module displays the title and the title style. Here -1 means no display, 0 means the default style, 1, 2, 3... support custom extensions;

[0027] themeType defines the theme color of the large screen chart. Here, 0 is the default dark background with light fonts, 1 is a white background with dark fonts, 2, 3, 4... support custom extensions;

[0028] moreType defines the link properties of the unit module to support configuration. Here, 0 is the default configuration link, and -1 does not support link;

[0029] backgroundColor defines the background color of the cell module attribute.

[0030] Compared with the prior art, the present invention has the following technical effects:

[0031] The present invention digitizes the page layout: abstracts all describable attributes (such as coordinates, size, border, theme, link, data source, etc.) of the front-end component element module that composes the web page into object data storage, supports editing and operating object data to dynamically change the page layout, and increases the flexibility and scalability of page layout development.

[0032] In the present invention, all chart components are decoupled from the large screen and can be freely disassembled, assembled, replaced and displayed: switching charts on the large screen only requires changing the component reference ID, and when adding new charts, it is only necessary to develop customized components according to the design or encapsulate new general components.

[0033] The data source configuration referenced by the large-screen chart display in the present invention supports dynamic expansion: add / delete / modify data analysis indicators under the agreed data interface format, configure method, url and other information in the data table, and the front end can immediately and dynamically query and display the corresponding interface support configuration.

[0034] In the present invention, all chart components define data conversion filters to receive the general data analysis interface returned in the agreed format, which is published to the corresponding chart for publication and display after differential processing in the filter, greatly increasing the reusability of the components.

[0035] The present invention can support developers, users, designers and other parties to customize the display page layout and analyze data configuration, greatly shortening the product response time for page design changes and data joint debugging tests. BRIEF DESCRIPTION OF THE DRAWINGS

[0036] Figure 1 This is a schematic diagram of the structure of the custom large-screen module in the present invention;

[0037] Figure 2 It is a schematic diagram of the abstract data layout in the present invention;

[0038] Figure 3 This is a flow chart for customizing large-screen data loading in the present invention. DETAILED DESCRIPTION

[0039] The technical solution of the present invention will be clearly and completely described below in conjunction with the accompanying drawings of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, rather than all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of the present invention.

[0040] Example 1

[0041] A method for implementing a custom data visualization large screen based on a Vue framework, characterized in that it includes the following steps:

[0042] Step 1: Deconstruction of large screen modules: Use the concept of Vue components to deconstruct the large screen page, mainly decomposing it into three modules: data source, chart, and layout, to achieve scalability of multiple data sources, componentization of charts, unified interfaces, and data-based layout;

[0043] Step 2: Multiple data sources are expandable: All data sources that need to display / to display data analysis indicators are persisted in the database according to the agreed format, namely: request address - url, request type - method, data source name - name, data source unique identification - ID. The front-end page lists the currently stored data source array according to the dynamic query results, supports users to define the data feature display chart module, and adds the corresponding database table record when adding a new analyzable data source. The page can display the support selection and configuration of the visual chart in real time;

[0044] Step 3: Chart componentization: All charts use vue to define independent components, provide open component name references, and define common properties for components, namely, layout module index - chartIndex, chart display data - chartData, and layout module object container - chartInstancesBox; the chartIndex attribute distinguishes and defines different objects to increase component reusability, and the chartInstancesBox attribute supports caching the current layout instance object to support parent component call operations, such as triggering the resize mechanism inside the component after dragging the scaling unit component in the parent container, and the component's built-in data interface filter supports differential conversion of unified format data to the corresponding chart;

[0045] Step 4: Interface unification: unify the data source request to return the data analysis information result interface format. All target analysis data information needs to be rendered on the big screen through the chart component;

[0046] Step 5: Layout data: Abstract each chart unit module in the page layout and encapsulate it as a data object for storage. All unit modules in the specified parent container are parsed into a JSON object array LIST_A for storage. Use jQuery's drag.js to drag the module framework to load the layout data and render it, that is, define the container. <power-drag>Traverse the LIST_A array, load the layout attribute parameters and render them;

[0047] Step 6: Asynchronous transmission / real-time update of chart data: When traversing the layout array LIST_A in step 5, load the corresponding chart component rendering according to chartType, obtain the data source address stored in the cache dataSourceMap according to dataSourceType, initiate an asynchronous request to the data source interface, obtain the data response result RESULT_A in the request callback function, and establish an eventBus information channel according to the unique layout ID of chartIndex to deliver RESULT_A to the corresponding component rendering display; support defining a timer to request to refresh some real-time data sources regularly;

[0048] Step 7: Interactively customize the main screen: After clicking on the main screen to enter the customization mode, you can click to add a new chart module, select a new data source and chart type to define the visual display. Each chart display button includes edit, delete and theme switching. It supports switching between different chart types or deleting existing modules. You can also drag and drop existing chart modules to layout them according to your preferences. It supports layout preview and takes effect after saving the layout data.

[0049] (1) Large screen module component development environment deployment:

[0050] a. Chart subcomponent development: After the existing front-end Vue system environment is deployed normally, third-party plug-ins such as echarts5.0, highchart, d3.js, etc. are introduced to support the development of graphic library components. All required graphic chart components (customized / general) are encapsulated in the form of subcomponents. A unified data interface conversion filter is added to the subcomponent to convert the interface data to the component configuration item format; when adding a new chart component, determine the appropriate chart plug-in to introduce or match it according to the design custom development, name it according to the agreed format, and support automatic matching and acquisition of the layout page;

[0051] b. Development of large-screen editing custom pages: Add data source selection function, chart component selection function, theme color selection function, border setting selection function, etc., introduce drag.js to render and display the layout of each component, use grid distribution to support custom size module display and maintain automatic grid alignment;

[0052] c. Page data abstraction & persistent maintenance: Large screen layout data, analyzable data source interface URL and method and other information are maintained and stored according to indicator parameters, and user-defined data is managed independently.

[0053] (2) Large screen module migration and deployment:

[0054] a. Graphic component module, large screen editing / preview page module, copy and transplant to the new vue system;

[0055] b. Check the referenced package.json dependency package introduction and configure the large screen access route;

[0056] c. Change the corresponding default layout data according to the design requirements, and save the operation page to obtain it;

[0057] Just update the data source list of the current system into the database according to the format (url, method, dataSourceType).

[0058] The above shows and describes the basic principles, main features and advantages of the present invention. Those skilled in the art should understand that the present invention is not limited to the above embodiments. The above embodiments and descriptions are only preferred examples of the invention and are not intended to limit the present invention. Without departing from the novel spirit and scope of the present invention, the present invention may have various changes and improvements, which fall within the scope of the present invention to be protected. The scope of protection of the present invention is defined by the attached claims and their equivalents.

Claims

1. A method for implementing a custom data visualization large screen based on the Vue framework, characterized in that: The steps include: Step 1: Deconstruction of large screen modules: Use the concept of Vue components to deconstruct the large screen page into three modules: data source, chart, and layout, to achieve scalability of multiple data sources, componentization of charts, unified interfaces, and data-based layout; Step 2: Multiple data sources are expandable: All data sources that need to display / to display data analysis indicators are persisted in the database according to the agreed format, namely: request address - url, request type - method, data source name - name, data source unique identification - ID. The front-end page lists the currently stored data source array according to the dynamic query results, supports user-defined data feature display chart module, and adds corresponding database table records when adding analyzable data sources. The page can display the support selection and configuration of visual charts in real time; Step 3: Chart componentization: All charts use Vue to define independent components, provide open component name references, and define common properties for components, namely, layout module index - chartIndex, chart display data - chartData, and layout module object container - chartInstancesBox; the chartIndex property distinguishes and defines different objects to increase component reusability, and the chartInstancesBox property supports caching the current layout instance object to support parent component call operations; Step 4: Interface unification: unify the data source request to return the data analysis information result interface format. All target analysis data information needs to be rendered on the big screen through the chart component; Step 5: Layout data: Abstract each chart unit module in the page layout and encapsulate it as a data object for storage. All unit modules in the specified parent container are parsed into a JSON object array LIST_A for storage. Use jQuery's drag.js to drag the module framework to load the layout data and render it, that is, define the container. <power-drag> Traverse the LIST_A array, load the layout attribute parameters and render them; Step 6: Asynchronous transmission / real-time update of chart data: When traversing the layout array LIST_A in step 5, load the corresponding chart component rendering according to chartType, obtain the data source address stored in the cache dataSourceMap according to dataSourceType, initiate an asynchronous request to the data source interface, obtain the data response result RESULT_A in the request callback function, and establish an eventBus information channel according to the unique layout ID of chartIndex to deliver RESULT_A to the corresponding component rendering display; support defining a timer to request to refresh some real-time data sources regularly; Step 7: Interactively customize the main screen: After clicking on the main screen to enter the customization mode, click on the new chart module, select a new data source and chart type to define the visual display. Each chart display button includes edit, delete and theme switching. It supports switching between different chart types, or deleting existing modules, or dragging and dropping existing chart modules to layout according to your preferences. It supports layout preview and takes effect after saving the layout data.

2. The method for implementing a custom data visualization large screen based on the Vue framework according to claim 1 is characterized in that: In step 3, the chart components are divided into: (1) Customized components, i.e. specially designed customized data charts or display modules, are named "ComChart0_ Drag Module ID"; (2) Reusable general components, such as common data display charts such as bar charts and radar charts, are named "ComChart_chart component ID".

3. The method for implementing a custom data visualization large screen based on the Vue framework according to claim 1 is characterized in that: In step 4, according to the classification type of the chart component, the data analysis information result interface format is also divided into: (1) Customized component data interface, that is, providing an adaptive data format in JSON array / object according to the design, with variable structure and attributes, such as: when listing statistical data: [{name: 'TEST_A ',value: '0 '}, {name: 'TEST_A ',value: '1 '}, {name: 'TEST_A ',value: '3 '}]; (2) Reusable general component data interface, i.e. JSON array, with fixed structure and properties: [{legend: '',data:[{name: '',value: ''}]}], this structure is applicable to all general chart components, including line chart, area chart, bar chart, donut chart, radar and dashboard. Specifically, when displaying the CPU and memory usage of the system in each time period: [{legend: 'CPU ',data:[{name: '12:00 ',value: '0.80 '}, {name: ' 13:00 ',value: '0.75 '}]}, {legend: 'Memory',data:[{name: ' 12:00 ',value: '0.60 '},{name: '13:00 ',value: '0.85 '}]}], this data format supports multi-group object and multi-dimensional data description and expression.

Citation Information

Cited By

  • Visual large-screen management system and method for medical data based on Vue

    CN121523630A