Connection query method, system and equipment for report data and storage medium
By constructing and connecting sub-query statements of multiple reports, the database can be directly queried and displayed visually, which solves the problem of tedious and complex multi-report connection query processes, improves user experience and query efficiency, and lowers technical thresholds.
Patent Information
- Application Number
- CN202410817949.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-06-24
- Publication Date
- 2024-10-15
AI Technical Summary
In the existing technology, the multi-report connection query process is cumbersome and complicated, and the technical threshold is high. It is difficult for ordinary users to conduct effective data analysis, and the computing resources are consumed greatly, resulting in poor user experience.
By constructing sub-query statements for multiple reports, and connecting sub-query statements according to the connection relationship, a connection query statement is generated, the database is directly queried and visually displayed, the operation process is simplified, the technical threshold is reduced, and the query efficiency is improved.
It simplifies the operation process of multi-report connection query, lowers the technical threshold, improves user experience, reduces computing resource consumption, and enables rapid acquisition of visual display of multi-report data.
Smart Images

Figure CN118779357A_ABST
Abstract
Description
Technical Field
[0001] The embodiments of the present application relate to the field of computer technology, and in particular to a method, system, device and storage medium for querying a connection of report data. Background Art
[0002] At present, in data analysis and query scenarios, data visualization platforms are usually provided for users to view and display data. As business develops, data analysis scenarios become more and more complex, and the demand for connection queries of multiple data reports increases. For example, for an online product, two reports will be counted: user browsing and user payment. When performing data analysis later, it is necessary to jointly query these two reports (i.e., connection query) to analyze their correlation. For this kind of connection query demand, professional data analysts need to assemble SQL (Structured Query Language) statements by themselves and use SQL statements to query the corresponding data from the database.
[0003] However, the related multi-report connection query method has a relatively high technical threshold for ordinary users. It requires certain SQL knowledge and understanding of the meaning of the source table fields and the calculation method of indicators in order to query the required data. The whole process is complicated and time-consuming, and the computing resources are consumed a lot, and the user experience is relatively poor. Summary of the invention
[0004] The embodiments of the present application provide a method, system, device and storage medium for connection query of report data, which can simplify the operation process of multi-report connection query, improve the user's multi-report connection query experience, and solve the technical problems of cumbersome and complex multi-report connection query process and high technical threshold.
[0005] In a first aspect, an embodiment of the present application provides a connection query method for report data, comprising:
[0006] In response to the received connection query request corresponding to the multiple reports, determine the connection relationship between the reports in the multiple reports, and obtain the query configuration information and visualization report configuration information of the multiple reports;
[0007] Constructing sub-query statements corresponding to each report in the multiple reports based on the query configuration information, and connecting each sub-query statement according to the query configuration information and the connection relationship to obtain a connection query statement;
[0008] Based on the connection query statement, the engine database is queried to obtain report data corresponding to multiple reports, and the report data is visualized based on the visualization report configuration information.
[0009] In a second aspect, an embodiment of the present application provides a report data connection query system, including:
[0010] A response module is configured to respond to the received connection query request corresponding to the multiple reports, determine the connection relationship between the reports in the multiple reports, and obtain the query configuration information and the visualization report configuration information of the multiple reports;
[0011] A construction module is configured to construct sub-query statements corresponding to each report in the multiple reports based on the query configuration information, and connect each sub-query statement according to the query configuration information and the connection relationship to obtain a connection query statement;
[0012] The query module is configured to query the engine database based on the connection query statement, obtain the report data corresponding to the multiple reports, and visualize the report data based on the visualization report configuration information.
[0013] In a third aspect, an embodiment of the present application provides a connection query device for report data, including:
[0014] memory and one or more processors;
[0015] The memory is configured to store one or more programs;
[0016] When the one or more programs are executed by the one or more processors, the one or more processors implement the report data connection query method as described in the first aspect.
[0017] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium, wherein the computer-readable storage medium stores computer-executable instructions, and when the computer-executable instructions are executed by a computer processor, the method for connecting and querying report data as described in the first aspect is configured to be executed.
[0018] In a fifth aspect, an embodiment of the present application provides a computer program product, which includes instructions. When the instructions are executed on a computer or a processor, the computer or the processor executes the connection query method for report data as described in the first aspect.
[0019] The embodiment of the present application determines the connection relationship between each report in the multiple reports by responding to the received connection query request corresponding to the multiple reports, and obtains the query configuration information and visualization report configuration information of the multiple reports; constructs the sub-query statements corresponding to each report in the multiple reports based on the query configuration information, and connects each sub-query statement according to the query configuration information and the connection relationship to obtain the connection query statement; queries the engine database based on the connection query statement, obtains the report data corresponding to the multiple reports, and visualizes the report data based on the visualization report configuration information. By adopting the above-mentioned technical means, by constructing the sub-query statements of each report, and connecting the sub-query statements according to the connection relationship to obtain the connection query statement of multiple reports, so as to obtain the report data of multiple reports for visualization, the operation process of the multi-report connection query can be simplified, the situation that the manual assembly of query statements leads to the cumbersome and time-consuming process can be avoided, the efficiency of the multi-report connection query can be improved, the technical threshold of the multi-report connection query can be reduced, and the user's multi-report data connection query experience can be improved. BRIEF DESCRIPTION OF THE DRAWINGS
[0020] Figure 1 This is a flow chart of a method for querying report data connections provided by an embodiment of the present application;
[0021] Figure 2 This is a schematic diagram of the connection operation of the report in the embodiment of the present application;
[0022] Figure 3 is a response flow chart of a connection query request in an embodiment of the present application;
[0023] Figure 4 is a flow chart for determining the connection relationship in an embodiment of the present application;
[0024] Figure 5 It is a directed acyclic graph of multiple reports in the embodiment of the present application;
[0025] Figure 6 It is a structural diagram of a connection query system for report data provided in an embodiment of the present application;
[0026] Figure 7 It is a structural diagram of a connection query device for report data provided in an embodiment of the present application. DETAILED DESCRIPTION
[0027] In order to make the purpose, technical scheme and advantages of the present application clearer, the specific embodiments of the present application are further described in detail below in conjunction with the accompanying drawings. It is understood that the specific embodiments described herein are only used to explain the present application, rather than to limit the present application. It should also be noted that, for the convenience of description, only the part related to the present application but not all the contents are shown in the accompanying drawings. Before discussing the exemplary embodiments in more detail, it should be mentioned that some exemplary embodiments are described as processes or methods depicted as flow charts. Although the flow chart describes each operation (or step) as a sequential process, many of the operations therein can be implemented in parallel, concurrently or simultaneously. In addition, the order of each operation can be rearranged. The process can be terminated when its operation is completed, but it can also have additional steps not included in the accompanying drawings. The process can correspond to a method, a function, a procedure, a subroutine, a subprogram, etc.
[0028] The report data connection query method provided in this application aims to obtain the report data of multiple reports for visual display by constructing sub-query statements for each report and connecting the sub-query statements according to the connection relationship to obtain the connection query statement of multiple reports, thereby simplifying the operation process of multi-report connection query.
[0029] In relevant data query and analysis scenarios, there are many data visualization platforms for users to view and display data. The data is displayed in visual reports. The visual reports need to be configured in advance by professional data analysts, and various indicators have been calculated. Subsequent users can simply view the results according to the configured query conditions. However, with the development of business, the analysis scenarios are becoming more and more complex, and there are more demands for connection queries of multiple reports. For this kind of connection query demand, professional data analysts currently assemble SQL statements to query by themselves, but this query method has too high a threshold for most ordinary users. In addition to mastering certain SQL knowledge, they also need to understand the meaning of the source table fields and the calculation method of the indicators. The whole process is relatively complicated, and the required operation technology threshold is high, and the query results cannot be displayed in the form of reports.
[0030] Based on this, a connection query method for report data in an embodiment of the present application is provided to solve the technical problems that the multi-report connection query process is cumbersome and complicated and the technical threshold is too high. Providing a convenient and low-threshold report connection query method and visually displaying the results can meet the needs of user joint queries and reduce the burden of professional data analysts to repeatedly configure reports. At the same time, this query method can take into account performance, reduce the consumption of computing resources, and ensure user experience.
[0031] Example:
[0032] Figure 1A flow chart of a method for querying a connection of report data provided in an embodiment of the present application is provided. The method for querying a connection of report data provided in this embodiment can be executed by a device for querying a connection of report data. The device for querying a connection of report data can be implemented by software and / or hardware. The device for querying a connection of report data can be composed of two or more physical entities or one physical entity. Generally speaking, the device for querying a connection of report data can be a processing device such as a computer, a tablet, or a server host.
[0033] The following description is made by taking the report data connection query device as an example of the main body of the report data connection query method. Figure 1 , the connection query method of the report data specifically includes:
[0034] S110 . In response to the received connection query request corresponding to the multiple reports, determine the connection relationship between the reports in the multiple reports, and obtain query configuration information and visualization report configuration information of the multiple reports.
[0035] When performing a multi-report connection query, the user submits a connection query request corresponding to the multi-report, and the system triggers a multi-report data query based on the connection query request. When a user requests a multi-report connection query, it is necessary to provide the connection relationship between each report in the multi-report so that the query statement can be constructed based on the connection relationship. In addition, for the data required to be queried by each report, it is necessary to configure the corresponding query configuration information to obtain the corresponding data from the engine database. In addition, in order to display the report data corresponding to the queried multi-report in the form required by the user, it is also necessary to provide the corresponding visualization report configuration information, which is used for the subsequent visualization of the queried report data based on the visualization report configuration information.
[0036] The above connection relationship, query configuration information and visualization report configuration information are configured when the user uploads the connection query request. Figure 2 As shown, a visual configuration report query interface is provided for users to configure queries for multiple reports. The visual configuration report query interface includes a report list and a canvas area. Users can drag reports from the report list to the canvas on the visual configuration report query interface, and connect each report on the canvas to form a connection relationship between the reports, thereby completing the configuration of the report connection relationship. After the configuration of the connection relationship and other information is completed, the system displays the corresponding query configuration information configuration interface and the visual report configuration information configuration interface according to the report selected by the user to configure the corresponding information. After completing the above information configuration, the corresponding multi-report connection query request can be triggered. Based on the received connection query request, the system can respond to the connection query request and query the report data of multiple reports.
[0037] Optionally, refer to Figure 2 , in response to the received connection query request corresponding to multiple reports, including:
[0038] Determine the data sources corresponding to each report in the multi-report;
[0039] When the cross-data source query conditions are met between the data sources, the received connection query request corresponding to the multiple reports is responded to.
[0040] When responding to a request for a connection query of multiple reports, it is necessary to determine whether the data source of each report in the multiple reports supports cross-data source queries. For example, when a user drags a report into the canvas, it is determined whether the currently dragged report meets the basic requirements of a connection query and whether it is a cross-data source query. Among them, the system needs to obtain all elements (such as tables, charts, etc.) dragged into the report by the user and their associated data sources. Check whether the data source associated with each element is unique, or whether cross-data source queries are allowed. If the system does not allow cross-data source queries, it is necessary to ensure that all elements in the report are referenced from the same data source. By traversing all report elements in the canvas, check whether their data sources are consistent. If multiple data sources are found, determine whether these data sources are allowed to be connected to the query. According to actual query requirements, the system can adaptively formulate data sources that do not run cross-data source queries to facilitate subsequent judgments.
[0041] In addition, for report elements that require a join query, the system can verify whether there are valid join conditions. Join conditions are usually based on common fields or keys between two or more data sources. By checking whether the report element specifies these join conditions and whether these conditions are valid, it is determined whether the currently dragged report meets the basic requirements of the join query. Optionally, the visual configuration report query interface can provide some sample reports and templates to help users better understand how to design report connection relationships and configuration information that meet the requirements. These examples can show how to correctly reference data sources, set join conditions and related configuration information, etc.
[0042] Further, refer to Figure 3 , determine the connection relationship between each report in multiple reports, including:
[0043] S1103, obtaining a directed acyclic graph between each report in the multiple reports, where the directed acyclic graph is constructed by the user selecting a report option in the visual query interface and connecting lines;
[0044] S1104 , determining the top node of the directed acyclic graph, traversing the directed acyclic graph from the top node, and determining the connection relationship between each report in the multiple reports based on the traversal result.
[0045] After the user completes the report connection in the canvas, the system will save the settings in the user's canvas as a directed acyclic graph. Then, by traversing all the nodes in the directed acyclic graph, find the top node, that is, the node with only downstream and no upstream. Then traverse the directed acyclic graph according to the depth-first algorithm, such as Figure 5 As shown, after traversal, the expression can be obtained: Report 1 connection (Report 2 connection (Report 3 connection Report 4)), which is used to represent the connection relationship between multiple reports.
[0046] Optionally, in the process of setting the connection relationship in advance, it is also necessary to determine whether the list connection view in the current canvas has a cycle to ensure that a directed acyclic graph (DAG) is generated. If the list connection view has a cycle, the system needs to prompt the user to correct it; if there is no cycle, it is persisted.
[0047] S120: construct sub-query statements corresponding to each report in the multiple reports based on the query configuration information, and connect each sub-query statement according to the query configuration information and the connection relationship to obtain a connection query statement.
[0048] Furthermore, based on the acquired query configuration information, the present application constructs sub-query statements for each report, and then connects the sub-query statements according to the connection relationship and the connection conditions configured by the query configuration information, thereby obtaining the corresponding connection query statement.
[0049] The query configuration information includes the report data source and form return field information;
[0050] Construct sub-query statements corresponding to each report in multiple reports based on query configuration information, including:
[0051] Based on the report data source and the field information returned by the form, write the subquery statements corresponding to each report in multiple reports one by one.
[0052] When constructing a query statement, you need to clarify the data source associated with each report in the multi-report. The data source can be a database table, view, other report query results, or an external data source. Determining the data source is the basis for constructing a query statement, which determines which data set to extract data from. Then, according to the field settings returned by the report form, select the fields to be queried from the data source. These fields may be columns in the table, or values obtained through calculations or functions. When constructing a query statement, you need to specify the names of these fields in order to query the corresponding data result set. By pre-configuring the above report data source and form return field information, you can write subquery statements based on each report. The subquery statement can be a SELECT statement used to select data from the data source.
[0053] The subquery statement can be constructed by traversing the above connection relationship and building the subquery statement according to the report configuration of each traversed node (i.e., a single report), thereby obtaining the expression SQL1 connection (SQL2 connection (SQL3 connection SQL4)) formed by connecting the subquery statements.
[0054] Optionally, the query configuration information also includes form query conditions;
[0055] Before querying the engine database based on the connection query statement, it also includes:
[0056] Parse the connection query statement and modify the corresponding sub-query statement in the connection query statement based on the form query condition.
[0057] According to the actual report data query requirements, users can configure the corresponding form query conditions to filter the report data according to the form query conditions. According to the form query conditions, add appropriate filter clauses (such as WHERE clauses) in the query statement to limit the returned data rows. The filter conditions can be based on field value comparisons, logical operations (such as AND, OR) or complex expressions. Add the corresponding form query conditions by modifying the subquery statement.
[0058] In addition, according to the form query conditions set by the user, the query scope can also be pushed down to simplify the final query statement. According to the query conditions currently requested by the user and the SQL expression obtained by parsing the above steps, it is determined whether the query scope needs to be pushed down to the subquery and the subquery statement is modified. If it needs to be pushed down to the subquery statement, the SQL is modified to ensure that the query scope is limited at the subquery stage, thereby reducing the burden on the query engine.
[0059] Furthermore, the query configuration information also includes a connection clause between each report in the multiple reports;
[0060] Connect each subquery statement according to the query configuration information and connection relationship, including:
[0061] Connect each subquery statement according to the connection relationship, and add the connection clause between the corresponding subquery statements.
[0062] It is understandable that if a report involves multiple data sources and a join query needs to be performed to obtain a complete data set, then an appropriate join clause (such as a JOIN clause) needs to be added to the query statement. A join query allows data to be combined based on the associated fields between two or more tables. In a join query, you need to specify the join type (such as INNERJOIN, LEFT JOIN, etc.), the join fields, and the join conditions. With a JOIN clause, the expression of the above query statement will be replaced with SQL1 JOIN (SQL2 JOIN (SQL3JOIN SQL4)).
[0063] In addition, when building query statements, you can also consider some optimization measures to improve query performance. For example, use indexes to speed up data retrieval, reduce unnecessary data conversion or calculation, limit the amount of data returned, etc. These optimization measures can be customized according to the specific data source, query requirements, and data volume. After building the query statement, you need to test and verify it on the actual data source to ensure that it returns the correct results and meets the requirements of the report. This can be done by executing the query statement in the database management tool and checking the result set. In this way, by assembling the query SQL, you can ensure the accuracy of the connection query, meet the user's query requirements, and ensure that the final query statement can reduce the query scope as much as possible, thereby reducing the burden on the query engine.
[0064] S130 , querying an engine database based on the connection query statement, obtaining report data corresponding to multiple reports, and visually displaying the report data based on the visual report configuration information.
[0065] Finally, the corresponding report data can be obtained by submitting the multi-report connection query statement constructed above to the engine database query. Then, the results are visualized according to the user's visualization report configuration information.
[0066] Among them, users may configure visualization report configuration information through the visualization configuration report query interface to define how the interface visually displays the queried report data. Visualization report configuration information may include selecting chart types (such as line charts, bar charts, pie charts, etc.), defining colors, setting axis labels, legends, etc. According to the user's settings, use visualization libraries (such as Matplotlib, Seaborn, Plotly, ECharts, etc.) to draw data into charts. These charts can be static or interactive, allowing users to perform further analysis and exploration. Embed the generated charts into the visualization configuration report query interface. Ensure that the charts are displayed correctly on the interface and allow users to perform necessary interactions.
[0067] In addition, for large data sets and complex queries, you may need to consider performance optimization strategies, such as index optimization, query rewriting, partitioning, etc. You can monitor the performance of the system and make adjustments as needed.
[0068] Optionally, after obtaining the report data corresponding to the multiple reports, the following is further included:
[0069] A table creation statement is constructed based on the connection query statement, and report data corresponding to multiple reports is cached in a specified engine table based on the table creation statement to reuse connection queries for multiple reports.
[0070] In order to reduce the system's repeated queries to the engine database during the connection query process, the system can cache the results of each multi-report query in the accelerated query engine Doris. When the user performs a multi-report visual query later, the system will first query whether there are matching results in Doris, so as to reuse the connection query data of multiple reports and improve the user's query experience.
[0071] Among them, after the connection query statement SQL assembled by the user is submitted to the engine database for query, the query result is generated into a file and saved. Then, the field information in the finally generated SQL query is parsed, including field name, field type, etc. According to the parsed field information, the Doris table building statement is assembled according to the table building syntax rules of the accelerated query engine Doris. The assembled Doris table building statement is submitted to the Doris engine. The Doris engine executes the table building statement to create the corresponding table structure. Then, the result file generated by the previous database engine is uploaded to the Doris engine. The Doris engine imports the data in the result file into the corresponding table according to the table structure. Then, the setting information of the connection query is updated, marking that the result of the query has been cached in the Doris engine. The table name of the corresponding table in the Doris engine is saved so that the required data can be directly retrieved from Doris in subsequent queries, realizing efficient query of multi-report data.
[0072] It should be noted that the Doris engine needs to ensure that the cached data is consistent with the data in the original database. When the original data changes, the data in the Doris engine needs to be updated synchronously.
[0073] When the user initiates a visual query request for multiple reports, the system should first check whether the corresponding results have been cached in the Doris engine. If the cache exists, the data is directly retrieved from the Doris engine and returned; otherwise, the original connection query is executed and the results are cached. By caching the query results to the Doris engine, the response speed of subsequent identical queries can be significantly improved, reducing the system's repeated query pressure on the original database engine.
[0074] In the above, by responding to the received connection query request corresponding to multiple reports, the connection relationship between each report in the multiple reports is determined, and the query configuration information and visualization report configuration information of the multiple reports are obtained; based on the query configuration information, the sub-query statements corresponding to each report in the multiple reports are constructed, and the sub-query statements are connected according to the query configuration information and the connection relationship to obtain the connection query statement; based on the connection query statement, the engine database is queried to obtain the report data corresponding to the multiple reports, and the report data is visualized based on the visualization report configuration information. By adopting the above technical means, by constructing the sub-query statements of each report, and connecting the sub-query statements according to the connection relationship to obtain the connection query statement of multiple reports, so as to obtain the report data of multiple reports for visualization, the operation process of the multi-report connection query can be simplified, the situation that the manual assembly of query statements leads to a cumbersome and time-consuming process can be avoided, the efficiency of the multi-report connection query can be improved, and the technical threshold of the multi-report connection query can be reduced, thereby improving the user's multi-report data connection query experience.
[0075] Based on the above embodiments, Figure 6 A structural diagram of a connection query system for report data provided by this application. Figure 6 The report data connection query system provided in this embodiment specifically includes: a response module 21, a construction module 22 and a query module 23.
[0076] The response module 21 is configured to respond to the received connection query request corresponding to the multiple reports, determine the connection relationship between the reports in the multiple reports, and obtain the query configuration information and visualization report configuration information of the multiple reports;
[0077] The construction module 22 is configured to construct sub-query statements corresponding to each report in the multiple reports based on the query configuration information, and connect each sub-query statement according to the query configuration information and the connection relationship to obtain a connection query statement;
[0078] The query module 23 is configured to query the engine database based on the connection query statement, obtain the report data corresponding to the multiple reports, and visualize the report data based on the visualization report configuration information.
[0079] Specifically, in response to the received connection query request corresponding to multiple reports, the following steps are included:
[0080] Determine the data sources corresponding to each report in the multi-report;
[0081] When the cross-data source query conditions are met between the data sources, the received connection query request corresponding to the multiple reports is responded to.
[0082] Determine the connection relationship between each report in the multi-report, including:
[0083] Obtain a directed acyclic graph between multiple reports. The directed acyclic graph is constructed by users selecting report options and connecting them in the visual query interface.
[0084] The top node of the directed acyclic graph is determined, the directed acyclic graph is traversed from the top node, and the connection relationship between each report in the multi-report is determined based on the traversal result.
[0085] Specifically, the query configuration information includes report data source and form return field information;
[0086] Construct sub-query statements corresponding to each report in multiple reports based on query configuration information, including:
[0087] Based on the report data source and the field information returned by the form, write the subquery statements corresponding to each report in multiple reports one by one.
[0088] The query configuration information also includes the connection clauses between the various reports in the multiple reports;
[0089] Connect each subquery statement according to the query configuration information and connection relationship, including:
[0090] Connect each subquery statement according to the connection relationship, and add the connection clause between the corresponding subquery statements.
[0091] The query configuration information also includes form query conditions;
[0092] Before querying the engine database based on the connection query statement, it also includes:
[0093] Parse the connection query statement and modify the corresponding sub-query statement in the connection query statement based on the form query condition.
[0094] Specifically, after obtaining the report data corresponding to the multiple reports, it also includes:
[0095] A table creation statement is constructed based on the connection query statement, and report data corresponding to multiple reports is cached in a specified engine table based on the table creation statement to reuse connection queries for multiple reports.
[0096] In the above, by responding to the received connection query request corresponding to multiple reports, the connection relationship between each report in the multiple reports is determined, and the query configuration information and visualization report configuration information of the multiple reports are obtained; based on the query configuration information, the sub-query statements corresponding to each report in the multiple reports are constructed, and the sub-query statements are connected according to the query configuration information and the connection relationship to obtain the connection query statement; based on the connection query statement, the engine database is queried to obtain the report data corresponding to the multiple reports, and the report data is visualized based on the visualization report configuration information. By adopting the above technical means, by constructing the sub-query statements of each report, and connecting the sub-query statements according to the connection relationship to obtain the connection query statement of multiple reports, so as to obtain the report data of multiple reports for visualization, the operation process of the multi-report connection query can be simplified, the situation that the manual assembly of query statements leads to a cumbersome and time-consuming process can be avoided, the efficiency of the multi-report connection query can be improved, and the technical threshold of the multi-report connection query can be reduced, thereby improving the user's multi-report data connection query experience.
[0097] The report data connection query system provided in the embodiment of the present application can be configured to execute the report data connection query method provided in the above embodiment, and has corresponding functions and beneficial effects.
[0098] Based on the above practical example, the present application embodiment also provides a connection query device for report data, referring to Figure 7 , the connection query device for report data includes: a processor 31, a memory 32, a communication module 33, an input device 34 and an output device 35. The memory, as a computer-readable storage medium, can be configured to store software programs, computer executable programs and modules, such as program instructions / modules corresponding to the connection query method for report data described in any embodiment of the present application (for example, the response module, the construction module and the query module in the connection query system for report data). The communication module is configured to perform data transmission. The processor executes various functional applications and data processing of the device by running the software programs, instructions and modules stored in the memory, that is, realizes the connection query method for report data described above. The input device can be configured to receive input digital or character information, and generate key signal input related to the user settings and function control of the device. The output device may include a display device such as a display screen. The connection query device for report data provided above can be configured to execute the connection query method for report data provided in the above embodiment, and has corresponding functions and beneficial effects.
[0099] On the basis of the above embodiments, the embodiments of the present application further provide a computer-readable storage medium, wherein the computer-readable storage medium stores computer-executable instructions, wherein the computer-executable instructions are configured to execute a method for querying a connection of report data when executed by a computer processor, and the storage medium may be any of various types of memory devices or storage devices. Of course, the computer-executable instructions of the computer-readable storage medium provided in the embodiments of the present application are not limited to the method for querying a connection of report data as described above, and may also execute related operations in the method for querying a connection of report data provided in any embodiment of the present application.
[0100] On the basis of the above embodiments, the embodiments of the present application also provide a computer program product. The technical solution of the present application is essentially or the part that contributes to the prior art or all or part of the technical solution can be embodied in the form of a software product. The computer program product is stored in a storage medium, including a number of instructions for enabling a computer device, a mobile terminal or a processor therein to execute all or part of the steps of the connection query method for report data described in each embodiment of the present application.
Claims
1. A connection query method for report data, characterized in that: include: In response to the received connection query request corresponding to the multiple reports, determining the connection relationship between the reports in the multiple reports, and obtaining the query configuration information and the visualization report configuration information of the multiple reports; Constructing a sub-query statement corresponding to each report in the multiple reports based on the query configuration information, and connecting each of the sub-query statements according to the query configuration information and the connection relationship to obtain a connection query statement; Based on the connection query statement, an engine database is queried to obtain report data corresponding to the multiple reports, and the report data is visually displayed based on the visual report configuration information.
2. The connection query method for report data according to claim 1, characterized in that: Determining the connection relationship between each report in the multiple reports includes: Obtaining a directed acyclic graph between each report in the multiple reports, wherein the directed acyclic graph is constructed by a user selecting a report option in a visual query interface and connecting lines; The top node of the directed acyclic graph is determined, the directed acyclic graph is traversed from the top node, and the connection relationship between each report in the multiple reports is determined based on the traversal result.
3. The connection query method for report data according to claim 1, characterized in that: The response to the received connection query request corresponding to the multiple reports includes: Determine each data source corresponding to each report in the multiple reports; When the data sources meet the cross-data source query condition, the received connection query request corresponding to the multiple reports is responded to.
4. The connection query method for report data according to claim 1, characterized in that: The query configuration information includes report data source and form return field information; The constructing a sub-query statement corresponding to each report in the multiple reports based on the query configuration information includes: Sub-query statements corresponding to each report in the multiple reports are compiled one by one based on the report data source and the form return field information.
5. The connection query method for report data according to claim 4 is characterized in that: The query configuration information also includes connection clauses between the multiple reports; The connecting each of the sub-query statements according to the query configuration information and the connection relationship includes: The sub-query statements are connected according to the connection relationship, and the connection clause is added between the corresponding sub-query statements.
6. The connection query method for report data according to claim 4 is characterized in that: The query configuration information also includes form query conditions; Before querying the engine database based on the connection query statement, the method further includes: The connection query statement is parsed, and the corresponding sub-query statement in the connection query statement is modified based on the form query condition.
7. The method for querying report data connection according to any one of claims 1 to 6, characterized in that: After acquiring the report data corresponding to the multiple reports, the method further includes: A table creation statement is constructed based on the connection query statement, and report data corresponding to the multiple reports are cached in a designated engine table based on the table creation statement to perform connection query reuse of the multiple reports.
8. A connection query system for report data, characterized in that: include: A response module, configured to respond to a received connection query request corresponding to multiple reports, determine a connection relationship between each report in the multiple reports, and obtain query configuration information and visualization report configuration information of the multiple reports; A construction module configured to construct a sub-query statement corresponding to each report in the multiple reports based on the query configuration information, and connect each of the sub-query statements according to the query configuration information and the connection relationship to obtain a connection query statement; The query module is configured to query the engine database based on the connection query statement, obtain the report data corresponding to the multiple reports, and visualize the report data based on the visualization report configuration information.
9. A connection query device for report data, characterized in that: include: memory and one or more processors; The memory is configured to store one or more programs; When the one or more programs are executed by the one or more processors, the one or more processors implement the report data connection query 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, and when the computer-executable instructions are executed by a computer processor, the computer-executable instructions are configured to execute the report data connection query method according to any one of claims 1 to 7.
11. A computer program product, characterized in that The computer program product includes instructions, and when the instructions are executed on a computer or a processor, the computer or the processor executes the report data connection query method according to any one of claims 1 to 7.
Citation Information
Cited By
Risk query method and device based on large model, medium and equipment
CN119621759A
Structured data processing method and device based on cloud mode, medium and equipment
CN119621818A
