WO2016045542A1 - Method and apparatus for realizing data visualization - Google Patents

Method and apparatus for realizing data visualization Download PDF

Info

Publication number
WO2016045542A1
WO2016045542A1 PCT/CN2015/089950 CN2015089950W WO2016045542A1 WO 2016045542 A1 WO2016045542 A1 WO 2016045542A1 CN 2015089950 W CN2015089950 W CN 2015089950W WO 2016045542 A1 WO2016045542 A1 WO 2016045542A1
Authority
WO
WIPO (PCT)
Prior art keywords
data
rendering
visualization
style
visual
Prior art date
Application number
PCT/CN2015/089950
Other languages
French (fr)
Chinese (zh)
Inventor
储晓颖
Original Assignee
阿里巴巴集团控股有限公司
储晓颖
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 阿里巴巴集团控股有限公司, 储晓颖 filed Critical 阿里巴巴集团控股有限公司
Publication of WO2016045542A1 publication Critical patent/WO2016045542A1/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor

Definitions

  • the invention relates to a method and a device for implementing data visualization, in particular to a method and a device for implementing front-end data visualization.
  • an embodiment of the present invention provides a method for implementing data visualization, the method comprising:
  • the configuration information of the data source, the visualization style, and the association relationship is imported into the visual rendering framework through a customized interface;
  • the visual rendering framework renders according to the configuration information and outputs to the browser engine.
  • the data source, the visualization style, and the visual rendering framework are separately packaged.
  • the customized interface is an IOC interface.
  • the data source and the visualization style are a many-to-many association relationship, and each data source corresponds to at least one visualization style, and each visualization style corresponds to at least one data source.
  • the “the rendering rendering frame is rendered according to the configuration information” specifically includes:
  • the rendering tool is called for rendering.
  • the parameter information includes:
  • Query at least one of the period, granularity, and data ID of the data.
  • the "recalling the rendering tool according to the rendering model” specifically includes:
  • the corresponding rendering tool is called for rendering.
  • the "recalling the corresponding rendering tool according to the parameter format" specifically includes:
  • the “transforming the data into a rendering model of the visual style matching according to the association relationship” specifically includes:
  • the data structure is retrieved and converted to a rendered model of visual style matching based on a visual style associated with the data structure.
  • the data source is in the form of a plug-in, and each plug-in includes a service query address and parameter information of the data;
  • the visual style is in the form of a plugin, and each plugin includes a visual style.
  • the method further includes:
  • the method comprises:
  • each report type only corresponds to one page element.
  • an embodiment of the present invention provides an apparatus for implementing data visualization, and the apparatus for implementing data visualization includes:
  • a configuration module configured to configure a data source, a visualization style, and an association relationship between the data source and the visualization style
  • the import module is configured to import, by the customized interface, the configuration information of the data source, the visual style, and the association relationship into the visual rendering framework when the trigger request is received;
  • the visual rendering framework is further configured to render according to the configuration information and output to a browser engine.
  • the data source, the visualization style, and the visual rendering framework are separately packaged.
  • the customized interface is an IOC interface.
  • the data source and the visualization style are a many-to-many association relationship, and each data source corresponds to at least one visualization style, and each visualization style corresponds to at least one data source.
  • the visual rendering framework is specifically configured to:
  • the rendering tool is called for rendering.
  • the parameter information includes:
  • Query at least one of the period, granularity, and data ID of the data.
  • the visual rendering framework is specifically configured to:
  • the corresponding rendering tool is called for rendering.
  • the visual rendering framework is specifically configured to:
  • the corresponding rendering tool is called for rendering according to the parameter format and the parameter logic provided by the visualization style.
  • the visual rendering framework is specifically configured to:
  • the data structure is retrieved and converted to a rendered model of visual style matching based on a visual style associated with the data structure.
  • the data source is in the form of a plug-in, and each plug-in includes a service query address and parameter information of the data;
  • the visual style is in the form of a plugin, and each plugin includes a visual style.
  • the visual rendering framework is further configured to register event monitoring logic to a browser engine.
  • the configuration module is further configured to:
  • each report type only corresponds to one page element.
  • the beneficial effects of the present invention are: separately encapsulating the visual rendering framework and the data source, the visual style, and the associated relationship, and the user only needs to configure the data source, the visual style, and the associated relationship, and then can be imported.
  • Visual rendering framework for rendering improving R&D efficiency and front-end performance.
  • FIG. 1 is a flowchart of a method for implementing data visualization according to an embodiment of the present invention
  • FIG. 2 is a schematic diagram of a module corresponding to each link in a data source, a visualization style, and an association relationship in a visual rendering framework according to an embodiment of the present invention
  • FIG. 3 is a block diagram showing an IOC architecture design of a front-end role in an embodiment of the present invention
  • FIG. 4 is a schematic diagram of coding when an XSTING user desires to display a form in which a transaction summary related data is displayed in an embodiment of the present invention
  • FIG. 5 is a schematic diagram of coding of two data source configurations of a user defined ds1 and ds2 in a multi-data source scenario according to an embodiment of the present invention
  • Figure 6 is a diagram showing the effect corresponding to Figure 5;
  • FIG. 8 is a schematic diagram showing the trend of data shown in FIG. 7 by using DOM elements in an embodiment of the present invention.
  • Fig. 9 is a block diagram showing an apparatus for realizing data visualization according to an embodiment of the present invention.
  • an embodiment of the present invention provides a method for implementing data visualization, which include:
  • the data source and the visualization style are a many-to-many association relationship, and each data source corresponds to at least one visualization style, and each visualization style corresponds to at least one data source.
  • data for minute-level statistics can be displayed either as a graph style or as a tabular style; while a tabular style can display both minute-level statistics and multiple business state machine results.
  • the relationship between the data source and the visual style is configured accordingly to provide an association relationship between the supported visual styles in each data source, so as to original the query of the data source.
  • JSON is transformed into a data structure that is preferred by different visual styles, and the relationship between the data source and the visual style is like an intermediate table in a relational database, maintaining a many-to-many relationship between the data source and the visual style.
  • the configuration information of the data source, the visual style, and the association relationship are imported into the visual rendering framework through the customized interface, and the visual rendering framework renders according to the configuration information, and outputs the image to the browser engine.
  • the trigger request may be, for example, a timing trigger, a user click, etc.
  • a complete implementation flow is encapsulated in the visual rendering framework (this part will be described in detail below), and the customized interface is exposed to the outside.
  • the above-mentioned data source, visual style, and configuration information of the association relationship are imported.
  • the relationship between the data source, the visual style, and the association relationship corresponding to each part of the visual rendering framework is as shown in FIG. 2, and the circular box shown in the figure needs to pass the data source, the visual style, and the association.
  • the logical part of the relationship configuration is described in detail below.
  • the process of encapsulation in the visual rendering framework is:
  • the Query Driver triggers an asynchronous query (Async Query) according to a certain strategy (which may be timing, artificial triggering, or initialization trigger when the page is just opened).
  • the asynchronous query initiates an AJAX query to the REST service that provides the data query service to obtain data (such as JSON structure data). Specifically, the asynchronous query needs to obtain corresponding data according to the service query address and parameter information configured in the data source.
  • the service query address here refers to the query address of the REST service provided by the data source for the asynchronous query, and the parameter information includes the query. At least one of the period, granularity, and data ID of the data.
  • the REST service returns only the data structure defined by the server, and is not necessarily suitable for the front end.
  • An important reason for this phenomenon is the difference in roles between the front and the rear.
  • One of the differences is that the server is stable and the front end is flexible. In the face of frequent changes, we are more inclined to flexibly modify the front-end logic, and let the back-end services gradually precipitate the steady state.
  • the second difference is that the data perspectives at the front and back are different, the back end tends to be a general perspective, and the front end tends to face the current view of the scene.
  • the server side saves student information of universities across the country.
  • the structure of the exposed REST service definition may be the partial List ⁇ Student>.
  • the Student object contains basic information such as student number, name, gender, and professional.
  • the REST service provides a credit score query (providing a student number as a parameter) and returns a GPA object (including individual grades).
  • the Render Driver acquires the data in the data model cache according to certain strategies (which may be timing, manual triggering, query completion triggering, etc.), and performs rendering model conversion.
  • Multiple associations (Adaptor) in the data source provide structural transformation logic for rendering model transformations. In this process, you need to convert the data into a rendering model that matches the visual style according to the association relationship.
  • Body first transforms the data into a data structure that matches the visual style according to the association relationship, and then retrieves the data structure and converts the data structure into a rendering model matching the visual style according to the visual style associated with the data structure.
  • Visual style requires different rendering models (such as timeline styles that require Map ⁇ Time, Value>, and table styles require a two-dimensional array), so each visual style corresponds to a proprietary association in a data source. Relationship, this association is responsible for transforming the original JSON into the rendering model of the visual style; at the same time, the visual style provides the structural transformation logic of the rendering tool for the rendering model transformation (such as converting the rendering model of the visual style itself into the EXT pie chart) Required parameter format).
  • the List ⁇ StudentGPA> structure is applicable to the front-end scenario of the “class credit performance display”, but it does not necessarily apply to the report rendering tool currently used by developers.
  • EXT has the structure required by it, and the requirements of GoogleLineChart.
  • Another structure is that the biggest purpose of such a conversion step is not to be kidnapped by the tool. Once the data structure is kidnapped by a tool, it will bring many problems, such as very troublesome when changing tools, structural deviation, resulting in poor maintainability, Dashboard is difficult to support multiple presentations (such as users want to see the mood to choose to display For a table or a pie chart).
  • the rendering tool After being converted to a Render Model, it is officially hosted to various Render tools (such as EXT). Before hosting the rendering tool, you need to call the rendering tool to render according to the rendering model. Specifically, according to the structural transformation logic provided by the visual style, the required rendering model is converted into a parameter format required by the corresponding rendering tool, and the corresponding rendering tool is called according to the parameter format for rendering, so that more rendering can be adapted. tool. According to the parameter format, when the corresponding rendering tool is called for rendering, the parameter logic provided by the parameter format and the visual style is also used (for example, the visual style of the curve style will use the LineChart in EXT, and the visual style of the table style will use EXT. In the Grid, and provide the header, title and other information), call the corresponding rendering tool for rendering.
  • the parameter logic provided by the parameter format and the visual style is also used (for example, the visual style of the curve style will use the LineChart in EXT, and the visual style of the table style will use EXT
  • the rendering tool registers the information provided by the rendering model to the browser engine (such as inserting a ⁇ table> into the document) to complete the rendering according to its implementation.
  • the rendering tool may also include event monitoring logic. In this case, you need to listen to the event monitoring logic. Register to the browser engine.
  • the browser engine will call back the event listener handler, which completes the event processing logic.
  • the logic can be varied, either a simple alert or a data model cache.
  • the modification of the structure may also be a manual triggering of a new query flow or rendering process.
  • the customized interface is an IOC interface.
  • IOC Inversion of Control
  • the framework does the repetitive process, and the user only needs to focus on their business (or functionality).
  • the underlying visual rendering framework is responsible for the encapsulation and implementation of a set of processes, but ignores the implementation details of all custom logic, but exposes the IOC interface to the upper layer; the middle Plugin layer is responsible for the encapsulation.
  • the top layer is the logic of the final product, the coding of this layer should be as simple as possible. After the visual rendering framework and Plugin two-layer packaging, the product layer should only You need to provide the parameters necessary for different Plugins.
  • the data source is configured as a plug-in.
  • Each plug-in includes the service query address and parameter information of the data.
  • Each data source is a data source plug-in.
  • the encapsulated data source includes minute-level statistics, second-level data statistics, and ERROR. Log segmentation statistics, single business state machine, massive slot full table traversal query and many other data sources of different formats; similarly, the visual style is also configured as a plug-in form, each plug-in includes a visual style, Each visual style is a visual style plug-in, such as graphs, pie charts, tables, and histograms.
  • the XFLUSH also includes more complex styles such as link graphs, mesh graphs, and light graphs.
  • the third box Provide some basic information for the report, such as location, size, refresh rate, title, and more.
  • FIG. 5 defines two data source configurations of ds1 and ds2, FIG. 6 for the effect.
  • multiple data sources can be different plug-ins (in this case, the DataSource1 plug-in can be used in combination with any data source plug-in, as long as they all implement the association relationship that supports the visual style of the graph, for example, When the double eleventh promotion, ds1 obtains the transaction data, and ds2 obtains the microblog lyric data (the number of microblogs associated with double eleven appearing every minute), and then displays it in the same graph).
  • the asynchronous query link also utilizes Javascript's Deferred technology to implement a synchronous programming model, which simplifies the framework design, solves the time difference problem of multiple asynchronous query returns, and avoids inferior solutions such as polling.
  • these ⁇ circle> elements ultimately plot the curves in the graph.
  • This kind of practice whether good or bad, is still slightly inferior in performance, at least in the interaction event will be very passive. For example, if you want to listen to a mouse click event at a certain point in the curve, then 1440 DOM elements should be properly registered, manage their life cycle, handle their interaction events, and so on.
  • the DOM element is actually a relatively coarse-grained runtime object (which contains a lot of metadata and runtime data), which will put a big burden on the browser engine.
  • 2D, 3D maps or models can be fully manufactured and stored as data files.
  • the runtime dynamically loads data files according to scene switching, loads maps and model data into memory, and finally Finish rendering.
  • data files For example, in a 2D game, if a map of a wild grass is a picture, it may reach 1MB (if there are 1024*1024 pixels, the RGB value of each pixel occupies one byte), the map is loaded. After that, the whole picture is drawn to the interface.
  • the actual design is often much simpler: making 4 small pictures ABCD, reflecting slightly different vegetation features, the arrangement of these 4 small pictures creates different map scenes.
  • the 2D map file can be just a two-dimensional array.
  • the elements are ABCD four. Different arrangement and combination can form different map appearances. This method can greatly reduce the burden of storage space loss, memory usage, element management and interaction control. The only increase is the logic complexity during rendering. It takes a certain amount of calculation (not as simple as drawing a large picture).
  • the configuration page coordinate function is configured to obtain the page coordinates of the page element corresponding to the trigger event
  • the original data is Map ⁇ Time, Value>
  • the traditional approach is to generate 1440 DOM elements, registered to the browser engine, the latter complete rendering and element lifecycle management, event control .
  • the method of the present invention is to provide a get page coordinate function (getPositionByEntry); for each entry in the map (that is, each point), call the page coordinate function function as a parameter (Time can calculate the x coordinate, Value can be calculated Out y coordinates); use the HTML5 Canvas to complete the "dot" drawing (draw color, size and other effects according to various personalization requirements).
  • the configuration obtaining data function is configured to retrieve data corresponding to the page coordinates after acquiring the page coordinates of the page element corresponding to the trigger event; wherein each report type corresponds to only one page element.
  • the mouse coordinate is used as a parameter to call the get data function (getEntryByPosition, the x coordinate can be used to derive the closest Entry, if the total length of the x-axis is N pixels, a total of M points, the current x coordinate is x, that is Math.round (x/(N/M)) entries); take out the data of this entry for subsequent event monitoring.
  • getEntryByPosition the x coordinate can be used to derive the closest Entry, if the total length of the x-axis is N pixels, a total of M points, the current x coordinate is x, that is Math.round (x/(N/M)) entries); take out the data of this entry for subsequent event monitoring.
  • the data visualization implementing apparatus 100 includes The configuration module 10, the import module 20, and the visual rendering framework 30 are provided.
  • the configuration module 10 is configured to configure a data source, a visualization style, and an association relationship between the data source and the visualization style;
  • the data source and the visualization style are a many-to-many association relationship, and each data source corresponds to at least one visualization style, and each visualization style corresponds to at least one data source.
  • data for minute-level statistics can be displayed either as a graph style or as a tabular style; while a tabular style can display both minute-level statistics and multiple business state machine results.
  • the relationship between the data source and the visual style is configured accordingly to provide an association relationship between the supported visual styles in each data source, so as to original the query of the data source.
  • JSON is transformed into a data structure that is preferred by different visual styles, and the relationship between the data source and the visual style is like an intermediate table in a relational database, maintaining a many-to-many relationship between the data source and the visual style.
  • the import module 20 is configured to import the configuration information of the data source, the visual style, and the association relationship into the visual rendering framework 30 through the customized interface when the trigger request is received, and the visual rendering framework 30 renders according to the configuration information, and outputs the image to the browser engine. .
  • the trigger request may be, for example, a timing trigger, a user click, etc.
  • a complete implementation flow is encapsulated in the visual rendering framework (this part will be described in detail below), and the customized interface is exposed to the outside.
  • the above-mentioned data source, visual style, and configuration information of the association relationship are imported.
  • the relationship between the data source, the visual style, and the association relationship corresponding to each part of the visual rendering framework is as shown in the figure.
  • the circular box shown in the figure is the data source, the visual style, and the association relationship.
  • the logical part of the configuration is the data source, the visual style, and the association relationship.
  • the visual rendering framework 30 includes:
  • the Query Driver triggers an asynchronous query (Async Query) according to a certain strategy (which may be timing, artificial triggering, or initialization trigger when the page is just opened).
  • the asynchronous query initiates an AJAX query to the REST service that provides the data query service to obtain data (such as JSON structure data).
  • the asynchronous query in the visual rendering framework 30 is configured to obtain corresponding data according to the service query address and parameter information configured in the data source, where the service query address refers to the REST service provided by the data source for the asynchronous query.
  • the address is queried, and the parameter information includes at least one of a period, a granularity, and a data ID of the query data.
  • the REST service returns only the data structure defined by the server, and is not necessarily suitable for the front end.
  • An important reason for this phenomenon is the difference in roles between the front and the rear.
  • One of the differences is that the server is stable and the front end is flexible. In the face of frequent changes, we are more inclined to flexibly modify the front-end logic, and let the back-end services gradually precipitate the steady state.
  • the second difference is that the data perspectives at the front and back are different, the back end tends to be a general perspective, and the front end tends to face the current view of the scene.
  • the server side saves student information of universities across the country.
  • the structure of the exposed REST service definition may be the partial List ⁇ Student>.
  • the Student object contains basic information such as student number, name, gender, and professional.
  • the REST service provides a credit score query (providing a student number as a parameter) and returns a GPA object (including individual grades).
  • the Render Driver acquires the data in the data model cache according to certain strategies (which may be timing, manual triggering, query completion triggering, etc.), and performs rendering model conversion.
  • Multiple associations (Adaptor) in the data source provide structural transformation logic for rendering model transformations.
  • the visual rendering framework 30 needs to convert the data into a rendering model matching the visual style according to the association relationship. More specifically, the data is first converted into a data structure matching the visual style according to the association relationship, and then the data structure is retrieved and according to The visual style associated with the data structure transforms the data structure into a rendering model that matches the visual style.
  • Visual style requires different rendering models (such as timeline styles that require Map ⁇ Time, Value>, and table styles require a two-dimensional array), so each visual style corresponds to a proprietary association in a data source. Relationship, this association is responsible for transforming the original JSON into the rendering model of the visual style; at the same time, the visual style provides the structural transformation logic of the rendering tool for the rendering model transformation (such as converting the rendering model of the visual style itself into the EXT pie chart) Required parameter format).
  • the List ⁇ StudentGPA> structure is applicable to the front-end scenario of the “class credit performance display”, but it does not necessarily apply to the report rendering tool currently used by developers.
  • EXT has the structure required by it, and the requirements of GoogleLineChart.
  • Another structure is that the biggest purpose of such a conversion step is not to be kidnapped by the tool. Once the data structure is kidnapped by a tool, it will bring many problems, such as very troublesome when changing tools, structural deviation, resulting in poor maintainability, Dashboard is difficult to support multiple presentations (such as users want to see the mood to choose to display For a table or a pie chart).
  • the visual rendering framework 30 is also used to invoke the rendering tool for rendering based on the rendering model. Specifically, according to the structural transformation logic provided by the visual style, the required rendering model is converted into a parameter format required by the corresponding rendering tool, and the corresponding rendering tool is called according to the parameter format for rendering, so that more rendering can be adapted. tool. According to the parameter format, when the corresponding rendering tool is called for rendering, the parameter logic provided by the parameter format and the visual style is also used (for example, the visual style of the curve style will use the LineChart in EXT, and the visual style of the table style will use EXT. In the Grid, and provide the header, title and other information), call the corresponding rendering tool for rendering.
  • the visual style of the curve style will use the LineChart in EXT
  • the visual style of the table style will use EXT. In the Grid, and provide the header, title and other information
  • the rendering tool registers the information provided by the rendering model to the browser engine (such as inserting a ⁇ table> into the document) according to the different implementations, and completes the rendering; at the same time,
  • the rendering tool may also include event monitoring logic that the visual rendering framework 30 will register with the browser engine.
  • the browser engine will call back the event listener handler, which completes the event processing logic.
  • the logic can be varied, either a simple alert or a data model cache.
  • the modification of the structure may also be a manual triggering of a new query flow or rendering process.
  • the customized interface is an IOC interface.
  • IOC Inversion of Control
  • the framework does the repetitive process, and the user only needs to focus on their business (or functionality). Therefore, the data visualization implementation method provided by the present invention is actually a process of implementing the IOC architecture in the original front-end visualization implementation process, the query process and the rendering process.
  • the underlying visual rendering framework is responsible for the encapsulation and implementation of a set of processes, but ignores the implementation details of all custom logic, but exposes the IOC interface outwards, waiting for the upper layer implementation; the middle Plugin layer is responsible for encapsulating commonly used custom logic (including common The data source and the common visual style); the top layer is the logic of the final product.
  • the coding of this layer should be as simple as possible. After the visual rendering framework and the Plugin two-layer package, the product layer should only need to provide the parameters necessary for different Plugins. Just fine.
  • the data source is configured as a plug-in.
  • Each plug-in includes the service query address and parameter information of the data.
  • Each data source is a data source plug-in.
  • the encapsulated data source includes minute-level statistics, second-level data statistics, and ERROR.
  • each plug-in includes a visual style
  • Each visual style is a visual style plug-in, such as graphs, pie charts, tables, histograms and other implementation logic, and can also include more complex styles such as link diagrams, mesh diagrams, and light diagrams.
  • the third box Provide some basic information for the report, such as location, size, refresh rate, title, and more.
  • FIG. 5 defines two data source configurations of ds1 and ds2, FIG. 6 for the effect.
  • multiple data sources can be different plug-ins (in this case, the DataSource1 plug-in can be used in combination with any data source plug-in, as long as they all implement the association relationship that supports the visual style of the graph, for example, When the double eleventh promotion, ds1 obtains the transaction data, and ds2 obtains the microblog lyric data (the number of microblogs associated with double eleven appearing every minute), and then displays it in the same graph).
  • XSTING's asynchronous query link also utilizes Javascript's Deferred technology to implement a synchronous programming model, simplifying the framework design, solving the time difference problem of multiple asynchronous query returns, and avoiding inferior solutions such as polling.
  • the event monitoring mechanism, interactive control, pop-up dynamic report and other functions provided by the framework are exposed to the user with the most simplified IOC interface, which minimizes the user code and only provides absolute Customized parameters are required, and there is no need to consider the underlying implementation details.
  • these ⁇ circle> elements ultimately plot the curves in the graph.
  • This kind of practice whether good or bad, is still slightly inferior in performance, at least in the interaction event will be very passive. For example, if you want to listen to a mouse click event at a certain point in the curve, then 1440 DOM elements should be properly registered, manage their life cycle, handle their interaction events, and so on.
  • the DOM element is actually a relatively coarse-grained runtime object (which contains a lot of metadata and runtime data), which will put a big burden on the browser engine.
  • 2D, 3D maps or models can be fully manufactured and stored as data files.
  • the runtime dynamically loads data files according to scene switching, loads maps and model data into memory, and finally Finish rendering. For example, in a 2D game, if a map of a wild grass is a picture, it may reach 1MB (if there are 1024*1024 pixels, the RGB value of each pixel occupies one byte), the map is loaded. After that, it’s actually the whole picture. Draw on the interface.
  • the configuration module 10 is further configured to: configure a page coordinate function to obtain a page coordinate of a page element corresponding to the trigger event;
  • the original data is Map ⁇ Time, Value>
  • the traditional approach is to generate 1440 DOM elements, registered to the browser engine, the latter complete rendering and element lifecycle management, event control .
  • the method of the present invention is to provide a get page coordinate function (getPositionByEntry); for each entry in the map (that is, each point), call the page coordinate function function as a parameter (Time can calculate the x coordinate, Value can be calculated Out y coordinates); use the HTML5 Canvas to complete the "dot" drawing (draw color, size and other effects according to various personalization requirements).
  • the configuration module 10 configures the acquisition data function to retrieve data corresponding to the page coordinates after acquiring the page coordinates of the page element corresponding to the trigger event; wherein each report type corresponds to only one page element.
  • the mouse coordinate is used as a parameter to call the get data function (getEntryByPosition, the x coordinate can be used to derive the closest Entry, if the total length of the x-axis is N pixels, a total of M points, the current x coordinate is x, that is Math.round (x/(N/M)) entries); take out the data of this entry for subsequent event monitoring.
  • getEntryByPosition the x coordinate can be used to derive the closest Entry, if the total length of the x-axis is N pixels, a total of M points, the current x coordinate is x, that is Math.round (x/(N/M)) entries); take out the data of this entry for subsequent event monitoring.
  • the visual rendering framework and the data source, the visual style and its associated relationships are independently encapsulated, and the user only needs to configure the data source, the visual style and its association relationship, and then can import the visual rendering framework for rendering, and improve the research and development. Efficiency and front-end performance.
  • the disclosed system, apparatus, and method may be implemented in other manners.
  • the device implementations described above are merely illustrative.
  • the division of the unit is only a logical function division.
  • there may be another division manner for example, multiple units or components may be combined or Can be integrated into another system, or some features can be ignored or not executed.
  • the mutual coupling or direct coupling or communication connection shown or discussed may be an indirect coupling or communication connection through some interface, device or unit, and may be in an electrical, mechanical or other form.
  • the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, may be located in one place, or may be distributed to multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of the present embodiment.
  • each functional unit in each embodiment of the present invention may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit.
  • the above integrated unit can be implemented in the form of hardware or in the form of hardware plus software functional units.
  • the above-described integrated unit implemented in the form of a software functional unit can be stored in a computer readable storage medium.
  • the software functional unit is stored in a storage medium and includes instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) or a processor to perform the method of various embodiments of the present invention. Part of the steps.
  • the foregoing storage medium includes: a USB flash drive, a mobile hard disk, a read-only memory (ROM), A variety of media that can store program code, such as random access memory (RAM), disk, or optical disk.

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Data Mining & Analysis (AREA)
  • Databases & Information Systems (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Processing Or Creating Images (AREA)
  • User Interface Of Digital Computer (AREA)

Abstract

A method and apparatus for realizing data visualization, wherein the method comprises: configuring a data source, a visualization style and an association relationship between the data source and the visualization style; upon receipt of a trigger request, importing the configuration information of the data source, the visualization style and the association relationship to a visual rendering framework via a customized interface; and rendering the visual rendering framework according to the configuration information and outputting the visual rendering framework to a browser engine. The method and apparatus have the advantageous effects that: the visual rendering framework as well as the data source, the visualization style and the association relationship therebetween are independently packaged, and users can import the data source, the visualization style and the correlation relationship therebetween to the visual rendering framework for rendering purposes only by configuring the data source, the visualization style and the association relationship therebetween, thus improving the efficiency of research and development and front-end performances.

Description

数据可视化的实现方法及装置Method and device for realizing data visualization 技术领域Technical field
本发明涉及一种数据可视化的实现方法及装置,尤其涉及一种前端数据可视化的实现方法及装置。The invention relates to a method and a device for implementing data visualization, in particular to a method and a device for implementing front-end data visualization.
背景技术Background technique
随着技术的进步,大数据分析越发升温,除了海量数据计算和存储的难题,还有一个影响产品研发效率和用户体验的重要环节,即数据可视化。然而即使有EXT、Google LineChart等众多可供选择的前端报表技术,也只能被当做工具使用,没有形成一套可扩展的前端IOC开发框架,不能够有效降低研发成本。With the advancement of technology, big data analysis is heating up. In addition to the problems of massive data calculation and storage, there is also an important link that affects product development efficiency and user experience, namely data visualization. However, even if there are many front-end report technologies that can be selected, such as EXT and Google LineChart, they can only be used as tools. They do not form a scalable front-end IOC development framework, which can not effectively reduce R&D costs.
在前端报表技术中,常见的包括Ext、Google LineChart、HighChart等等。这些技术通常重渲染而轻框架,仅能作为工具使用。它们各自都规定了自身的数据结构,用户必须自己做AJAX查询,解析JSON,再将data适配为这些工具要求的结构……,这个过程中,工具能够帮助用户解决的仅仅是报表渲染环节,而数据可视化技术的环节还涉及到数据查询、数据解析、数据缓存、结构转换、数据交互、定时驱动、布局控制、弹出拖拽浮动、公用参数控制等等。如果放任这些环节由开发人员自行解决,往往会导致风格迥异的javascript充斥在各个产品代码中(我们不能保证每个前端开发人员都有很高的重构抽象能力),一旦公用的逻辑没有沉淀重用,接下来的维护和扩展工作就会浪费大量的编码成本、学习成本、返工成本。In front-end reporting technology, common ones include Ext, Google LineChart, HighChart, and so on. These techniques are usually re-rendered and lightly framed and can only be used as a tool. They each specify their own data structure, users must do AJAX queries themselves, parse JSON, and then adapt data to the structure required by these tools... In this process, the tools can help users solve only the report rendering process. The data visualization technology also involves data query, data parsing, data caching, structure conversion, data interaction, timing driving, layout control, pop-and-drop floating, common parameter control, and so on. If you let these problems be solved by the developers themselves, it will often lead to different styles of javascript flooding in each product code (we can't guarantee that each front-end developer has high refactoring abstraction ability), once the common logic is not precipitated and reused. The next maintenance and expansion work will waste a lot of coding costs, learning costs, and rework costs.
发明内容Summary of the invention
本发明的目的在于提供一种数据可视化的实现方法及装置。It is an object of the present invention to provide a method and apparatus for implementing data visualization.
为实现上述发明目的之一,本发明一实施方式提供了一种数据可视化的实现方法,所述方法包括: To achieve one of the above objects, an embodiment of the present invention provides a method for implementing data visualization, the method comprising:
配置数据源、可视化样式,以及所述数据源和所述可视化样式之间的关联关系;Configuring a data source, a visualization style, and an association relationship between the data source and the visualization style;
当收到触发请求时,将所述数据源、可视化样式、关联关系的配置信息通过定制化接口导入可视化渲染框架;When the trigger request is received, the configuration information of the data source, the visualization style, and the association relationship is imported into the visual rendering framework through a customized interface;
所述可视化渲染框架根据所述配置信息进行渲染,并输出至浏览器引擎。The visual rendering framework renders according to the configuration information and outputs to the browser engine.
作为本发明一实施方式的进一步改进,所述数据源、可视化样式,以及所述可视化渲染框架分别独立封装。As a further improvement of an embodiment of the present invention, the data source, the visualization style, and the visual rendering framework are separately packaged.
作为本发明一实施方式的进一步改进,所述定制化接口为IOC接口。As a further improvement of an embodiment of the present invention, the customized interface is an IOC interface.
作为本发明一实施方式的进一步改进,所述数据源和所述可视化样式为多对多的关联关系,每一个数据源对应至少一个可视化样式,每一个可视化样式对应至少一个数据源。As a further improvement of an embodiment of the present invention, the data source and the visualization style are a many-to-many association relationship, and each data source corresponds to at least one visualization style, and each visualization style corresponds to at least one data source.
作为本发明一实施方式的进一步改进,所述『所述可视化渲染框架根据所述配置信息进行渲染』具体包括:As a further improvement of an embodiment of the present invention, the “the rendering rendering frame is rendered according to the configuration information” specifically includes:
根据所述数据源中配置的服务查询地址及参数信息,获取相应的数据;Obtaining corresponding data according to the service query address and parameter information configured in the data source;
根据所述关联关系将所述数据转换为可视化样式匹配的渲染模型;Converting the data into a rendering model of visual style matching according to the association relationship;
根据所述渲染模型,调用渲染工具进行渲染。According to the rendering model, the rendering tool is called for rendering.
作为本发明一实施方式的进一步改进,所述参数信息包括:As a further improvement of an embodiment of the present invention, the parameter information includes:
查询数据的周期、粒度、数据ID的至少其中之一。Query at least one of the period, granularity, and data ID of the data.
作为本发明一实施方式的进一步改进,『根据所述渲染模型,调用渲染工具进行渲染』具体包括:As a further improvement of an embodiment of the present invention, the "recalling the rendering tool according to the rendering model" specifically includes:
根据所述可视化样式提供的结构转换逻辑,将所述渲染模型转换为对应的渲染工具所要求参数格式;Converting the rendering model to a parameter format required by the corresponding rendering tool according to the structure conversion logic provided by the visualization style;
根据所述参数格式,调用对应的渲染工具进行渲染。According to the parameter format, the corresponding rendering tool is called for rendering.
作为本发明一实施方式的进一步改进,『根据所述参数格式,调用对应的渲染工具进行渲染』具体包括:As a further improvement of an embodiment of the present invention, the "recalling the corresponding rendering tool according to the parameter format" specifically includes:
根据所述参数格式以及所述可视化样式提供的参数逻辑,调用相应的渲染工 具进行渲染。Calling the corresponding renderer according to the parameter format and the parameter logic provided by the visual style With rendering.
作为本发明一实施方式的进一步改进,所述『根据所述关联关系将所述数据转换为可视化样式匹配的渲染模型』具体包括:As a further improvement of an embodiment of the present invention, the “transforming the data into a rendering model of the visual style matching according to the association relationship” specifically includes:
根据所述关联关系将所述数据转换为可视化样式匹配的的数据结构;Converting the data into a data structure that is visually matched according to the association relationship;
调取所述数据结构并根据与所述数据结构关联的可视化样式,将所述数据结构转换为可视化样式匹配的渲染模型。The data structure is retrieved and converted to a rendered model of visual style matching based on a visual style associated with the data structure.
作为本发明一实施方式的进一步改进,As a further improvement of an embodiment of the present invention,
所述数据源为插件形式,每个插件中包括数据的服务查询地址及参数信息;The data source is in the form of a plug-in, and each plug-in includes a service query address and parameter information of the data;
所述可视化样式为插件形式,每个插件中包括一种可视化样式。The visual style is in the form of a plugin, and each plugin includes a visual style.
作为本发明一实施方式的进一步改进,所述方法还包括:As a further improvement of an embodiment of the present invention, the method further includes:
将事件监听逻辑注册到浏览器引擎。Register the event listener logic to the browser engine.
作为本发明一实施方式的进一步改进,所述方法包括:As a further improvement of an embodiment of the present invention, the method comprises:
配置获取页面坐标函数,以获取触发事件相应的页面元素的页面坐标;Configuring a page coordinate function to obtain a page coordinate of a page element corresponding to the trigger event;
配置获取数据函数,以在获取触发事件相应的页面元素的页面坐标后,调取与所述页面坐标相应的数据;Configuring a data acquisition function to retrieve data corresponding to the page coordinates after acquiring the page coordinates of the page element corresponding to the trigger event;
其中,每一报表类型只对应一个页面元素。Among them, each report type only corresponds to one page element.
为实现上述发明目的之一,本发明一实施方式提供了一种数据可视化的实现装置,所述数据可视化的实现装置包括:In order to achieve the above object, an embodiment of the present invention provides an apparatus for implementing data visualization, and the apparatus for implementing data visualization includes:
配置模块,用于配置数据源、可视化样式,以及所述数据源和所述可视化样式之间的关联关系;a configuration module, configured to configure a data source, a visualization style, and an association relationship between the data source and the visualization style;
导入模块,用于当收到触发请求时,将所述数据源、可视化样式、关联关系的配置信息通过定制化接口导入可视化渲染框架;The import module is configured to import, by the customized interface, the configuration information of the data source, the visual style, and the association relationship into the visual rendering framework when the trigger request is received;
所述可视化渲染框架还用于根据所述配置信息进行渲染,并输出至浏览器引擎。The visual rendering framework is further configured to render according to the configuration information and output to a browser engine.
作为本发明一实施方式的进一步改进,所述数据源、可视化样式,以及所述可视化渲染框架分别独立封装。As a further improvement of an embodiment of the present invention, the data source, the visualization style, and the visual rendering framework are separately packaged.
作为本发明一实施方式的进一步改进,所述定制化接口为IOC接口。 As a further improvement of an embodiment of the present invention, the customized interface is an IOC interface.
作为本发明一实施方式的进一步改进,所述数据源和所述可视化样式为多对多的关联关系,每一个数据源对应至少一个可视化样式,每一个可视化样式对应至少一个数据源。As a further improvement of an embodiment of the present invention, the data source and the visualization style are a many-to-many association relationship, and each data source corresponds to at least one visualization style, and each visualization style corresponds to at least one data source.
作为本发明一实施方式的进一步改进,所述可视化渲染框架具体用于:As a further improvement of an embodiment of the present invention, the visual rendering framework is specifically configured to:
根据所述数据源中配置的服务查询地址及参数信息,获取相应的数据;Obtaining corresponding data according to the service query address and parameter information configured in the data source;
根据所述关联关系将所述数据转换为可视化样式匹配的渲染模型;Converting the data into a rendering model of visual style matching according to the association relationship;
根据所述渲染模型,调用渲染工具进行渲染。According to the rendering model, the rendering tool is called for rendering.
作为本发明一实施方式的进一步改进,所述参数信息包括:As a further improvement of an embodiment of the present invention, the parameter information includes:
查询数据的周期、粒度、数据ID的至少其中之一。Query at least one of the period, granularity, and data ID of the data.
作为本发明一实施方式的进一步改进,所述可视化渲染框架具体用于:As a further improvement of an embodiment of the present invention, the visual rendering framework is specifically configured to:
根据所述可视化样式提供的结构转换逻辑,将所述渲染模型转换为对应的渲染工具所要求参数格式;Converting the rendering model to a parameter format required by the corresponding rendering tool according to the structure conversion logic provided by the visualization style;
根据所述参数格式,调用对应的渲染工具进行渲染。According to the parameter format, the corresponding rendering tool is called for rendering.
作为本发明一实施方式的进一步改进,所述可视化渲染框架具体用于:As a further improvement of an embodiment of the present invention, the visual rendering framework is specifically configured to:
根据所述参数格式以及所述可视化样式提供的参数逻辑,调用相应的渲染工具进行渲染。The corresponding rendering tool is called for rendering according to the parameter format and the parameter logic provided by the visualization style.
作为本发明一实施方式的进一步改进,所述可视化渲染框架具体用于:As a further improvement of an embodiment of the present invention, the visual rendering framework is specifically configured to:
根据所述关联关系将所述数据转换为可视化样式匹配的的数据结构;Converting the data into a data structure that is visually matched according to the association relationship;
调取所述数据结构并根据与所述数据结构关联的可视化样式,将所述数据结构转换为可视化样式匹配的渲染模型。The data structure is retrieved and converted to a rendered model of visual style matching based on a visual style associated with the data structure.
作为本发明一实施方式的进一步改进,As a further improvement of an embodiment of the present invention,
所述数据源为插件形式,每个插件中包括数据的服务查询地址及参数信息;The data source is in the form of a plug-in, and each plug-in includes a service query address and parameter information of the data;
所述可视化样式为插件形式,每个插件中包括一种可视化样式。The visual style is in the form of a plugin, and each plugin includes a visual style.
作为本发明一实施方式的进一步改进,所述可视化渲染框架还用于将事件监听逻辑注册到浏览器引擎。As a further improvement of an embodiment of the present invention, the visual rendering framework is further configured to register event monitoring logic to a browser engine.
作为本发明一实施方式的进一步改进,所述配置模块还用于:As a further improvement of an embodiment of the present invention, the configuration module is further configured to:
配置获取页面坐标函数,以获取触发事件相应的页面元素的页面坐标; Configuring a page coordinate function to obtain a page coordinate of a page element corresponding to the trigger event;
配置获取数据函数,以在获取触发事件相应的页面元素的页面坐标后,调取与所述页面坐标相应的数据;Configuring a data acquisition function to retrieve data corresponding to the page coordinates after acquiring the page coordinates of the page element corresponding to the trigger event;
其中,每一报表类型只对应一个页面元素。Among them, each report type only corresponds to one page element.
与现有技术相比,本发明的有益效果是:将可视化渲染框架和数据源、可视化样式及其关联关系独立封装,用户只需要对数据源、可视化样式及其关联关系进行配置,即可导入可视化渲染框架进行渲染,提高了研发效率和前端性能。Compared with the prior art, the beneficial effects of the present invention are: separately encapsulating the visual rendering framework and the data source, the visual style, and the associated relationship, and the user only needs to configure the data source, the visual style, and the associated relationship, and then can be imported. Visual rendering framework for rendering, improving R&D efficiency and front-end performance.
附图说明DRAWINGS
图1是本发明一实施方式的数据可视化的实现方法的流程图;1 is a flowchart of a method for implementing data visualization according to an embodiment of the present invention;
图2是本发明一实施方式中数据源、可视化样式、以及关联关系与可视化渲染框架中各环节对应的模块示意图;2 is a schematic diagram of a module corresponding to each link in a data source, a visualization style, and an association relationship in a visual rendering framework according to an embodiment of the present invention;
图3是本发明一实施方式中将前端的角色进行IOC架构设计的模块图;3 is a block diagram showing an IOC architecture design of a front-end role in an embodiment of the present invention;
图4是本发明一实施方式中XSTING用户期望展示一个表格,表格中展示交易摘要相关的数据时的编码示意图;4 is a schematic diagram of coding when an XSTING user desires to display a form in which a transaction summary related data is displayed in an embodiment of the present invention;
图5是本发明一实施方式中在多数据源场景下,用户定义ds1和ds2两个数据源配置的编码示意图;5 is a schematic diagram of coding of two data source configurations of a user defined ds1 and ds2 in a multi-data source scenario according to an embodiment of the present invention;
图6是与图5对应的展现效果图;Figure 6 is a diagram showing the effect corresponding to Figure 5;
图7是本发明一实施方式中展现一天1440分钟的数据走势的曲线图;7 is a graph showing the trend of data of 1440 minutes per day in an embodiment of the present invention;
图8是本发明一实施方式中用DOM元素绘制图7所示的数据走势的示意图;FIG. 8 is a schematic diagram showing the trend of data shown in FIG. 7 by using DOM elements in an embodiment of the present invention; FIG.
图9是本发明一实施方式的数据可视化的实现装置的模块图。Fig. 9 is a block diagram showing an apparatus for realizing data visualization according to an embodiment of the present invention.
具体实施方式detailed description
以下将结合附图所示的各实施方式对本发明进行详细描述。但这些实施方式并不限制本发明,本领域的普通技术人员根据这些实施方式所轻易做出的结构、方法、或功能上的变换均包含在本发明的保护范围内。The present invention will be described in detail below in conjunction with the embodiments shown in the drawings. However, the embodiments are not intended to limit the invention, and structural, method, or functional changes that are readily made by those skilled in the art in light of these embodiments are included in the scope of the invention.
如图1所示,本发明一实施方式提供了一种数据可视化的实现方法,其 包括:As shown in FIG. 1 , an embodiment of the present invention provides a method for implementing data visualization, which include:
配置数据源、可视化样式,以及数据源和可视化样式之间的关联关系;Configure data sources, visualization styles, and relationships between data sources and visualization styles;
在数据分析领域,用户往往会面对多种多样的数据源。比如在数据仓库产出BI报表时,可能既要获取DB中ETL清洗出来的数据(比如某个商品的交易次数),又要获取日志分析的数据(比如某个商品被用户浏览的UV),还要加上消息事件的数据(比如某个商品的炒信行为数量),甚至要去捞取微博上的舆情数据。In the field of data analysis, users often face a variety of data sources. For example, when the data warehouse produces BI reports, it may be necessary to obtain the ETL cleaned data in the DB (such as the number of transactions of a certain commodity), and also obtain the log analysis data (such as the UV of a certain item viewed by the user). Also add the data of the news event (such as the number of speculative behavior of a commodity), and even go to the lyric data on Weibo.
用户在想要展现某个报表时,必然清楚应该展示为什么样式(是表格、曲线、还是饼图等),而这些不同的样式也即定义为可视化样式。When users want to present a report, they must be clear about why they should be displayed (either tables, curves, pies, etc.), and these different styles are defined as visual styles.
数据源和可视化样式为多对多的关联关系,每一个数据源对应至少一个可视化样式,每一个可视化样式对应至少一个数据源。例如,分钟级统计的数据既可以展示为曲线图样式也可以展示为表格样式;而表格样式既可以展示分钟级统计数据又可以展示多笔业务状态机结果。此步骤中,相应地配置了数据源和可视化样式之间的关联关系,以在每个数据源中,为它支持的可视化样式各提供一个之间的关联关系,以便将本数据源查询的原始JSON转换为不同可视化样式偏爱的数据结构,而数据源和可视化样式之间的关联关系就像关系型数据库里的中间表,维持了数据源和可视化样式的多对多关系。The data source and the visualization style are a many-to-many association relationship, and each data source corresponds to at least one visualization style, and each visualization style corresponds to at least one data source. For example, data for minute-level statistics can be displayed either as a graph style or as a tabular style; while a tabular style can display both minute-level statistics and multiple business state machine results. In this step, the relationship between the data source and the visual style is configured accordingly to provide an association relationship between the supported visual styles in each data source, so as to original the query of the data source. JSON is transformed into a data structure that is preferred by different visual styles, and the relationship between the data source and the visual style is like an intermediate table in a relational database, maintaining a many-to-many relationship between the data source and the visual style.
当收到触发请求时,将数据源、可视化样式、关联关系的配置信息通过定制化接口导入可视化渲染框架,可视化渲染框架根据配置信息进行渲染,并输出至浏览器引擎。When the trigger request is received, the configuration information of the data source, the visual style, and the association relationship are imported into the visual rendering framework through the customized interface, and the visual rendering framework renders according to the configuration information, and outputs the image to the browser engine.
如图2所示,触发请求可以是例如定时触发、用户点击等,可视化渲染框架内封装有一套完整的实现流程(这部分将在下文中做详细的描述),并向外暴露定制化接口,等待上述的数据源、可视化样式、关联关系的配置信息导入后实现。而数据源、可视化样式、以及关联关系三者对应到该可视化渲染框架中各部分的关系即如图2所示,图中所示的圆形框中为需要通过数据源、可视化样式、以及关联关系进行配置的逻辑部分。As shown in FIG. 2, the trigger request may be, for example, a timing trigger, a user click, etc., and a complete implementation flow is encapsulated in the visual rendering framework (this part will be described in detail below), and the customized interface is exposed to the outside. The above-mentioned data source, visual style, and configuration information of the association relationship are imported. The relationship between the data source, the visual style, and the association relationship corresponding to each part of the visual rendering framework is as shown in FIG. 2, and the circular box shown in the figure needs to pass the data source, the visual style, and the association. The logical part of the relationship configuration.
在本发明的一实施方式中,可视化渲染框架内封装的流程有: In an embodiment of the invention, the process of encapsulation in the visual rendering framework is:
查询驱动(Query Driver)按照一定策略(可能是定时、也可以是人工触发、也可能是页面刚打开时的初始化触发),触发异步查询(Async Query)。The Query Driver triggers an asynchronous query (Async Query) according to a certain strategy (which may be timing, artificial triggering, or initialization trigger when the page is just opened).
异步查询向提供数据查询服务的REST服务发起AJAX查询,获取数据(比如JSON结构的数据)。具体地,异步查询需要根据数据源中配置的服务查询地址和参数信息,获取相应的数据,这里的服务查询地址指的是数据源为异步查询提供的是REST服务的查询地址,参数信息包括查询数据的周期、粒度、数据ID的至少其中之一。The asynchronous query initiates an AJAX query to the REST service that provides the data query service to obtain data (such as JSON structure data). Specifically, the asynchronous query needs to obtain corresponding data according to the service query address and parameter information configured in the data source. The service query address here refers to the query address of the REST service provided by the data source for the asynchronous query, and the parameter information includes the query. At least one of the period, granularity, and data ID of the data.
REST服务返回的只是服务端定义的数据结构,不一定适合前端。造成这种现象的一个重要原因就是前后端的角色差异。差异之一,服务端偏稳,前端追求灵活,面对频繁变更的需求我们更倾向于灵活的修改前端逻辑,而让后端服务逐渐沉淀稳态。差异之二,是前后端的数据视角不同,后端更倾向于通用的视角,而前端则倾向于面向当前展示场景的视角。The REST service returns only the data structure defined by the server, and is not necessarily suitable for the front end. An important reason for this phenomenon is the difference in roles between the front and the rear. One of the differences is that the server is stable and the front end is flexible. In the face of frequent changes, we are more inclined to flexibly modify the front-end logic, and let the back-end services gradually precipitate the steady state. The second difference is that the data perspectives at the front and back are different, the back end tends to be a general perspective, and the front end tends to face the current view of the scene.
例如,服务器端保存了全国各所大学的学生信息,其暴露的REST服务定义的结构可能就是偏本质的List<Student>,Student对象中包含了学号、姓名、性别、专业等基本信息,另一个REST服务提供学分成绩查询(提供学号作为参数),会返回GPA对象(包含各科成绩)。而前端的某个页面可能是一个班级的学分成绩展示场景,它更偏爱的数据结构是List<StudentGPA>,StudentGPA={学号:xxx,姓名:xxx,高等数学:86,英语:92,离散数学:77,Linux程序设计:99…},而且这个List最好还是按总学分降序排列的。For example, the server side saves student information of universities across the country. The structure of the exposed REST service definition may be the partial List<Student>. The Student object contains basic information such as student number, name, gender, and professional. The REST service provides a credit score query (providing a student number as a parameter) and returns a GPA object (including individual grades). The front page of a certain class may be a class credit score presentation scene. Its preferred data structure is List<StudentGPA>, StudentGPA={student number: xxx, name: xxx, advanced mathematics: 86, English: 92, discrete Math: 77, Linux programming: 99...}, and this list is best sorted in descending order of total credits.
由于上述的这些需求差异,就需要将REST服务返回的原始结果交给数据模型转(Data Model Transform)换进行结构转换,变成前端偏爱的结构。转换好的结果就可以交给数据模型缓存(Data Model Cache)进行前端缓存了(可以做单例缓存,也可以实现多版本,视情况而定)。Due to the above-mentioned differences in requirements, it is necessary to transfer the original result returned by the REST service to the Data Model Transform for structural transformation, and become a structure with a front-end preference. The converted results can be passed to the Data Model Cache for front-end caching (you can do single-case caching, or you can implement multiple versions, depending on the situation).
渲染驱动(Render Driver)按一定的策略(可能是定时、人工触发、查询完成触发等等)获取数据模型缓存中的数据,执行渲染模型转换。数据源中的多个关联关系(Adaptor)是为渲染模型转换提供结构转换逻辑。在此过程中,需要根据关联关系将该数据转换为可视化样式匹配的渲染模型,更具 体地,先根据关联关系将数据转换为可视化样式匹配的数据结构,再调取数据结构并根据与该数据结构关联的可视化样式,将数据结构转换为可视化样式匹配的渲染模型。不同可视化样式要求的渲染模型不同(比如时间曲线样式要求提供Map<Time,Value>,而表格样式要求提供一个二维数组),所以在一个数据源中每个可视化样式会对应一个专有的关联关系,此关联关系负责将原始JSON转换为该可视化样式的渲染模型;同时,可视化样式会为渲染模型转换提供渲染工具的结构转换逻辑(比如将可视化样式自身的渲染模型转换为EXT饼状图所要求的参数格式)。The Render Driver acquires the data in the data model cache according to certain strategies (which may be timing, manual triggering, query completion triggering, etc.), and performs rendering model conversion. Multiple associations (Adaptor) in the data source provide structural transformation logic for rendering model transformations. In this process, you need to convert the data into a rendering model that matches the visual style according to the association relationship. Body, first transforms the data into a data structure that matches the visual style according to the association relationship, and then retrieves the data structure and converts the data structure into a rendering model matching the visual style according to the visual style associated with the data structure. Different visualization styles require different rendering models (such as timeline styles that require Map<Time, Value>, and table styles require a two-dimensional array), so each visual style corresponds to a proprietary association in a data source. Relationship, this association is responsible for transforming the original JSON into the rendering model of the visual style; at the same time, the visual style provides the structural transformation logic of the rendering tool for the rendering model transformation (such as converting the rendering model of the visual style itself into the EXT pie chart) Required parameter format).
还是以学生信息为例,List<StudentGPA>结构虽然适用于“班级学分绩展示”这个前端场景,但是它不一定适用于开发者当前使用的报表渲染工具,EXT有它要求的结构、GoogleLineChart要求的又是另一种结构……多出这样一个转换步骤最大的目的在于不被工具绑架数据结构。一旦数据结构被某个工具绑架,会带来诸多问题,例如换工具的时候非常麻烦、结构偏离本质导致可维护性变差、Dashboard难以支持多种展现形式(比如用户想要看心情来选择展示为表格或者饼图)。Still taking the student information as an example, the List<StudentGPA> structure is applicable to the front-end scenario of the “class credit performance display”, but it does not necessarily apply to the report rendering tool currently used by developers. EXT has the structure required by it, and the requirements of GoogleLineChart. Another structure is that the biggest purpose of such a conversion step is not to be kidnapped by the tool. Once the data structure is kidnapped by a tool, it will bring many problems, such as very troublesome when changing tools, structural deviation, resulting in poor maintainability, Dashboard is difficult to support multiple presentations (such as users want to see the mood to choose to display For a table or a pie chart).
转换为渲染模型(Render Model)以后,就正式的托管给各类渲染工具(Render Tool,例如EXT)了。在托管给渲染工具之前,需要根据渲染模型,调用渲染工具进行渲染。具体地,先根据可视化样式提供的结构转换逻辑,将需渲染模型转换为对应的渲染工具所要求参数格式,并根据该参数格式,调用对应的渲染工具进行渲染,如此,可适应更多的渲染工具。而在根据参数格式,调用对应的渲染工具进行渲染时,会同时根据参数格式以及可视化样式提供的参数逻辑(比如曲线样式的可视化样式就会使用EXT中的LineChart、表格样式的可视化样式则使用EXT中的Grid,并提供表头、标题等信息),调用相应的渲染工具进行渲染。After being converted to a Render Model, it is officially hosted to various Render tools (such as EXT). Before hosting the rendering tool, you need to call the rendering tool to render according to the rendering model. Specifically, according to the structural transformation logic provided by the visual style, the required rendering model is converted into a parameter format required by the corresponding rendering tool, and the corresponding rendering tool is called according to the parameter format for rendering, so that more rendering can be adapted. tool. According to the parameter format, when the corresponding rendering tool is called for rendering, the parameter logic provided by the parameter format and the visual style is also used (for example, the visual style of the curve style will use the LineChart in EXT, and the visual style of the table style will use EXT. In the Grid, and provide the header, title and other information), call the corresponding rendering tool for rendering.
渲染工具按照各自实现方式的不同,将渲染模型提供的信息注册到浏览器引擎(比如向document中插入一个<table>),完成渲染;与此同时,提供给渲染工具的还可能包含事件监听逻辑,此时需要将该事件监听逻辑一并 注册到浏览器引擎。The rendering tool registers the information provided by the rendering model to the browser engine (such as inserting a <table> into the document) to complete the rendering according to its implementation. At the same time, the rendering tool may also include event monitoring logic. In this case, you need to listen to the event monitoring logic. Register to the browser engine.
如果DOM元素捕获到交互事件,浏览器引擎则会回调事件监听handler,后者完成事件处理逻辑,这里的逻辑就可能多种多样了,可能是一个简单的alert,也可能是对数据模型缓存中结构的修改,也可能是人工触发一次新的查询流程或渲染流程。If the DOM element captures an interactive event, the browser engine will call back the event listener handler, which completes the event processing logic. The logic here can be varied, either a simple alert or a data model cache. The modification of the structure may also be a manual triggering of a new query flow or rendering process.
如图3所示,本发明的一实施方式中,上述的定制化接口为IOC接口。IOC(Inversion of Control,控制反转)是一个重要的面向对象编程的法则来削减计算机程序的耦合问题,也是轻量级的Spring框架的核心。通过将控制权交给框架,由框架做重复的流程,而用户只需关注自身的业务(或功能)。在IOC架构实现的过程中,底层的可视化渲染框架负责一套流程的封装和实现,但忽略所有定制化逻辑的实现细节,而是向外暴露IOC接口,等待上层实现;中间的Plugin层负责封装常用的定制化逻辑(包括常用的数据源及常见的可视化样式);最顶层则是最终产品的逻辑,此层的编码要尽量简化,在可视化渲染框架、Plugin两层封装之后,产品层应该只需要提供不同Plugin所必须的参数即可。As shown in FIG. 3, in an embodiment of the present invention, the customized interface is an IOC interface. IOC (Inversion of Control) is an important object-oriented programming rule to reduce the coupling problem of computer programs and is the core of the lightweight Spring framework. By giving control to the framework, the framework does the repetitive process, and the user only needs to focus on their business (or functionality). In the process of IOC architecture implementation, the underlying visual rendering framework is responsible for the encapsulation and implementation of a set of processes, but ignores the implementation details of all custom logic, but exposes the IOC interface to the upper layer; the middle Plugin layer is responsible for the encapsulation. Commonly used custom logic (including common data sources and common visual styles); the top layer is the logic of the final product, the coding of this layer should be as simple as possible. After the visual rendering framework and Plugin two-layer packaging, the product layer should only You need to provide the parameters necessary for different Plugins.
在进行IOC的架构设计时,数据源、可视化样式,以及可视化渲染框架分别独立封装。数据源被配置为插件形式,每个插件中包括数据的服务查询地址及参数信息,每个数据源就是一个数据源插件,例如,封装的数据源包括分钟级统计数据、秒级数据统计、ERROR日志分词统计、单笔业务状态机、海量槽位全表遍历查询等多种多样格式不一的数据源;类似地,可视化样式也被配置为插件形式,每个插件中包括一种可视化样式,每个可视化样式就是一个可视化样式插件,例如曲线图、饼图、表格、柱状图等实现逻辑,在XFLUSH中还包含了链路图、网状图、灯图等更多复杂样式。When designing the architecture of the IOC, the data source, visual style, and visual rendering framework are each packaged separately. The data source is configured as a plug-in. Each plug-in includes the service query address and parameter information of the data. Each data source is a data source plug-in. For example, the encapsulated data source includes minute-level statistics, second-level data statistics, and ERROR. Log segmentation statistics, single business state machine, massive slot full table traversal query and many other data sources of different formats; similarly, the visual style is also configured as a plug-in form, each plug-in includes a visual style, Each visual style is a visual style plug-in, such as graphs, pie charts, tables, and histograms. The XFLUSH also includes more complex styles such as link graphs, mesh graphs, and light graphs.
如图4所示,为用户编写的一个实际例子,他期望展示的是一个表格,表格中展示“交易摘要”相关的数据。他所需的编码内容包括:As shown in Figure 4, a practical example written for the user, he expects to present a table showing the "transaction summary" related data. The coding content he needs includes:
第一个框:为数据源提供必需的参数,比如schema=DataSource1是在选择一个数据源插件(DataSource1选择的是分钟级统计数据源),table则表 示选择哪张表里的统计结果(可以将XFLUSH中的几千个分钟级统计规则的结果看做几千张表,而此例中则使用了交易相关的数据表),最后这个数据源对象还为Style4提供了专属参数:valueColIndex=3,表示此表返回的结果中代表数值的data会放在第3列提供给Style4。The first box: Provide the necessary parameters for the data source, such as schema=DataSource1 is to select a data source plug-in (DataSource1 selects the minute-level statistical data source), table is the table Show which table of statistics is selected (you can think of the results of thousands of minute-level statistical rules in XFLUSH as thousands of tables, and in this case, transaction-related data tables), and finally this data source object Also provides a special parameter for Style4: valueColIndex=3, indicating that the data representing the value in the result returned by this table will be provided in the third column to Style4.
第二个框:为可视化样式提供必需的参数,比如schema是在选择插件(Style4是高级表格展示插件),heads是在定义表头(表头第3列是“数量”也和valueColIndex对应),defaultSortColIndex=3表示默认按第3列进行排序,defaultSortCount表示默认排序展示前多少个。The second box: Provide the necessary parameters for the visual style, such as the schema is to select the plugin (Style4 is the advanced table display plugin), the heads are in the definition of the header (the third column of the header is "quantity" also corresponds to valueColIndex), defaultSortColIndex=3 means sorting by column 3 by default, defaultSortCount means how many times before the default sorting is displayed.
第三个框:为报表提供一些基本信息,比如位置、大小、刷新速度、标题等。The third box: Provide some basic information for the report, such as location, size, refresh rate, title, and more.
只需要这些信息,就能展示出用户所需的报表了,在目前日趋丰富的插件库支持下,能够支持的数据源和样式组合已经能够满足所有日常所需了,用户也只需要简单的编码,就能轻松实现各种不同效果。Only with this information, you can display the reports that users need. With the support of the increasingly rich plug-in library, the data sources and style combinations that can be supported can meet all the daily needs, and users only need simple coding. , you can easily achieve a variety of different effects.
如图5和图6所示,在多数据源的场景下作用更加明显:As shown in Figure 5 and Figure 6, the role is more obvious in the scenario of multiple data sources:
在本发明的一实施方式中,期望将多个数据源的数据展示在同一张曲线报表中,用户只需要定义多个数据源即可(图5定义了ds1和ds2两个数据源配置,图6为展现效果)。而且多个数据源可以是相异的插件(本例中都是DataSource1插件,实际使用时可以组合使用任意的数据源插件,只要它们都实现了支持曲线图可视化样式的关联关系即可,比如在双十一大促时,ds1获取交易数据,ds2获取微博舆情数据(每分钟出现的与双十一相关的微博数量),继而展示到同一张曲线图中)。而且异步查询环节也利用了Javascript的Deferred技术,实现了同步的编程模型,简化了框架设计,解决了多个异步查询返回结果的时间差问题,避免轮询等劣质解决方案。In an embodiment of the present invention, it is desirable to display data of multiple data sources in the same curve report, and the user only needs to define multiple data sources (FIG. 5 defines two data source configurations of ds1 and ds2, FIG. 6 for the effect). Moreover, multiple data sources can be different plug-ins (in this case, the DataSource1 plug-in can be used in combination with any data source plug-in, as long as they all implement the association relationship that supports the visual style of the graph, for example, When the double eleventh promotion, ds1 obtains the transaction data, and ds2 obtains the microblog lyric data (the number of microblogs associated with double eleven appearing every minute), and then displays it in the same graph). Moreover, the asynchronous query link also utilizes Javascript's Deferred technology to implement a synchronous programming model, which simplifies the framework design, solves the time difference problem of multiple asynchronous query returns, and avoids inferior solutions such as polling.
不仅如此,框架提供的事件监听机制、交互控制、弹出动态报表等功能都是以最简化的IOC接口暴露给用户,将用户编码量降至最低,只提供绝对需要的定制化参数而已,不需要考虑底层实现细节。Not only that, the event monitoring mechanism, interactive control, pop-up dynamic report and other functions provided by the framework are exposed to the user with the most simplified IOC interface, which minimizes the user code and only provides the customized parameters that are absolutely needed. Consider the underlying implementation details.
如图7所示,在传统的前端报表技术中,有些只能做到DOM元素级别 的渲染和控制。比如一个曲线图,展现了一天1440分钟的数据走势,其中就会有一千多个数据(1440个点)需要渲染,在HTML5等技术出现之前,前端报表技术往往非常被动的采用一些复杂解决方案,甚至会产生与数据点数量相当的DOM元素来绘制出曲线。As shown in Figure 7, in the traditional front-end reporting technology, some can only achieve the DOM element level. Rendering and control. For example, a graph shows the data trend of 1440 minutes a day, in which there will be more than one thousand data (1440 points) to be rendered. Before the emergence of HTML5 and other technologies, front-end reporting technology is often very passive to adopt some complex solutions. It even produces DOM elements that are equivalent to the number of data points to draw the curve.
如图8所示,这些<circle>元素最终绘制出了图中的曲线。这样的做法不论好坏,在性能上还是略逊一筹的,起码在交互事件上就会非常被动。比如想要监听曲线中某一个点的鼠标单击事件,那就是1440个DOM元素都要被妥善的注册、管理它们的生命周期、处理它们的交互事件等。DOM元素其实还是粒度比较粗的运行时对象(内部包含很多的元数据、运行时数据),会给浏览器引擎带来较大的负担。而且作为渲染为主的工具,往往很难加入细粒度的交互功能(比如想要监听图8中LineChart上某一个“点”的鼠标单击事件,工具未必能够开放出简洁的API),这类工具暴露给用户的交互API粒度一般是较粗的(比如对整个图表进行拖拽、点击)。As shown in Figure 8, these <circle> elements ultimately plot the curves in the graph. This kind of practice, whether good or bad, is still slightly inferior in performance, at least in the interaction event will be very passive. For example, if you want to listen to a mouse click event at a certain point in the curve, then 1440 DOM elements should be properly registered, manage their life cycle, handle their interaction events, and so on. The DOM element is actually a relatively coarse-grained runtime object (which contains a lot of metadata and runtime data), which will put a big burden on the browser engine. Moreover, as a rendering-oriented tool, it is often difficult to add fine-grained interactive functions (such as a mouse click event that wants to listen to a "point" on the LineChart in Figure 8, the tool may not be able to open a simple API). The granularity of the interactive API exposed by the tool to the user is generally coarser (such as dragging and clicking on the entire chart).
而本申请的一实施方式中,为了实现细粒度的交互渲染控制(比如一段1440个“点”的曲线,希望鼠标点击曲线中的某一段区域能弹出另一张详情报表、比如想控制曲线不同区域段的颜色粗细、比如希望将曲线图当做node绘制一个网状交织的链路关系图等等),采用了HTML5的Canvas技术实现了一套简洁易用的渲染工具,也就是类似EXT、GoogleLineChart的制图工具javascript库。此工具库和常规的实现方案最大的区别就是充分采用了游戏引擎中“时间换空间”的设计思路。In an implementation manner of the present application, in order to implement fine-grained interactive rendering control (such as a curve of 1440 "points", it is desirable that a certain area in the mouse click curve can pop up another detailed report, for example, to control the curve differently. The color of the area segment, such as the desire to use the graph as a node to draw a network of interlaced link diagrams, etc., using HTML5 Canvas technology to achieve a set of simple and easy to use rendering tools, which is similar to EXT, GoogleLineChart The graphics tool javascript library. The biggest difference between this tool library and the conventional implementation is the full use of the "time-for-space" design in the game engine.
在游戏引擎客户端渲染的场景中,可以将2D、3D的地图或模型都全量制造并存储为数据文件,运行时在根据场景切换来动态加载数据文件,将地图、模型数据载入内存,最终完成渲染。举例说明,在2D游戏中,一张野外草地的地图如果是一张图片,那可能会达到1MB(假如有1024*1024个像素,每个像素的RGB值占一个byte),在载入该地图后其实就是将整张图片绘制到界面上。而实际的设计往往简单很多:制造4张小图片ABCD,体现略有差异的植被特征,这4张小图片的排列组合就制造出了不同的地图场景 (比如A代表纯草地,B代表有小石头的草地,C代表有杂草的草地,D代表光秃的黄土,那2D地图文件可以仅仅是一个二维数组,其中的元素就是ABCD四选一,不同的排列组合就能形成不同的地图样貌),这种做法能够极大的降低存储空间损耗、内存占用量、元素管理和交互控制的负担,唯一增加的就是渲染时的逻辑复杂度,需要一定的计算量(不像绘制一张大图片那么简单)。In the scene rendered by the game engine client, 2D, 3D maps or models can be fully manufactured and stored as data files. The runtime dynamically loads data files according to scene switching, loads maps and model data into memory, and finally Finish rendering. For example, in a 2D game, if a map of a wild grass is a picture, it may reach 1MB (if there are 1024*1024 pixels, the RGB value of each pixel occupies one byte), the map is loaded. After that, the whole picture is drawn to the interface. The actual design is often much simpler: making 4 small pictures ABCD, reflecting slightly different vegetation features, the arrangement of these 4 small pictures creates different map scenes. (For example, A stands for pure grass, B stands for grass with small stones, C stands for grass with weeds, and D stands for bare loess. The 2D map file can be just a two-dimensional array. The elements are ABCD four. Different arrangement and combination can form different map appearances. This method can greatly reduce the burden of storage space loss, memory usage, element management and interaction control. The only increase is the logic complexity during rendering. It takes a certain amount of calculation (not as simple as drawing a large picture).
对应到本申请的数据可视化实现方法一实施方式中:In one embodiment of the data visualization implementation method corresponding to the present application:
首先,配置获取页面坐标函数,以获取触发事件相应的页面元素的页面坐标;First, the configuration page coordinate function is configured to obtain the page coordinates of the page element corresponding to the trigger event;
还是以1440个“点”的曲线举例,原始的数据是Map<Time,Value>,传统的做法就是产生1440个DOM元素,注册给浏览器引擎,后者完成渲染和元素生命周期管理、事件控制。而本发明的做法是:提供一个获取页面坐标函数(getPositionByEntry);对于Map里的每个entry(也就是每个点),作为参数调用页面坐标函数函数(Time可推算出x坐标,Value可推算出y坐标);使用HTML5的Canvas完成“点”的绘制(绘制时可根据各种个性化需求选择颜色、大小等效果)。Or the example of the 1440 "point" curve, the original data is Map<Time, Value>, the traditional approach is to generate 1440 DOM elements, registered to the browser engine, the latter complete rendering and element lifecycle management, event control . The method of the present invention is to provide a get page coordinate function (getPositionByEntry); for each entry in the map (that is, each point), call the page coordinate function function as a parameter (Time can calculate the x coordinate, Value can be calculated Out y coordinates); use the HTML5 Canvas to complete the "dot" drawing (draw color, size and other effects according to various personalization requirements).
其次,配置获取数据函数,以在获取触发事件相应的页面元素的页面坐标后,调取与所述页面坐标相应的数据;其中,每一报表类型只对应一个页面元素。Secondly, the configuration obtaining data function is configured to retrieve data corresponding to the page coordinates after acquiring the page coordinates of the page element corresponding to the trigger event; wherein each report type corresponds to only one page element.
当鼠标点击事件发生时,将鼠标坐标作为参数调用获取数据函数(getEntryByPosition,x坐标可推算出最相近的Entry,假如x轴总长为N像素,一共M个点,当前x坐标为x,那就是第Math.round(x/(N/M))个entry);将此entry的数据取出做后续事件监听处理。When the mouse click event occurs, the mouse coordinate is used as a parameter to call the get data function (getEntryByPosition, the x coordinate can be used to derive the closest Entry, if the total length of the x-axis is N pixels, a total of M points, the current x coordinate is x, that is Math.round (x/(N/M)) entries); take out the data of this entry for subsequent event monitoring.
如此,仅仅是在制图和交互时多了一点计算量,而1440个DOM元素所占用的空间和损耗的维护成本都可以避免了。除了上述实施例中提到的曲线图,表格、饼图等样式下的处理思路都是类似,在此不再赘述。In this way, only a little more computational effort is made in the mapping and interaction, and the maintenance cost of the space and loss occupied by the 1440 DOM elements can be avoided. In addition to the graphs mentioned in the above embodiments, the processing ideas in the form of a table, a pie chart, and the like are similar, and are not described herein again.
如图9所示,在本发明一实施方式中,数据可视化的实现装置100包括 配置模块10、导入模块20、以及可视化渲染框架30。As shown in FIG. 9, in an embodiment of the present invention, the data visualization implementing apparatus 100 includes The configuration module 10, the import module 20, and the visual rendering framework 30 are provided.
配置模块10用于配置数据源、可视化样式,以及数据源和可视化样式之间的关联关系;The configuration module 10 is configured to configure a data source, a visualization style, and an association relationship between the data source and the visualization style;
在数据分析领域,用户往往会面对多种多样的数据源。比如在数据仓库产出BI报表时,可能既要获取DB中ETL清洗出来的数据(比如某个商品的交易次数),又要获取日志分析的数据(比如某个商品被用户浏览的UV),还要加上消息事件的数据(比如某个商品的炒信行为数量),甚至要去捞取微博上的舆情数据。In the field of data analysis, users often face a variety of data sources. For example, when the data warehouse produces BI reports, it may be necessary to obtain the ETL cleaned data in the DB (such as the number of transactions of a certain commodity), and also obtain the log analysis data (such as the UV of a certain item viewed by the user). Also add the data of the news event (such as the number of speculative behavior of a commodity), and even go to the lyric data on Weibo.
用户在想要展现某个报表时,必然清楚应该展示为什么样式(是表格、曲线、还是饼图等),而这些不同的样式也即定义为可视化样式。When users want to present a report, they must be clear about why they should be displayed (either tables, curves, pies, etc.), and these different styles are defined as visual styles.
数据源和可视化样式为多对多的关联关系,每一个数据源对应至少一个可视化样式,每一个可视化样式对应至少一个数据源。例如,分钟级统计的数据既可以展示为曲线图样式也可以展示为表格样式;而表格样式既可以展示分钟级统计数据又可以展示多笔业务状态机结果。此步骤中,相应地配置了数据源和可视化样式之间的关联关系,以在每个数据源中,为它支持的可视化样式各提供一个之间的关联关系,以便将本数据源查询的原始JSON转换为不同可视化样式偏爱的数据结构,而数据源和可视化样式之间的关联关系就像关系型数据库里的中间表,维持了数据源和可视化样式的多对多关系。The data source and the visualization style are a many-to-many association relationship, and each data source corresponds to at least one visualization style, and each visualization style corresponds to at least one data source. For example, data for minute-level statistics can be displayed either as a graph style or as a tabular style; while a tabular style can display both minute-level statistics and multiple business state machine results. In this step, the relationship between the data source and the visual style is configured accordingly to provide an association relationship between the supported visual styles in each data source, so as to original the query of the data source. JSON is transformed into a data structure that is preferred by different visual styles, and the relationship between the data source and the visual style is like an intermediate table in a relational database, maintaining a many-to-many relationship between the data source and the visual style.
导入模块20用于当收到触发请求时,将数据源、可视化样式、关联关系的配置信息通过定制化接口导入可视化渲染框架30,可视化渲染框架30根据配置信息进行渲染,并输出至浏览器引擎。The import module 20 is configured to import the configuration information of the data source, the visual style, and the association relationship into the visual rendering framework 30 through the customized interface when the trigger request is received, and the visual rendering framework 30 renders according to the configuration information, and outputs the image to the browser engine. .
如图2所示,触发请求可以是例如定时触发、用户点击等,可视化渲染框架内封装有一套完整的实现流程(这部分将在下文中做详细的描述),并向外暴露定制化接口,等待上述的数据源、可视化样式、关联关系的配置信息导入后实现。而数据源、可视化样式、以及关联关系三者对应到该可视化渲染框架中各部分的关系即如图所示,图中所示的圆形框中为需要通过数据源、可视化样式、以及关联关系进行配置的逻辑部分。 As shown in FIG. 2, the trigger request may be, for example, a timing trigger, a user click, etc., and a complete implementation flow is encapsulated in the visual rendering framework (this part will be described in detail below), and the customized interface is exposed to the outside. The above-mentioned data source, visual style, and configuration information of the association relationship are imported. The relationship between the data source, the visual style, and the association relationship corresponding to each part of the visual rendering framework is as shown in the figure. The circular box shown in the figure is the data source, the visual style, and the association relationship. The logical part of the configuration.
在本发明一实施方式中,可视化渲染框架30内包括:In an embodiment of the present invention, the visual rendering framework 30 includes:
查询驱动(Query Driver)按照一定策略(可能是定时、也可以是人工触发、也可能是页面刚打开时的初始化触发),触发异步查询(Async Query)。The Query Driver triggers an asynchronous query (Async Query) according to a certain strategy (which may be timing, artificial triggering, or initialization trigger when the page is just opened).
异步查询向提供数据查询服务的REST服务发起AJAX查询,获取数据(比如JSON结构的数据)。具体地,可视化渲染框架30中的异步查询用于根据数据源中配置的服务查询地址和参数信息,获取相应的数据,这里的服务查询地址指的是数据源为异步查询提供的是REST服务的查询地址,参数信息包括查询数据的周期、粒度、数据ID的至少其中之一。The asynchronous query initiates an AJAX query to the REST service that provides the data query service to obtain data (such as JSON structure data). Specifically, the asynchronous query in the visual rendering framework 30 is configured to obtain corresponding data according to the service query address and parameter information configured in the data source, where the service query address refers to the REST service provided by the data source for the asynchronous query. The address is queried, and the parameter information includes at least one of a period, a granularity, and a data ID of the query data.
REST服务返回的只是服务端定义的数据结构,不一定适合前端。造成这种现象的一个重要原因就是前后端的角色差异。差异之一,服务端偏稳,前端追求灵活,面对频繁变更的需求我们更倾向于灵活的修改前端逻辑,而让后端服务逐渐沉淀稳态。差异之二,是前后端的数据视角不同,后端更倾向于通用的视角,而前端则倾向于面向当前展示场景的视角。The REST service returns only the data structure defined by the server, and is not necessarily suitable for the front end. An important reason for this phenomenon is the difference in roles between the front and the rear. One of the differences is that the server is stable and the front end is flexible. In the face of frequent changes, we are more inclined to flexibly modify the front-end logic, and let the back-end services gradually precipitate the steady state. The second difference is that the data perspectives at the front and back are different, the back end tends to be a general perspective, and the front end tends to face the current view of the scene.
例如,服务器端保存了全国各所大学的学生信息,其暴露的REST服务定义的结构可能就是偏本质的List<Student>,Student对象中包含了学号、姓名、性别、专业等基本信息,另一个REST服务提供学分成绩查询(提供学号作为参数),会返回GPA对象(包含各科成绩)。而前端的某个页面可能是一个班级的学分成绩展示场景,它更偏爱的数据结构是List<StudentGPA>,StudentGPA={学号:xxx,姓名:xxx,高等数学:86,英语:92,离散数学:77,Linux程序设计:99…},而且这个List最好还是按总学分降序排列的。For example, the server side saves student information of universities across the country. The structure of the exposed REST service definition may be the partial List<Student>. The Student object contains basic information such as student number, name, gender, and professional. The REST service provides a credit score query (providing a student number as a parameter) and returns a GPA object (including individual grades). The front page of a certain class may be a class credit score presentation scene. Its preferred data structure is List<StudentGPA>, StudentGPA={student number: xxx, name: xxx, advanced mathematics: 86, English: 92, discrete Math: 77, Linux programming: 99...}, and this list is best sorted in descending order of total credits.
由于上述的这些需求差异,就需要将REST服务返回的原始结果交给数据模型转(Data Model Transform)换进行结构转换,变成前端偏爱的结构。转换好的结果就可以交给数据模型缓存(Data Model Cache)进行前端缓存了(可以做单例缓存,也可以实现多版本,视情况而定)。Due to the above-mentioned differences in requirements, it is necessary to transfer the original result returned by the REST service to the Data Model Transform for structural transformation, and become a structure with a front-end preference. The converted results can be passed to the Data Model Cache for front-end caching (you can do single-case caching, or you can implement multiple versions, depending on the situation).
渲染驱动(Render Driver)按一定的策略(可能是定时、人工触发、查询完成触发等等)获取数据模型缓存中的数据,执行渲染模型转换。数据源中的多个关联关系(Adaptor)是为渲染模型转换提供结构转换逻辑。在此过 程中,可视化渲染框架30需要根据关联关系将该数据转换为可视化样式匹配的渲染模型,更具体地,先根据关联关系将数据转换为可视化样式匹配的数据结构,再调取数据结构并根据与该数据结构关联的可视化样式,将数据结构转换为可视化样式匹配的渲染模型。不同可视化样式要求的渲染模型不同(比如时间曲线样式要求提供Map<Time,Value>,而表格样式要求提供一个二维数组),所以在一个数据源中每个可视化样式会对应一个专有的关联关系,此关联关系负责将原始JSON转换为该可视化样式的渲染模型;同时,可视化样式会为渲染模型转换提供渲染工具的结构转换逻辑(比如将可视化样式自身的渲染模型转换为EXT饼状图所要求的参数格式)。The Render Driver acquires the data in the data model cache according to certain strategies (which may be timing, manual triggering, query completion triggering, etc.), and performs rendering model conversion. Multiple associations (Adaptor) in the data source provide structural transformation logic for rendering model transformations. Here over In the process, the visual rendering framework 30 needs to convert the data into a rendering model matching the visual style according to the association relationship. More specifically, the data is first converted into a data structure matching the visual style according to the association relationship, and then the data structure is retrieved and according to The visual style associated with the data structure transforms the data structure into a rendering model that matches the visual style. Different visualization styles require different rendering models (such as timeline styles that require Map<Time, Value>, and table styles require a two-dimensional array), so each visual style corresponds to a proprietary association in a data source. Relationship, this association is responsible for transforming the original JSON into the rendering model of the visual style; at the same time, the visual style provides the structural transformation logic of the rendering tool for the rendering model transformation (such as converting the rendering model of the visual style itself into the EXT pie chart) Required parameter format).
还是以学生信息为例,List<StudentGPA>结构虽然适用于“班级学分绩展示”这个前端场景,但是它不一定适用于开发者当前使用的报表渲染工具,EXT有它要求的结构、GoogleLineChart要求的又是另一种结构……多出这样一个转换步骤最大的目的在于不被工具绑架数据结构。一旦数据结构被某个工具绑架,会带来诸多问题,例如换工具的时候非常麻烦、结构偏离本质导致可维护性变差、Dashboard难以支持多种展现形式(比如用户想要看心情来选择展示为表格或者饼图)。Still taking the student information as an example, the List<StudentGPA> structure is applicable to the front-end scenario of the “class credit performance display”, but it does not necessarily apply to the report rendering tool currently used by developers. EXT has the structure required by it, and the requirements of GoogleLineChart. Another structure is that the biggest purpose of such a conversion step is not to be kidnapped by the tool. Once the data structure is kidnapped by a tool, it will bring many problems, such as very troublesome when changing tools, structural deviation, resulting in poor maintainability, Dashboard is difficult to support multiple presentations (such as users want to see the mood to choose to display For a table or a pie chart).
转换为渲染模型(Render Model)以后,就正式的托管给各类渲染工具(Render Tool,例如EXT)了。在托管给渲染工具之前,可视化渲染框架30还用于根据渲染模型,调用渲染工具进行渲染。具体地,先根据可视化样式提供的结构转换逻辑,将需渲染模型转换为对应的渲染工具所要求参数格式,并根据该参数格式,调用对应的渲染工具进行渲染,如此,可适应更多的渲染工具。而在根据参数格式,调用对应的渲染工具进行渲染时,会同时根据参数格式以及可视化样式提供的参数逻辑(比如曲线样式的可视化样式就会使用EXT中的LineChart、表格样式的可视化样式则使用EXT中的Grid,并提供表头、标题等信息),调用相应的渲染工具进行渲染。After being converted to a Render Model, it is officially hosted to various Render tools (such as EXT). Before being hosted to the rendering tool, the visual rendering framework 30 is also used to invoke the rendering tool for rendering based on the rendering model. Specifically, according to the structural transformation logic provided by the visual style, the required rendering model is converted into a parameter format required by the corresponding rendering tool, and the corresponding rendering tool is called according to the parameter format for rendering, so that more rendering can be adapted. tool. According to the parameter format, when the corresponding rendering tool is called for rendering, the parameter logic provided by the parameter format and the visual style is also used (for example, the visual style of the curve style will use the LineChart in EXT, and the visual style of the table style will use EXT. In the Grid, and provide the header, title and other information), call the corresponding rendering tool for rendering.
渲染工具按照各自实现方式的不同,将渲染模型提供的信息注册到浏览器引擎(比如向document中插入一个<table>),完成渲染;与此同时,提 供给渲染工具的还可能包含事件监听逻辑,可视化渲染框架30会将该事件监听逻辑一并注册到浏览器引擎。The rendering tool registers the information provided by the rendering model to the browser engine (such as inserting a <table> into the document) according to the different implementations, and completes the rendering; at the same time, The rendering tool may also include event monitoring logic that the visual rendering framework 30 will register with the browser engine.
如果DOM元素捕获到交互事件,浏览器引擎则会回调事件监听handler,后者完成事件处理逻辑,这里的逻辑就可能多种多样了,可能是一个简单的alert,也可能是对数据模型缓存中结构的修改,也可能是人工触发一次新的查询流程或渲染流程。If the DOM element captures an interactive event, the browser engine will call back the event listener handler, which completes the event processing logic. The logic here can be varied, either a simple alert or a data model cache. The modification of the structure may also be a manual triggering of a new query flow or rendering process.
如图3所示,本发明的一实施方式中,该定制化接口为IOC接口。IOC(Inversion of Control,控制反转)是一个重要的面向对象编程的法则来削减计算机程序的耦合问题,也是轻量级的Spring框架的核心。通过将控制权交给框架,由框架做重复的流程,而用户只需关注自身的业务(或功能)。所以,本发明提供的数据可视化实现方法实际上是对原有的前端可视化实现流程中,查询流程和渲染流程两部分进行IOC架构实现的过程。底层的可视化渲染框架负责一套流程的封装和实现,但忽略所有定制化逻辑的实现细节,而是向外暴露IOC接口,等待上层实现;中间的Plugin层负责封装常用的定制化逻辑(包括常用的数据源及常见的可视化样式);最顶层则是最终产品的逻辑,此层的编码要尽量简化,在可视化渲染框架、Plugin两层封装之后,产品层应该只需要提供不同Plugin所必须的参数即可。As shown in FIG. 3, in an embodiment of the present invention, the customized interface is an IOC interface. IOC (Inversion of Control) is an important object-oriented programming rule to reduce the coupling problem of computer programs and is the core of the lightweight Spring framework. By giving control to the framework, the framework does the repetitive process, and the user only needs to focus on their business (or functionality). Therefore, the data visualization implementation method provided by the present invention is actually a process of implementing the IOC architecture in the original front-end visualization implementation process, the query process and the rendering process. The underlying visual rendering framework is responsible for the encapsulation and implementation of a set of processes, but ignores the implementation details of all custom logic, but exposes the IOC interface outwards, waiting for the upper layer implementation; the middle Plugin layer is responsible for encapsulating commonly used custom logic (including common The data source and the common visual style); the top layer is the logic of the final product. The coding of this layer should be as simple as possible. After the visual rendering framework and the Plugin two-layer package, the product layer should only need to provide the parameters necessary for different Plugins. Just fine.
在进行IOC的架构设计时,数据源、可视化样式,以及可视化渲染框架分别独立封装。数据源被配置为插件形式,每个插件中包括数据的服务查询地址及参数信息,每个数据源就是一个数据源插件,例如,封装的数据源包括分钟级统计数据、秒级数据统计、ERROR日志分词统计、单笔业务状态机、海量槽位全表遍历查询等多种多样格式不一的数据源;类似地,可视化样式也被配置为插件形式,每个插件中包括一种可视化样式,每个可视化样式就是一个可视化样式插件,例如曲线图、饼图、表格、柱状图等实现逻辑,还可包含了链路图、网状图、灯图等更多复杂样式。When designing the architecture of the IOC, the data source, visual style, and visual rendering framework are each packaged separately. The data source is configured as a plug-in. Each plug-in includes the service query address and parameter information of the data. Each data source is a data source plug-in. For example, the encapsulated data source includes minute-level statistics, second-level data statistics, and ERROR. Log segmentation statistics, single business state machine, massive slot full table traversal query and many other data sources of different formats; similarly, the visual style is also configured as a plug-in form, each plug-in includes a visual style, Each visual style is a visual style plug-in, such as graphs, pie charts, tables, histograms and other implementation logic, and can also include more complex styles such as link diagrams, mesh diagrams, and light diagrams.
如图4所示,为用户编写的一个实际例子,他期望展示的是一个表格,表格中展示“交易摘要”相关的数据。他所需的编码内容包括: As shown in Figure 4, a practical example written for the user, he expects to present a table showing the "transaction summary" related data. The coding content he needs includes:
第一个框:为数据源提供必需的参数,比如schema=DataSource1是在选择一个数据源插件(DataSource1选择的是分钟级统计数据源),table则表示选择哪张表里的统计结果(可以将几千个分钟级统计规则的结果看做几千张表,而此例中则使用了交易相关的数据表),最后这个数据源对象还为Style4提供了专属参数:valueColIndex=3,表示此表返回的结果中代表数值的data会放在第3列提供给Style4。The first box: Provide the necessary parameters for the data source, such as schema=DataSource1 is to select a data source plug-in (DataSource1 selects the minute-level statistical data source), and table indicates which table to select the statistical results (can be The results of thousands of minute-level statistical rules are treated as thousands of tables, and in this case, transaction-related data tables are used. Finally, this data source object also provides a unique parameter for Style4: valueColIndex=3, indicating this table. The data representing the value in the returned result is placed in the third column and supplied to Style4.
第二个框:为可视化样式提供必需的参数,比如schema是在选择插件(Style4是高级表格展示插件),heads是在定义表头(表头第3列是“数量”也和valueColIndex对应),defaultSortColIndex=3表示默认按第3列进行排序,defaultSortCount表示默认排序展示前多少个。The second box: Provide the necessary parameters for the visual style, such as the schema is to select the plugin (Style4 is the advanced table display plugin), the heads are in the definition of the header (the third column of the header is "quantity" also corresponds to valueColIndex), defaultSortColIndex=3 means sorting by column 3 by default, defaultSortCount means how many times before the default sorting is displayed.
第三个框:为报表提供一些基本信息,比如位置、大小、刷新速度、标题等。The third box: Provide some basic information for the report, such as location, size, refresh rate, title, and more.
只需要这些信息,就能展示出用户所需的报表了,在目前日趋丰富的插件库支持下,能够支持的数据源和样式组合已经能够满足所有日常所需了,用户也只需要简单的编码,就能轻松实现各种不同效果。Only with this information, you can display the reports that users need. With the support of the increasingly rich plug-in library, the data sources and style combinations that can be supported can meet all the daily needs, and users only need simple coding. , you can easily achieve a variety of different effects.
如图5和图6所示,在多数据源的场景下的作用更加明显:As shown in Figure 5 and Figure 6, the role in the multi-data source scenario is more obvious:
在本发明的一实施方式中,期望将多个数据源的数据展示在同一张曲线报表中,用户只需要定义多个数据源即可(图5定义了ds1和ds2两个数据源配置,图6为展现效果)。而且多个数据源可以是相异的插件(本例中都是DataSource1插件,实际使用时可以组合使用任意的数据源插件,只要它们都实现了支持曲线图可视化样式的关联关系即可,比如在双十一大促时,ds1获取交易数据,ds2获取微博舆情数据(每分钟出现的与双十一相关的微博数量),继而展示到同一张曲线图中)。而且XSTING的异步查询环节也利用了Javascript的Deferred技术,实现了同步的编程模型,简化了框架设计,解决了多个异步查询返回结果的时间差问题,避免轮询等劣质解决方案。In an embodiment of the present invention, it is desirable to display data of multiple data sources in the same curve report, and the user only needs to define multiple data sources (FIG. 5 defines two data source configurations of ds1 and ds2, FIG. 6 for the effect). Moreover, multiple data sources can be different plug-ins (in this case, the DataSource1 plug-in can be used in combination with any data source plug-in, as long as they all implement the association relationship that supports the visual style of the graph, for example, When the double eleventh promotion, ds1 obtains the transaction data, and ds2 obtains the microblog lyric data (the number of microblogs associated with double eleven appearing every minute), and then displays it in the same graph). Moreover, XSTING's asynchronous query link also utilizes Javascript's Deferred technology to implement a synchronous programming model, simplifying the framework design, solving the time difference problem of multiple asynchronous query returns, and avoiding inferior solutions such as polling.
不仅如此,框架提供的事件监听机制、交互控制、弹出动态报表等功能都是以最简化的IOC接口暴露给用户,将用户编码量降至最低,只提供绝对 需要的定制化参数而已,不需要考虑底层实现细节。Not only that, the event monitoring mechanism, interactive control, pop-up dynamic report and other functions provided by the framework are exposed to the user with the most simplified IOC interface, which minimizes the user code and only provides absolute Customized parameters are required, and there is no need to consider the underlying implementation details.
如图7所示,在传统的前端报表技术中,有些只能做到DOM元素级别的渲染和控制。比如一个曲线图,展现了一天1440分钟的数据走势,其中就会有一千多个数据(1440个点)需要渲染,在HTML5等技术出现之前,前端报表技术往往非常被动的采用一些复杂解决方案,甚至会产生与数据点数量相当的DOM元素来绘制出曲线。As shown in Figure 7, in the traditional front-end reporting technology, some can only achieve DOM element level rendering and control. For example, a graph shows the data trend of 1440 minutes a day, in which there will be more than one thousand data (1440 points) to be rendered. Before the emergence of HTML5 and other technologies, front-end reporting technology is often very passive to adopt some complex solutions. It even produces DOM elements that are equivalent to the number of data points to draw the curve.
如图8所示,这些<circle>元素最终绘制出了图中的曲线。这样的做法不论好坏,在性能上还是略逊一筹的,起码在交互事件上就会非常被动。比如想要监听曲线中某一个点的鼠标单击事件,那就是1440个DOM元素都要被妥善的注册、管理它们的生命周期、处理它们的交互事件等。DOM元素其实还是粒度比较粗的运行时对象(内部包含很多的元数据、运行时数据),会给浏览器引擎带来较大的负担。而且作为渲染为主的工具,往往很难加入细粒度的交互功能(比如想要监听图8中LineChart上某一个“点”的鼠标单击事件,工具未必能够开放出简洁的API),这类工具暴露给用户的交互API粒度一般是较粗的(比如对整个图表进行拖拽、点击)。As shown in Figure 8, these <circle> elements ultimately plot the curves in the graph. This kind of practice, whether good or bad, is still slightly inferior in performance, at least in the interaction event will be very passive. For example, if you want to listen to a mouse click event at a certain point in the curve, then 1440 DOM elements should be properly registered, manage their life cycle, handle their interaction events, and so on. The DOM element is actually a relatively coarse-grained runtime object (which contains a lot of metadata and runtime data), which will put a big burden on the browser engine. Moreover, as a rendering-oriented tool, it is often difficult to add fine-grained interactive functions (such as a mouse click event that wants to listen to a "point" on the LineChart in Figure 8, the tool may not be able to open a simple API). The granularity of the interactive API exposed by the tool to the user is generally coarser (such as dragging and clicking on the entire chart).
而本申请的一实施方式中,为了实现细粒度的交互渲染控制(比如一段1440个“点”的曲线,希望鼠标点击曲线中的某一段区域能弹出另一张详情报表、比如想控制曲线不同区域段的颜色粗细、比如希望将曲线图当做node绘制一个网状交织的链路关系图等等),采用了HTML5的Canvas技术实现了一套简洁易用的渲染工具,也就是类似EXT、GoogleLineChart的制图工具javascript库。此工具库和常规的实现方案最大的区别就是充分采用了游戏引擎中“时间换空间”的设计思路。In an implementation manner of the present application, in order to implement fine-grained interactive rendering control (such as a curve of 1440 "points", it is desirable that a certain area in the mouse click curve can pop up another detailed report, for example, to control the curve differently. The color of the area segment, such as the desire to use the graph as a node to draw a network of interlaced link diagrams, etc., using HTML5 Canvas technology to achieve a set of simple and easy to use rendering tools, which is similar to EXT, GoogleLineChart The graphics tool javascript library. The biggest difference between this tool library and the conventional implementation is the full use of the "time-for-space" design in the game engine.
在游戏引擎客户端渲染的场景中,可以将2D、3D的地图或模型都全量制造并存储为数据文件,运行时在根据场景切换来动态加载数据文件,将地图、模型数据载入内存,最终完成渲染。举例说明,在2D游戏中,一张野外草地的地图如果是一张图片,那可能会达到1MB(假如有1024*1024个像素,每个像素的RGB值占一个byte),在载入该地图后其实就是将整张图片 绘制到界面上。而实际的设计往往简单很多:制造4张小图片ABCD,体现略有差异的植被特征,这4张小图片的排列组合就制造出了不同的地图场景(比如A代表纯草地,B代表有小石头的草地,C代表有杂草的草地,D代表光秃的黄土,那2D地图文件可以仅仅是一个二维数组,其中的元素就是ABCD四选一,不同的排列组合就能形成不同的地图样貌),这种做法能够极大的降低存储空间损耗、内存占用量、元素管理和交互控制的负担,唯一增加的就是渲染时的逻辑复杂度,需要一定的计算量(不像绘制一张大图片那么简单)。In the scene rendered by the game engine client, 2D, 3D maps or models can be fully manufactured and stored as data files. The runtime dynamically loads data files according to scene switching, loads maps and model data into memory, and finally Finish rendering. For example, in a 2D game, if a map of a wild grass is a picture, it may reach 1MB (if there are 1024*1024 pixels, the RGB value of each pixel occupies one byte), the map is loaded. After that, it’s actually the whole picture. Draw on the interface. The actual design is often much simpler: making 4 small pictures ABCD, reflecting the slightly different vegetation features, the arrangement of the 4 small pictures creates different map scenes (such as A for pure grass and B for small) Stone grass, C stands for weedy grass, D stands for bare loess, the 2D map file can be just a two-dimensional array, the elements are ABCD four, one can form different maps by different arrangement Appearance), this approach can greatly reduce the burden of storage space loss, memory footprint, element management and interaction control, the only increase is the logic complexity of rendering, requires a certain amount of calculation (not like drawing a large The picture is so simple).
对应到本申请的数据可视化实现装置一实施方式中:Corresponding to an embodiment of the data visualization implementation device of the present application:
首先,配置模块10还用于配置获取页面坐标函数,以获取触发事件相应的页面元素的页面坐标;First, the configuration module 10 is further configured to: configure a page coordinate function to obtain a page coordinate of a page element corresponding to the trigger event;
还是以1440个“点”的曲线举例,原始的数据是Map<Time,Value>,传统的做法就是产生1440个DOM元素,注册给浏览器引擎,后者完成渲染和元素生命周期管理、事件控制。而本发明的做法是:提供一个获取页面坐标函数(getPositionByEntry);对于Map里的每个entry(也就是每个点),作为参数调用页面坐标函数函数(Time可推算出x坐标,Value可推算出y坐标);使用HTML5的Canvas完成“点”的绘制(绘制时可根据各种个性化需求选择颜色、大小等效果)。Or the example of the 1440 "point" curve, the original data is Map<Time, Value>, the traditional approach is to generate 1440 DOM elements, registered to the browser engine, the latter complete rendering and element lifecycle management, event control . The method of the present invention is to provide a get page coordinate function (getPositionByEntry); for each entry in the map (that is, each point), call the page coordinate function function as a parameter (Time can calculate the x coordinate, Value can be calculated Out y coordinates); use the HTML5 Canvas to complete the "dot" drawing (draw color, size and other effects according to various personalization requirements).
其次,配置模块10配置获取数据函数,以在获取触发事件相应的页面元素的页面坐标后,调取与所述页面坐标相应的数据;其中,每一报表类型只对应一个页面元素。Next, the configuration module 10 configures the acquisition data function to retrieve data corresponding to the page coordinates after acquiring the page coordinates of the page element corresponding to the trigger event; wherein each report type corresponds to only one page element.
当鼠标点击事件发生时,将鼠标坐标作为参数调用获取数据函数(getEntryByPosition,x坐标可推算出最相近的Entry,假如x轴总长为N像素,一共M个点,当前x坐标为x,那就是第Math.round(x/(N/M))个entry);将此entry的数据取出做后续事件监听处理。When the mouse click event occurs, the mouse coordinate is used as a parameter to call the get data function (getEntryByPosition, the x coordinate can be used to derive the closest Entry, if the total length of the x-axis is N pixels, a total of M points, the current x coordinate is x, that is Math.round (x/(N/M)) entries); take out the data of this entry for subsequent event monitoring.
如此,仅仅是在制图和交互时多了一点计算量,而1440个DOM元素所占用的空间和损耗的维护成本都可以避免了。除了上述实施例中提到的曲线 图,表格、饼图等样式下的处理思路都是类似,在此不再赘述。In this way, only a little more computational effort is made in the mapping and interaction, and the maintenance cost of the space and loss occupied by the 1440 DOM elements can be avoided. In addition to the curves mentioned in the above embodiments The processing ideas in the styles of graphs, tables, and pie charts are similar, and will not be described here.
综上所述,将可视化渲染框架和数据源、可视化样式及其关联关系独立封装,用户只需要对数据源、可视化样式及其关联关系进行配置,即可导入可视化渲染框架进行渲染,提高了研发效率和前端性能。In summary, the visual rendering framework and the data source, the visual style and its associated relationships are independently encapsulated, and the user only needs to configure the data source, the visual style and its association relationship, and then can import the visual rendering framework for rendering, and improve the research and development. Efficiency and front-end performance.
所属领域的技术人员可以清楚地了解到,为描述的方便和简洁,上述描述的系统,装置和单元的具体工作过程,可以参考前述方法实施方式中的对应过程,在此不再赘述。A person skilled in the art can clearly understand that for the convenience and brevity of the description, the specific working process of the system, the device and the unit described above can refer to the corresponding process in the foregoing method embodiments, and details are not described herein again.
在本发明所提供的几个实施方式中,应该理解到,所揭露的系统,装置和方法,可以通过其它的方式实现。例如,以上所描述的装置实施方式仅仅是示意性的,例如,所述单元的划分,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式,例如多个单元或组件可以结合或者可以集成到另一个系统,或一些特征可以忽略,或不执行。另一点,所显示或讨论的相互之间的耦合或直接耦合或通信连接可以是通过一些接口,装置或单元的间接耦合或通信连接,可以是电性,机械或其它的形式。In the several embodiments provided by the present invention, it should be understood that the disclosed system, apparatus, and method may be implemented in other manners. For example, the device implementations described above are merely illustrative. For example, the division of the unit is only a logical function division. In actual implementation, there may be another division manner, for example, multiple units or components may be combined or Can be integrated into another system, or some features can be ignored or not executed. In addition, the mutual coupling or direct coupling or communication connection shown or discussed may be an indirect coupling or communication connection through some interface, device or unit, and may be in an electrical, mechanical or other form.
所述作为分离部件说明的单元可以是或者也可以不是物理上分开的,作为单元显示的部件可以是或者也可以不是物理单元,即可以位于一个地方,或者也可以分布到多个网络单元上。可以根据实际的需要选择其中的部分或者全部单元来实现本实施方式方案的目的。The units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, may be located in one place, or may be distributed to multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of the present embodiment.
另外,在本发明各个实施方式中的各功能单元可以集成在一个处理单元中,也可以是各个单元单独物理存在,也可以2个或2个以上单元集成在一个单元中。上述集成的单元既可以采用硬件的形式实现,也可以采用硬件加软件功能单元的形式实现。In addition, each functional unit in each embodiment of the present invention may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above integrated unit can be implemented in the form of hardware or in the form of hardware plus software functional units.
上述以软件功能单元的形式实现的集成的单元,可以存储在一个计算机可读取存储介质中。上述软件功能单元存储在一个存储介质中,包括若干指令用以使得一台计算机装置(可以是个人计算机,服务器,或者网络装置等)或处理器(processor)执行本发明各个实施方式所述方法的部分步骤。而前述的存储介质包括:U盘、移动硬盘、只读存储器(Read‐Only Memory,ROM)、 随机存取存储器(Random Access Memory,RAM)、磁碟或者光盘等各种可以存储程序代码的介质。The above-described integrated unit implemented in the form of a software functional unit can be stored in a computer readable storage medium. The software functional unit is stored in a storage medium and includes instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) or a processor to perform the method of various embodiments of the present invention. Part of the steps. The foregoing storage medium includes: a USB flash drive, a mobile hard disk, a read-only memory (ROM), A variety of media that can store program code, such as random access memory (RAM), disk, or optical disk.
最后应说明的是:以上实施方式仅用以说明本发明的技术方案,而非对其限制;尽管参照前述实施方式对本发明进行了详细的说明,本领域的普通技术人员应当理解:其依然可以对前述各实施方式所记载的技术方案进行修改,或者对其中部分技术特征进行等同替换;而这些修改或者替换,并不使相应技术方案的本质脱离本发明各实施方式技术方案的精神和范围。 Finally, it should be noted that the above embodiments are only for explaining the technical solutions of the present invention, and are not intended to be limiting; although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art will understand that Modifications of the technical solutions described in the foregoing embodiments, or equivalents of the technical features of the embodiments of the present invention, are not to be construed as a departure from the spirit and scope of the embodiments of the present invention.

Claims (24)

  1. 一种数据可视化的实现方法,其特征在于,所述方法包括:A method for implementing data visualization, characterized in that the method comprises:
    配置数据源、可视化样式,以及所述数据源和所述可视化样式之间的关联关系;Configuring a data source, a visualization style, and an association relationship between the data source and the visualization style;
    当收到触发请求时,将所述数据源、可视化样式、关联关系的配置信息通过定制化接口导入可视化渲染框架;When the trigger request is received, the configuration information of the data source, the visualization style, and the association relationship is imported into the visual rendering framework through a customized interface;
    所述可视化渲染框架根据所述配置信息进行渲染,并输出至浏览器引擎。The visual rendering framework renders according to the configuration information and outputs to the browser engine.
  2. 根据权利要求1所述的数据可视化的实现方法,其特征在于,所述数据源、可视化样式,以及所述可视化渲染框架分别独立封装。The method for implementing data visualization according to claim 1, wherein the data source, the visualization style, and the visual rendering framework are separately packaged.
  3. 根据权利要求1所述的数据可视化的实现方法,其特征在于,所述定制化接口为IOC接口。The method for implementing data visualization according to claim 1, wherein the customized interface is an IOC interface.
  4. 根据权利要求1所述的数据可视化的实现方法,其特征在于,所述数据源和所述可视化样式为多对多的关联关系,每一个数据源对应至少一个可视化样式,每一个可视化样式对应至少一个数据源。The method for implementing data visualization according to claim 1, wherein the data source and the visualization style are in a many-to-many association relationship, and each data source corresponds to at least one visualization style, and each visualization style corresponds to at least one A data source.
  5. 根据权利要求1所述的数据可视化的实现方法,其特征在于,所述『所述可视化渲染框架根据所述配置信息进行渲染』具体包括:The method for implementing data visualization according to claim 1, wherein the "the rendering rendering framework performs rendering according to the configuration information" specifically includes:
    根据所述数据源中配置的服务查询地址及参数信息,获取相应的数据;Obtaining corresponding data according to the service query address and parameter information configured in the data source;
    根据所述关联关系将所述数据转换为可视化样式匹配的渲染模型;Converting the data into a rendering model of visual style matching according to the association relationship;
    根据所述渲染模型,调用渲染工具进行渲染。According to the rendering model, the rendering tool is called for rendering.
  6. 根据权利要求5所述的数据可视化的实现方法,其特征在于,所述参数信息包括:The method for implementing data visualization according to claim 5, wherein the parameter information comprises:
    查询数据的周期、粒度、数据ID的至少其中之一。Query at least one of the period, granularity, and data ID of the data.
  7. 根据权利要求5所述的数据可视化的实现方法,其特征在于,『根据所述渲染模型,调用渲染工具进行渲染』具体包括:The method for implementing the data visualization according to claim 5, wherein the "recalling the rendering tool according to the rendering model" specifically includes:
    根据所述可视化样式提供的结构转换逻辑,将所述渲染模型转换为对应的渲染工具所要求参数格式; Converting the rendering model to a parameter format required by the corresponding rendering tool according to the structure conversion logic provided by the visualization style;
    根据所述参数格式,调用对应的渲染工具进行渲染。According to the parameter format, the corresponding rendering tool is called for rendering.
  8. 根据权利要求7所述的数据可视化的实现方法,其特征在于,『根据所述参数格式,调用对应的渲染工具进行渲染』具体包括:The method for realizing the data visualization according to claim 7, wherein the "recalling the corresponding rendering tool according to the parameter format" specifically includes:
    根据所述参数格式以及所述可视化样式提供的参数逻辑,调用相应的渲染工具进行渲染。The corresponding rendering tool is called for rendering according to the parameter format and the parameter logic provided by the visualization style.
  9. 根据权利要求5所述的数据可视化的实现方法,其特征在于,所述『根据所述关联关系将所述数据转换为可视化样式匹配的渲染模型』具体包括:The method for realizing data visualization according to claim 5, wherein the "transforming the data into a rendering model matching the visual style according to the association relationship" specifically includes:
    根据所述关联关系将所述数据转换为可视化样式匹配的的数据结构;Converting the data into a data structure that is visually matched according to the association relationship;
    调取所述数据结构并根据与所述数据结构关联的可视化样式,将所述数据结构转换为可视化样式匹配的渲染模型。The data structure is retrieved and converted to a rendered model of visual style matching based on a visual style associated with the data structure.
  10. 根据权利要求5所述的数据可视化的实现方法,其特征在于,The method for implementing data visualization according to claim 5, characterized in that
    所述数据源为插件形式,每个插件中包括数据的服务查询地址及参数信息;The data source is in the form of a plug-in, and each plug-in includes a service query address and parameter information of the data;
    所述可视化样式为插件形式,每个插件中包括一种可视化样式。The visual style is in the form of a plugin, and each plugin includes a visual style.
  11. 根据权利要求1所述的数据可视化的实现方法,其特征在于,所述方法还包括:The method for implementing data visualization according to claim 1, wherein the method further comprises:
    将事件监听逻辑注册到浏览器引擎。Register the event listener logic to the browser engine.
  12. 根据权利要求1所述的数据可视化的实现方法,其特征在于,所述方法包括:The method for implementing data visualization according to claim 1, wherein the method comprises:
    配置获取页面坐标函数,以获取触发事件相应的页面元素的页面坐标;Configuring a page coordinate function to obtain a page coordinate of a page element corresponding to the trigger event;
    配置获取数据函数,以在获取触发事件相应的页面元素的页面坐标后,调取与所述页面坐标相应的数据;Configuring a data acquisition function to retrieve data corresponding to the page coordinates after acquiring the page coordinates of the page element corresponding to the trigger event;
    其中,每一报表类型只对应一个页面元素。Among them, each report type only corresponds to one page element.
  13. 一种数据可视化的实现装置,其特征在于,所述数据可视化的实现装置包括:An apparatus for implementing data visualization, wherein the device for implementing data visualization comprises:
    配置模块,用于配置数据源、可视化样式,以及所述数据源和所述可视化样式之间的关联关系;a configuration module, configured to configure a data source, a visualization style, and an association relationship between the data source and the visualization style;
    导入模块,用于当收到触发请求时,将所述数据源、可视化样式、关联关系 的配置信息通过定制化接口导入可视化渲染框架;An import module, configured to: when the trigger request is received, the data source, the visual style, and the association relationship The configuration information is imported into the visual rendering framework through a customized interface;
    所述可视化渲染框架还用于根据所述配置信息进行渲染,并输出至浏览器引擎。The visual rendering framework is further configured to render according to the configuration information and output to a browser engine.
  14. 根据权利要求13所述的数据可视化的实现装置,其特征在于,所述数据源、可视化样式,以及所述可视化渲染框架分别独立封装。The apparatus for implementing data visualization according to claim 13, wherein the data source, the visualization style, and the visual rendering framework are separately packaged.
  15. 根据权利要求13所述的数据可视化的实现装置,其特征在于,所述定制化接口为IOC接口。The device for implementing data visualization according to claim 13, wherein the customized interface is an IOC interface.
  16. 根据权利要求13所述的数据可视化的实现装置,其特征在于,所述数据源和所述可视化样式为多对多的关联关系,每一个数据源对应至少一个可视化样式,每一个可视化样式对应至少一个数据源。The apparatus for implementing data visualization according to claim 13, wherein the data source and the visualization style are in a many-to-many association relationship, and each data source corresponds to at least one visualization style, and each visualization style corresponds to at least one A data source.
  17. 根据权利要求13所述的数据可视化的实现装置,其特征在于,所述可视化渲染框架具体用于:The apparatus for implementing data visualization according to claim 13, wherein the visual rendering framework is specifically configured to:
    根据所述数据源中配置的服务查询地址及参数信息,获取相应的数据;Obtaining corresponding data according to the service query address and parameter information configured in the data source;
    根据所述关联关系将所述数据转换为可视化样式匹配的渲染模型;Converting the data into a rendering model of visual style matching according to the association relationship;
    根据所述渲染模型,调用渲染工具进行渲染。According to the rendering model, the rendering tool is called for rendering.
  18. 根据权利要求17所述的数据可视化的实现装置,其特征在于,所述参数信息包括:The device for implementing data visualization according to claim 17, wherein the parameter information comprises:
    查询数据的周期、粒度、数据ID的至少其中之一。Query at least one of the period, granularity, and data ID of the data.
  19. 根据权利要求17所述的数据可视化的实现装置,其特征在于,所述可视化渲染框架具体用于:The apparatus for implementing data visualization according to claim 17, wherein the visual rendering framework is specifically configured to:
    根据所述可视化样式提供的结构转换逻辑,将所述渲染模型转换为对应的渲染工具所要求参数格式;Converting the rendering model to a parameter format required by the corresponding rendering tool according to the structure conversion logic provided by the visualization style;
    根据所述参数格式,调用对应的渲染工具进行渲染。According to the parameter format, the corresponding rendering tool is called for rendering.
  20. 根据权利要求19所述的数据可视化的实现装置,其特征在于,所述可视化渲染框架具体用于:The apparatus for implementing data visualization according to claim 19, wherein the visual rendering framework is specifically configured to:
    根据所述参数格式以及所述可视化样式提供的参数逻辑,调用相应的渲染工具进行渲染。 The corresponding rendering tool is called for rendering according to the parameter format and the parameter logic provided by the visualization style.
  21. 根据权利要求17所述的数据可视化的实现装置,其特征在于,所述可视化渲染框架具体用于:The apparatus for implementing data visualization according to claim 17, wherein the visual rendering framework is specifically configured to:
    根据所述关联关系将所述数据转换为可视化样式匹配的的数据结构;Converting the data into a data structure that is visually matched according to the association relationship;
    调取所述数据结构并根据与所述数据结构关联的可视化样式,将所述数据结构转换为可视化样式匹配的渲染模型。The data structure is retrieved and converted to a rendered model of visual style matching based on a visual style associated with the data structure.
  22. 根据权利要求17所述的数据可视化的实现方法,其特征在于,The method for implementing data visualization according to claim 17, wherein
    所述数据源为插件形式,每个插件中包括数据的服务查询地址及参数信息;The data source is in the form of a plug-in, and each plug-in includes a service query address and parameter information of the data;
    所述可视化样式为插件形式,每个插件中包括一种可视化样式。The visual style is in the form of a plugin, and each plugin includes a visual style.
  23. 根据权利要求13所述的数据可视化的实现装置,其特征在于,所述可视化渲染框架还用于将事件监听逻辑注册到浏览器引擎。The apparatus for implementing data visualization according to claim 13, wherein the visual rendering framework is further configured to register event monitoring logic to a browser engine.
  24. 根据权利要求13所述的数据可视化的实现装置,其特征在于,所述配置模块还用于:The device for implementing data visualization according to claim 13, wherein the configuration module is further configured to:
    配置获取页面坐标函数,以获取触发事件相应的页面元素的页面坐标;Configuring a page coordinate function to obtain a page coordinate of a page element corresponding to the trigger event;
    配置获取数据函数,以在获取触发事件相应的页面元素的页面坐标后,调取与所述页面坐标相应的数据;Configuring a data acquisition function to retrieve data corresponding to the page coordinates after acquiring the page coordinates of the page element corresponding to the trigger event;
    其中,每一报表类型只对应一个页面元素。 Among them, each report type only corresponds to one page element.
PCT/CN2015/089950 2014-09-26 2015-09-18 Method and apparatus for realizing data visualization WO2016045542A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201410502545.2 2014-09-26
CN201410502545.2A CN105512139B (en) 2014-09-26 2014-09-26 The implementation method and device of data visualization

Publications (1)

Publication Number Publication Date
WO2016045542A1 true WO2016045542A1 (en) 2016-03-31

Family

ID=55580296

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2015/089950 WO2016045542A1 (en) 2014-09-26 2015-09-18 Method and apparatus for realizing data visualization

Country Status (2)

Country Link
CN (1) CN105512139B (en)
WO (1) WO2016045542A1 (en)

Cited By (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107220038A (en) * 2016-11-25 2017-09-29 广东亿迅科技有限公司 The quick application process of data visualization figure and system
CN109741431A (en) * 2018-12-31 2019-05-10 航天精一(广东)信息科技有限公司 A kind of two three-dimensional integratedization electronic map frames
CN110097224A (en) * 2019-05-05 2019-08-06 中国科学院海洋研究所 A kind of visualization storm tide-wave coupling forecasting method
CN110764757A (en) * 2019-10-22 2020-02-07 成都九洲电子信息系统股份有限公司 Interactive graphics drawing engine based on HTML5
CN111078169A (en) * 2019-11-29 2020-04-28 武汉虹信技术服务有限责任公司 Front-end device of visual large-screen system and construction method thereof
CN112100069A (en) * 2020-09-15 2020-12-18 中国人民解放军国防大学联合作战学院 SIMSCRIPT language-oriented discrete event simulation event queue visualization method
CN112583624A (en) * 2019-09-30 2021-03-30 北京国双科技有限公司 Energy consumption data processing method and device
CN112800295A (en) * 2021-01-27 2021-05-14 浪潮云信息技术股份公司 Data visualization tool implementation method based on index unit
CN114064029A (en) * 2020-07-31 2022-02-18 阿里巴巴集团控股有限公司 Method, device and architecture for realizing back-end drawing and data robot
CN114663608A (en) * 2022-03-14 2022-06-24 海看网络科技(山东)股份有限公司 Echarts-based map firework assembly implementation method

Families Citing this family (27)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105930475A (en) * 2016-06-28 2016-09-07 齐德昱 Compound document organization and access model GriDoc of big data
CN106682057A (en) * 2016-07-21 2017-05-17 深圳奇迹智慧网络有限公司 Multi-dimensional data visualization presentation method
CN108090035A (en) * 2016-11-23 2018-05-29 北京国双科技有限公司 Data processing method and device
CN108153779B (en) * 2016-12-05 2022-04-05 阿里巴巴集团控股有限公司 Page data delivery information processing method and device
CN106709057A (en) * 2017-01-09 2017-05-24 郑州云海信息技术有限公司 Distributed cluster visualized database
CN106909610B (en) * 2017-01-10 2020-11-24 中电科华云信息技术有限公司 Method and system for visually dragging and querying data based on browser
CN106815371A (en) * 2017-02-06 2017-06-09 浪潮通用软件有限公司 A kind of method for reading data realized by visual configuration across data source
CN106846126A (en) * 2017-03-03 2017-06-13 北京科摩仕捷科技有限公司 A kind of electric business website order transaction data visualization method
CN107220274B (en) * 2017-04-13 2020-10-09 中科曙光南京研究院有限公司 Visual data interface market realization method
CN107832282A (en) * 2017-11-21 2018-03-23 苏州正载信息技术有限公司 A kind of implementation method for defining Visual Report Forms
CN110109962A (en) * 2017-12-26 2019-08-09 广东电网有限责任公司电力调度控制中心 A kind of visual presentation method of the preliminary data based on operation of power networks
CN108153886B (en) * 2017-12-28 2021-02-02 北京恒泰实达科技股份有限公司 User-defined visual display method of real-time data in web application
CN108563666B (en) * 2018-01-05 2022-04-05 四川兴政信息技术有限公司 Data visualization processing system and method based on big data technology
CN108388576B (en) * 2018-01-16 2020-07-24 绿湾网络科技有限公司 Method and system for interactively generating map
CN108287923B (en) * 2018-02-28 2020-12-29 浪潮云信息技术股份公司 Intelligent visual interface data extraction system and design method thereof
CN108804513A (en) * 2018-04-24 2018-11-13 华东计算技术研究所(中国电子科技集团公司第三十二研究所) Automatic visual analysis method for big data platform
CN108874487B (en) * 2018-06-13 2020-01-10 北京九章云极科技有限公司 Data analysis processing method, system, device and storage medium based on workflow
CN109086442B (en) * 2018-08-16 2021-07-06 口口相传(北京)网络技术有限公司 Business data display method and device
CA3115220C (en) * 2018-10-09 2023-07-18 Tableau Software, Inc. Correlated incremental loading of multiple data sets for an interactive data prep application
CN109542438A (en) * 2018-11-19 2019-03-29 成都淞幸科技有限责任公司 One kind being based on visual chart development approach
CN109669992A (en) * 2018-12-20 2019-04-23 云南电网有限责任公司玉溪供电局 A kind of implementation method of data visualization conversion
CN111722895B (en) * 2019-03-21 2024-01-12 成都数天下科技有限公司 SPC chart rendering method in Power BI component
CN111309317A (en) * 2020-02-09 2020-06-19 北京工业大学 Code automation method and device for realizing data visualization
CN112506738A (en) * 2020-12-03 2021-03-16 上海哔哩哔哩科技有限公司 Data visualization processing method and device
CN112487067A (en) * 2020-12-04 2021-03-12 国泰新点软件股份有限公司 Method, device and storage medium for page display based on data configuration
CN114546577B (en) * 2022-03-04 2024-04-26 北京超图软件股份有限公司 Data visualization method and system
US20240078724A1 (en) * 2022-09-05 2024-03-07 Salesforce, Inc. User Interface for Presenting Time Series Metrics

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101430710A (en) * 2008-11-14 2009-05-13 中国科学院软件研究所 Data visualization engine system
US20100185928A1 (en) * 2009-01-21 2010-07-22 Microsoft Corporation Extensibility for web based diagram visualization
CN102004777A (en) * 2010-11-19 2011-04-06 中国科学院软件研究所 Customizable Web information integration method and system
CN102609262A (en) * 2012-02-13 2012-07-25 浪潮集团山东通用软件有限公司 Method for realizing FLASH charting control capable of being driven by multiple data sources in POWERBUILDER
CN103336805A (en) * 2013-06-21 2013-10-02 中国电子科技集团公司第四十一研究所 Method and device for automatic customized report form generation based on graphical mapping relationship

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103677789B (en) * 2012-09-25 2017-11-24 深圳市金正方科技股份有限公司 Table data based on GRID components shows method and system
CN103412871B (en) * 2013-07-08 2017-02-08 北京百度网讯科技有限公司 Method and device for generating visualized view

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101430710A (en) * 2008-11-14 2009-05-13 中国科学院软件研究所 Data visualization engine system
US20100185928A1 (en) * 2009-01-21 2010-07-22 Microsoft Corporation Extensibility for web based diagram visualization
CN102004777A (en) * 2010-11-19 2011-04-06 中国科学院软件研究所 Customizable Web information integration method and system
CN102609262A (en) * 2012-02-13 2012-07-25 浪潮集团山东通用软件有限公司 Method for realizing FLASH charting control capable of being driven by multiple data sources in POWERBUILDER
CN103336805A (en) * 2013-06-21 2013-10-02 中国电子科技集团公司第四十一研究所 Method and device for automatic customized report form generation based on graphical mapping relationship

Cited By (14)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107220038A (en) * 2016-11-25 2017-09-29 广东亿迅科技有限公司 The quick application process of data visualization figure and system
CN109741431A (en) * 2018-12-31 2019-05-10 航天精一(广东)信息科技有限公司 A kind of two three-dimensional integratedization electronic map frames
CN110097224A (en) * 2019-05-05 2019-08-06 中国科学院海洋研究所 A kind of visualization storm tide-wave coupling forecasting method
CN112583624A (en) * 2019-09-30 2021-03-30 北京国双科技有限公司 Energy consumption data processing method and device
CN112583624B (en) * 2019-09-30 2023-05-23 北京国双科技有限公司 Method and device for processing energy consumption data
CN110764757A (en) * 2019-10-22 2020-02-07 成都九洲电子信息系统股份有限公司 Interactive graphics drawing engine based on HTML5
CN110764757B (en) * 2019-10-22 2023-06-09 成都九洲电子信息系统股份有限公司 Interactive graphic drawing engine based on HTML5
CN111078169A (en) * 2019-11-29 2020-04-28 武汉虹信技术服务有限责任公司 Front-end device of visual large-screen system and construction method thereof
CN111078169B (en) * 2019-11-29 2023-09-26 武汉虹信技术服务有限责任公司 Front-end device of visual large-screen system and construction method thereof
CN114064029A (en) * 2020-07-31 2022-02-18 阿里巴巴集团控股有限公司 Method, device and architecture for realizing back-end drawing and data robot
CN112100069A (en) * 2020-09-15 2020-12-18 中国人民解放军国防大学联合作战学院 SIMSCRIPT language-oriented discrete event simulation event queue visualization method
CN112100069B (en) * 2020-09-15 2022-10-14 中国人民解放军国防大学联合作战学院 Discrete event simulation event queue visualization method oriented to SIMSCRIPT language
CN112800295A (en) * 2021-01-27 2021-05-14 浪潮云信息技术股份公司 Data visualization tool implementation method based on index unit
CN114663608A (en) * 2022-03-14 2022-06-24 海看网络科技(山东)股份有限公司 Echarts-based map firework assembly implementation method

Also Published As

Publication number Publication date
CN105512139A (en) 2016-04-20
CN105512139B (en) 2019-11-05

Similar Documents

Publication Publication Date Title
WO2016045542A1 (en) Method and apparatus for realizing data visualization
US10637899B1 (en) Collaborative design
US20180157391A1 (en) Page Information Personalization Method, Apparatus and System
CN103365862B (en) It is a kind of for generating the method and apparatus of picture corresponding with the page
WO2020125567A1 (en) Automatic animation generation method, and automatic animation generation system
CN111079047B (en) Web-oriented page construction system
CN107092625B (en) Data configuration method, data processing method and device
JP5930497B2 (en) Template file processing method and apparatus
CN105404665A (en) JSON format data query management system
CN103955549A (en) Web GIS system based on SVG and data input and search method thereof
CN104657384A (en) Dynamic allocation report data processing method based on two-dimension relationship
JP2014524623A5 (en)
US20240185393A1 (en) Learning parameters for an image harmonization neural network to generate deep harmonized digital images
CN109949391A (en) Graphic rendering method, apparatus, electronic equipment and storage medium
CN105183951A (en) Furniture combination effect display method and system
US20150149466A1 (en) Condensed hierarchical data viewer
Tanahashi et al. An interface design for future cloud-based visualization services
US20160292218A1 (en) Extensible data query scenario definition and consumption
CN109739504B (en) Method for automatically generating H5 service handling page according to background configuration
CN116932829A (en) Solutions for developer supporting big data tree view components
CA3203326A1 (en) Session collaboration system
US20160321259A1 (en) Network insights
CN115686484A (en) Big data platform capable of freely configuring large screen visualization
WO2018205390A1 (en) Control layout display control method, system, and apparatus, and computer readable storage medium
Tian Application and analysis of artificial intelligence graphic element algorithm in digital media art design

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 15843516

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 15843516

Country of ref document: EP

Kind code of ref document: A1