Report query method, device, server, storage medium and program product

By adopting a two-level caching mechanism in the platform server, the first cache server and the second cache server cache key-value pairs and report files respectively, the problem of large memory resource occupancy and low data processing efficiency is solved, and more efficient data processing and resource utilization is achieved.

CN113312402BActive Publication Date: 2025-03-21AGRICULTURAL BANK OF CHINA
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202110668669.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-06-16
Publication Date
2025-03-21
Estimated Expiration
2041-06-16

AI Technical Summary

Technical Problem

In the prior art, the platform server caches a large number of report files, resulting in large memory resources occupancy and low data processing efficiency.

Method used

Using a two-level caching mechanism, multiple different key-value pairs are cached in the first cache server, and multiple different report files are cached in the second cache server. The platform server obtains query values ​​from the first cache server according to the first keyword, and then obtains report files from the second cache server to avoid cached report files in the platform server.

Benefits of technology

It effectively reduces the memory resource usage of platform servers, improves data processing efficiency, reduces the frequency of access to databases, and saves costs.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN113312402B_ABST
    Figure CN113312402B_ABST
Patent Text Reader

Abstract

The embodiment of the present application provides a report query method, device, server, storage medium and program product, the method comprising: receiving a query request from a user end; the query request includes a first report identifier and a first query condition; splicing the first report identifier and the first query condition to obtain a first keyword; according to the first keyword, obtaining a first query value corresponding to the first keyword from a first cache server; if the first query value is obtained, obtaining a first report file corresponding to the first query value from a second cache server, and sending the first report file to the user end. The report query method, device, server, storage medium and program product provided by the embodiment of the application can be used to improve the low data processing efficiency of the platform server.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The embodiments of the present application relate to communication technology, and more particularly to a report query method, device, server, storage medium and program product. Background Art

[0002] Currently, the report access system includes the user end, platform server and database.

[0003] In the related art, a plurality of different report files are cached in a platform server, and the platform server can receive access requests from a user terminal. When a report file corresponding to the access request is included in a plurality of different report files, the report file corresponding to the access request is sent to the user terminal. When a report file corresponding to the access request is not included in a plurality of different report files, data information is obtained from a database, the data information is processed, a report file is generated, the generated report file is cached, and the report file is sent to the user terminal.

[0004] In actual applications, since report files are usually large, in the above-mentioned related technologies, when a platform server caches multiple different report files, a large amount of memory resources of the platform server are occupied, resulting in low data processing efficiency of the platform server. Summary of the invention

[0005] The embodiments of the present application provide a report query method, device, server, storage medium and program product for improving the low data processing efficiency of a platform server.

[0006] In a first aspect, an embodiment of the present application provides a report query method, including:

[0007] Receiving a query request from a user terminal; the query request includes a first report identifier and a first query condition;

[0008] The first report identifier and the first query condition are concatenated to obtain a first keyword;

[0009] According to the first keyword, obtaining a first query value corresponding to the first keyword from the first cache server;

[0010] If the first query value is obtained, a first report file corresponding to the first query value is obtained from the second cache server, and the first report file is sent to the user terminal.

[0011] In a possible design, obtaining, according to the first keyword, a first query value corresponding to the first keyword from the first cache server includes:

[0012] Sending a first keyword to a first cache server;

[0013] A first query value corresponding to a first keyword sent by a first cache server is received.

[0014] In a possible design, obtaining a first report file corresponding to the first query value from the second cache server includes:

[0015] Sending the first query value to the second cache server;

[0016] A first report file corresponding to the first query value sent by the second cache server is received.

[0017] In one possible design, the method further includes:

[0018] If the first query value is not obtained, obtaining a report generation model corresponding to the pre-stored first report identifier; the report generation model includes the query parameters in the first query condition;

[0019] According to the query parameters, source data for generating the first report file is obtained from the database, where the source data is data that meets the query parameters;

[0020] The source data is processed through the report generation model to obtain a first report file, and the first report file is sent to the user end.

[0021] In one possible design, the method further includes:

[0022] Obtaining a first storage path corresponding to a pre-stored first report identifier;

[0023] Combining the first storage path and the first keyword to obtain a first query value;

[0024] The first keyword and the first query value are sent to the first cache server, and the first report file is sent to the second cache server.

[0025] In one possible design, the method further includes:

[0026] Receiving a prediction request sent by a prediction server at a first preset time; the prediction request includes a second report identifier and a second query condition, and the prediction request is used to request pre-generation of a second report file;

[0027] Concatenate the second report identifier and the second query condition to obtain a second keyword;

[0028] Sending a second keyword to the first cache server, and receiving a second query result sent by the first cache server;

[0029] If the second query result does not include the second query value corresponding to the second keyword, a second report file is generated and sent to the second cache server.

[0030] In one possible design, after generating the second report file, the method further includes:

[0031] Obtaining a second storage path corresponding to a pre-stored second report identifier;

[0032] The second storage path and the second keyword are combined to obtain a second query value, and the second keyword and the second query value are sent to the first cache server.

[0033] In one possible design, the method further includes:

[0034] receiving a cleanup instruction sent from the prediction server at a second preset time, the cleanup instruction being used to instruct cleanup of the first cache server and the second cache server;

[0035] Obtaining a cleanup list from the first cache server according to the cleanup instruction;

[0036] If the cleanup list includes keywords and query values, a first deletion instruction is sent to the first cache server, and a second deletion instruction is sent to the second cache server; the first deletion instruction is used to instruct the first cache server to delete the keywords and query values ​​included in the cached cleanup list, and the second deletion instruction is used to instruct the second cache server to delete the report file corresponding to the query value included in the cached cleanup list.

[0037] In one possible design, the method further includes:

[0038] receiving a cleanup instruction from a user terminal; the cleanup instruction is used to instruct to clean up the first cache server and the second cache server;

[0039] Obtaining a cleanup list from the first cache server according to the cleanup instruction;

[0040] Send the cleanup list to the user end;

[0041] receiving a deletion instruction sent by a user terminal; the deletion instruction includes some or all of the keywords and query values, and some or all of the keywords and query values ​​exist in the cleanup list;

[0042] Delete some or all keywords and query values ​​cached in the first cache server, and delete report files corresponding to some or all query values ​​cached in the second cache server.

[0043] In a second aspect, an embodiment of the present application provides a report query device, including: a receiving module, a processing module and a sending module; wherein:

[0044] A receiving module, configured to receive a query request from a user terminal; the query request includes a first report identifier and a first query condition;

[0045] A processing module, used for concatenating the first report identifier and the first query condition to obtain a first keyword;

[0046] The receiving module is further used to obtain a first query value corresponding to the first keyword from the first cache server according to the first keyword;

[0047] The receiving module is further configured to obtain a first report file corresponding to the first query value from the second cache server if the first query value is obtained;

[0048] The sending module is used to send the first report file to the user terminal.

[0049] In a possible design, the sending module is further used to send the first keyword to the first cache server;

