Report page display method and device, electronic equipment and storage medium
By obtaining and utilizing the metadata configuration information of the report page, dynamically determine the display indicators and calculate the indicator values, the problem of low report development efficiency in the existing technology is solved, and efficient report page display and personalized display needs are achieved.
Patent Information
- Application Number
- CN202411449176.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-16
- Publication Date
- 2024-12-27
AI Technical Summary
In the existing technology, in a system with intensive data display, the development efficiency of report pages is inefficient, and a large amount of code is required to implement new indicators, which is difficult to meet the needs of personalized display.
By obtaining the metadata configuration information of the report page, calculating logical configuration information based on the relationship between the page area and indicators and indicators, dynamically determine the target display indicators and calculate the indicator values, and realize the display of the report page, and add new ones without writing code. Report metrics.
It improves report development efficiency, meets different display needs, and realizes fine-grained control of page area display, shortens development time.
Smart Images

Figure CN119201113A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of computer technology, and in particular to a report page display method, device, electronic device and storage medium. Background Art
[0002] For systems with intensive data display, data can be presented in the form of reports. Displaying data on report pages can make data more intuitive, help perform statistical analysis on the data, and fully tap the value contained in the data. Summary of the invention
[0003] The present application aims to solve one of the technical problems in the related art at least to some extent.
[0004] To this end, the first purpose of this application is to propose a report page display method to achieve efficient development of reports and meet the personalized display requirements of report pages.
[0005] The second objective of the present application is to provide a report page display device.
[0006] The third objective of the present application is to provide an electronic device.
[0007] A fourth objective of the present application is to provide a computer-readable storage medium.
[0008] A fifth object of the present application is to provide a computer program product.
[0009] To achieve the above-mentioned purpose, the first embodiment of the present application proposes a report page display method, including:
[0010] Obtaining a display request for a report page to be displayed; wherein the display request includes a page identifier of the report page to be displayed;
[0011] According to the page identifier, metadata configuration information of the report page to be displayed is obtained; wherein the metadata configuration information includes page area configuration information, association relationship between page areas and indicators, and indicator calculation logic configuration information, and the page area configuration information includes configuration information of each page area in the report page to be displayed;
[0012] Determining, according to the association relationship, a target display indicator in each of the page areas and a first calculation indicator corresponding to the target display indicator;
[0013] Obtaining a first indicator value of the first calculation indicator according to the first calculation logic of the first calculation indicator in the indicator calculation logic configuration information;
[0014] The report page to be displayed is displayed according to the configuration information of each page area, the target display index and the first index value.
[0015] To achieve the above-mentioned purpose, the second embodiment of the present application proposes a report page display device, including:
[0016] A first acquisition module is used to acquire a display request of a report page to be displayed; wherein the display request includes a page identifier of the report page to be displayed;
[0017] A second acquisition module is used to acquire metadata configuration information of the report page to be displayed according to the page identifier; wherein the metadata configuration information includes page area configuration information, association relationship between page areas and indicators, and indicator calculation logic configuration information, and the page area configuration information includes configuration information of each page area in the report page to be displayed;
[0018] A first determination module, configured to determine, according to the association relationship, a target display index in each of the page areas and a first calculation index corresponding to the target display index;
[0019] A third acquisition module, configured to acquire a first indicator value of the first calculation indicator according to the first calculation logic of the first calculation indicator in the indicator calculation logic configuration information;
[0020] A display module is used to display the report page to be displayed according to the configuration information of each page area, the target display index and the first index value.
[0021] To achieve the above-mentioned purpose, the third aspect of the present application provides an electronic device, including: a processor, and a memory communicatively connected to the processor;
[0022] The memory stores computer-executable instructions;
[0023] The processor executes the computer-executable instructions stored in the memory to implement the method as described in the embodiment of the first aspect.
[0024] To achieve the above-mentioned purpose, the fourth aspect embodiment of the present application proposes a computer-readable storage medium, in which computer-readable storage medium is stored computer execution instructions, and when the computer execution instructions are executed by a processor, they are used to implement the method described in the first aspect embodiment.
[0025] To achieve the above-mentioned purpose, the fifth aspect of the present application proposes a computer program product, including a computer program, which implements the method described in the first aspect when executed by a processor.
[0026] The report page display method, device, electronic device and storage medium provided in the present application obtain the metadata configuration information of the report page to be displayed according to the identifier of the report page to be displayed, and determine the target display indicator and the corresponding calculation indicator in each page area according to the association relationship between the page area and the indicator in the metadata configuration information, obtain the indicator value of the corresponding calculation indicator according to the indicator calculation logic configuration information in the metadata configuration information, and then display the report page to be displayed according to the configuration information of each page area, the target display indicator, the indicator value of the corresponding calculation indicator, etc. Therefore, when adding a new report indicator, there is no need to write code, only metadata configuration is required to realize the display of the new report indicator, shortening the development time, improving the report development efficiency, and meeting different display requirements. Based on the configuration information of different page areas and the association information between the page area and the indicator, fine-grained control of the display of the page area can be achieved, and precise control of the report display can be performed.
[0027] Additional aspects and advantages of the present application will be given in part in the description below, and in part will become apparent from the description below, or will be learned through the practice of the present application. BRIEF DESCRIPTION OF THE DRAWINGS
[0028] The above and / or additional aspects and advantages of the present application will become apparent and easily understood from the following description of the embodiments in conjunction with the accompanying drawings, in which:
[0029] Figure 1 A flowchart of a report page display method provided in an embodiment of the present application;
[0030] Figure 2 A flowchart of another report page display method provided in an embodiment of the present application;
[0031] Figure 3 A flowchart of another report page display method provided in an embodiment of the present application;
[0032] Figure 4 A schematic diagram of a report page display process provided in an embodiment of the present application;
[0033] Figure 5 A structural schematic diagram of a report page display device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0034] Embodiments of the present application are described in detail below, and examples of the embodiments are shown in the accompanying drawings, wherein the same or similar reference numerals throughout represent the same or similar elements or elements having the same or similar functions. The embodiments described below with reference to the accompanying drawings are exemplary and are intended to be used to explain the present application, and should not be construed as limiting the present application.
[0035] The report page display method and device according to the embodiment of the present application are described below with reference to the accompanying drawings.
[0036] Figure 1 A flowchart of a report page display method provided in an embodiment of the present application.
[0037] In some embodiments, for a data-intensive system, for each report page, it is usually necessary to write classes and methods in the MVC three-tier architecture. When a new indicator is added to the report page, it is necessary to write code again, which reduces the efficiency of report development. Among them, MVC refers to a software architecture pattern, namely Model-View-Controller.
[0038] To address this problem, the present application provides a report page display method to achieve efficient report development and meet the personalized display requirements of report pages, such as Figure 1 As shown, the report page display method includes the following steps:
[0039] Step 101: Obtain a display request for a report page to be displayed.
[0040] In this application, when a user triggers a display control of a report page to be displayed on a client, or inputs a Uniform Resource Locator (URL) of a report page to be displayed, the client may send a display request of the report page to be displayed to the server. The display request may include a page identifier of the report page to be displayed, and may also include user role information, etc.
[0041] For example, the page identifier of the report page to be displayed may be the name of the report page to be displayed, or the data subject name of the report page to be displayed, or the data subject identifier of the report page to be displayed.
[0042] The user role information may include the user's position information, the user's job title information, etc.
[0043] For example, each data indicator display page on the front end can be abstracted into a data theme, which can be identified by letters. Each data theme has a corresponding viewing permission, and the page permission configuration information is obtained. For example, the page permission configuration information example is as follows Table 1:
[0044] Table 1
[0045] Data Subject Data Subject Identifier post Health Insurance Financial Data A Health insurance data viewing post Agricultural Insurance Financial Data B Agricultural insurance data viewing post
[0046] In the above Table 1, users in the health insurance data viewing position can view the health insurance financial data page, and users in the agricultural insurance data viewing position can view the agricultural insurance financial data page.
[0047] Step 102: Obtain metadata configuration information of the report page to be displayed according to the page identifier.
[0048] In this application, metadata configuration information can be configured for each report page in advance, so that the correspondence between the metadata configuration information of each report page can be stored in advance, and then the metadata configuration information of the report page to be displayed can be obtained according to the page identifier of the report page to be displayed. The metadata configuration information includes but is not limited to page area configuration information, the association relationship between page area and indicators, indicator calculation logic configuration information, etc.
[0049] Exemplarily, the area displayed on each report page can be subdivided, the report page can be divided into at least one page area, and the page area can be configured to obtain page area configuration information. The page area configuration information may include configuration information of each page area, such as the identification of the page area, the name of the page area, the data subject to which the page area belongs, the page ranking, etc. The page area configuration information may be shown in Table 2 below:
[0050] Table 2
[0051]
[0052] Some fields in Table 2 above are explained as follows:
[0053] Data time acquisition logic: The same area may contain multiple data indicators. For example, [Premium Ranking] may include premiums, premiums receivable, claims and other data. Different data come from different business systems, and the data time provided may not be the same, but there should be a unified display logic on the page, such as taking the maximum date, minimum date or current natural date of all indicators.
[0054] Area Description: This field stores the description of the signing criteria and data source of the area on the page. It is rich text and can be directly explained and displayed by the front end. Among them, the signing criteria can refer to a series of specifications and standards that need to be followed in the signing process, which involves multiple aspects such as signing time, premium calculation, and contract content.
[0055] From the page area configuration information shown in Table 2 above, it can be seen that this report page contains three page areas, from top to bottom, they are [Premium Ranking], [Institution Premium Ranking], and [Product Premium Ranking].
[0056] For example, the association between the page area and the indicator can be configured according to the display requirements, and the association can include the corresponding relationship between each page area, display indicator, calculation indicator, display form, etc. Among them, the display indicator can refer to a specific data point or statistical data that has a direct association with the page area and needs to be visualized or displayed. In addition, the display indicators in different page areas are different, and the same page area can include one or more display indicators. The calculation indicators corresponding to different display indicators can be the same or different, and the display forms of the same calculation indicator in different page areas can be different.
[0057] For example, the relationship between page areas and indicators can be shown in Table 3 below:
[0058] Table 3
[0059] Page Area ID Display indicator id Calculate indicator id Display form A01 A0101 Idx01 Bar Chart A01 A0102 Idx02 Pie Chart A02 A0201 Idx01 Line chart
[0060] In the above Table 3, the calculated indicator Idx01 is referenced in two page areas, but the display forms are different, namely a bar chart and a line chart.
[0061] For example, the various graphs and tables on the front end can be abstracted into a two-dimensional table, that is, no matter how complex the data display requirements are, the table header plus data structure can meet the needs of data supply, and some data specifically displayed in the area can also be defined as indicators. Among them, the indicator configuration can include four parts, one is the indicator calculation logic, the second is the indicator data source, the third is the indicator data return format, and the fourth is the association between the page area and the indicator. Among them, the association between the page area and the indicator can be explained as above.
[0062] Among them, the indicator calculation logic configuration may refer to configuring the calculation logic of the calculation indicator itself, and the indicator calculation logic configuration information may be obtained, and the indicator calculation logic configuration information may include but is not limited to the identification of each calculation indicator, indicator name, calculation logic, indicator description, etc. In addition, the configuration information may not be related to the display form and display area.
[0063] For example, an example of indicator calculation logic configuration information may be shown in Table 4 below:
[0064] Table 4
[0065]
[0066] The calculation logic of each calculation indicator can be clearly understood through the indicator calculation logic configuration information shown in Table 4. The data frequency field will perform different interception processing on the query date string due to different configurations to meet different requirements.
[0067] Step 103: Determine the target display index in each page area and the first calculation index corresponding to the target display index according to the association relationship.
[0068] In the present application, the target display indicator in the page area and the first calculation indicator corresponding to the target display indicator can be determined by querying the association relationship between the page area and the indicator.
[0069] Exemplarily, all display indicators corresponding to the page area in the association relationship can be used as target display indicators. For example, by querying the above Table 3, display indicators A0101 and A0102 can be used as target display indicators for page area A01, and display indicator A0201 can be used as target display indicator for page area A01.
[0070] Step 104: Obtain a first indicator value of the first calculation indicator according to the first calculation logic of the first calculation indicator in the indicator calculation logic configuration information.
[0071] In the present application, the first calculation logic of the first calculation indicator can be determined by querying the indicator calculation logic configuration information, and the first indicator value of the first calculation indicator can be obtained according to the first calculation logic.
[0072] Exemplarily, according to the first calculation logic, data can be obtained from an original data table associated with the first calculation indicator and calculated to obtain a first indicator value of the first calculation indicator.
[0073] Step 105 , displaying the report page to be displayed according to the configuration information of each page area, the target display index and the first index value.
[0074] The configuration information of each page area may include but is not limited to the identification of each page area, the name of each page area, data time acquisition logic, page sorting, etc.
[0075] Exemplarily, the identification of each page area, the name of each page area, the ranking of each page area, the target display indicator corresponding to each page area, the first indicator value of the first calculation indicator corresponding to the target display indicator, etc. in the configuration information of each page area can be returned to the client, so that the client can display the report page to be displayed based on these data.
[0076] In the embodiment of the present application, the metadata configuration information of the report page to be displayed is obtained according to the identifier of the report page to be displayed, and the target display index and the corresponding calculation index in each page area are determined according to the association relationship between the page area and the index in the metadata configuration information, and the index value of the corresponding calculation index is obtained according to the index calculation logic configuration information in the metadata configuration information, and then the report page to be displayed is displayed according to the configuration information of each page area, the target display index, the index value of the corresponding calculation index, etc. Therefore, when adding a new report indicator, there is no need to write code, only metadata configuration is required, and the display of the new report indicator can be realized, which shortens the development time, improves the report development efficiency, and can also meet different display requirements. Based on the configuration information of different page areas and the association information between the page area and the indicator, fine-grained control of the display of the page area can be achieved, and precise control of the report display can be performed.
[0077] Figure 2 A flowchart of another report page display method provided in an embodiment of the present application.
[0078] like Figure 2 As shown, the method may include the following steps:
[0079] Step 201: Obtain a display request for a report page to be displayed.
[0080] In the present application, the display request may include the page identifier of the report page to be displayed, and may also include user role information, etc. The user role information may be as described in the above embodiment, and will not be described in detail.
[0081] Step 202: Obtain metadata configuration information of the report page to be displayed according to the page identifier.
[0082] In the present application, step 202 can be implemented in any of the embodiments of the present application, so it will not be described in detail here.
[0083] Exemplarily, viewing permissions may be set for report pages, such as the page permission configuration information shown in Table 1 in the above embodiment. The display request may also include user role information. Based on the user role information, at least one report page with access permissions may be determined by querying the page permission configuration information. If at least one report page includes a report page to be displayed, indicating that the user has viewing permissions for the report page to be displayed, metadata configuration information is obtained based on the page identifier of the report page to be displayed.
[0084] Therefore, after obtaining a display request for a report page to be displayed, it is possible to determine whether the user has the authority to view the report page to be displayed based on the user authority information in the display request. If the user has the authority to view the report page to be displayed, the metadata configuration information of the report page to be displayed is obtained based on the page identifier of the report page to be displayed, thereby improving the security of the report page display.
[0085] Step 203: Determine the candidate display indicators in each page area according to the association relationship.
[0086] In the present application, all display indicators corresponding to a page area in the association relationship between the page area and the indicator can be determined as candidate display indicators for the page area.
[0087] For example, based on the above Table 3, the display indicators A0101 and A0102 may be used as candidate display indicators for the page area A01.
[0088] Step 204: query the page area authority configuration information according to the user role information to determine the target display indicators that the user has the authority to view among the candidate display indicators.
[0089] In this application, the visible permissions of different user role information can be configured for the same page area to obtain page area permission configuration information. Exemplarily, the metadata configuration information can also include page area permission configuration information, which can include display indicators visible to different user role information in each page area, data themes of report pages to be displayed, etc.
[0090] For example, user role information may refer to user position information, and page area permission configuration information of a report page with data subject A may be as shown in Table 5 below:
[0091] Table 5
[0092] post Data Subject Page area id Display indicator id head office A A01 A0101 head office A A01 A0102 Provincial Company A A01 A0101
[0093] As can be seen in Table 5, for the report page with data subject A, the visibility of the display indicators displayed in the same page area is different depending on whether the position is a provincial company or a head office.
[0094] In this application, the target display indicators that the user has the authority to view can be determined among the candidate display indicators by querying the page area authority configuration information according to the user role information. For example, if the user's position is a provincial company, then the user in page area A01 can view display indicator A0101, but has no authority to view A0102.
[0095] Step 205: query the association relationship according to the target display indicator and determine the first calculation indicator.
[0096] In the present application, since the association between the page area and the indicator includes the correspondence between the page area, the display indicator and the calculation indicator, the first calculation indicator corresponding to the target display indicator can be determined by searching the association based on the target display indicator in the page area.
[0097] Step 206: Obtain a first indicator value of the first calculation indicator according to the first calculation logic of the first calculation indicator in the indicator calculation logic configuration information.
[0098] In the present application, step 206 can be implemented in any of the embodiments of the present application, so it will not be described in detail here.
[0099] Step 207: Display the report page to be displayed according to the configuration information of each page area, the target display index and the first index value.
[0100] In this application, the return format of the first indicator value can be configured to obtain the return format configuration information to associate the column name returned by SQL with the data required for front-end display. For example, the return format configuration information is shown in Table 6 below:
[0101] Table 6
[0102] Calculation indicator ID Data column code Data column name Sorting Column Description Does the download include Idx01 bf Premium 1 Health insurance premiums yes Idx01 lp Claim amount 2 Health insurance claim amount no
[0103] Exemplarily, the metadata configuration information may also include return format configuration information. The front-end encapsulates components such as pie charts, bar charts, tables, broken lines, and cards. The server may encapsulate the configuration information, display indicators, and first indicator values of each page area according to the return format configuration information, obtain a response message, and send the response message to the client, so that the client renders the front-end component corresponding to the target display indicator in each page area based on the response message, and displays the report page to be displayed. Thus, based on metadata configuration and front-end component encapsulation, efficient development of reports that can be quickly configured can be achieved.
[0104] In an embodiment of the present application, the display request may also include user role information, and the metadata configuration information may also include page area permission configuration information. Therefore, based on the user role information and the page area permission configuration information, the display indication that the user has viewing authority can be determined, which can improve the security of the report data and meet different display requirements.
[0105] Figure 3 A flowchart of another report page display method provided in an embodiment of the present application.
[0106] like Figure 3 As shown, the method may include the following steps:
[0107] Step 301: Obtain a display request for a report page to be displayed.
[0108] In the present application, step 301 can be implemented in any of the embodiments of the present application, so it will not be described in detail here.
[0109] Step 302: Obtain metadata configuration information of the report page to be displayed according to the page identifier.
[0110] In the present application, step 302 can be implemented in any of the embodiments of the present application, so it will not be described in detail here.
[0111] Step 303: Determine the target display index in each page area and the first calculation index corresponding to the target display index according to the association relationship.
[0112] In the present application, step 303 can be implemented in any of the embodiments of the present application, so it will not be described in detail here.
[0113] Step 304: According to the first calculation indicator, query the indicator data source configuration information to determine the intermediate table associated with the first calculation indicator.
[0114] In this application, in order to adapt to the use of some complex scenarios, improve the query efficiency in complex scenarios, and shorten the page response time, the results of complex query calculations can be stored in an intermediate table to ensure that the logic of the indicator query part that interacts with the front end is as simple as possible. In this application, the intermediate table associated with the first calculation indicator can be obtained based on the calculation result by using certain calculation logic on the original data table associated with the first calculation indicator.
[0115] In this application, metadata configuration information may also include indicator data source configuration information, which may include the corresponding relationship between calculation indicators, database tables, etc. Exemplarily, the indicator data source configuration information may indicate which table in the indicator data source database, and may also indicate which field represents the data time, so as to confirm the current latest data timeliness. For example, the indicator data source configuration information may be as shown in Table 7 below:
[0116] Table 7
[0117] Calculation indicator ID Database Table Time Field Idx01 cwdata stsdate Idx02 ... ...
[0118] In the present application, the database table corresponding to the first calculation indicator can be determined according to the first calculation indicator by querying the indicator data source configuration information, and the database table can be used as an intermediate table associated with the first calculation indicator.
[0119] Optionally, the calculation configuration information and the calculation rule configuration information corresponding to the initial intermediate table can be obtained, and based on the calculation frequency configuration information, the second calculation indicator that needs to perform the calculation task in the initial intermediate table can be determined, and based on the original data table associated with the second calculation indicator and based on the second calculation logic of the second calculation indicator in the calculation rule configuration information, the second indicator value of the second indicator can be obtained, and based on the second indicator value, the initial intermediate table can be updated to obtain the intermediate table.
[0120] The calculation configuration information may be obtained by configuring the start time, calculation frequency, and current time of the intermediate table calculation. For example, the calculation configuration information may be shown in Table 8 below:
[0121] Table 8
[0122] Calculate indicator id Calculate interval Calculate the last execution time Calculated data cutoff time calidx1 1 hour 2024-07-14 9:00:00 2024-01-01 calidx2 1 hour 2024-07-14 8:00:00 2024-03-04
[0123] In the above Table 8, the calculation last execution time may be the time when the second calculation indicator is last executed by the calculation task.
[0124] The calculation rule configuration information may be obtained by configuring the data time acquisition logic, calculation logic, storage logic, deletion logic, etc. for the second calculation indicator. For example, the calculation rule configuration information may be as shown in Table 9 below:
[0125] Table 9
[0126]
[0127] Some fields in Table 9 above are explained as follows:
[0128] Data time acquisition logic: represents the latest data time of the original data table involved in the calculation indicator.
[0129] Calculation logic: The logic of calculating the indicator to the intermediate table.
[0130] Save logic: After the calculation logic is executed, the configuration of which fields of the obtained data are inserted into which intermediate table. Among them, the placeholder in the inserted value part, such as #bf, will be automatically associated with the column name of the data returned in the calculation logic.
[0131] Deletion logic: If the data of a certain day is calculated repeatedly, it should be deleted before querying. This part is the deletion logic. Placeholders in the configuration part such as #stsdate can be associated by name and automatically replaced in the calculation.
[0132] For example, the calculation task of the second calculation indicator may be scheduled according to a preset calculation frequency, such as scheduling at a frequency of 5 minutes, wherein the single scheduling logic may be as follows:
[0133] Search the calculation frequency configuration information, find all the second calculation indicators whose sum of the last execution time and the calculation interval is less than the current time, and perform the following processing on each second calculation indicator:
[0134] While (calculated data deadline <= business data maximum time) {
[0135] Result data = execSQL (calculation logic);
[0136] execSQL(delete logic);
[0137] execSQL(save logic);
[0138] Calculate data cutoff time++;
[0139] }
[0140] Therefore, pre-calculation can be performed based on the calculation frequency configuration information and the calculation rule configuration information to obtain an intermediate table. Therefore, when a display request for a report page is received, the indicator value of the first calculation indicator required to display the report page can be obtained by directly querying the intermediate table, without obtaining data from the original initial table and then calculating it, thereby improving query efficiency.
[0141] Step 305: query the intermediate table according to the first calculation logic to obtain the first indicator value.
[0142] In the present application, based on the first calculation logic, the query result can be obtained by querying the intermediate table, and the query result can be used as the first indicator value of the first calculation indicator.
[0143] Step 306: Display the report page to be displayed according to the configuration information of each page area, the target display index and the first index value.
[0144] In the present application, step 306 can be implemented in any of the embodiments of the present application, so it will not be described in detail here.
[0145] In an embodiment of the present application, the metadata configuration information may also include indicator data source configuration information. The indicator data source configuration information can be queried to determine the intermediate table associated with the first calculation indicator. Based on a simple first calculation logic, the intermediate table can be directly queried to obtain the first indicator value, thereby improving query efficiency and shortening report page response time.
[0146] In one embodiment of the present application, based on the above embodiment, the metadata configuration information may also include return format configuration information, and the return format configuration information may include download permissions for the first calculation indicator. For example, the calculation indicator Idx01 in Table 6 can be downloaded, but the calculation indicator Idx02 cannot be downloaded. Therefore, when the user downloads the data in the report page to be displayed, the indicator value of the corresponding calculation indicator can be downloaded based on the download permission.
[0147] In the present application, a download control can be set in the report page to be displayed by the client. The user can download the data on the report page by triggering the download control. If an indicator download request for the report page to be displayed is obtained, the downloadable third calculation indicator can be determined from the first calculation indicator based on the download permission of the first calculation indicator in the return format configuration information, and then a download file can be generated based on the third calculation indicator and the first indicator value of the third calculation indicator, and the downloaded file can be returned to the client.
[0148] The indicator download request may include the page identifier of the report page to be displayed, user role information, etc.
[0149] In an embodiment of the present application, the metadata configuration information may also include return format configuration information. When an indicator download request is received, the third calculation indicator that can be downloaded can be determined based on the download permission of the first calculation indicator set in the return format configuration information, thereby generating a download file based on the third calculation indicator and the first indicator value of the third calculation indicator, thereby achieving precise control over the download of report page data.
[0150] In the report page display method in the embodiment of the present application, from the perspective of the process of a user accessing a page, four common interfaces can be provided, namely, a data subject query interface, a subject area query interface, an area indicator detail acquisition interface, and a data download interface.
[0151] (1) Data subject query interface
[0152] It involves page area permission configuration information and page permission configuration information. You can query the current user's existing positions and use the position information to filter the data topics that the user has permission to view, that is, the front-end report page.
[0153] (2) Subject area query interface
[0154] It involves the relationship between page areas and indicators, indicator data source configuration table, and page area permission configuration information. Based on the data subject that the user has permission to access, the display indicators, calculation indicators, display formats, etc. contained in the data subject are calculated and returned in sequence.
[0155] For each page area, the data time of the page area can be obtained according to the indicator data source configuration information, page area configuration information, etc.
[0156] (3) Regional indicator details acquisition interface
[0157] Involving the configuration information of the calculation logic of indicator data and the return format of indicator data. According to the display indicators under the page area accessible to users, the indicator values are obtained in turn according to the calculation logic of the calculation indicators corresponding to each display indicator, and the response message is encapsulated according to the return format configuration information.
[0158] (4) Data download interface
[0159] Involving the configuration information of the calculation logic of indicator data and the return format of indicator data. According to the display indicators under the page area accessible to users and the configuration of the [Can be downloaded] item in the return format configuration information, the Excel file header can be organized, and the indicator values can be obtained according to the calculation logic of each calculation indicator, and the indicator data can be written to complete the export and download.
[0160] (5) Front-end common component encapsulation
[0161] The front end can encapsulate components such as pie charts, bar charts, tables, broken lines, cards, etc., and encapsulate them according to the message structure returned by the back-end public interface. For encapsulated components, you only need to enter the indicator details to obtain the message data returned by the interface to complete the development and display.
[0162] In order to facilitate understanding of the report page display method of this application, the following Figure 4 To explain, Figure 4 A schematic diagram of a report page display process provided in an embodiment of the present application.
[0163] like Figure 4 As described in, metadata configuration and intermediate table calculation configuration can be performed on the report page as needed to obtain metadata configuration information and intermediate table calculation configuration information respectively, wherein the metadata configuration information may include the association relationship between the page area and the indicator, the page area authority configuration information, the Fanhu format configuration information, the indicator calculation logic configuration information, etc., and Figure 4 The page area configuration information, indicator data source configuration information, etc. not shown in the figure, the intermediate table calculation configuration information may include calculation frequency configuration information, calculation rule configuration information, etc.
[0164] Based on the configuration information of the intermediate table calculation, data is prepared through automatic tasks, and based on the data in the original data table, the intermediate table is obtained, and the intermediate table is used as the data source of the report page. When a display request for the report page is received, the indicator data can be obtained from the intermediate table, and the data required for the display of the report page can be returned to the front end through the public interface. The front end can render the encapsulated components, such as bar charts, pie charts, tables, broken lines, etc., based on the response message returned by the public interface, so as to display the report page. Among them, the public interface may include as shown in the above embodiment.
[0165] In order to implement the above embodiment, the present application also proposes a report page display device. Figure 5 A structural schematic diagram of a report page display device provided in an embodiment of the present application.
[0166] like Figure 5 As shown, the report page display device 500 includes:
[0167] The first acquisition module 510 is used to acquire a display request of a report page to be displayed; wherein the display request includes a page identifier of the report page to be displayed;
[0168] The second acquisition module 520 is used to acquire metadata configuration information of the report page to be displayed according to the page identifier; wherein the metadata configuration information includes page area configuration information, the association relationship between the page area and the indicator, and the indicator calculation logic configuration information, and the page area configuration information includes the configuration information of each page area in the report page to be displayed;
[0169] A first determination module 530 is used to determine the target display index in each page area and the first calculation index corresponding to the target display index according to the association relationship;
[0170] A third acquisition module 540 is used to acquire a first indicator value of the first calculation indicator according to the first calculation logic of the first calculation indicator in the indicator calculation logic configuration information;
[0171] The display module 550 is used to display the report page to be displayed according to the configuration information of each page area, the target display index and the first index value.
[0172] Furthermore, in a possible implementation of the embodiment of the present application, the display request further includes user role information, the metadata configuration information further includes page area authority configuration information, and the first determination module 530 is used to:
[0173] Determining candidate display indicators in each of the page areas according to the association relationship;
[0174] According to the user role information, query the page area permission configuration information to determine the target display indicator that the user has the permission to view among the candidate display indicators;
[0175] According to the target display indicator, the association relationship is queried to determine the first calculation indicator.
[0176] Furthermore, in a possible implementation of the embodiment of the present application, the metadata configuration information also includes indicator data source configuration information, and the third acquisition module 540 is used to:
[0177] According to the first calculation indicator, query the indicator data source configuration information to determine the intermediate table associated with the first calculation indicator;
[0178] According to the first calculation logic, the intermediate table is queried to obtain the first indicator value.
[0179] Furthermore, in a possible implementation of the embodiment of the present application, the device may also include:
[0180] A fourth acquisition module is used to acquire the calculation frequency configuration information and calculation rule configuration information corresponding to the initial intermediate table;
[0181] A second determination module is used to determine a second calculation index that needs to execute a calculation task in the initial intermediate table according to the calculation frequency configuration information;
[0182] a fifth acquisition module, configured to acquire, according to the original data table associated with the second calculation indicator and based on the second calculation logic of the second calculation indicator in the calculation rule configuration information, a second indicator value of the second indicator;
[0183] The sixth acquisition module is used to update the initial intermediate table according to the second indicator value to obtain the intermediate table.
[0184] Furthermore, in a possible implementation of the embodiment of the present application, the metadata configuration information includes indicator return format configuration information, and the display module 550 is used to:
[0185] According to the return format configuration information, the configuration information of each page area, the display index and the first index value are encapsulated to obtain a response message;
[0186] The response message is sent to the client, so that the client renders the front-end components corresponding to the target display indicators in each page area based on the response message, and displays the report page to be displayed.
[0187] Furthermore, in a possible implementation of the embodiment of the present application, the display request also includes user role information, and the first acquisition module 510 is used to:
[0188] Determining, based on the user role information, at least one report page to which the user has access permissions;
[0189] In response to the at least one report page including the report page to be displayed, the metadata configuration information is acquired according to the page identifier.
[0190] Furthermore, in a possible implementation of the embodiment of the present application, the metadata configuration information also includes return format configuration information, and the device may also include:
[0191] a third determining module, configured to, in response to obtaining an indicator download request for the report page to be displayed, determine a third calculation indicator from the first calculation indicators according to the download authority of the first calculation indicator in the return format configuration information;
[0192] A generating module, used for generating a download file according to the third calculation index and the first index value of the third calculation index;
[0193] The sending module is used to return the downloaded file to the client.
[0194] It should be noted that the above explanation of the report page display method embodiment is also applicable to the report page display device of this embodiment, and will not be repeated here.
[0195] In the embodiment of the present application, the metadata configuration information of the report page to be displayed is obtained according to the identifier of the report page to be displayed, and the target display index and the corresponding calculation index in each page area are determined according to the association relationship between the page area and the index in the metadata configuration information, and the index value of the corresponding calculation index is obtained according to the index calculation logic configuration information in the metadata configuration information, and then the report page to be displayed is displayed according to the configuration information of each page area, the target display index, the index value of the corresponding calculation index, etc. Therefore, when adding a new report indicator, there is no need to write code, only metadata configuration is required, and the display of the new report indicator can be realized, which shortens the development time, improves the report development efficiency, and can also meet different display requirements. Based on the configuration information of different page areas and the association information between the page area and the indicator, fine-grained control of the display of the page area can be achieved, and precise control of the report display can be performed.
[0196] In order to implement the above embodiments, the present application also proposes an electronic device, comprising: a processor, and a memory communicatively connected to the processor; the memory stores computer-executable instructions; the processor executes the computer-executable instructions stored in the memory to implement the method provided by the above embodiments.
[0197] In order to implement the above embodiments, the present application also proposes a computer-readable storage medium, in which computer-executable instructions are stored. When the computer-executable instructions are executed by a processor, they are used to implement the methods provided by the above embodiments.
[0198] In order to implement the above embodiments, the present application also proposes a computer program product, including a computer program, which implements the methods provided by the above embodiments when executed by a processor.
[0199] The collection, storage, use, processing, transmission, provision and disclosure of user personal information involved in this application are in compliance with relevant laws and regulations and do not violate public order and good morals.
[0200] It should be noted that personal information from users should be collected for legitimate and reasonable purposes and should not be shared or sold outside of these legitimate uses. In addition, such collection / sharing should be carried out after receiving the user's informed consent, including but not limited to notifying the user to read the user agreement / user notice and sign the agreement / authorization including authorization of relevant user information before the user uses the function. In addition, any necessary steps should be taken to protect and safeguard access to such personal information data and ensure that others who have access to personal information data comply with its privacy policy and procedures.
[0201] The present application is expected to provide an implementation scheme for users to selectively block the use or access of personal information data. That is, the present disclosure is expected to provide hardware and / or software to prevent or block access to such personal information data. Once the personal information data is no longer needed, the risk can be minimized by limiting data collection and deleting the data. In addition, when applicable, such personal information is de-identified to protect the privacy of the user.
[0202] In the description of the aforementioned embodiments, the description with reference to the terms "one embodiment", "some embodiments", "example", "specific example", or "some examples" etc. means that the specific features, structures, materials or characteristics described in conjunction with the embodiment or example are included in at least one embodiment or example of the present application. In this specification, the schematic representations of the above terms do not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials or characteristics described may be combined in any one or more embodiments or examples in a suitable manner. In addition, those skilled in the art may combine and combine the different embodiments or examples described in this specification and the features of the different embodiments or examples, without contradiction.
[0203] In addition, the terms "first" and "second" are used for descriptive purposes only and should not be understood as indicating or implying relative importance or implicitly indicating the number of the indicated technical features. Therefore, the features defined as "first" and "second" may explicitly or implicitly include at least one of the features. In the description of this application, the meaning of "plurality" is at least two, such as two, three, etc., unless otherwise clearly and specifically defined.
[0204] Any process or method description in a flowchart or otherwise described herein may be understood to represent a module, fragment or portion of code comprising one or more executable instructions for implementing the steps of a custom logical function or process, and the scope of the preferred embodiments of the present application includes alternative implementations in which functions may not be performed in the order shown or discussed, including performing functions in a substantially simultaneous manner or in the reverse order depending on the functions involved, which should be understood by technicians in the technical field to which the embodiments of the present application belong.
[0205] The logic and / or steps represented in the flowchart or otherwise described herein, for example, can be considered as an ordered list of executable instructions for implementing logical functions, and can be embodied in any computer-readable medium for use by an instruction execution system, device or apparatus (such as a computer-based system, a system including a processor, or other system that can fetch instructions from an instruction execution system, device or apparatus and execute the instructions), or in combination with these instruction execution systems, devices or apparatuses. For the purpose of this specification, "computer-readable medium" can be any device that can contain, store, communicate, propagate or transmit a program for use by an instruction execution system, device or apparatus, or in combination with these instruction execution systems, devices or apparatuses. More specific examples of computer-readable media (a non-exhaustive list) include the following: an electrical connection with one or more wires (electronic device), a portable computer disk box (magnetic device), a random access memory (RAM), a read-only memory (ROM), an erasable and programmable read-only memory (EPROM or flash memory), a fiber optic device, and a portable compact disk read-only memory (CDROM). In addition, the computer-readable medium may even be paper or other suitable medium on which the program is printed, since the program may be obtained electronically, for example, by optically scanning the paper or other medium and then editing, interpreting or processing in other suitable ways if necessary, and then stored in a computer memory.
[0206] It should be understood that the various parts of the present application can be implemented by hardware, software, firmware or a combination thereof. In the above-mentioned embodiments, multiple steps or methods can be implemented by software or firmware stored in a memory and executed by a suitable instruction execution system. For example, if implemented by hardware, as in another embodiment, it can be implemented by any one of the following technologies known in the art or their combination: a discrete logic circuit having a logic gate circuit for implementing a logic function for a data signal, a dedicated integrated circuit having a suitable combination of logic gate circuits, a programmable gate array (PGA), a field programmable gate array (FPGA), etc.
[0207] A person skilled in the art may understand that all or part of the steps in the method for implementing the above-mentioned embodiment may be completed by instructing related hardware through a program, and the program may be stored in a computer-readable storage medium, which, when executed, includes one or a combination of the steps of the method embodiment.
[0208] In addition, each functional unit in each embodiment of the present application may be integrated into a processing module, or each unit may exist physically separately, or two or more units may be integrated into one module. The above-mentioned integrated module may be implemented in the form of hardware or in the form of a software functional module. If the integrated module is implemented in the form of a software functional module and sold or used as an independent product, it may also be stored in a computer-readable storage medium.
[0209] The storage medium mentioned above may be a read-only memory, a magnetic disk or an optical disk, etc. Although the embodiments of the present application have been shown and described above, it can be understood that the above embodiments are exemplary and cannot be understood as limiting the present application. A person of ordinary skill in the art may change, modify, replace and modify the above embodiments within the scope of the present application.
Claims
1. A report page display method, characterized in that: The following steps are involved: Obtaining a display request for a report page to be displayed; wherein the display request includes a page identifier of the report page to be displayed; According to the page identifier, metadata configuration information of the report page to be displayed is obtained; wherein the metadata configuration information includes page area configuration information, association relationship between page areas and indicators, and indicator calculation logic configuration information, and the page area configuration information includes configuration information of each page area in the report page to be displayed; Determining, according to the association relationship, a target display indicator in each of the page areas and a first calculation indicator corresponding to the target display indicator; Obtaining a first indicator value of the first calculation indicator according to the first calculation logic of the first calculation indicator in the indicator calculation logic configuration information; The report page to be displayed is displayed according to the configuration information of each page area, the target display index and the first index value.
2. The method according to claim 1, characterized in that The display request also includes user role information, the metadata configuration information also includes page area authority configuration information, and determining the target display index in each page area and the first calculation index corresponding to the target display index according to the association relationship includes: Determining candidate display indicators in each of the page areas according to the association relationship; According to the user role information, query the page area permission configuration information to determine the target display indicator that the user has the permission to view among the candidate display indicators; According to the target display indicator, the association relationship is queried to determine the first calculation indicator.
3. The method according to claim 1, characterized in that The metadata configuration information also includes indicator data source configuration information, and the obtaining the first indicator value of the first calculation indicator according to the first calculation logic of the first calculation indicator in the indicator calculation logic configuration information includes: According to the first calculation indicator, query the indicator data source configuration information to determine the intermediate table associated with the first calculation indicator; According to the first calculation logic, the intermediate table is queried to obtain the first indicator value.
4. The method according to claim 3, characterized in that Also includes: Obtain calculation frequency configuration information and calculation rule configuration information corresponding to the initial intermediate table; Determining, according to the calculation frequency configuration information, a second calculation index in the initial intermediate table that needs to perform a calculation task; According to the original data table associated with the second calculation indicator, based on the second calculation logic of the second calculation indicator in the calculation rule configuration information, obtaining a second indicator value of the second indicator; The initial intermediate table is updated according to the second indicator value to obtain the intermediate table.
5. The method according to claim 1, characterized in that The metadata configuration information includes indicator return format configuration information, and the displaying of the report page to be displayed according to the configuration information of each page area, the target display indicator and the first indicator value includes: According to the return format configuration information, the configuration information of each page area, the display index and the first index value are encapsulated to obtain a response message; The response message is sent to the client, so that the client renders the front-end components corresponding to the target display indicators in each page area based on the response message, and displays the report page to be displayed.
6. The method according to claim 1, characterized in that The display request also includes user role information, and obtaining metadata configuration information of the report page to be displayed according to the page identifier includes: Determining, based on the user role information, at least one report page to which the user has access permissions; In response to the at least one report page including the report page to be displayed, the metadata configuration information is acquired according to the page identifier.
7. The method according to any one of claims 1 to 6, wherein the metadata configuration information further includes return format configuration information, and the method further includes: In response to obtaining an indicator download request for the report page to be displayed, determining a third calculation indicator from the first calculation indicators according to the download authority of the first calculation indicator in the return format configuration information; Generate a download file according to the third calculation indicator and the first indicator value of the third calculation indicator; The downloaded file is returned to the client.
8. A report page display device, characterized in that: include: A first acquisition module is used to acquire a display request of a report page to be displayed; wherein the display request includes a page identifier of the report page to be displayed; A second acquisition module is used to acquire metadata configuration information of the report page to be displayed according to the page identifier; wherein the metadata configuration information includes page area configuration information, association relationship between page areas and indicators, and indicator calculation logic configuration information, and the page area configuration information includes configuration information of each page area in the report page to be displayed; A first determination module, configured to determine, according to the association relationship, a target display index in each of the page areas and a first calculation index corresponding to the target display index; A third acquisition module, configured to acquire a first indicator value of the first calculation indicator according to the first calculation logic of the first calculation indicator in the indicator calculation logic configuration information; A display module is used to display the report page to be displayed according to the configuration information of each page area, the target display index and the first index value.
9. An electronic device, characterized in that: include: A processor, and a memory communicatively connected to the processor; The memory stores computer-executable instructions; The processor executes the computer-executable instructions stored in the memory to implement the method according to any one of claims 1 to 7.
10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer-executable instructions, which are used to implement the method according to any one of claims 1 to 7 when executed by a processor.
11. A computer program product, characterized in that The invention comprises a computer program, which implements the method according to any one of claims 1 to 7 when being executed by a processor.
Citation Information
Patent Citations
Business data display system, method and device and storage medium
CN114443996A
Method and device for generating report page, equipment and storage medium
CN115048136A
Report query method, device and equipment and computer readable storage medium
CN116541873A
Authority management method and device based on annotation, equipment and storage medium
CN118133314A