Disclosure of Invention
The invention aims to provide a mobile end BI middleware technology based on an application container.
In order to achieve the purpose, the invention adopts the following technical scheme:
the mobile terminal BI middleware technology based on the application container is provided and comprises a middleware, wherein the middleware builds a bridge between the application container and a report server; checking user data in the report through bridging, and synchronizing the user data of the report into a local project library for mapping a third-party application user and a report user;
setting a user mapping module, acquiring login user information through an interface provided by an application container, distributing the login user to a default group, mapping the default group with a report user in a report Server, and realizing mapping between the login user and the report user in the report Server;
the group and the report user are in one-to-one correspondence, different users are distributed to different groups, the authority of different groups is set, the same group corresponds to the same report user, and the owned authorities are the same;
setting a report request transmission module, obtaining report user data according to the mapping after a user logs in, accessing the report through the bill of the report, splicing and accessing the URL of the report, and realizing the function of viewing the report;
setting a browsing history interface, storing the accessed report data into the history data of a user after the user successfully accesses one report, wherein the database adopts an independent database, and when a certain report is clicked in a history list, the report can be correspondingly displayed;
setting a report collection interface, wherein a user is interested in a certain workbook or report, can click a collection identifier of a workbook or a report page, and stores the workbook or the report into a collection library of the user, and the same as the history list is that the collected workbook is clicked in a display page collected by the user, so that the user can enter the workbook and list all reports under the workbook; clicking the collected report to display the report;
and setting a background management function for maintaining the mapping between the user and the group and maintaining the mapping between the group and the report user.
Further, the step of setting the user mapping module is as follows:
the method comprises the following steps: logging in user information, identifying the user information through big data, recording the compared information characteristic of the user information after comparison as a, setting x default groups, and giving specific characteristics to the x default groups;
step two: comparing the characteristics of the comparison information a with the specific characteristics of the x default groups one by one, and displaying the comparison coincidence percentage;
step three: comparing the x percentages, taking out the maximum value, and corresponding the comparison information a with the default group n of the percentages;
step four: assigning the user information to a default group n;
step five: and respectively endowing the x default groups with the authority, and respectively endowing the users in the x default groups with the corresponding authority.
Further, the step of setting the report request transmission module is as follows:
the method comprises the following steps: after the report Server end modifies the configuration of the report checked through the bill, the report request needs to be called to obtain the bill;
step two: splicing the obtained bill with the address and the parameters of the report server to form a URL;
step three: and giving the URL to a front-end page, using the page to access, and displaying the report.
Further, when the report is displayed, the statement is determined by calling RestAPI of the report, when the RestAPI is called, the user name of the report is used, the token is firstly obtained by the password, the token is passed in a parameter form, and the workbook and the report data are obtained in a stream form; acquiring XML-formatted data, analyzing the data through XML, finally packaging the data into classes, and returning to a front-end display page; and data is required to be taken from the report Server every time of calling, so that the real-time performance of the data is ensured.
Further, the step of setting the browsing history interface is as follows:
the method comprises the following steps: when a user logs in, a corresponding small database g1 is set for the user information;
step two: when a user clicks and accesses a report, setting n (n is 1, 2, n and n) of accessed report data to be recorded into the small database g 1;
step three: and (3) giving a mark m (m is 1, 2, the sum of m and m), carrying out correspondence and corresponding link design on the report m and the report data n, inputting the accessed data of the report m into a small database g1, and displaying a history list to the front end.
Furthermore, a first login detection module is arranged in the user mapping module, when logging in, if the user does not exist in the middleware database, the user is assigned to a group x1 by default, x1 is a default report user, the api of the report is called according to the user name and the password of the default report, the workbook data is taken, and the foreground page is displayed.
Further, the background management is divided into 3 modules, namely 'report user management', 'group management', 'view management', and the like, and the view name can be modified, and the modified content is the local view name and the display name.
Furthermore, the report user management module maintains the password of the report user in a local library, when an API is used or the report library is queried, the report user name can be obtained, the password cannot be obtained, the token can be taken only when the view and the workbook list are displayed, and the RestAPI can be called to query the related data of the report after the token is transmitted;
the group management module is used as a middle bridge for mapping the user and the report user, the user name and the report user name are mainly maintained in group management, and the report user option in the group is displayed by inquiring the report user name and cannot be modified randomly;
the view management module is used for giving an alias to the view name acquired from the report server and displaying the alias of the report when the page is displayed; the default of the thumbnail of the report is obtained from a report server, and the thumbnail is uploaded to a local thumbnail through view management to replace the original view thumbnail.
Furthermore, after the view data is displayed to the foreground, when a user clicks a certain view, the corresponding bill is taken according to the report user name, after the bill is obtained, the bill, the data of the report Server, such as IP (Internet protocol) and the like, are spliced together with the url of the view and some parameters needing to control the style, and the spliced path is returned to the front-end page.
Furthermore, the middleware is matched with a third-party application, and the user data is transmitted to the middleware so as to be mapped and maintained with the report; in the code of the middleware, parameters are received, and user data is captured.
The invention has the beneficial effects that:
through this removal end report form middleware, can be convenient carry out integrated whole with the report form, can directly look over report form data through the cell-phone, make things convenient for customer's mobile office.
1. The lack of moving BI products in an open platform (or third party application) is compensated.
2. The report service is integrated into the mobile micro-application ecology, and the report service user ecology is improved.
3. And (4) opening the micro application or small program mobile entry of the enterprise user of the original report server, and unifying the entries.
4. The user permission of the third-party application user and the report server is seamlessly integrated, secondary authentication is not needed for user access, and user experience is improved.
5. The perfect mobile terminal adaptation keeps the original report interactive function and supports the browsing of the horizontal screen mode report.
6. The multi-end access requirements of the private cloud and the public cloud of the report user are supported, and the non-inductive cloud access can be realized.
7. Moving: and the user directly checks the report form through the mobile phone.
8. Real-time implementation: providing more realistic data in a shorter time
9. Self-help: saving time and cost
10. Expanding: the middleware is a report and a middle service, has strong expansibility, can be displayed on the mobile terminal after the report and the thumbnail are changed, and can be displayed on the mobile terminal after the report name is modified.
Detailed Description
The technical scheme of the invention is further explained by the specific implementation mode in combination with the attached drawings.
Wherein the showings are for the purpose of illustration only and are shown by way of illustration only and not in actual form, and are not to be construed as limiting the present patent; to better illustrate the embodiments of the present invention, some components of the drawings may be omitted, enlarged or reduced, and do not represent the size of an actual product.
The application container-based mobile end BI middleware technology shown in the figures 1 and 2 comprises a middleware which builds a bridge between an application container and a report server; checking user data in the report through bridging, and synchronizing the user data of the report into a local project library for mapping between a third-party user and a report user;
setting a user mapping module, acquiring login user information through an interface provided by an application container, distributing the login user to a default group, mapping the default group with a report user in a report Server, and realizing mapping between the login user and the report user in the report Server;
the group and the report user are in one-to-one correspondence, different users are distributed to different groups, the authority of different groups is set, the same group corresponds to the same report user, and the owned authorities are the same;
setting a report request transmission module, after a user logs in, obtaining report user data according to mapping, accessing the report through the bill of the report, splicing and accessing the URL of the report, and realizing the function of viewing the report;
setting a browsing history interface, storing accessed report data into the history data of a user after the user successfully accesses a report, wherein the database adopts an independent database, and the report can be correspondingly displayed when a certain report is clicked in a history list;
setting a report collection interface, wherein a user is interested in a certain workbook or report, can click a collection identifier of a workbook or a report page, and stores the workbook or the report into a collection library of the user, and the same as a history list is that the collected workbook is clicked in a display page collected by the user, and all reports under the workbook can be listed under the workbook; clicking the collected report to display the report;
and setting a background management function for maintaining the mapping between the user and the group and maintaining the mapping between the group and the report user.
The steps of setting the user mapping module are as follows:
the method comprises the following steps: logging in user information, identifying the user information through big data, recording the compared information characteristic of the user information after comparison as a, setting x default groups, and giving specific characteristics to the x default groups;
step two: comparing the characteristics of the comparison information a with the specific characteristics of the x default groups one by one, and displaying the comparison coincidence percentage;
step three: comparing the x percentages, taking out the maximum value, and corresponding the comparison information a with the default group n of the percentages;
step four: assigning the user information to a default group n;
step five: and respectively endowing the x default groups with the authority, and respectively endowing the users in the x default groups with the corresponding authority.
The steps of setting the report request transmission module are as follows:
the method comprises the following steps: after the report Server end modifies the configuration of the report checked through the bill, the report request needs to be called to obtain the bill;
step two: splicing the obtained bill with the address and the parameters of the report server to form a URL;
step three: and giving the URL to a front-end page, using the page to access, and displaying the report.
The method comprises the steps that a report is displayed according to the RestAPI of the report, the user name of the report is used when the RestAPI is called, a token is obtained through a password, the token is transmitted in a parameter mode, and a workbook and report data are obtained in a stream mode; acquiring XML-formatted data, analyzing the data through XML, finally packaging the data into classes, and returning to a front-end display page; and data is required to be taken from the report Server every time of calling, so that the real-time performance of the data is ensured.
The steps of setting the browsing history interface are as follows:
the method comprises the following steps: when a user logs in, a corresponding small database g1 is set for the user information;
step two: when a user clicks and accesses a report, setting n (n is 1, 2, n and n) of accessed report data to be recorded into the small database g 1;
step three: and (3) giving a mark m (m is 1, 2, the sum of m and m), carrying out correspondence and corresponding link design on the report m and the report data n, inputting the accessed data of the report m into a small database g1, and displaying a history list to the front end.
And a first login detection module is arranged in the user mapping module, if no user exists in the middleware database during login, the user is assigned to a group x1 by default, x1 is a default report user, the api of the report is called according to the user name and the password of the default report, the workbook data is taken, and the foreground page is displayed.
The background management is divided into 3 modules, namely 'report user management', 'group management', 'view management', and the like, and the view names can be modified, and the modified contents are the local view names and the display names.
The report user management module is used for maintaining the password of the report user in a local library, acquiring a report user name and not acquiring the password when an API is used or the report library is inquired, taking the token only when the user name and the password of the report are needed when a view and a workbook list are displayed, calling RestAPI after the token is transmitted, and inquiring related data of the report;
the group management module is used as a middle bridge for mapping the user and the report user, the user name and the report user name are mainly maintained in the group management, and the report user option in the group is displayed by inquiring the report user name and cannot be modified randomly;
the view management module is used for giving an alias to the view name acquired from the report server and displaying the alias of the report when the page is displayed; the default of the thumbnail of the report is obtained from a report server, and the thumbnail is uploaded to a local thumbnail through view management to replace the original view thumbnail.
After the view data is displayed to the foreground, when a user clicks a certain view, the user firstly takes a corresponding bill according to a report user name, and after the bill is obtained, the bill, the IP (Internet protocol) and other data of a report Server are spliced together with url of the view and parameters of patterns needing to be controlled, and the spliced path is returned to a front-end page.
The middleware is matched with the third-party application, and the user data is transmitted to the middleware so as to be mapped and maintained with the report; in the code of the middleware, parameters are received, user data is captured
The foregoing is merely exemplary and illustrative of the present invention and various modifications, additions and substitutions may be made by those skilled in the art to the specific embodiments described without departing from the scope of the invention as defined in the following claims.