[0050] The receiving module is specifically configured to receive a first query value corresponding to a first keyword sent by a first cache server.

[0051] In one possible design, the sending module is further used to send the first query value to the second cache server;

[0052] The receiving module is specifically configured to receive a first report file corresponding to a first query value sent by a second cache server.

[0053] In a possible design, the device further includes: an acquisition module; wherein,

[0054] an acquisition module, for acquiring a report generation model corresponding to a pre-stored first report identifier if the first query value is not acquired; the report generation model includes query parameters in the first query condition; and according to the query parameters, acquiring source data for generating the first report file from a database, the source data being data that meets the query parameters;

[0055] The processing module is further used to process the source data through the report generation model to obtain a first report file;

[0056] The sending module is also used to send the first report file to the user end.

[0057] In a possible design, the acquisition module is further used to acquire a first storage path corresponding to a pre-stored first report identifier;

[0058] The processing module is further used to combine the first storage path and the first keyword to obtain a first query value;

[0059] The sending module is further used to send the first keyword and the first query value to the first cache server, and send the first report file to the second cache server.

[0060] In a possible design, the receiving module is further used to receive a prediction request sent by the prediction server at a first preset time; the prediction request includes a second report identifier and a second query condition, and the prediction request is used to request pre-generation of a second report file;

[0061] The processing module is further used to concatenate the second report identifier and the second query condition to obtain a second keyword;

[0062] The sending module is further used to send the second keyword to the first cache server;

[0063] The receiving module is further used to receive the second query result sent by the first cache server;

[0064] The processing module is further configured to generate a second report file if the second query result does not include a second query value corresponding to the second keyword;

[0065] The sending module is also used to send a second report file to the second cache server.

[0066] In a possible design, after the second report file is generated, the acquisition module is further used to acquire a second storage path corresponding to the pre-stored second report identifier;

[0067] The processing module is further used to combine the second storage path and the second keyword to obtain a second query value;

[0068] The sending module is also used to send the second keyword and the second query value to the first cache server.

[0069] In one possible design, the receiving module is further used to receive a cleanup instruction sent from the prediction server at a second preset time, where the cleanup instruction is used to instruct to clean up the first cache server and the second cache server;

[0070] The acquisition module is further used to acquire a cleanup list from the first cache server according to the cleanup instruction;

[0071] The sending module is also used to send a first deletion instruction to the first cache server and a second deletion instruction to the second cache server if the cleanup list includes keywords and query values; the first deletion instruction is used to instruct the first cache server to delete the keywords and query values ​​included in the cached cleanup list, and the second deletion instruction is used to instruct the second cache server to delete the report file corresponding to the query value included in the cached cleanup list.

[0072] In a possible design, the receiving module is further used to receive a cleanup instruction from the user end; the cleanup instruction is used to instruct to clean up the first cache server and the second cache server;

[0073] The acquisition module is further used to acquire a cleanup list from the first cache server according to the cleanup instruction;

[0074] The sending module is also used to send the cleanup list to the user end;

[0075] The receiving module is further used to receive a deletion instruction sent by the user terminal; the deletion instruction includes part or all of the keywords and query values, and part or all of the keywords and query values ​​exist in the cleanup list;

[0076] The processing module is further used to delete some or all of the keywords and query values ​​cached in the first cache server, and delete the report files corresponding to some or all of the query values ​​cached in the second cache server.

[0077] In a third aspect, an embodiment of the present application provides a server, including: a processor and a memory;

[0078] Memory stores computer-executable instructions;

[0079] The processor executes the computer execution instructions stored in the memory, so that the processor performs the report query method as described in any one of the first aspects.

[0080] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium, in which computer-executable instructions are stored. When a processor executes the computer-executable instructions, a report query method as described in any one of the first aspects is implemented.

[0081] In a fifth aspect, an embodiment of the present application provides a computer program product, including a computer program, which, when executed by a processor, implements the report query method as described in any one of the first aspects.

[0082] The embodiment of the present application provides a report query method, device, server, storage medium and program product, the method comprising: receiving a query request from a user end; the query request includes a first report identifier and a first query condition; concatenating the first report identifier and the first query condition to obtain a first keyword; obtaining a first query value corresponding to the first keyword from a first cache server according to the first keyword; if the first query value is obtained, obtaining a first report file corresponding to the first query value from a second cache server, and sending the first report file to the user end. In the above method, a two-level cache mechanism is adopted, caching multiple different key-value pairs in the first cache server, and caching multiple different report files in the second cache server. After obtaining the first query value from the first cache server according to the first keyword, the platform server obtains the first report file from the second cache server according to the first query value, and sends the first report file to the user end, so as to avoid the report file occupying the memory resources of the platform server and improve the data processing efficiency of the platform server. BRIEF DESCRIPTION OF THE DRAWINGS

[0083] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of the embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative labor.

[0084] Figure 1 A schematic diagram of the structure of the existing communication architecture provided in the embodiment of the present application;

[0085] Figure 2 A schematic diagram of the communication architecture provided for this application;

[0086] Figure 3 Schematic diagram of the report query method provided in the embodiment of the present application Figure 1 ;

[0087] Figure 4 Schematic diagram of the report query method provided in the embodiment of the present application Figure 2 ;

[0088] Figure 5 Schematic diagram of the report query method provided in the embodiment of the present application Figure 3 ;

[0089] Figure 6 Schematic diagram of the report query method provided in the embodiment of the present application Figure 4 ;

[0090] Figure 7 Schematic diagram of the report query method provided in the embodiment of the present application Figure 5 ;

[0091] Figure 8 A schematic diagram of the structure of the report query device provided in the embodiment of the present application Figure 1 ;

[0092] Fig. 9 A schematic diagram of the structure of the report query device provided in the embodiment of the present application Figure 2 ;

[0093] Fig.10 A schematic diagram of the hardware structure of the server provided in an embodiment of the present application. DETAILED DESCRIPTION

[0094] In order to make the purpose, technical solution and advantages of the embodiments of the present application clearer, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.

[0095] First, the relevant terms involved in this application are explained.

[0096] Platform as a Service (PaaS) is a level of cloud computing services. It refers to the software development platform as a service that can be seamlessly expanded, so that developers only need to focus on their own business logic without paying attention to the underlying technology.

[0097] Remote Dictionary Service (Redis), a high-performance key-value storage system based primarily on memory.

[0098] Network Attached Storage (NAS) is a dedicated data storage server that is data-centric, completely separates storage devices from servers, and centrally manages data, thereby freeing up bandwidth, improving performance, and reducing total cost of ownership.

[0099] Report files are data that can be dynamically displayed in the software system in the form of tables, charts, etc.

[0100] Combine the following Figure 1 The communication architecture involved in the relevant technology in this application is explained.

[0101] Figure 1 This is a schematic diagram of the structure of the existing communication architecture provided in the embodiment of the present application. Figure 1 As shown, it includes: multiple user terminals, load balancing servers, server clusters and databases. Among them, the server cluster includes multiple platform servers. It should be noted that Figure 1 It is described by taking the example that the multiple user terminals include user terminal A and user terminal B, and the multiple platform servers include PaaS server A, PaaS server B and PaaS server C.

