Background
The way people obtain information is very limited, and more than 80% of information obtained from the outside comes from the visual system. When the data is presented in the form of a visual chart by a visualization tool, one can more concisely and clearly recognize the graphic features and convert them into specified information. The data visualization report forms are that after data analysis personnel use data and analyze the data, the analysis results need to be presented to different crowds in various chart forms, the presented contents are different, such as pie charts, bar charts, graphs, perspective views and the like, and the presented modes need to be diversified, such as clients, mobile phone apps, web ends and system integration. The content and different presentation modes can provide visual and clear data presentation for the data.
The visual chart is an intuitive data presentation mode, and the management process of a unit, a company, an enterprise and the like is intuitively fed back by data, so that the management problem is insight. The method can be based on digitized business concepts such as business growth, user operation, transaction records, growth trend and the like, can seamlessly interface enterprise data, output full-link data indexes, help enterprises and users to rapidly analyze the current situation of business, realize data driving and increase power-assisted business.
In order to better utilize big data, many foreign well-known universities such as the universities of the Massachusetts, universities of Harvard have visualized big data as a study topic. Visualization of urban information by the research team of the university of hemp, university and college of technology, 744 widely cited papers have been published. The ongoing projects include new languages for interactive visualization, theoretical models, exploratory analysis and design tools, perceptual experiments to evaluate the effect of the visualization, and visual analysis systems for large-scale text analysis, population genomics and other fields to drive the research progress of data visualization tools.
Related data visualization tool research teams, such as Beijing university visualization and visualization analysis research group, zhejiang university visualization analysis research group and the like, are also established by many universities in China. In addition to academic research institutions, businesses, media, individuals, and offices are actively engaged in data visualization research, particularly new media. They spontaneously begin to attempt to present data to the target audience through the narrative. With the development of data visualization tools, many students in China have written a summary paper about big data visualization. The basic theory supporting big data visual analysis is analyzed, the analysis process supporting the cognitive theory, the information visual theory and the user interface of man-machine interaction are included, and the big data information visual technology discussed on the basis is applied to the main stream: text-oriented, network, temporal and spatial, multidimensional visualization techniques.
Although existing data visualization platforms have a relatively comprehensive presentation form and presentation content, there is no excessive design and technical support at the data presentation level. The main aspects are as follows:
1. report capability external playing
Most of the existing data analysis report tools are single platforms for checking and accessing data report after logging in, and cannot adapt to pc end and mobile phone end.
2. Rights management and control
1) Aiming at different users, the conventional report service needs to manufacture different report panels, and the workload of data analysis personnel and report manufacturing personnel is increased. And the data authority of the user cannot be effectively isolated under the same type of user.
2) The user can access the data after the user inputs the account password to log in, and the data can not be effectively integrated in other applications or services.
Disclosure of Invention
In view of the above problems in the related art, the present invention provides a method and system for displaying data.
According to one aspect of the present invention, there is provided a method of displaying data, comprising: when the third party system generates an embedded page for displaying data, the report service platform sends an auth_token (authentication token) comprising authority authentication information to the third party system; performing page embedded access by using an iframe embedded mode, and generating access url by a third party system according to an auth_token, wherein the iframe embedded mode uses a header comprising the auth_token to transmit authority authentication information; the report service platform performs authority authentication according to the auth_token of url, assembles a data query statement through a pre-configured user template, and returns a corresponding data report page for a corresponding user; and providing a corresponding data report page according to the version information of the third-party system and changing the operation mode into an operation mode conforming to the version information.
According to the embodiment of the invention, the user template is jinja template using python technology, so that different users can only see the data of the authority according to the identity information during data query.
According to an embodiment of the present invention, the method for displaying data further includes: parameters of jinja templates are customized to carry out screening and filtering on the data corresponding to the parameters.
According to the embodiment of the invention, the authority authentication information of the auth_token comprises the chart authority and the data authority of the chart, and after authentication is successful, data query sentences are assembled by configuring jinja templates of users so as to return different data report pages for different users.
According to an embodiment of the present invention, the operation modes at least include at least one of time selection, drop-down frame, and radio selection.
According to another aspect of the invention, a system for displaying data is provided, comprising a third party system and a report service platform. When a third party system generates a page for displaying data, the report service platform sends an auth_token (authentication token) comprising authority authentication information to the third party system; performing page embedded access by using an iframe embedded mode, and generating access url by a third party system according to an auth_token, wherein the iframe embedded mode uses a header comprising the auth_token to transmit authority authentication information; the report service platform performs authority authentication according to the auth_token of url, assembles a data query statement through a pre-configured user template, and returns a corresponding data report page for a corresponding user; and providing a corresponding data report page according to the version information of the third-party system and changing the operation mode into an operation mode conforming to the version information.
According to the embodiment of the invention, the user template is jinja template using python technology, so that different users can only see the data of the authority according to the identity information during data query.
According to an embodiment of the present invention, the report service platform is further configured to: parameters of jinja templates are customized to carry out screening and filtering on the data corresponding to the parameters.
According to the embodiment of the invention, the authority authentication information of the auth_token comprises the chart authority and the data authority of the chart, and after authentication is successful, data query sentences are assembled by configuring jinja templates of users so as to return different data report pages for different users.
According to an embodiment of the invention, the operating mode includes at least a time selection and a drop-down box.
Detailed Description
The following description of the embodiments of the present invention will be made clearly and completely with reference to the accompanying drawings, in which it is apparent that the embodiments described are only some embodiments of the present invention, but not all embodiments. All other embodiments, which are derived by a person skilled in the art based on the embodiments of the invention, fall within the scope of protection of the invention.
In view of the problems and deficiencies of the prior art, the present invention provides a method for displaying data. FIG. 1 is a flow chart of a method of exposing data according to an embodiment of the invention. As shown in fig. 1, the method for displaying data of the present invention includes the following steps:
And S12, when the third party system generates a page for displaying data, the report service platform sends an auth_token comprising the authority authentication information to the third party system.
S14, performing page embedded access by using an iframe embedded mode, and generating access url (uniform resource locator, unified resource positioning system) by a third party system according to the authtoken. Wherein the iframe embedding manner uses a header including the auth_token to transfer the rights authentication information.
S16, the report service platform performs authority authentication according to the auth_token of url, assembles a data query statement through a pre-configured user template, and returns a corresponding data report page for a corresponding user.
And S18, providing a corresponding data report page according to version information (such as a PC browser and a mobile phone app) of the third-party system, and changing the operation mode into an operation mode conforming to the version information.
According to the technical scheme, web display is performed in a URL direct access mode, verification parameters are analyzed after URL is acquired, user permission judgment, report permission judgment, data source judgment and data filtering are performed, and then display pages are assembled and returned to a user for display, so that the problems of user login, cross-domain, adaptation and the like are avoided. Therefore, a convenient embedded report presentation tool is provided, and the report presentation tool can be seamlessly embedded into other services or applications to provide page self-adaption problems of PCs and apps. And the method is used for carrying out hierarchical processing on different personnel authorities (such as different personnel of an administrator, report development, report viewing and the like), providing report isolation and data authority isolation for different viewing personnel, and providing data service capability for improving authority management and control for a user.
Fig. 2 is a schematic flow chart according to an embodiment of the present invention. The method of data presentation of the present invention is specifically described below in conjunction with fig. 2.
First, a preliminary preparation work may be performed. At this time, according to the data requirement, an analyst analyzes the data, develops a data result, configures a viewing rule of the personnel for viewing the report, namely configures jinja templates, and generates a visualized data report. The jinja templates can ensure that different users only see the data of the authority according to the identity information during data query.
Specifically, using python's jinja template can define parameter variables during data report making, and { { { cache_key_wrapper (current_user () } } can be used to represent the current login user during data source query, and this condition can be used as a parameter during different data processing to filter data.
In addition, jinja templates can be customized to support more parameter configurations, filtering conditions and the like. Such as: the selected time period may be obtained as follows:
further, more complex requirements may be handled using technical expressions, such as exposing different types of charts. The parameter templates are custom using the { } } expressions. The data parameters may be obtained from a system or context.
The system index zb parameter is obtained from the filter_values, and the following examples are as follows:
SELECT { "' +", join (filter_values (' zb ')) plus "'" } = ' transaction amount ' the total_trans_amt When { "+", join (filter_values (' zb ')) plus "}" = ' transaction number ' the total_trans_ CNT END AS TRANS _metrics, case write { "' +", join (filter_values (' zb ')) + "'" } = "transaction amount ' the ' transaction amount ' write {" ' + ", join (filter_values (' zb ')) +" } "=" transaction number ' end as t from hyq _prds1_mer_trans_sum. As an example, fig. 4A shows a schematic diagram of data presentation at the PC side; fig. 4B shows a schematic diagram of a data presentation at the app end of a cell phone.
Then, referring to FIG. 2, an embedded page url request is made. When the third party system (front end of the embedder) generates the embedded page for the user, the report service platform (back end of the embedder and the data cube datacube) is called to acquire and generate the authorization authentication information auth_token through steps S202, S204 and S206.
In one embodiment, at step S208, the third party system may make a page embedded access in the form of < IFRAME SRC = "https:// ip: port/iframe/{ auth token }". And displaying the data report in the customer service application or service.
The invention uses the iframe embedding mode to embed data, however, the current iframe data is embedded with a cross-domain scheme with a serious table, and particularly in the information authentication process, information such as cookies, session and the like cannot be transmitted, and effective verification can not be carried out on the information of the user. Therefore, in order to solve the problem of data cross-domain, the invention uses a header to transfer sensitive information in combination with a custom auth_token verification mode, as shown below, so that the data security and report embedded access can be ensured.
Next, the third party system performs front-end embedded data presentation. In step S210, the third party generates access url according to the auth_token containing the authority authentication information to make a report request of the data report platform, i.e. access the report page. At step S210, the reporting platform backend performs auth_token rights authentication. The authentication information of the auth_token contains the graph authority, and the data authority of the graph. And after successful authentication, data query sentences are assembled through the configured user jinja templates, and different data report pages are returned for different users.
Finally, at step S212, adaptive data presentation is performed. Here, the user can embed the page in different applications or services, and the returned page supports access of the PC web and the mobile phone app, and provides different pages according to different types of access modes, so as to achieve the condition of data self-adaption. The existing self-adaptive technology only carries out adaptive adjustment on page size and position layout, but does not carry out adaptation of APP on the control (time selection, drop-down frame, single selection and multiple selection aspects and the like) level. The self-adaptation of the data magic cube integrates layout self-adaptation, presents a better visual effect, performs secondary adaptation development on the operation control, and performs customized configuration according to the version information of the acquired system and the browser or APP condition. The operation mode is changed into the common operation mode of the APP. As an example, fig. 3A shows a schematic diagram of a configuration scheme; fig. 3B shows a schematic diagram of a presentation.
Fig. 5 is an architectural design for a method for implementing the data presentation of the present invention. As shown in FIG. 5, the architecture design comprises a management unit, rights management, user management, data source management, and data reporting module management. And three external data layers, namely a configuration layer (represented by a configuration data source), a permission layer (represented by a permission management interface) and a report embedding layer (represented by cross-application embedding) are abstracted on the module.
The management unit comprises the functions of user group management, authority management, report making and the like. The functions of rights management include user group rights. The functions of the user module comprise an administrator user, a configuration user and a report view user. The functions of data source management include source data configuration and data management of report form viewing users. The functions of the data report module include configuring a user to analyze data, generating a report, and viewing the report by a report viewing user. In addition, block 50 may be used to implement the method of presenting data described above for the present invention.
According to another aspect of the present invention there is provided a system for presenting data for use in forming the method of presenting data as described above. The system may include a third party system and a reporting services platform. When a third party system generates a page for displaying data, the report service platform sends an auth_token including authority authentication information to the third party system; the third party system generates access url according to the auth_token; and the report service platform performs authority authentication according to the auth_token of url, assembles a data query statement through a pre-configured user template and returns a corresponding data report page for a corresponding user. And providing a corresponding data report page according to the version information of the third-party system and changing the operation mode into an operation mode conforming to the version information.
In summary, the invention has the following benefits:
1. data rights filtering jinja configuration implementation scheme
Jinja is a template engine under Python, mainly for sandbox execution functions and optional auto-escape functions. The invention mainly uses jinja automatic escape function to realize the diversification of data parameter transmission, brings in identity information when inquiring data, and ensures that the data seen by different people only has the data of own authority.
2. Solution of web embedding cross-domain problem
The problem that the conventional web embedding cannot deliver cookies is that authority authentication cannot be performed in the embedded page. The patent solves the authority authentication of the embedded page by utilizing a header and self-defined auto-token verification mode, and solves the cross-domain problem during embedding.
The foregoing description of the preferred embodiments of the invention is not intended to be limiting, but rather is intended to cover all modifications, equivalents, alternatives, and improvements that fall within the spirit and scope of the invention.