A report query method, device and equipment and a storage medium
By receiving detailed query requests and filtering cached data, the inefficiency of traditional batch query schemes is solved, enabling fast aggregate queries on massive amounts of data and improving system performance and user experience.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- KINGDEE SOFTWARE(CHINA) CO LTD
- Filing Date
- 2022-10-20
- Publication Date
- 2026-05-19
AI Technical Summary
Traditional batch query solutions require multiple scrolling down to see the total rows when querying massive amounts of data, resulting in high manpower and computing costs, low efficiency, and poor system performance and stability.
By receiving detailed query requests, filtering and caching detailed data, limiting the amount of response data according to a preset data size threshold, and directly using cached total data or querying the database for total data when receiving total query requests, the number of database accesses is reduced.
It enables fast querying of detailed and total data, reduces system pressure, improves response speed and user experience, and reduces computational load and database access frequency.
Smart Images

Figure CN115599827B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of computer technology, and in particular to a report query method, apparatus, device, and storage medium. Background Technology
[0002] For report queries, the traditional technical solution is a batch query approach. Batch queries retrieve data in batches using a pre-defined, ordered batching logic, with each criterion corresponding to one query, until the data retrieval requirements for that query are met. Currently, batch query solutions suffer from the following problems when handling massive amounts of data: When a user needs to view the total, they must scroll down to the last row multiple times, triggering queries for all criteria sequentially, before finally seeing the total row. This results in significant manpower and computational costs for report queries, leading to low efficiency. Summary of the Invention
[0003] In view of this, the purpose of this invention is to provide a report query method, apparatus, device, and storage medium that can improve the efficiency of report query and enable rapid querying of detailed data and total data. The specific solution is as follows:
[0004] Firstly, this application discloses a report query method, including:
[0005] Receive detailed query requests for reports;
[0006] Perform detailed query processing based on the detailed query request to obtain the detailed data of the report;
[0007] The detailed data is filtered according to a preset data size threshold, and the detailed query request is responded to based on the filtered target data; wherein the data size of the target data does not exceed the preset data size threshold.
[0008] Receive a total query request initiated based on the target data, and respond to the total query request according to the total data of the detailed data.
[0009] In the above scheme, before receiving the aggregate query request initiated based on the target data, the method further includes:
[0010] The detailed data read from the database is aggregated to obtain aggregate data, and the aggregate data is cached.
[0011] Accordingly, responding to the total query request based on the total data of the detailed data includes:
[0012] The total query request is responded to based on the cached total data.
[0013] In the above scheme, when performing aggregate processing on the detailed data read from the database to obtain aggregate data, the method further includes:
[0014] Store the total processed records into the context;
[0015] Accordingly, responding to the total query request based on the cached total data includes:
[0016] The process involves retrieving the record for the aggregate processing from the context and triggering the step of responding to the aggregate query request based on the cached aggregate data, based on the retrieved record for the aggregate processing.
[0017] In the above scheme, after receiving the aggregate query request initiated based on the target data, the method further includes:
[0018] The database is invoked by querying the total data to obtain the total data by querying and summarizing the detailed data in the database.
[0019] In the above scheme, after performing detailed query processing based on the detailed query request to obtain the detailed data of the report, the method further includes:
[0020] Cache the detailed data;
[0021] Accordingly, after responding to the detailed query request based on the filtered target data, the method further includes:
[0022] Receive a specified query request for the specified data in the report;
[0023] The specified query request is responded to based on the specified data in the cached detailed data.
[0024] In the above scheme, the step of filtering the detailed data according to a preset data volume threshold includes:
[0025] When the size of the detailed data does not exceed the preset data size threshold, the detailed data will be used as the target data.
[0026] When the size of the detailed data exceeds the preset data size threshold, data in the detailed data whose size is equal to the preset data size threshold is selected as the target data.
[0027] In the above scheme, the report query method is applied to a server, and the server includes a report framework, a total report query plugin, a detail queryer, and a total queryer;
[0028] The report framework is used to receive the detail query request and the total query request, and is also used to call the detail queryer or the total queryer through the total report query plugin; the detail queryer is used to perform the detail query processing; and the total queryer is used to calculate the total data.
[0029] Secondly, this application discloses a report query device, comprising:
[0030] The request receiving module is used to receive detailed query requests for reports;
[0031] The detailed data acquisition module is used to perform detailed query processing based on the detailed query request to obtain the detailed data of the report;
[0032] The response module is used to filter the detailed data according to a preset data size threshold, and respond to the detailed query request according to the filtered target data; wherein the data size of the target data does not exceed the preset data size threshold.
[0033] The response module is also configured to receive a total query request initiated based on the target data, and respond to the total query request according to the total data of the detailed data.
[0034] Thirdly, this application discloses an electronic device, including:
[0035] Memory, used to store computer programs;
[0036] A processor is configured to execute the computer program to implement the steps of the report query method disclosed above.
[0037] Fourthly, this application discloses a computer-readable storage medium for storing a computer program; wherein, when the computer program is executed by a processor, it implements the report query method disclosed above.
[0038] Fifthly, this application discloses a computer program product, including a computer program, wherein when the computer program is executed by a processor, it implements the report query method disclosed above.
[0039] As can be seen, this application provides a report query method, including: receiving a detailed query request for a report; performing detailed query processing based on the detailed query request to obtain the detailed data of the report; filtering the detailed data according to a preset data size threshold, and responding to the detailed query request based on the filtered target data; wherein the data size of the target data does not exceed the preset data size threshold; receiving a total query request initiated based on the target data, and responding to the total query request based on the total data of the detailed data. Therefore, this application, by responding to detailed query requests with filtered target data and responding to total query requests initiated based on target data, can meet users' needs for rapid querying of detailed and total data, and can improve response speed. Attached Figure Description
[0040] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on the provided drawings without creative effort.
[0041] Figure 1 A schematic diagram illustrating batch data querying for related technologies;
[0042] Figure 2 This is a flowchart of the report query method disclosed in this application;
[0043] Figure 3 This is a flowchart of the report query method disclosed in this application;
[0044] Figure 4 This is a flowchart of the report query method disclosed in this application;
[0045] Figure 5 This is a schematic diagram of user use cases disclosed in this application;
[0046] Figure 6 This is a schematic diagram of the report query disclosed in this application;
[0047] Figure 7 A schematic diagram illustrating the modeling of the method disclosed in this application;
[0048] Figure 8 This is a flowchart of a specific report query method disclosed in this application;
[0049] Figure 9 A schematic diagram of the report query device provided in this application;
[0050] Figure 10 This application provides a structural diagram of an electronic device. Detailed Implementation
[0051] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0052] Currently, the traditional technical solution is a batch query scheme. Batch query retrieves data in batches through a pre-defined ordered batching logic. Each criterion corresponds to one query under that criterion, until the data retrieval requirements of this query are met, and then all data is returned. Specifically, as follows... Figure 1 As shown, when a user queries a report, the system first displays the first 200 rows, triggering a data retrieval query for rows [0, 200]. If the first criterion cannot meet the 200-row requirement, the system will continue to trigger a query for the second criterion, and so on, until the data retrieval requirement is met before returning the retrieved data to the front end. When the user scrolls down to the last row, i.e., row 200, the system will then perform a data retrieval query for rows [200, 400]. Only after the query is completed can the user see rows [200, 400]. The batch query solution currently has the following main problems when querying massive amounts of data: In terms of user experience, when a user views the total, they need to scroll down to the last row multiple times, triggering queries for all criteria sequentially, before finally seeing the total row. The total row summarizes all detailed data. In terms of system performance, the computation and caching of massive amounts of data puts immense pressure on the system, easily causing overall system lag. Regarding stability, batch query schemes require N database queries even when data distribution is uneven, with many criteria but few data points for a single criterion. Therefore, this application provides a report query method that improves response speed, system performance and stability, and reduces system pressure.
[0053] The embodiments of the present invention can be applied to various Enterprise Resource Planning (ERP) systems that involve reports, including but not limited to production management systems, supply chain systems, human resources systems, financial systems, tax systems, and auditing systems.
[0054] The embodiments of the present invention can be implemented by electronic devices, such as by terminal devices, by servers, or by a combination of terminal devices and servers.
[0055] This invention discloses a report query method, see [link to relevant documentation]. Figure 2 As shown, the method includes:
[0056] Step S11: Receive a detailed query request for the report.
[0057] This section receives a detailed query request for a specific report, used to view the report's detailed data. For example, when a user opens a report through the client's browser, this is triggered to generate a detailed query request for that report.
[0058] Step S12: Perform detailed query processing based on the detailed query request to obtain the detailed data of the report.
[0059] For example, a query is performed in the database based on a detail query request to obtain the detailed data of the corresponding report. Here, the detailed data refers to all the detailed data of the report.
[0060] Step S13: Filter the detailed data according to the preset data size threshold, and respond to the detailed query request based on the filtered target data; wherein the data size of the target data does not exceed the preset data size threshold.
[0061] After obtaining the detailed data from the report, the detailed data is filtered according to a preset data size threshold to obtain the target data, ensuring that the size of the target data does not exceed the preset data size threshold. It is worth noting that the target data here may be all or part of the detailed data.
[0062] Then, based on the obtained target data, a detailed query request is responded to. For example, the target data can be sent to the client for display in a browser. In this way, by limiting the amount of data displayed on the front end by setting a preset data size threshold, the pressure of data interaction can be reduced, making the report query process more lightweight and stable, allowing users to quickly understand the general situation of the report.
[0063] In some embodiments, after step S12, the method further includes: caching detailed data; after step S13, the method further includes: receiving a specified query request for specified data in the report; and responding to the specified query request based on the specified data in the cached detailed data.
[0064] Here, after retrieving the detailed data from the report, this detailed data can be cached. Thus, if a specific query request for a particular piece of data in the report is received, the query will be responded to based on the cached detailed data, without requiring a separate query. This method satisfies the user's need to view specific data after viewing the target data, while also enabling a fast response to the specified data and reducing computational load.
[0065] In some embodiments, the above-mentioned filtering of detailed data based on a preset data size threshold can be achieved in the following manner: when the data size of the detailed data does not exceed the preset data size threshold, the detailed data is used as the target data; when the data size of the detailed data exceeds the preset data size threshold, data in the detailed data whose data size is equal to the preset data size threshold is filtered out and used as the target data.
[0066] Here, a preset data size threshold is used to constrain the amount of data responded to. The specific constraints can be as follows:
[0067] 1) When the size of the detailed data does not exceed the preset data size threshold, it proves that the detailed data does not need to be constrained, and the detailed data can be directly used as the target data and responded to.
[0068] 2) When the size of the detailed data exceeds a preset data size threshold, select data in the detailed data whose size is equal to the preset data size threshold as the target data. This can be done according to preset rules, such as selecting the first few rows in the detailed data.
[0069] It is worth noting that a detailed query request may include a user's requirement to view specific data. For example, if a user only needs to view the data in rows [0, 200] of the report, the detailed data in the aforementioned cases 1) and 2) can be replaced with the specified data, thus satisfying the user's targeted viewing needs.
[0070] Step S14: Receive a total query request initiated based on the target data, and respond to the total query request based on the total data of the detailed data.
[0071] Here, upon receiving a total query request initiated based on the target data, the total query request is responded to according to the total data of the detailed data, for example, by sending it to the client to be displayed in the browser's total row, which is dedicated to displaying total data.
[0072] This application does not limit the triggering conditions for the total query request. For example, a control for triggering the total query request can be set in the browser, or the user can be set to scroll down the target data to the last row.
[0073] This application embodiment can be applied to a server, which includes a report framework, a total report query plugin, a detail queryer, and a total queryer. The report framework is a software framework used for data interaction with the client, such as receiving detail query requests and total query requests sent by the client, and also calling the detail queryer or total queryer through the total report query plugin. The detail queryer and total queryer can be custom code blocks; the detail queryer performs detail query processing, and the total queryer calculates total data. Thus, through division of labor and collaboration, response efficiency can be further improved.
[0074] like Figure 2 As shown, this embodiment of the application, by limiting the amount of detailed data in the response, allows users to quickly view detailed data and initiate aggregate query requests, thereby quickly obtaining aggregate data without multiple interactions. Simultaneously, it reduces computational load and the number of database accesses, improving the smoothness of report viewing.
[0075] See Figure 3 As shown in the figure, this application discloses a report query method based on Figure 2 Before step S14, in step S21, the detailed data read from the database can be aggregated to obtain aggregate data, and the aggregate data can be cached.
[0076] For example, detailed data from the database can be read into memory, and the detailed data in memory can be aggregated to obtain total data. Then, the total data can be cached for later use.
[0077] exist Figure 3 middle, Figure 2 The step S14 shown can be updated to step S22, which involves receiving a total query request initiated based on the target data and responding to the total query request based on the cached total data.
[0078] When a total query request based on target data is received, the system can respond directly to the total query request based on the cached total data without accessing the database again. This reduces the amount of calculation and improves the response speed, which helps to enhance the user experience of total reports.
[0079] In some embodiments, when performing aggregate processing on detailed data read from the database to obtain aggregate data, the method further includes: storing the aggregated records in the context; responding to an aggregate query request based on the cached aggregate data, including: searching for aggregated records in the context, and triggering the execution of the following steps based on the found aggregated records; and responding to an aggregate query request based on the cached aggregate data.
[0080] Here, the records of aggregate processing can be stored in the context, such as in a log. Thus, when an aggregate query request is received, the system first checks if the aggregate processing record exists in the context. If it does, the system responds to the aggregate query request based on the cached aggregate data; otherwise, it queries the detailed data in the database to obtain the aggregate data. By storing these records in the context, the accuracy of the aggregate data can be guaranteed.
[0081] See Figure 4 As shown in the figure, this application discloses a report query method. Figure 2 The step S14 shown can be implemented through steps S31 to S33. In step S31, a total query request initiated based on the target data is received.
[0082] In step S32, the database is invoked by querying the total data to obtain the total data by querying and summarizing the detailed data in the database.
[0083] Here, when a total query request is received, the database can be invoked using a total query command (such as an SQL command) to query and aggregate the detailed data in the database to obtain the total data.
[0084] In step S33, the total query request is responded to based on the total data of the detailed data.
[0085] pass Figure 4 The method shown delays the calculation of total data, which can avoid unnecessary waste of resources in some scenarios and improve the speed of users querying reports. For example, if a user wants to export data for analysis in Excel, they need to check the report first.
[0086] It is worth noting that, Figure 3 and Figure 4 The examples can be applied to different scenarios. For instance, the appropriate workflow can be determined based on the size of the detailed data. For example, when the size of the detailed data is less than a preset data size threshold, the appropriate workflow can be... Figure 3 The process is shown below; when the size of the detailed data is greater than or equal to the preset data size threshold, it applies. Figure 4 The process is shown below.
[0087] Next, we will illustrate the report query method provided in this application through practical examples. In aggregate report query activities, users mainly have two use cases, such as... Figure 5As shown, these are for viewing totals and searching detailed data. Total reports specifically refer to reports that display detailed data of a particular entity along with the totals of those detailed data, such as auxiliary ledgers and detailed category ledgers in general ledger applications. Research indicates that for the "view totals" use case, users are not actually concerned with the amount of detailed data. However, for the "search detailed data" use case, users tend to narrow their search scope, looking for specific detailed data with a smaller dataset. Therefore, there are no large-scale use cases for the "search detailed data" use case. In this embodiment, to address user needs, the amount of data displayed on the interface is limited, resulting in a lighter, more stable, and user-friendly total report query. Figure 6 As shown, when a user queries a report, the system (such as an ERP system) first returns 100,000 detailed data points (100,000 refers to 100,000, corresponding to the preset data size threshold mentioned above). When the user scrolls down to the last row to view the total, the system then determines the total separately and returns it to the user. When a user queries a report, the report framework calls the total report query plugin to perform a detailed query. The total report query plugin calls the detailed query tool to complete the detailed query and obtain the corresponding detailed data.
[0088] In this embodiment of the application, the internal design of the ERP system can be as follows: Figure 7 As shown, the solution model is first completed. The `TotalCalculateReportPlugin` inherits from `AbstractReportListDataPlugin` (the platform's report query plugin, i.e., the query plugin included with the report framework). Of course, the total report query plugin can also be a non-inherited, independently developed plugin. It should be noted that when creating `TotalCalculateReportPlugin`, specific query tools need to be specified, including a detail query tool (`DetailQuery`) and a total query tool (`TotalQuery`). After the total report query plugin inherits from the platform's report query plugin, it overrides the parent class's `queryBatchBy()` method and the `query()` method. The `queryBatchBy` method returns two batching criteria (i.e., the batching criteria for detail batches and total batches, used to identify different query requests, thus distinguishing between detail query requests and total query requests), and sets it to retrieve one batch at a time. The `query` method is called by the platform, implementing different query logic under detail batches and total batches, as well as the creation and management of the context during detail and total queries.
[0089] In specific implementation, such as Figure 8As shown, when a user queries a report, the report framework first determines whether the query request is a detailed query request or a total query request based on the batching logic implemented in the total report query plugin. A detailed query request corresponds to a detailed batch query, and a total query request corresponds to a total batch query. If it is a detailed batch query, the report framework calls the total report query plugin to execute the detailed query, and the total report query plugin then calls the detailed queryer to retrieve the detailed data.
[0090] During the detailed batch query process, when the amount of detailed data is less than the preset data size threshold (e.g., ...), Figure 8 When the total data is 10W (as shown), the total report query plugin calls the total queryer to perform total processing, and then concatenates the returned total data with the detailed data before returning it to the report framework. However, if the amount of detailed data is greater than or equal to the preset data size threshold, the total report query plugin will only return the detailed data to the report framework.
[0091] After receiving the data returned by the total report query plugin, the reporting framework first sends the detailed data to the client, whose interface will then display the detailed data. When the user scrolls down to the last row of the detailed data and wants to view the total, the client generates a total query request and sends it to the reporting framework, which then triggers a batch total query. In the batch total query, if the total report query plugin detects from the context that the total has already been calculated using the detailed data, it will quickly return an empty dataset to notify the reporting framework to return the calculated total data to the client. If the total has not been calculated, it will call the total query tool's SQL query command to perform a total query on the database and return the resulting total data to the reporting framework.
[0092] Understandably, this solution improves user experience and speeds up query response by designing user use case models, system class models, and detailed general implementation steps for aggregate report queries, allowing users to see aggregate rows with a single dropdown; the query on the report page is more lightweight, placing less pressure on the CPU (Central Processing Unit / Processor), database, and cache modules in the system; and the query performance is more stable and unaffected by data distribution.
[0093] See Figure 9 As shown in the figure, this application also discloses a report query device, including:
[0094] The request receiving module 11 is used to receive detailed query requests for reports;
[0095] The detailed data acquisition module 12 is used to perform detailed query processing based on the detailed query request and obtain the detailed data of the report;
[0096] The response module 13 is used to filter detailed data according to a preset data size threshold and respond to detailed query requests based on the filtered target data; wherein the data size of the target data does not exceed the preset data size threshold.
[0097] The response module 13 is also used to receive a total query request initiated based on the target data, and respond to the total query request based on the total data of the detailed data.
[0098] In some embodiments, the report query device further includes a totalization module, which is used to perform totalization processing on the detailed data read from the database to obtain total data and cache the total data; the response module 13 is also used to respond to the total query request based on the cached total data.
[0099] In some embodiments, the report query device further includes a storage module for storing the total processing records in the context; and a response module 13 for retrieving the total processing records from the context and triggering the following steps based on the retrieved total processing records: responding to the total query request based on the cached total data.
[0100] In some embodiments, the response module 13 is further configured to invoke the database via a query total instruction to perform query total processing on the detailed data in the database to obtain total data.
[0101] In some embodiments, the report query device further includes a caching module for caching detailed data; the report query device further includes a specified query module for: receiving a specified query request for specified data in the report; and responding to the specified query request based on the specified data in the cached detailed data.
[0102] In some embodiments, the response module 13 is further configured to: when the size of the detailed data does not exceed a preset data size threshold, use the detailed data as the target data; when the size of the detailed data exceeds the preset data size threshold, filter out the data in the detailed data whose size is equal to the preset data size threshold, and use it as the target data.
[0103] In some embodiments, the report query device can be applied to a server, which includes a report framework, a total report query plugin, a detail queryer, and a total queryer. The report framework is used to receive detail query requests and total query requests, and is also used to call the detail queryer or the total queryer through the total report query plugin. The detail queryer is used to perform detail query processing, and the total queryer is used to calculate total data.
[0104] Furthermore, embodiments of this application also provide an electronic device. Figure 10This is a structural diagram of an electronic device 20 according to an exemplary embodiment. The content of the diagram should not be construed as limiting the scope of this application.
[0105] Figure 10 This is a schematic diagram of the structure of an electronic device 20 provided in an embodiment of this application. Specifically, the electronic device 20 may include: at least one processor 21, at least one memory 22, a power supply 23, a communication interface 24, an input / output interface 25, and a communication bus 26. The memory 22 stores a computer program, which is loaded and executed by the processor 21 to implement the relevant steps in the report query method disclosed in any of the foregoing embodiments. Furthermore, the electronic device 20 in this embodiment may specifically be an electronic computer.
[0106] In this embodiment, the power supply 23 is used to provide operating voltage for each hardware device on the electronic device 20; the communication interface 24 can create a data transmission channel between the electronic device 20 and external devices, and the communication protocol it follows can be any communication protocol applicable to the technical solution of this application, and is not specifically limited here; the input / output interface 25 is used to acquire external input data or output data to the outside world, and its specific interface type can be selected according to specific application needs, and is not specifically limited here.
[0107] In addition, the memory 22, as a carrier for resource storage, can be a read-only memory, random access memory, disk or optical disk, etc. The resources stored thereon can include operating system 221, computer program 222, etc., and the storage method can be temporary storage or permanent storage.
[0108] The operating system 221 is used to manage and control the various hardware devices on the electronic device 20 and the computer program 222, which may be Windows Server, Netware, Unix, Linux, etc. In addition to including a computer program capable of performing the report query method executed by the electronic device 20 as disclosed in any of the foregoing embodiments, the computer program 222 may further include a computer program capable of performing other specific tasks.
[0109] Furthermore, this application also discloses a storage medium storing a computer program. When the computer program is loaded and executed by a processor, it implements the report query method steps disclosed in any of the foregoing embodiments.
[0110] This application also discloses a computer program product, including a computer program, wherein when the computer program is executed by a processor, it implements the report query method steps disclosed in any of the foregoing embodiments.
[0111] The various embodiments in this specification are described in a progressive manner, with each embodiment focusing on its differences from other embodiments. Similar or identical parts between embodiments can be referred to interchangeably. For the apparatus disclosed in the embodiments, since it corresponds to the method disclosed in the embodiments, the description is relatively simple; relevant parts can be referred to in the method section.
[0112] Finally, it should be noted that in this document, relational terms such as "first" and "second" are used only to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes the element.
[0113] The above provides a detailed description of the report query method, apparatus, device, and storage medium provided by the present invention. Specific examples have been used to illustrate the principles and implementation methods of the present invention. The description of the above embodiments is only for the purpose of helping to understand the method and core ideas of the present invention. At the same time, for those skilled in the art, there will be changes in the specific implementation methods and application scope based on the ideas of the present invention. Therefore, the content of this specification should not be construed as a limitation of the present invention.
Claims
1. A report query method, characterized in that, include: Receive detailed query requests for reports; Perform detailed query processing based on the detailed query request to obtain the detailed data of the report; The detailed data is filtered according to a preset data size threshold, and the detailed query request is responded to based on the filtered target data; wherein the data size of the target data does not exceed the preset data size threshold. Receive a total query request initiated based on the target data, and respond to the total query request according to the total data of the detailed data; Before receiving the aggregate query request initiated based on the target data, the method further includes: performing aggregate processing on the detailed data read from the database to obtain aggregate data, and caching the aggregate data; correspondingly, responding to the aggregate query request based on the aggregate data of the detailed data includes: responding to the aggregate query request based on the cached aggregate data; When the detailed data read from the database is aggregated to obtain aggregate data, the method further includes: storing the aggregated records in the context; correspondingly, responding to the aggregate query request based on the cached aggregate data includes: searching for the aggregated records in the context, and triggering the step of responding to the aggregate query request based on the cached aggregate data based on the found aggregated records.
2. The report query method according to claim 1, characterized in that, After receiving the aggregate query request initiated based on the target data, the method further includes: The database is invoked by querying the total data to obtain the total data by querying and summarizing the detailed data in the database.
3. The report query method according to claim 1, characterized in that, After performing detailed query processing based on the detailed query request to obtain the detailed data of the report, the method further includes: Cache the detailed data; Accordingly, after responding to the detailed query request based on the filtered target data, the method further includes: Receive a specified query request for specified data in the report; The specified query request is responded to based on the specified data in the cached detailed data.
4. The report query method according to claim 1, characterized in that, The step of filtering the detailed data according to a preset data volume threshold includes: When the size of the detailed data does not exceed the preset data size threshold, the detailed data will be used as the target data. When the size of the detailed data exceeds the preset data size threshold, data in the detailed data whose size is equal to the preset data size threshold is selected as the target data.
5. The report query method according to any one of claims 1 to 4, characterized in that, Applied to a server, the server includes a report framework, a total report query plugin, a detail queryer, and a total queryer; The report framework is used to receive the detail query request and the total query request, and is also used to call the detail queryer or the total queryer through the total report query plugin; the detail queryer is used to perform the detail query processing; and the total queryer is used to calculate the total data.
6. A report query device, characterized in that, include: The request receiving module is used to receive detailed query requests for reports; The detailed data acquisition module is used to perform detailed query processing based on the detailed query request to obtain the detailed data of the report; The response module is used to filter the detailed data according to a preset data size threshold, and respond to the detailed query request according to the filtered target data; wherein the data size of the target data does not exceed the preset data size threshold. The response module is also configured to receive a total query request initiated based on the target data, and respond to the total query request according to the total data of the detailed data; The report query device is further configured to: perform aggregate processing on the detailed data read from the database to obtain aggregate data, and cache the aggregate data; correspondingly, the response module is specifically configured to: respond to the aggregate query request based on the cached aggregate data; The report query device is further configured to: store the total processing records in the context; correspondingly, the response module is specifically configured to: search for the total processing records in the context, and trigger the execution of the step of responding to the total query request based on the cached total data according to the searched total processing records.
7. An electronic device, characterized in that, include: Memory, used to store computer programs; A processor for executing the computer program to implement the steps of the report query method as described in any one of claims 1 to 5.
8. A computer-readable storage medium, characterized in that, Used to store computer programs; wherein, when the computer programs are executed by a processor, they implement the report query method as described in any one of claims 1 to 5.
9. A computer program product, characterized in that, The system includes a computer program, wherein the computer program, when executed by a processor, implements the report query method as described in any one of claims 1 to 5.