[0102] Multiple client terminals communicate with the load balancing server respectively, the load balancing server communicates with multiple platform servers respectively, the multiple platform servers communicate with the database respectively, and the multiple platform servers cannot communicate with each other.

[0103] Let's take user A as an example. Figure 1The communication architecture shown is used to illustrate the existing report query method that can be implemented. Client A sends a report access request to the load balancing server, and the access request is used to request access to the report file; after the load balancing server determines the target server among multiple platform servers, it sends the access request to the target server; the target server obtains the source data for generating the report file from the database according to the access request, generates the report file according to the source data, and then caches the report file, and sends the report file to client A through the load balancing server.

[0104] In the above-mentioned existing report query method, the report files generated by the platform server are usually cached in its memory. Since the report files are usually large, a large number of report files occupy a large amount of memory resources of the platform server, resulting in low data processing efficiency of the platform server.

[0105] In order to avoid a large number of report files occupying the memory resources of the platform server, thereby improving the data processing efficiency of the platform server, this application provides a report query method. Figure 2 The communication architecture of the report query method provided in this application is described.

[0106] Figure 2 This is a schematic diagram of the communication architecture provided by this application. Figure 2 As shown, it includes: multiple user terminals, a load balancing server, a server cluster, a first cache server, a second cache server and a database. The server cluster includes multiple platform servers. It should be noted that Figure 2 It is described by taking the example that the multiple user terminals include user terminal A and user terminal B, and the multiple platform servers include PaaS server A, PaaS server B and PaaS server C.

[0107] Among them, the load balancing server is used to receive query requests sent by multiple user terminals and distribute the query requests to the corresponding platform servers; the platform server is used to deploy web applications, including deploying a report generation model (i.e., generation logic) for generating report files; the first cache server is used to store the first-level cache information, i.e., key-value pairs (key-value), the keyword (key value) is obtained according to the report identifier and the query condition, and the query value (value value) is obtained according to the storage path and file name of the report generation (it can also be obtained according to the storage path, file name, and generation time); the second cache server is used to store the second-level cache information, i.e., report files; the database is used to store the source data for generating report files.

[0108] Multiple client terminals communicate with the load balancing server respectively, the load balancing server communicates with multiple platform servers respectively, the multiple platform servers communicate with the first cache server, the second cache server and the database respectively, and the multiple platform servers cannot communicate with each other.

[0109] Optionally, the above communication can be achieved through a wired network or a wireless network. For example, a wired network may include a coaxial cable, a twisted pair, and an optical fiber. For example, a wireless network may be a 2G network, a 3G network, a 4G network, or a 5G network, a Wireless Fidelity (WIFI) network, etc. Specifically, this application does not limit the specific type or form of communication, as long as it can achieve the above communication function.

[0110] exist Figure 2 In the communication architecture shown, the first cache server (Redis server) is used to cache query values ​​corresponding to multiple different report files, and the second cache server (i.e., NAS server) is used to cache multiple different report files. For example, when the target server is PaaS server A, after receiving the query request, PaaS server A obtains the query value from the first cache server, obtains the report file from the second cache server according to the query value, and sends the report file to the load balancing server, thereby avoiding caching the report file in the platform server, saving the memory resources of the platform server, and improving the data processing efficiency of the platform server.

[0111] The technical solution of the present application is described in detail with specific embodiments below. The following specific embodiments can be combined with each other, and the same or similar concepts or processes may not be described in detail in some embodiments.

[0112] Figure 3 Schematic diagram of the report query method provided in the embodiment of the present application Figure 1 .like Figure 3 As shown, the method includes:

[0113] S301: Receive a query request from a user terminal, where the query request includes a first report identifier and a first query condition.

[0114] The execution subject of the report query method provided in the embodiment of the present application is a platform server, which may be a report query device set in the platform server, and the report query device may be implemented by a combination of software and / or hardware. The following takes the execution subject as an example of a platform server to illustrate the technical solution provided in the present application.

[0115] Specifically, the user terminal sends a query request to the load balancing server. After determining the platform server, the load balancing server sends the query request to the platform server so that the platform server can receive the query request.

[0116] The first query condition may include date, enterprise structure name, user terminal identifier, etc.

[0117] S302: Concatenate the first report identifier and the first query condition to obtain a first keyword.

[0118] Optionally, the first keyword may be obtained through the following two methods.

[0119] Mode 1: encrypt the first report identifier and the first query condition by using an encryption algorithm to obtain a first keyword.

[0120] Method 2: According to a preset rule, the first report identifier and the first query condition are combined to obtain a first keyword. The preset rule may include a sequence number of each type of information (including identifiers, conditions, etc.). For example, when the first query condition includes a date and an enterprise structure name, if the sequence number of the first report identifier is 1, the sequence number of the enterprise structure name is 2, and the sequence number of the date is 3 in the preset rule, the first keyword obtained includes the first report identifier, the enterprise structure name, and the date arranged in sequence.

[0121] S303: According to the first keyword, obtain a first query value corresponding to the first keyword from the first cache server.

[0122] The first cache server includes a memory database, which can be any one of the following: Redis, memcached, FastDB, and Apache Ignite.

[0123] The first cache server may include N different key-value pairs (Key-Value), each of the N different key-value pairs includes a keyword (Key) and a query value (Value). N is an integer greater than or equal to 0.

[0124] Exemplarily, when the memory database in the first cache server is Redis, storing key-value pairs can avoid the problem that the size of a single cache item (ie, a key-value pair) in Redis exceeds 10 kilobytes, resulting in performance degradation of the first cache server.

[0125] Optionally, the platform server sends the first keyword to the first cache server, so that the first cache server queries N key-value pairs for a first query value corresponding to the first keyword.

[0126] Optionally, after receiving the first keyword, the first cache server can determine whether N is 0. If N is greater than 0, it will query the first query value corresponding to the first keyword in the N key-value pairs, and send the first query value to the platform server so that the platform server obtains the first query value; if N is equal to 0, a preset message (for example, NULL) is sent to the platform server.

[0127] The query value usually includes the storage path and file name of the report file. Optionally, the query value has a corresponding generation time, and the query value may also include the generation time.

[0128] The generation time usually indicates the activity of the query value (i.e., indicates the activity of accessing the report file corresponding to the query value). The generation time can be updated, for example, each time the first keyword is received. Optionally, the second cache server can update the generation time in the following two ways.

[0129] Mode 1: After receiving the first keyword, the second cache server obtains the system time of the second cache server and updates the generation time to the system time.

[0130] Mode 2: The platform server sends the first query value to the second cache server and sends the update time to the second cache server at the same time; after receiving the update time, the second cache server updates the generation time to the above update time. In Mode 2, the update time can be the system time of the platform server, or the sum of the system time of the platform server and the first preset time.

[0131] S304: If the first query value is obtained, obtain a first report file corresponding to the first query value from the second cache server, and send the first report file to the user terminal.

[0132] A plurality of different report files are pre-cached in the second cache server.

[0133] Optionally, the first report file may be obtained in the following two ways.

[0134] Method 1: The platform server sends a first query value to the second cache server; the second cache server searches for the first report file in multiple pre-cached report files based on the storage path and file name in the first query value, and sends the first report file to the platform server, so that the platform server sends the first report file to the user end through the load balancing server.

[0135] Method 2, the platform server sends the storage path and file name to the second cache server, the second cache server stores the path and file name, searches for the first report file in multiple different pre-cached report files, and sends the first report file to the platform server, so that the platform server sends the first report file to the user end through the load balancing server.

[0136] exist Figure 3 In the report query method provided in the embodiment, a two-level cache mechanism is adopted to cache multiple different key-value pairs in the first cache server and cache multiple different report files in the second cache server. After the platform server obtains the first query value from the first cache server according to the first keyword, it obtains the first report file from the second cache server according to the first query value and sends the first report file to the user terminal, thereby avoiding the report file occupying the memory resources of the platform server and improving the data processing efficiency of the platform server.

[0137] Furthermore, in actual applications, if a large number of report files are to be stored in the platform server to improve the data processing efficiency of the platform server, the memory capacity of the platform server is usually expanded, which results in high costs. In the present application, multiple key-value pairs are cached in the first cache server, and multiple different report files are cached in the second cache server. This can improve the data processing efficiency of the platform server without expanding the memory capacity of the platform server, thus saving costs.

[0138] Based on the above embodiments, the report query method provided by the present application is further described in detail below in conjunction with specific embodiments. For details, please refer to Figure 4 Example.

[0139] Figure 4 Schematic diagram of the report query method provided in the embodiment of the present application Figure 2 .like Figure 4 As shown, the method includes:

[0140] S401. The client sends a query request to the platform server through the load balancing server. The query request includes a first report identifier and a first query condition.

[0141] The user-side load balancing server sends a query request, and the load balancing server forwards the query request to the platform server.

[0142] S402: The platform server concatenates the first report identifier and the first query condition in the query request to obtain a first keyword.

[0143] S403: The platform server sends the first keyword to the first cache server.

[0144] S404: The first cache server sends the query result to the platform server.

[0145] S405: The platform server determines whether there is a first query value corresponding to the first keyword in the query information.

[0146] If so, execute S406 to S407; otherwise, execute S408 to S416.

[0147] S406: The platform server sends the first query value to the second cache server.

[0148] It should be noted that when the platform server determines that there is a first query value corresponding to the first keyword in the query result, it is equivalent to obtaining the first query value, so 406 to S407 can be executed; when the platform server determines that there is no first query value in the query result, it is equivalent to not obtaining the first query value, so S408 to S416 can be executed.

[0149] Optionally, before S406, the method may further include: sending the update time to the second cache server, so that the second cache server updates the generation time of the first query value according to the update time.

[0150] S407: The second cache server sends the first report file corresponding to the first query value to the user terminal through the platform server and the load balancing server in sequence.

[0151] Specifically, the second cache server sends the first report file corresponding to the first query value to the platform server; the platform server sends the first report file corresponding to the first query value to the user end through the load balancing server; the platform server sends the first report file corresponding to the first query value to the load balancing server, and the load balancing server sends the first report file corresponding to the first query value to the user end.

[0152] S408: The platform server obtains a pre-stored report generation model corresponding to the first report identifier, where the report generation model includes a query parameter in the first query condition.

[0153] The report generation model is a logic program including report processing rules.

[0154] S409. The platform server obtains source data for generating a first report file from a database according to the query parameters, where the source data is data that meets the query parameters; and processes the source data through a report generation model to obtain a first report file.

[0155] Optionally, the above-mentioned database can also be set in a server (such as a database server). Specifically, the platform server sends query parameters to the database server so that the database server performs information query according to the query parameters, obtains source data for generating the first report file, and sends the source data to the platform server.

[0156] S410: The platform server sends a first report file to the user terminal through the load balancing server.

[0157] S411. The platform server obtains a first storage path corresponding to a pre-stored first report identifier, and combines the first storage path and a first keyword to obtain a first query value.

[0158] S412: The platform server sends the first keyword and the first query value to the first cache server.

[0159] S413: The first cache server sends first feedback information to the platform server.

[0160] The first feedback information is used to indicate that the first cache server successfully caches the first keyword and the first query value.

[0161] S414: The platform server sends the first report file to the second cache server.

[0162] S415. The second cache server sends second feedback information to the platform server.

[0163] The second feedback information is used to indicate that the second cache server successfully caches the first report file.

[0164] It should be noted that in Figure 4 The report query method provided only illustrates the execution process of S401 to S415. In practical applications, for example, the execution process of S401 to S415 can be adjusted to: first execute S401 to S410; then execute S414 to S415; and finally execute S411 to S413.

[0165] Figure 4The report query method provided by the embodiment is different from the prior art. In the prior art, for example, when a user terminal sends a report access request (user requests a report file), the load balancing server sends the report access request, for example, to Paas server A. When the report file is cached in Paas server A, Paas server A sends the report file to user terminal A; when the above-mentioned user terminal or another user terminal sends another report access request, the load balancing server sends the report access request, for example, to Paas server B. When the report file is not cached in Paas server B, Paas server B needs to re-access the database to obtain source data, and generate and cache the report file based on the source data, and then send the report file to user terminal A. In the above-mentioned prior art, multiple platform servers in a server cluster cannot access the report files cached in each other, resulting in a low usage rate (i.e., hit rate) of the report files cached in the platform servers, and when the platform server receives a report access request, if there is no cached report file, the platform server must access the database to obtain source data, resulting in a high frequency of access to the database. In addition, caching report files in the platform server causes the report files to occupy a large amount of memory resources of the platform server, thereby reducing the data processing efficiency of the platform server.

[0166] In the present application, a two-level cache mechanism is adopted, where multiple key-value pairs are cached in the first cache server, and multiple different report files are cached in the second cache server. For each platform server, when a user terminal sends a query request, if the load balancing server sends the query request, for example, to Paas server A, then when Paas server A obtains the first query value, it sends the first query value to the second cache server, receives the first report file sent by the second cache server, and then sends the first report file to user terminal A; when Paas server A does not obtain the first query value, it obtains the report generation model and source data, processes the source data through the report generation model, obtains the first report file, and sends the first report file to the second cache server and the user terminal respectively, so that the second cache server caches the first report file; when the above-mentioned user terminal or another user terminal sends the above-mentioned query request again, the load balancing server sends the query request, for example, to Paas server B, then Paas server B can also obtain the first report file from the second cache server (when the first report file is within the cache validity period), and send the first report file to user terminal A. In the present application, multiple platform servers in the server cluster can access the report files cached by the second cache server, thereby improving the utilization rate (i.e., hit rate) of the cached report files. Moreover, when the platform server receives a query request, if there is no cached report file, the platform server can obtain the report file from the second cache server, thereby reducing the frequency of access to the database. In addition, the report files are cached in the second cache server to avoid the report files occupying the memory resources of the platform server, thereby improving the data processing efficiency of the platform server.

[0167] In addition, it is different from the prior art. In the prior art, multiple platform servers in a server cluster may store the same report file, occupying the overall memory resources of the communication architecture. In the present application, multiple different report files are cached in the second cache server, and the same report file will not be cached in any device in the communication architecture, saving the overall memory resources of the communication architecture.

[0168] Based on the above embodiments, Figure 5 The report query method provided in the embodiment of the present application is further described in detail. For details, please refer to Figure 5 Example.

[0169] Figure 5 Schematic diagram of the report query method provided in the embodiment of the present application Figure 3 .like Figure 5 As shown, the method includes:

[0170] S501. The prediction server sends a cleanup instruction to the platform server through the load balancing server at a second preset time, where the cleanup instruction is used to instruct to clean up the first cache server and the second cache server.

[0171] exist Figure 2 The communication architecture shown may also include a prediction server, which may communicate with a load balancing server.

[0172] Specifically, the prediction server sends a cleanup instruction to the load balancing server at the second preset time, and the load balancing server sends a cleanup instruction to the platform server. The second preset time may be, for example, 23:59 or 00:00 every day.

[0173] The cleaning instruction may include a cache validity period before the second preset time, and the cache validity period indicates that the first cache server writes query values ​​outside the cache validity period into the cleaning list. For example, when the second preset time is 00:00, the cache validity period may be 00:01 to 23:59.

[0174] In one possible design, after determining that the cache time is greater than the system preset time, the prediction server sends a cleanup instruction to the load balancing server.

[0175] S502: The platform server sends a list request to the first cache server, where the list request is used to request to obtain a cleanup list.

[0176] S503: The first cache server sends a cleanup list to the platform server.

[0177] The first cache server counts the key-value pairs in its cache according to the cache effectiveness period and the generation time of the query value, obtains the key-value pairs within the cache effectiveness period, writes the key-value pairs within the cache effectiveness period into a cleanup list, and sends the cleanup list with the key-value pairs written to the platform server; or writes the query value within the cache effectiveness period into the cleanup list, and sends the cleanup list with the query value written to the platform server; or writes the keyword corresponding to the query value within the cache effectiveness period into the cleanup list, and sends the cleanup list with the keyword written to the platform server.

[0178] For example, the key-value pairs cached by the first cache server include Key1-Value1, Key2-Value2, and Key3-Value3. The corresponding generation time of Value1 is 08:00, the corresponding generation time of Value2 is 09:32, and the corresponding generation time of Value3 is 10:02. When the cache takes effect for 07:00 to 10:00, Key1-Value1 and Key2-Value2 can be written into the cleanup list; or Value1 and Value2 can be written into the cleanup list; or Key1 and Key2 can be written into the cleanup list.

[0179] S504: The platform server determines whether the cleanup list includes keywords and query values.

[0180] If not, execute S505; if so, execute S506 to S511.

[0181] It should be noted that when the cleanup list is written with a key-value pair, S504 may be executed.

[0182] When the cleaning list contains keywords, the platform server determines whether the cleaning list includes the keywords; if not, S505 is executed; if so, S506 to S511 are executed.

[0183] When the query value is written into the cleanup list, the platform server determines whether the query value is included in the cleanup list; if not, execute S505; if so, execute S506 to S511.

[0184] It should be noted that when S506 to S511 are executed, it indicates that the cleanup list is an empty table, that is, there is no key-value pair, keyword, or query value.

[0185] S505: The platform server sends third feedback information to the prediction server through the load balancing server.

[0186] The third feedback information indicates that the cached information in the first cache server and the second cache server has been cleared.

[0187] S506: The platform server sends a first deletion instruction to the first cache server.

[0188] The first deletion instruction is used to instruct the first cache server to delete the keyword and query value included in the cached cleanup list.

[0189] S507: The first cache server deletes the keywords and query values ​​included in the cache cleanup list.

[0190] S508. The first cache server sends fourth feedback information to the platform server.

[0191] The fourth feedback information indicates that the keywords and query values ​​included in the cached cleanup list are successfully deleted.

[0192] S509: The platform server sends a second deletion instruction to the second cache server.

[0193] The second deletion instruction is used to instruct the second cache server to delete the report file corresponding to the query value in the cleanup list.

[0194] S510: The second cache server deletes the report file corresponding to the query value included in the cache cleanup list.

[0195] S511. The second cache server sends fifth feedback information to the platform server.

[0196] The fifth feedback information indicates that the report file corresponding to the query value included in the cached cleanup list is successfully deleted.

[0197] S512: The platform server sends third feedback information to the prediction server through the load balancing server.

[0198] exist Figure 5 In the report query method provided in the embodiment, after receiving the cleanup instruction, the platform server obtains the cleanup list. When the cleanup list includes keywords and query values, the first cache server deletes the keywords and query values ​​included in the cached cleanup list, and the second cache server deletes the report files corresponding to the query values ​​included in the cached cleanup list, thereby achieving the purpose of automatically cleaning the first cache server and the second cache server, and avoiding the problem of slow data processing efficiency of the cache servers due to the first cache server and the second cache server caching a large amount of data.

[0199] Figure 6 Schematic diagram of the report query method provided in the embodiment of the present application Figure 4 .like Figure 6 As shown, the method includes:

[0200] S601: The user terminal sends a cleanup instruction to the platform server through the load balancing server. The cleanup instruction is used to instruct the first cache server and the second cache server to clean up.

[0201] Specifically, the user terminal sends a cleanup instruction to the load balancing server; the load balancing server sends a cleanup instruction to the platform server.

[0202] S602: The platform server sends a list request to the first cache server. The list request is used to request to obtain a cleanup list.

[0203] Specifically, after receiving the cleanup instruction, the platform server sends a list request to the first cache server.

[0204] S603: The first cache server sends a cleanup list to the user terminal via the platform server and the load balancing server in sequence.

[0205] Specifically, the platform server sends a cleanup list to the load balancing server; the load balancing server sends a cleanup list to the user end.

[0206] Optionally, the cleanup list in S603 may be the same as the cleanup list in S503, which will not be described in detail here.

[0207] S604: The user terminal sends a deletion instruction to the platform server through the load balancing server. The deletion instruction includes some or all keywords and query values ​​in the cleanup list.

[0208] The deletion instruction may also include some or all keywords in the cleanup list, or some or all query values.

[0209] Some or all of the keywords and query values, keywords, and query values ​​are content that needs to be deleted as specified by the user, and some or all of the keywords and query values, keywords, and query values ​​exist in the cleanup list.

[0210] Specifically, the load balancing server sends a deletion instruction to the platform server; and the platform server sends a deletion instruction to the first cache server.

[0211] S605: The platform server sends a deletion instruction to the first cache server.

[0212] S606: The first cache server deletes some or all of the cached keywords and query values.

[0213] It should be noted that when the deletion instruction includes clearing some or all keywords and query values ​​in the list; some or all keywords; or some or all keyword query values, the first cache server can execute S606.

[0214] For example, when the deletion indication includes some or all keywords, the first cache server can determine the key-value pairs corresponding to some or all keywords based on some or all keywords, and delete the key-value pairs corresponding to some or all keywords, thereby deleting some or all cached keywords and query values.

[0215] S607: The first cache server sends sixth feedback information to the platform server.

[0216] The sixth feedback information indicates that the first cache server has successfully deleted some or all of the keywords and query values ​​included in the deletion instruction.

[0217] S608: The platform server sends a deletion instruction to the second cache server.

[0218] S609: The second cache server deletes the report files corresponding to some or all query values ​​in the cache, thereby deleting the report files corresponding to some or all query values ​​in the cache of the second cache server.

[0219] S610: The second cache server sends seventh feedback information to the platform server.

[0220] The seventh feedback information indicates that the second cache server has successfully deleted the report files corresponding to some or all of the query values ​​included in the deletion instruction.

[0221] S611. The platform server sends eighth feedback information to the user terminal through the load balancing server.

[0222] Specifically, the platform server sends the eighth feedback information to the load balancing server; the load balancing server sends the eighth feedback information to the user terminal.

[0223] The eighth feedback information indicates that the first cache server and the second cache server are successfully cleared according to the deletion instruction.

[0224] It should be noted that in Figure 6 The report query method provided is only an exemplary description of the execution process of S601 to S611. In practical applications, for example, the execution process of S601 to S611 can also be adjusted to: first execute S601 to S604; then execute S608 to S610; then execute S605 to S607; and finally execute S611.

[0225] exist Figure 6 In the report query method provided, the platform server sends a deletion instruction to the first cache server and the second cache server respectively, so that the first cache server and the second cache server clean up the information cached by them respectively, avoiding the problem that the first cache server and the second cache server cache a large amount of data, resulting in a slow data processing efficiency of the cache server. In addition, in this embodiment, the deletion instruction includes some or all keywords and query values ​​specified by the user end, so that during the cleaning process of the first cache server and the second cache server, the cleaning needs of the user can be met, and the user experience can be improved.

[0226] It should be noted that Figure 3 to Figure 6 The platform server is the same server.

[0227] Figure 7 Schematic diagram of the report query method provided in the embodiment of the present application Figure 5 .like Figure 7 As shown, the method includes:

[0228] S701. The prediction server sends a historical information request to the load balancing server. The historical information request includes a second preset time length. The historical information request is used to request to obtain query requests within the second preset time length. Each query request within the second preset time length includes a report identifier and a query condition.

[0229] S702: The load balancing server sends a query request within a second preset time period to the prediction server, where the query request includes a second report identifier and a second query condition.

[0230] S703: The prediction server concatenates the second report identifier and the second query condition for each query request within the second preset time period to obtain a second keyword corresponding to each query request.

[0231] S704. The prediction server counts the second keyword corresponding to each query request to obtain the frequencies corresponding to the multiple second keywords; and arranges the multiple second keywords in descending order of the frequencies corresponding to the multiple second keywords to obtain a keyword sequence.

[0232] S705: The prediction server obtains the first M second keywords from the keyword sequence according to the pre-stored number M, and writes the second report identifier and the second query condition included in the first M second keywords into the report list.

[0233] M can be a positive integer greater than or equal to 1.

[0234] S706. The prediction server sends the i-th prediction request to the platform server through the load balancing server starting from the first preset time; the i-th prediction request includes the i-th second report identifier and the i-th second query condition in the report list, and the i-th prediction request is used to request the pre-generation of the i-th second report file.

[0235] In one possible design, the first preset time may be after the aforementioned second preset time.

[0236] It should be noted that when S706 is first executed, i is equal to 1. When S706 is first executed, the cache validity time may also be sent to the platform server so that the platform server stores the cache validity time, and / or the cache validity time may be sent to the first cache server.

[0237] S707: The platform server obtains the i-th second keyword based on the i-th second report identifier and the i-th second query condition.

[0238] In a possible design, S701 to S707 can also be replaced by the following steps: the prediction server sends a report list to the platform server; the platform server obtains the i-th second report identifier and the i-th second query condition in the report list, and obtains the i-th second keyword for the i-th second report identifier and the i-th second query condition.

[0239] S708: The platform server sends the i-th second keyword to the first cache server.

[0240] S709: The first cache server sends the i-th second query result to the platform server.

[0241] S710: If the platform server determines that the i-th second query result includes the i-th second query value corresponding to the i-th second keyword, the platform server sends the i-th update time to the second cache server.

[0242] The i-th update time is used to update the generation time corresponding to the i-th second query value.

[0243] S711. If the platform server determines that the i-th second query result does not include the i-th second query value corresponding to the i-th second keyword, it obtains the i-th report generation model corresponding to the i-th second report identifier stored in advance, and the i-th report generation model includes the query parameters in the i-th query condition.

[0244] S712. The platform server obtains source data for generating the i-th second report file from the database according to the query parameters in the i-th query condition, and processes the source data through the i-th report generation model to obtain the i-th second report file.

[0245] The source data of the i-th second report file is data that meets the query parameters in the i-th second query condition.

[0246] S713: The platform server obtains the i-th second storage path corresponding to the i-th second report identifier stored in advance, and combines the i-th second storage path and the i-th second keyword to obtain the i-th second query value.

[0247] S714: The platform server sends the i-th second keyword and the i-th second query value to the first cache server, so that the first cache server stores the i-th second keyword and the i-th second query value.

[0248] S715. The first cache server sends ninth feedback information to the platform server.

[0249] The ninth feedback information is used to indicate that the first cache server successfully caches the i-th second keyword and the i-th second query value.

[0250] S716. The platform server sends the i-th second report file to the second cache server.

[0251] S717. The second cache server sends tenth feedback information to the platform server.

[0252] The tenth feedback information is used to indicate that the second cache server successfully caches the i-th second report file.

[0253] S718. The platform server sends the eleventh feedback information to the prediction server through the load balancing server.

[0254] The eleventh feedback information is used to indicate that the i-th second report file is pre-generated successfully.

[0255] Exemplarily, the eleventh feedback information may be preset success mark information.

[0256] S719: The prediction server adds 1 to i and repeats S706 to S719 until i=M.

[0257] It should be noted that in Figure 7 In the embodiment, during the process of repeatedly executing S706 to S719, the platform server may be the same or different platform servers.

[0258] exist Figure 7 The report query method provided by the embodiment is different from the prior art. In the prior art, when the platform server receives a report access request for accessing a report file for the first time, the platform server needs to generate the report file, which results in low report access efficiency and reduces user experience. In the present application, the platform server receives a prediction request sent by the prediction server, and pre-generates a second report file according to the prediction request, and then caches the second report file in the second cache server, and caches the second query value corresponding to the second report file and the second keyword corresponding to the second query value in the first cache server, so that when the platform server receives a report access request for accessing a report file, the report file can be quickly obtained without temporarily generating a report file, thereby improving the low report access efficiency and thus improving the user experience.

[0259] Figure 8 A schematic diagram of the structure of the report query device provided in the embodiment of the present application Figure 1 .like Figure 8 As shown, the report query device includes: a receiving module 801, a processing module 802 and a sending module 803; wherein,

[0260] The receiving module 801 is used to receive a query request from a user terminal; the query request includes a first report identifier and a first query condition;

[0261] Processing module 802, used for concatenating the first report identifier and the first query condition to obtain a first keyword;

[0262] The receiving module 801 is further configured to obtain, according to the first keyword, a first query value corresponding to the first keyword from the first cache server;

[0263] The receiving module 801 is further configured to obtain a first report file corresponding to the first query value from the second cache server if the first query value is obtained;

[0264] The sending module 803 is used to send the first report file to the user terminal.

[0265] The report query device provided in the embodiment of the present application can execute the technical solution shown in the above method embodiment, and its implementation principle and beneficial effects are similar, which will not be repeated here.

[0266] Fig. 9 A schematic diagram of the structure of the report query device provided in the embodiment of the present application Figure 2 .exist Figure 8 On the basis of Fig. 9 As shown, the report query device also includes: an acquisition module 804; wherein,

[0267] The acquisition module 804 is used to acquire a report generation model corresponding to the pre-stored first report identifier if the first query value is not acquired; the report generation model includes the query parameters in the first query condition; according to the query parameters, source data for generating the first report file is acquired from the database, the source data being data that meets the query parameters;

[0268] The processing module 802 is further used to process the source data through the report generation model to obtain a first report file;

[0269] The sending module 803 is further configured to send the first report file to the user terminal.

[0270] The report query device provided in the embodiment of the present application can execute the technical solution shown in the above method embodiment, and its implementation principle and beneficial effects are similar, which will not be repeated here.

[0271] In a possible design, the sending module 803 is further configured to send the first keyword to the first cache server;

[0272] The receiving module 801 is specifically configured to receive a first query value corresponding to a first keyword sent by a first cache server.

[0273] In one possible design, the sending module 803 is further configured to send the first query value to the second cache server;

[0274] The receiving module 801 is specifically configured to receive a first report file corresponding to a first query value sent by a second cache server.

[0275] In a possible design, the acquisition module 804 is further used to acquire a first storage path corresponding to a pre-stored first report identifier;

[0276] The processing module 802 is further used to combine the first storage path and the first keyword to obtain a first query value;

[0277] The sending module 803 is further configured to send the first keyword and the first query value to the first cache server, and send the first report file to the second cache server.

[0278] In a possible design, the receiving module 801 is further used to receive a prediction request sent by the prediction server at a first preset time; the prediction request includes a second report identifier and a second query condition, and the prediction request is used to request pre-generation of a second report file;

[0279] The processing module 802 is further used to concatenate the second report identifier and the second query condition to obtain a second keyword;

[0280] The sending module 803 is further used to send the second keyword to the first cache server;

[0281] The receiving module 801 is further configured to receive a second query result sent by the first cache server;

[0282] The processing module 802 is further configured to generate a second report file if the second query result does not include a second query value corresponding to the second keyword;

[0283] The sending module 803 is further configured to send a second report file to the second cache server.

[0284] In a possible design, after the second report file is generated, the acquisition module 804 is further used to acquire a second storage path corresponding to the pre-stored second report identifier;

[0285] The processing module 802 is further configured to combine the second storage path and the second keyword to obtain a second query value;

[0286] The sending module 803 is further configured to send the second keyword and the second query value to the first cache server.

[0287] In one possible design, the receiving module 801 is further used to receive a cleanup instruction sent from the prediction server at a second preset time, where the cleanup instruction is used to instruct to clean up the first cache server and the second cache server;

[0288] The acquisition module 804 is further configured to acquire a cleanup list from the first cache server according to the cleanup instruction;

[0289] The sending module 803 is also used to send a first deletion instruction to the first cache server and a second deletion instruction to the second cache server if the cleanup list includes keywords and query values; the first deletion instruction is used to instruct the first cache server to delete the keywords and query values ​​included in the cached cleanup list, and the second deletion instruction is used to instruct the second cache server to delete the report file corresponding to the query value included in the cached cleanup list.

[0290] In a possible design, the receiving module 801 is further used to receive a cleanup instruction from the user end; the cleanup instruction is used to instruct to clean up the first cache server and the second cache server;

[0291] The acquisition module 804 is further configured to acquire a cleanup list from the first cache server according to the cleanup instruction;

[0292] The sending module 803 is also used to send the cleanup list to the user end;

[0293] The receiving module 801 is further used to receive a deletion instruction sent by the user terminal; the deletion instruction includes part or all of the keywords and query values, and part or all of the keywords and query values ​​exist in the cleanup list;

[0294] The processing module 802 is further configured to delete some or all keywords and query values ​​cached in the first cache server, and delete report files corresponding to some or all query values ​​cached in the second cache server.

[0295] The report query device provided in the embodiment of the present application can execute the technical solution shown in the above method embodiment, and its implementation principle and beneficial effects are similar, which will not be repeated here.

[0296] The information sending device provided in the embodiment of the present application can execute the technical solution shown in the above method embodiment, and its implementation principle and beneficial effects are similar, which will not be repeated here.

[0297] Fig.10 The hardware structure diagram of the server provided in the embodiment of the present application is shown in FIG. Fig.10 As shown, the server includes: a transceiver 101, a memory 102, and a processor 103. The transceiver 101 may include: a transmitter and / or a receiver. The transmitter may also be referred to as a transmitter, a transmitter, a transmission port, a transmission interface, or similar descriptions, and the receiver may also be referred to as a receiver, a receiver, a reception port, a reception interface, or similar descriptions. The transceiver 101 is used to receive data sent by other devices or to send data to other devices.

[0298] Exemplarily, the transceiver 101 , the memory 102 , and the processor 103 are interconnected via a bus 104 .

[0299] The memory 102 is used to store computer executable instructions.

[0300] The processor 103 is used to execute the computer-executable instructions stored in the memory 102, so that the processor 103 executes the report query method shown in any of the above method embodiments. The specific implementation process of the processor 103 can refer to the above method embodiments, and its implementation principle and technical effect are similar, which will not be repeated in this embodiment.

[0301] In the above Fig.10 In the illustrated embodiment, it should be understood that the processor may be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), etc. The general-purpose processor may be a microprocessor or the processor may be any conventional processor, etc. The steps of the method disclosed in the application may be directly embodied as being executed by a hardware processor, or may be executed by a combination of hardware and software modules in the processor.

[0302] The memory may include high-speed RAM memory and may also include non-volatile storage NVM, such as disk storage.

[0303] The bus can be an Industry Standard Architecture (ISA) bus, a Peripheral Component Interconnect (PCI) bus, or an Extended Industry Standard Architecture (EISA) bus, etc. The bus can be divided into an address bus, a data bus, a control bus, etc. For ease of representation, the bus in the drawings of the present application is not limited to only one bus or one type of bus.

[0304] The present application also provides a computer-readable storage medium, in which computer-executable instructions are stored. When a processor executes the computer-executable instructions, the above report query method is implemented.

[0305] The present application also provides a computer program product, including a computer program, which implements the above report query method when executed by a processor.

[0306] All or part of the steps of the above-mentioned method embodiments can be completed by hardware related to program instructions. The above-mentioned program can be stored in a readable memory. When the program is executed, the steps of the above-mentioned method embodiments are executed; and the above-mentioned memory (storage medium) includes: read-only memory (ROM), RAM, flash memory, hard disk, solid state drive, magnetic tape, floppy disk, optical disc and any combination thereof.

[0307] The embodiments of the present application are described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the embodiments of the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processing unit of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to generate a machine, so that the instructions executed by the processing unit of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.

[0308] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.

[0309] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.

[0310] Obviously, those skilled in the art can make various changes and modifications to the embodiments of the present application without departing from the spirit and scope of the present application. Thus, if these modifications and variations of the embodiments of the present application fall within the scope of the claims of the present application and their equivalents, the present application is also intended to include these modifications and variations.

[0311] In the present application, the term "include" and its variations may refer to non-restrictive inclusion; the term "or" and its variations may refer to "and / or". The terms "first", "second", etc. in this application are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. In the present application, "plurality" refers to two or more. "And / or" describes the association relationship of associated objects, indicating that three relationships may exist. For example, A and / or B may mean: A exists alone, A and B exist at the same time, and B exists alone. The character " / " generally indicates that the previously associated objects are in an "or" relationship.

Claims

1. A report query method, characterized in that: include: Receive query requests from the user end; The query request includes a first report identifier and a first query condition; Concatenate the first report identifier and the first query condition to obtain a first keyword; According to the first keyword, obtaining a first query value corresponding to the first keyword from a first cache server; If the first query value is obtained, obtaining a first report file corresponding to the first query value from a second cache server, and sending the first report file to the user terminal; The method further comprises: If the first query value is not obtained, obtaining a pre-stored report generation model corresponding to the first report identifier; the report generation model includes the query parameters in the first query condition; According to the query parameters, source data for generating the first report file is acquired from a database, wherein the source data is data that conforms to the query parameters; Processing the source data through the report generation model to obtain the first report file, and sending the first report file to the user terminal; Acquire a first storage path corresponding to the first report identifier stored in advance; Combining the first storage path and the first keyword to obtain the first query value; The first keyword and the first query value are sent to the first cache server, and the first report file is sent to the second cache server.

2. The method according to claim 1, characterized in that The acquiring, according to the first keyword, a first query value corresponding to the first keyword from a first cache server includes: Sending the first keyword to the first cache server; A first query value corresponding to the first keyword sent by the first cache server is received.

3. The method according to claim 1, characterized in that The obtaining, from the second cache server, a first report file corresponding to the first query value includes: Sending the first query value to the second cache server; Receive a first report file corresponding to the first query value sent by the second cache server.

4. The method according to any one of claims 1 to 3, characterized in that The method further comprises: Receiving a prediction request sent by a prediction server at a first preset time; the prediction request includes a second report identifier and a second query condition, and the prediction request is used to request pre-generation of a second report file; concatenating the second report identifier and the second query condition to obtain a second keyword; sending the second keyword to the first cache server, and receiving a second query result sent by the first cache server; If the second query result does not include the second query value corresponding to the second keyword, a second report file is generated and sent to the second cache server.

5. The method according to claim 4, characterized in that After generating the second report file, the method further includes: Acquire a pre-stored second storage path corresponding to the second report identifier; The second storage path and the second keyword are combined to obtain a second query value, and the second keyword and the second query value are sent to the first cache server.

6. The method according to any one of claims 1 to 3, characterized in that The method further comprises: receiving a cleanup instruction sent from the prediction server at a second preset time, the cleanup instruction being used to instruct cleanup of the first cache server and the second cache server; According to the cleaning instruction, obtaining a cleaning list from the first cache server; If the cleanup list includes keywords and query values, a first deletion instruction is sent to the first cache server, and a second deletion instruction is sent to the second cache server; the first deletion instruction is used to instruct the first cache server to delete the cached keywords and query values ​​included in the cleanup list, and the second deletion instruction is used to instruct the second cache server to delete the report files corresponding to the query values ​​included in the cleanup list of the cache.

7. The method according to any one of claims 1 to 3, characterized in that The method further comprises: receiving a cleanup instruction from the user terminal; the cleanup instruction is used to instruct to clean up the first cache server and the second cache server; According to the cleaning instruction, obtaining a cleaning list from the first cache server; Sending the cleaning list to the user terminal; receiving a deletion instruction sent by the user terminal; the deletion instruction includes part or all of the keywords and query values, and the part or all of the keywords and query values ​​exist in the cleanup list; The part or all of the keywords and query values ​​cached in the first cache server are deleted, and the report files corresponding to the part or all of the query values ​​cached in the second cache server are deleted.

8. A report query device, characterized in that: include: Receiving module, processing module and sending module; wherein, The receiving module is used to receive a query request from a user terminal; the query request includes a first report identifier and a first query condition; The processing module is used to concatenate the first report identifier and the first query condition to obtain a first keyword; The receiving module is further configured to obtain, from a first cache server, a first query value corresponding to the first keyword according to the first keyword; The receiving module is further configured to obtain a first report file corresponding to the first query value from a second cache server if the first query value is obtained; The sending module is used to send the first report file to the user terminal; an acquisition module, configured to acquire a pre-stored report generation model corresponding to the first report identifier if the first query value is not acquired; the report generation model includes the query parameters in the first query condition; According to the query parameters, source data for generating the first report file is acquired from a database, wherein the source data is data that conforms to the query parameters; The processing module is further used to process the source data through the report generation model to obtain the first report file; The sending module is further used to send the first report file to the user terminal; The acquisition module is further used to acquire a first storage path corresponding to the first report identifier stored in advance; The processing module is further configured to combine the first storage path and the first keyword to obtain the first query value; The sending module is further configured to send the first keyword and the first query value to the first cache server, and send the first report file to the second cache server.

9. A server, characterized in that: include: Processor and memory; The memory stores computer-executable instructions; The processor executes the computer-executable instructions stored in the memory, so that the processor executes the report 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. When the processor executes the computer-executable instructions, the report query method according to any one of claims 1 to 7 is implemented.

11. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the report query method according to any one of claims 1 to 7 is implemented.

Citation Information

Patent Citations

  • Industrial data hierarchical storage system and method and industrial data hierarchical query method

    CN112685454A