Data query method, device, electronic device and storage medium

By identifying list items in the web page and detecting user filtering conditions, and building data query clauses and statements, the problem of slow data query rate in the existing technology is solved, and the effect of fast filtering data results is achieved.

CN114722264BActive Publication Date: 2025-02-28DAWNING NETWORK TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202210375205.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-04-11
Publication Date
2025-02-28
Estimated Expiration
2042-04-11

AI Technical Summary

Technical Problem

Due to resource limitations, the existing data query rate is slow and it is impossible to quickly filter out data results.

Method used

By identifying list items in the web page, detecting the filter conditions of the target user, constructing data query clauses and statements, obtaining matching query result data, and displaying it in the web page.

Benefits of technology

It improves the response speed of data query, improves the data query rate, and can quickly filter out data results.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure 00000000_0000_ABST
    Figure 00000000_0000_ABST
Patent Text Reader

Abstract

The embodiment of the present invention discloses a data query method, device, electronic device and storage medium. The method specifically includes: in response to a data query request of a target user for a web page, identifying at least one list item in the web page; the list item includes at least one data field to be displayed; detecting whether the list item filtering condition of the target user for the web page is stored, and if so, identifying at least one target list item to be displayed in each list item according to the list item filtering condition; constructing a data query clause corresponding to all target list items, and constructing a data query statement corresponding to the data query request according to the data query clause to obtain query result data matching the data query statement; and displaying the query result data in the target list item in the web page. The technical solution of the embodiment of the present invention can improve the data query response speed, thereby improving the data query rate.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] Embodiments of the present invention relate to the field of computer technology, and in particular to a data query method, device, electronic device, and storage medium. Background Art

[0002] With the rapid development of the Internet, the amount of data has also increased dramatically. In various application scenarios, a large amount of data needs to be queried. For example, in the application scenario of data tracing and analysis, it is necessary to filter out data results from a large amount of data.

[0003] However, due to the limitations of various resources, such as server resources or I / O (Input / Output) resources, it is impossible to respond to data query requests in a timely manner during data query, resulting in a slow data query rate in existing data query methods, and an inability to quickly filter out data results from large amounts of data. Summary of the invention

[0004] The embodiments of the present invention provide a data query method, device, electronic device and storage medium, which can improve the data query response speed, thereby increasing the data query rate.

[0005] According to one aspect of the present invention, there is provided a data query method, comprising:

[0006] In response to a data query request of a target user for a Web (World Wide Web) page, identifying at least one list item in the Web page; the list item includes at least one data field to be displayed;

[0007] Detecting whether a target user's list item filtering condition for the Web page is stored, and if so, identifying at least one target list item to be displayed from each of the list items according to the list item filtering condition;

[0008] Constructing a data query clause corresponding to all target list items, and constructing a data query statement corresponding to the data query request according to the data query clause, so as to obtain query result data matching the data query statement;

[0009] The query result data is displayed in the target list item in the Web page.

[0010] In addition, the data query method according to the above embodiment of the present invention may also have the following additional technical features:

[0011] Optionally, check whether to store the target user's list item filtering conditions for the web page, including:

[0012] In the historical page access records corresponding to the target user, identifying the target access record corresponding to the Web page;

[0013] Parsing the target access record to detect whether the target user sets a filter list item for the Web page;

[0014] If so, the filtering list item set by the target user is determined as the list item filtering condition.

[0015] An embodiment of the above invention has the following advantages or beneficial effects: a specific implementation method of detecting whether to store the target user's list item filtering conditions for the Web page is proposed, so as to reduce the calculation data set and calculation result set in the data query process.

[0016] Optionally, after detecting whether the target user's list item screening condition for the Web page is stored, the method further includes:

[0017] If not, providing the target user with a filter setting interface for each list item in the Web page;

[0018] In response to at least one filter list item selected by the target user in the filter setting interface, construct a data query statement corresponding to the filter list item, and obtain query result data matching the data query statement;

[0019] The query result data is displayed in the filter list item in the Web page.

[0020] An embodiment of the above invention has the following advantages or beneficial effects: a supplementary processing strategy is added for detecting that the target user's list item filtering conditions for a Web page are not stored, that is, after detecting that the target user's list item filtering conditions for a Web page are not stored, a filtering setting interface is provided to the target user state, so that the target user can determine the filtering list items in the filtering setting interface, and then perform data query according to the data query statement corresponding to the filtering list item, which can ensure the query success rate of the data query request.

[0021] Optionally, constructing a data query clause corresponding to all target list items, and constructing a data query statement corresponding to the data query request according to the data query clause, including:

[0022] For the current processing target list item, according to each target data field included in the current processing target list item, a pre-built query clause list is queried to obtain a query clause corresponding to each target data field;

[0023] Combining the query clauses to form an inner query statement corresponding to the current processing target list item;

[0024] Combining the inner query statements of the currently processed target list items to construct a data query clause corresponding to all target list items;

[0025] According to the storage form of each of the target data fields in the original database, an outer query statement corresponding to all the target list items is formed;

[0026] A data query statement corresponding to the data query request is constructed according to the data query clause and the outer query statement.

[0027] An embodiment of the above invention has the following advantages or beneficial effects: by constructing an inner query statement corresponding to the current target list item, a data query clause corresponding to all target list items is obtained, and an outer query statement corresponding to all target list items is constructed. The data query statement is determined by the data query clause and the outer query statement, which can ensure that each list item can be calculated independently, thereby improving the data query response speed.

[0028] Optionally, before detecting whether the target user's list item filtering condition for the Web page is stored, the method further includes: splitting the data query request into at least one query task according to the query time period in the data query request; each query task is used to query data within a set time interval within the query time period;

[0029] Constructing a data query clause corresponding to all target list items, and constructing a data query statement corresponding to the data query request according to the data query clause to obtain query result data matching the data query statement, including:

[0030] Construct data query clauses for all target list items for all query tasks, and construct data query statements corresponding to the data query request based on the data query clauses to obtain query result data matching the data query statements.

[0031] An embodiment of the above invention has the following advantages or beneficial effects: by splitting the data query request according to the query time period of the data query request to obtain multiple query tasks, and constructing data query clauses and data query statements for the query tasks, the query calculation data set can be reduced and the data query efficiency is improved.

[0032] Optionally, according to the query time period in the data query request, splitting the data query request into at least one query task includes:

[0033] Obtaining a start time point and an end time point that match the query time period;

[0034] Along the direction from the starting time point to the ending time point, determining at least one whole unit division time point of a preset time unit type matching the starting time point; different time unit types correspond to different time spans;

[0035] Along the direction from the end time point to the start time point, determine at least one whole unit division time point of a preset time unit type matching the end time point;

[0036] At least one time interval is formed according to the starting time point, the ending time point, and each of the whole unit division time points;

[0037] According to each of the time intervals, the data query request is split into at least one query task.

[0038] An embodiment of the above invention has the following advantages or beneficial effects: by determining the starting time point, the ending time point, and the time points for dividing each whole unit of the query time period, and determining the time interval according to the starting time point, the ending time point, and the time points for dividing each whole unit, the data query request is split according to the time interval, so as to further reduce the query calculation data set and improve the data query efficiency.

[0039] Optionally, constructing data query clauses for all target list items for all query tasks, and constructing a data query statement corresponding to the data query request according to the data query clause to obtain query result data matching the data query statement, including:

[0040] Obtain a target data query clause that matches the target query task currently being processed, and obtain a target time interval that matches the target query task;

[0041] Determining whether the target time interval matches the target time unit type;

[0042] If yes, then after updating the target data query clause according to the cache query format, query result data matching the data query clause is obtained in the data cache area; wherein the data cache area is used to store cache data matching the target time unit type;

[0043] If not, then in the original data table, the query result data matching the data query statement is obtained.

[0044] An embodiment of the above invention has the following advantages or beneficial effects: by updating the data query clause according to the cache query format when the time interval of the query task matches the target time unit type, the query result data matching the data query statement is obtained in the data cache area, so that the data cache area can be accurately hit during the data query process, thereby reducing the query calculation data set and improving data query efficiency.

[0045] According to another aspect of the present invention, there is provided a data query device, comprising:

[0046] A list item identification module, configured to identify at least one list item in the Web page in response to a target user's data query request for the Web page; the list item includes at least one data field to be displayed;

[0047] A target list item identification module is used to detect whether the target user's list item screening conditions for the Web page are stored, and if so, to identify at least one target list item to be displayed in each of the list items according to the list item screening conditions;

[0048] A query result data acquisition module, used to construct a data query clause corresponding to all target list items, and to construct a data query statement corresponding to the data query request according to the data query clause, so as to obtain query result data matching the data query statement;

[0049] The query result data display module is used to display the query result data in the target list item in the Web page.

[0050] According to another aspect of the present invention, an electronic device is provided, the electronic device comprising:

[0051] at least one processor; and

[0052] a memory communicatively connected to the at least one processor; wherein,

[0053] The memory stores a computer program that can be executed by the at least one processor, and the computer program is executed by the at least one processor so that the at least one processor can execute the data query method described in any embodiment of the present invention.

[0054] According to another aspect of the present invention, a computer-readable storage medium is provided, wherein the computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a processor to implement the data query method described in any embodiment of the present invention when executed.

[0055] The technical solution of the embodiment of the present invention responds to the data query request of the target user for the Web page, identifies at least one list item in the Web page, and detects whether the list item filtering conditions of the target user for the Web page are stored. When detecting and storing the list item filtering conditions of the target user for the Web page, at least one target list item to be displayed in each list item is identified according to the list item filtering conditions, and a data query clause corresponding to all the target list items is constructed, so as to construct a data query statement corresponding to the data query request according to the data query clause, thereby obtaining query result data matching the data query statement, and then displaying the query result data in the target list item in the Web page, which solves the problem that the existing data query method cannot quickly filter data results due to the slow data query rate, can improve the data query response speed, and thus improve the data query rate.

[0056] It should be understood that the contents described in this section are not intended to identify the key or important features of the embodiments of the present invention, nor are they intended to limit the scope of the present invention. Other features of the present invention will become easily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS

[0057] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.

[0058] Figure 1 is a flow chart of a data query method provided by Embodiment 1 of the present invention;

[0059] Figure 2 is a flow chart of a data query method provided by Embodiment 2 of the present invention;

[0060] Figure 3 is a flow chart of a data query method provided by Embodiment 3 of the present invention;

[0061] Figure 4 is an example flow chart of a data query method provided by Embodiment 4 of the present invention;

[0062] Figure 5 This is an example flow chart of splitting a data query request provided by Embodiment 4 of the present invention;

[0063] Figure 6 This is an example flow chart of constructing a data query statement provided by the fourth embodiment of the present invention;

[0064] Figure 7is a schematic diagram of a data query device provided by Embodiment 5 of the present invention;

[0065] Figure 8 It is a structural schematic diagram of an electronic device for implementing the data query method according to an embodiment of the present invention. DETAILED DESCRIPTION

[0066] In order to enable those skilled in the art to better understand the scheme of the present invention, the technical scheme in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of the present invention.

[0067] It should be noted that the term "target" and the like in the specification and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchanged where appropriate, so that the embodiments of the present invention described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any of their variations are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units that are clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.

[0068] Embodiment 1

[0069] Figure 1 This is a flow chart of a data query method provided by the first embodiment of the present invention. This embodiment is applicable to the situation of quickly responding to data query requests and improving the data query rate. The method can be executed by a data query device, which can be implemented by software and / or hardware, and can generally be directly integrated into an electronic device that executes the method. The electronic device can be a terminal device or a server device. The embodiment of the present invention does not limit the type of electronic device that executes the data query method. Specifically, Figure 1 As shown, the data query method may specifically include the following steps:

[0070] S110 . In response to a data query request of a target user for a Web page, identifying at least one list item in the Web page; the list item includes at least one data field to be displayed.

[0071] The target user may be any user who can query data. The data query request may be any request for querying data sent by a user. The list item may be a list displayed in a web page. The data field to be displayed may be a data field that needs to be displayed in the list item. It is understandable that if the data requested for query in the data query request includes data in the data field to be displayed, then after the query result data is queried according to the data query request, the query result data may be displayed in the data field to be displayed.

[0072] In an embodiment of the present invention, after the target user sends a data query request on a Web page, the data query system may respond to the data query request sent by the target user to identify at least one list item in the Web page. Specifically, the list item may include at least one data field to be displayed. It is understandable that multiple list items may be displayed on a Web page. The target user may initiate a data query request for all list items displayed on the Web page, or may initiate a data query request for some list items displayed on the Web page, and the embodiment of the present invention does not limit this.

[0073] S120: Detect whether a target user's list item filtering condition for a Web page is stored; if so, identify at least one target list item to be displayed from among the list items according to the list item filtering condition.

[0074] Among them, the list item filtering condition may be a condition for filtering the list items in the list items displayed on the web page. Exemplarily, the list item filtering condition may be determined according to the condition for filtering the list items set by the target user in the data query request, or may be determined according to the condition for filtering the list items set by the target user in the previous data query process, etc., and the embodiment of the present invention does not limit this. It is understandable that the data query system may determine the filtered list items according to the list item filtering condition, and thus perform data query on the filtered list items according to the data query request. The target list item may be a list item obtained by filtering among the list items according to the list item filtering condition.

[0075] In an embodiment of the present invention, after the data query system identifies at least one list item in the Web page in response to a data query request of a target user for the Web page, it can further detect in the data query system whether the list item filtering condition of the target user for the Web page is stored. If the list item filtering condition of the target user for the Web page is stored in the data query system, at least one target list item to be displayed can be identified in each list item according to the list item filtering condition.

[0076] S130: construct a data query clause corresponding to all target list items, and construct a data query statement corresponding to the data query request according to the data query clause to obtain query result data matching the data query statement.

[0077] The data query clause may be a query statement constructed during the data query process to query the data in each target list item. Exemplarily, the data query clause may be a SQL (Structured Query Language) statement corresponding to each target list item. The data query statement may be a query statement constructed during the data query process to correspond to the data query request. Exemplarily, the data query statement may be an SQL statement corresponding to the data query request. The query result data may be the result data obtained by querying the data query statement.

[0078] In an embodiment of the present invention, after the data query system identifies at least one target list item to be displayed in each list item based on the list item screening conditions, it can further construct a data query clause corresponding to all the target list items, and construct a data query statement corresponding to the data query request based on the data query clause to obtain query result data matching the data query statement.

[0079] S140: Display the query result data in the target list item in the Web page.

[0080] In an embodiment of the present invention, after obtaining the query result data matching the data query statement, the data query system can further display the query result data in the target list item in the Web page. Specifically, the query result data can be displayed in the data field to be displayed of the target list item in the Web page.

[0081] According to the technical solution of this embodiment, the data query system identifies at least one list item in the Web page in response to the data query request of the target user for the Web page, and detects whether the list item filtering conditions of the target user for the Web page are stored. When detecting and storing the list item filtering conditions of the target user for the Web page, at least one target list item to be displayed in each list item is identified according to the list item filtering conditions, and a data query clause corresponding to all the target list items is constructed, so as to construct a data query statement corresponding to the data query request according to the data query clause, thereby obtaining query result data matching the data query statement, and then displaying the query result data in the target list item in the Web page, which solves the problem that the existing data query method cannot quickly filter data results due to the slow data query rate, and can improve the data query response speed, thereby improving the data query rate.

[0082] Embodiment 2

[0083] Figure 2 This is a flow chart of a data query method provided by Embodiment 2 of the present invention. This embodiment is a further refinement of the above-mentioned technical solutions, and provides multiple specific optional implementation methods for detecting whether the target user's list item screening conditions for the Web page are stored, and constructing data query clauses corresponding to all target list items, and constructing a data query statement corresponding to the data query request based on the data query clauses. The technical solution in this embodiment can be combined with each optional solution in one or more of the above-mentioned embodiments. Figure 2 As shown, the method may include the following steps:

[0084] S210 . In response to a data query request of a target user for a Web page, identifying at least one list item in the Web page; the list item includes at least one data field to be displayed.

[0085] S220: Detect whether the target user's list item filtering conditions for the Web page are stored. If so, identify at least one target list item to be displayed from each of the list items according to the list item filtering conditions.

[0086] Optionally, detecting whether the target user's list item filtering conditions for the Web page are stored may include: identifying a target access record corresponding to the Web page in the historical page access records corresponding to the target user; parsing the target access record to detect whether the target user has set a filtering list item for the Web page; and if so, determining the filtering list item set by the target user as the list item filtering condition.

[0087] The historical page access record may be an access record of pages visited by the target user, for example, an access record of the target user visiting page A, or an access record of the target user visiting page B, etc., which is not limited in the embodiment of the present invention. The target access record may be an access record of the target user visiting a web page. The filtered list item may be a list item obtained by filtering the list items displayed on the web page.

[0088] Specifically, in response to the target user's data query request for a Web page, after identifying at least one list item in the Web page, the data query system can further identify the target access record corresponding to the Web page in the historical page access record corresponding to the target user, and parse the target access record to detect whether the target user has set a filter list item for the Web page. If the target user has set a filter list item for the Web page, the filter list item set by the target user can be determined as the list item filter condition. It is understandable that if the target user has not set a filter list item for the Web page, it can be determined that the target user's list item filter condition for the Web page is not stored in the data query system.

[0089] The above technical solution proposes a specific implementation method for detecting whether the target user's list item screening conditions for the Web page are stored, so as to reduce the calculation data set and calculation result set in the data query process.

[0090] Optionally, after detecting whether the target user's list item filtering conditions for the Web page are stored, it may also include: if not, providing the target user with a filtering setting interface for each list item in the Web page; in response to at least one filtering list item selected by the target user in the filtering setting interface, constructing a data query statement corresponding to the filtering list item, and obtaining query result data matching the data query statement; and displaying the query result data in the filtering list item in the Web page.

[0091] The filter setting interface may be an interface provided for target users to perform filter settings on each list item in a Web page.

[0092] Specifically, the data query system responds to the target user's data query request for the Web page, and after identifying at least one list item in the Web page, it can further detect whether the target user's list item filtering conditions for the Web page are stored in the data query system. If the target user's list item filtering conditions for the Web page are not stored in the data query system, the data query system can provide the target user with a filtering setting interface for each list item in the Web page. After the data query system provides the target user with the filtering setting interface, the target user can select the filtering list item in the filtering setting interface and feedback to the data query system. In response to the filtering list item selected by the target user in the filtering setting interface, the data query system constructs a data query statement corresponding to the filtering list item, and obtains the query result data matching the data query statement, so as to display the query result data in the filtering list item in the Web page. It can be understood that the filtering list item selected by the target user in the filtering setting interface can be one or more, and the embodiment of the present invention is not limited to this.

[0093] The above technical solution adds a supplementary processing strategy for detecting that the target user's list item filtering conditions for the Web page are not stored. That is, after detecting that the target user's list item filtering conditions for the Web page are not stored, a filtering setting interface is provided to the target user state, so that the target user can determine the filtering list items in the filtering setting interface, and then perform data query according to the data query statement corresponding to the filtering list item, which can ensure the query success rate of the data query request.

[0094] S230 . For the current processing target list item, according to each target data field included in the current processing target list item, query a pre-built query clause list to obtain a query clause corresponding to each target data field.

[0095] The currently processed target list item may be a target list item for constructing a data query clause. The target data field may be a data field in the currently processed target list item. The query clause list may be a list for storing query clauses for each data field in each list item. It is understandable that the query clauses for each data field in the query clause list may be pre-constructed.

[0096] In the embodiment of the present invention, after the data query system identifies at least one target list item to be displayed in each list item according to the list item screening condition, it can further query the pre-built query clause list according to each target data field included in the current processing target list item for the current processing target list item, and obtain the query clause corresponding to each target data field. It can be understood that there can be multiple target data fields in the current processing target list item, and each target data field has a unique corresponding query clause.

[0097] S240: Combine the query clauses to form an inner query statement corresponding to the current processing target list item.

[0098] The inner query statement may be a query statement corresponding to the current processing target list item.

[0099] In the embodiment of the present invention, after obtaining the query clauses corresponding to each target data field, the data query system can further combine the query clauses to form an inner query statement corresponding to the current processing target list item. It can be understood that the inner query statement corresponding to the current processing target list item can be a collection of query clauses.

[0100] S250: Combine the inner query statements of the currently processed target list items to construct data query clauses corresponding to all target list items.

[0101] In the embodiment of the present invention, after the data query system combines the query clauses to form an inner query statement corresponding to the current processing target list item, it can further combine the inner query statements of the current processing target list items to construct a data query clause corresponding to all target list items. It can be understood that the data query clause can be a collection of the inner query statements.

[0102] S260: Form an outer query statement corresponding to all target list items according to the storage form of each target data field in the original database.

[0103] The original database may be a database storing data that has not been processed. The outer query statement may be a query statement constructed according to the storage form of the target data field in the original database.

[0104] In an embodiment of the present invention, after the data query system combines the inner query statements of each currently processed target list item to construct a data query clause corresponding to all target list items, it can further form an outer query statement corresponding to all target list items according to the storage form of each target data field in the original database. It can be understood that the data type of the target data field may be inconsistent with the data type stored in the original database. Exemplarily, the data type of data field A is an integer type, and the storage form of the data in the original database may be a character type. Another thing that can be understood is that the data of the target data field can be calculated from the data of multiple fields in the original database. Exemplarily, data field B can be calculated from field a, field b, and field c in the original database.

[0105] S270: construct a data query statement corresponding to the data query request according to the data query clause and the outer query statement to obtain query result data matching the data query statement.

[0106] In an embodiment of the present invention, after the data query system forms an outer query statement corresponding to all target list items according to the storage form of each target data field in the original database, it can further construct a data query statement corresponding to the data query request based on the data query clause and the outer query statement to obtain query result data matching the data query statement.

[0107] The above technical solution obtains the data query clauses corresponding to all the target list items by constructing an inner query statement corresponding to the current target list item, and constructs an outer query statement corresponding to all the target list items. The data query statement is determined by the data query clause and the outer query statement, which can ensure that each list item can be calculated independently, thereby improving the data query response speed.

[0108] S280: Display the query result data in the target list item in the Web page.

[0109] In the technical solution of this embodiment, the data query system identifies at least one list item in the Web page in response to the target user's data query request for the Web page, and when detecting and storing the list item screening conditions of the target user for the Web page, identifies at least one target list item to be displayed in each list item according to the list item screening conditions, and for the current processing target list item, queries a pre-built query clause list according to each target data field included in the current processing target list item, obtains a query clause corresponding to each target data field, combines each query clause to form an inner query statement corresponding to the current processing target list item, and stores each current processing target list item in the query clause list. The inner query statements of the table items are combined to construct a data query clause corresponding to all the target list items, and then an outer query statement corresponding to all the target list items is formed according to the storage form of each target data field in the original database, so as to construct a data query statement corresponding to the data query request according to the data query clause and the outer query statement, so as to obtain query result data matching the data query statement, and then display the query result data in the target list items in the Web page, which solves the problem that the existing data query method cannot quickly filter data results due to the slow data query rate, can improve the data query response speed, and thus improve the data query rate.

[0110] Embodiment 3

[0111] Figure 3 This is a flowchart of a data query method provided by Embodiment 3 of the present invention. This embodiment is a further refinement of the above-mentioned technical solutions, and provides multiple specific optional implementation methods for constructing data query clauses corresponding to all target list items, and constructing data query statements corresponding to the data query request based on the data query clauses to obtain query result data matching the data query statements. The technical solution in this embodiment can be combined with various optional solutions in one or more of the above-mentioned embodiments. Figure 3 As shown, the method may include the following steps:

[0112] S310: In response to a target user's data query request for a Web page, identifying at least one list item in the Web page; the list item includes at least one data field to be displayed.

[0113] S320. Split the data query request into at least one query task according to the query time period in the data query request; each query task is used to query data within a set time interval within the query time period.

[0114] The query time period may be a time period for querying data in a data query request. It is understandable that a data query request may include a query time period for querying data. The query task may be a task for querying data corresponding to different query time periods. The set time interval may be a pre-set time interval within the query time period.

[0115] In an embodiment of the present invention, after the data query system identifies at least one target list item to be displayed in each list item according to the list item screening condition, it can further split the data query request into query tasks according to the query time period in the data query request. Specifically, each query task can be used to query data within a set time interval within the query time period. It is understandable that the query task can be one or more, and the embodiment of the present invention does not limit this.

[0116] The above technical solution can reduce the query calculation data set and improve the data query efficiency by splitting the data query request into multiple query tasks according to the query time period of the data query request.

[0117] Optionally, splitting the data query request into at least one query task according to the query time period in the data query request may include: obtaining a start time point and an end time point that match the query time period; determining, along the direction from the start time point toward the end time point, a whole unit division time point of at least one preset time unit type that matches the start time point; different time unit types correspond to different time spans; determining, along the direction from the end time point toward the start time point, a whole unit division time point of at least one preset time unit type that matches the end time point; forming at least one time interval according to the start time point, the end time point, and each whole unit division time point; and splitting the data query request into at least one query task according to each time interval.

[0118] The preset time unit type may be a pre-set type that can represent a time unit. Exemplarily, the preset time unit type may be a day, an hour, or a minute, etc., which is not limited in the embodiment of the present invention. The whole unit division time point may be a time point at which the query time period is divided into whole time units according to the time unit type.

[0119] Specifically, after the data query system identifies at least one target list item to be displayed in each list item according to the list item screening condition, it can further obtain the start time point and the end time point that match the query time period, and determine the whole unit division time point that matches the start time point along the direction from the start time point to the end time point, and determine the whole unit division time point that matches the end time point along the direction from the end time point to the start time point, so as to form at least one time interval according to the start time point, the end time point, and each whole unit division time point, thereby splitting the data query request into at least one query task. Specifically, different time unit types correspond to different time spans. It can be understood that the whole unit division time point that matches the start time point can be a whole unit division time point of a preset time unit type, or a whole unit division time point of multiple preset time unit types, and the embodiment of the present invention does not limit this. The whole unit division time point that matches the end time point can be a whole unit division time point of a preset time unit type, or a whole unit division time point of multiple preset time unit types, and the embodiment of the present invention does not limit this.

[0120] Exemplarily, assuming that the query time period is from 8:00 to 9:10, the starting time point is 8:00 and the ending time point is 9:10. If the preset time unit type is day, there is no whole unit division time point with the time unit type of day that matches the starting time point, and there is no whole unit division time point with the time unit type of day that matches the ending time point. If the preset time unit type is hour, the whole unit division time point with the time unit type of hour that matches the starting time point is 8:00, and the whole unit division time point with the time unit type of hour that matches the ending time point is 9:00. If the preset time unit type is minute, the whole unit division time point with the time unit type of minute that matches the starting time point is 9:00, and the whole unit division time point with the time unit type of minute that matches the ending time point is 9:10. Then, according to the starting time point, the ending time point, and each whole unit division time point, a time interval from 8:00 to 9:00 and a time interval from 9:00 to 9:10 can be formed.

[0121] The above technical solution determines the starting time point, ending time point, and time points for dividing each whole unit of the query time period, and determines the time interval based on the starting time point, ending time point, and time points for dividing each whole unit, thereby splitting the data query request according to the time interval, so as to further reduce the query calculation data set and improve data query efficiency.

[0122] S330: Detect whether the target user's list item filtering conditions for the Web page are stored. If so, identify at least one target list item to be displayed from each of the list items according to the list item filtering conditions.

[0123] S340: construct data query clauses for all target list items for all query tasks, and construct a data query statement corresponding to the data query request based on the data query clauses to obtain query result data matching the data query statement.

[0124] In an embodiment of the present invention, after the data query system splits the data query request into query tasks according to the query time period in the data query request, it can further construct a data query clause for all target list items for all query tasks, and construct a data query statement corresponding to the data query request based on the data query clause to obtain query result data matching the data query statement.

[0125] Optionally, constructing data query clauses for all target list items for all query tasks, and constructing a data query statement corresponding to the data query request based on the data query clause to obtain query result data matching the data query statement, may include: obtaining a target data query clause matching the target query task currently being processed, and obtaining a target time interval matching the target query task; determining whether the target time interval matches the target time unit type; if so, updating the target data query clause according to the cache query format, and obtaining query result data matching the data query statement in the data cache area; wherein the data cache area is used to store cached data matching the target time unit type; if not, obtaining query result data matching the data query statement in the original data table.

[0126] Among them, the target query task can be a query task that is currently constructing a data query clause among various query tasks. The target data query clause can be a query statement constructed corresponding to the target query task. The target time interval can be the time interval corresponding to the target query task. The target time unit type can be a target type of the time unit type. The cache query format can be the format of the query statement when querying the cache table. Optionally, the cache query format can include the format of the query function in the query statement. The original data table can be a table storing data in an unprocessed database.

[0127] Specifically, after the data query system splits the data query request into query tasks according to the query time period in the data query request, it can further obtain the target data query clause that matches the currently processed target query task, and obtain the target time interval that matches the target query task to determine whether the target time interval matches the target time unit.

[0128] If the target time interval matches the target time unit, the target data query clause is updated according to the cache query format, and then the data query clauses for all target list items for all query tasks are constructed based on the updated target data query clauses, and a data query statement corresponding to the data query request is constructed based on the data query clauses to obtain query result data matching the data query statement in the data cache area. Specifically, the data cache area can be used to store cache data matching the target time unit type. It is understandable that the original data table can be split to obtain the data cache area according to the time unit type of the original data in the original data table.

[0129] If the target time interval does not match the target time unit, a data query clause for all target list items for all query tasks is constructed, and a data query statement corresponding to the data query request is constructed based on the data query clause to obtain query result data matching the data query statement in the original data table.

[0130] The above technical solution updates the data query clause according to the cache query format when the time interval of the query task matches the target time unit type, so as to obtain the query result data matching the data query statement in the data cache area, so that the data cache area can be accurately hit during the data query process, thereby reducing the query calculation data set and improving data query efficiency.

[0131] S350: Display the query result data in the target list item in the Web page.

[0132] According to the technical solution of this embodiment, the data query system identifies at least one list item in the Web page in response to the data query request of the target user for the Web page, and when detecting and storing the list item filtering conditions of the target user for the Web page, identifies at least one target list item to be displayed in each list item according to the list item filtering conditions, and splits the data query request into at least one query task according to the query time period in the data query request, constructs data query clauses for all target list items for all query tasks, and constructs a data query statement corresponding to the data query request according to the data query clause to obtain query result data matching the data query statement, thereby displaying the query result data in the target list item in the Web page, which solves the problem that the existing data query method cannot quickly filter data results due to the slow data query rate, can improve the data query response speed, and thus improve the data query rate.

[0133] Embodiment 4

[0134] The embodiment of the present invention is specifically described by taking the application scenario of data query of the clickhouse database system as an example, wherein the clickhouse database system is a column-based database system. Figure 4 is an example flow chart of a data query method provided by Embodiment 4 of the present invention. Figure 4 As shown, the following steps may be specifically included:

[0135] Step 401: The data query system responds to the data query request of the target user, enters the data query system, and the data query system obtains the user information of the target user (such as historical page access records).

[0136] Step 402: split the data query request into at least one query task (ie, a query entity set) according to the query time period in the data query request. Figure 5 is an example flow chart of splitting a data query request provided by the fourth embodiment of the present invention, such as Figure 5 As shown, according to the query time period in the data query request, splitting the data query request into at least one query task may include:

[0137] (1) Obtain the starting time point (i.e., s0) and the ending time point (i.e., e0) that match the query time period, and determine the whole day time point (i.e., s1), whole hour time point (i.e., s2), and whole minute time point (i.e., s3) that match the starting time point along the direction from the starting time point to the ending time point, and determine the whole day time point (i.e., e1), whole hour time point (i.e., e2), and whole minute time point (i.e., e3) that match the ending time point along the direction from the ending time point to the starting time point.

[0138] (2) At least one time interval is formed based on the start time point, the end time point, each full day time point, each full hour time point, and each full minute time point.

[0139] Specifically, the size of e1 and s1 is determined. If e1 is less than or equal to s1, it means that the time period does not include the whole day time period, and the size of e2 and s2 is further determined. If e1 is greater than s1, it means that the query time period includes the whole day time period, and a time interval is determined based on s1 and e1, and it is further determined whether s2 is equal to s1, and whether e2 is equal to e1. ​​If s2 is not equal to s1, it means that the query time period does not include the whole hour time period, and a time interval is determined based on s1 and s2. If s2 is equal to s1, it means that the query time period includes the whole hour time period, and a time interval is determined based on s1 and s2. If e2 is equal to e1, it means that the query time period does not include the whole hour time period, and a time interval is further determined based on e1 and e2. If e2 is not equal to e1, it means that the query time period includes the whole hour time period, and a time interval is determined based on e1 and e2. If e3 is equal to e2, it means that the query time period does not include the whole minute time period, and it is further determined whether e3 is equal to e0. If e3 is not equal to e2, it means that the query time period includes the whole minute time period, and a time interval is determined based on e2 and e3. If e3 is not equal to e0, it means that the query time period includes the whole second time period, and a time interval is determined based on e3 and e0. If e3 is equal to e0, it means that the query time period does not include the whole second time period, and you can exit the data query.

[0140] If e2 is greater than s2, it means that the query time period includes the whole hour time period, then a time interval is determined based on s1 and s2, and it is determined whether s3 is equal to s2. If e2 is less than or equal to s2, it means that the query time period includes the whole hour time period, then the size of e3 and s3 is further determined. If s3 is equal to s2, it means that the query time period does not include the whole minute time period, then it is further determined whether s3 is equal to s0. If s3 is not equal to s2, it means that the query time period includes the whole minute time period, then a time interval is determined based on s3 and s2.

[0141] If e3 is greater than s3, it means that the query time period includes the whole minute time period, then a time interval is determined based on s2 and s3, and it is determined whether s3 is equal to s0. If e3 is less than or equal to s3, it means that the query time period does not include the whole minute time period, then a time interval is determined based on s0 and e0. If s3 is not equal to s0, it means that the query time period includes the whole second time period, then a time interval is determined based on s3 and s0. If s3 is equal to s0, it means that the query time period does not include the whole second time period, then the data query can be exited.

[0142] If e1 is greater than s1 and e2 is not equal to e1, it means that the query time period does not include the whole hour time period, and then further determine whether e3 is equal to e2. If e1 is greater than s1 and e2 is equal to e1, it means that the query time period includes the whole hour time period, and then determine a time interval based on e1 and e2.

[0143] (3) Split the data query request into at least one query task according to each time interval.

[0144] Step 403: Construct a data query statement. Figure 6 is an example flow chart of constructing a data query statement provided by the fourth embodiment of the present invention, such as Figure 6 As shown, constructing a data query statement may include:

[0145] (1) Construct a target data query clause that matches the target query task currently being processed.

[0146] Determine whether the target user has set a filter list item (i.e., a customized display column) for the Web page in the user information of the target user. If there is a filter list item, identify the target list item to be displayed in each list item according to the filter list item, and query the pre-built query clause list to obtain the query clause corresponding to the target list item. If there is no filter list item, identify the target list item to be displayed in each list item according to the default list item, and query the pre-built query clause list to obtain the query clause corresponding to the target list item.

[0147] Determine the target time interval of the target query task currently being processed, and determine whether the data query needs to query the cache table based on whether the target time interval matches the target time unit type. If the cache table needs to be queried, the query clause is updated according to the cache query format. Specifically, if the target time interval exists for a whole day, the query clause is updated according to the query format of the day-level cache table. If the target time interval exists for an entire hour, the query clause is updated according to the query format of the hour-level cache table. If the target time interval exists for an entire minute, the query clause is updated according to the query format of the minute-level cache table. If the target time interval exists for a non-integer time, there is no need to update the query clause.

[0148] The target data query clause that matches all the target list items for the currently processed target query task is determined according to the query clauses corresponding to the updated target list items.

[0149] (2) Constructing data query clauses for all query tasks with all target list items. Combine the target data query clauses of each query task to construct a data query clause for all query tasks with all target list items (ie, the internal final query clause).

[0150] (3) Construct a data query statement corresponding to the data query request.

[0151] According to the storage form of the target data fields in the target list items to be displayed in the original database, an outer query statement corresponding to all the target list items is formed. The data query clause and the outer query statement are combined to obtain a combined query statement. According to the combined query statement and the query conditions in the data query request, a data query statement (i.e., a final query statement) corresponding to the data query request is constructed.

[0152] Step 404: In the data cache area or original data table of the clickhouse database system, obtain the query result data that matches the data query statement, and display the query result data on the web page.

[0153] The above technical solution reduces the list items in the data query process, thereby reducing the calculation data set in the data query process and reducing the calculation result set at the same time; by splitting the original data set into caches and generating different data cache areas, the data cache areas can be accurately hit during the data query process, thereby reducing the query calculation data set and improving data query efficiency; by making each target list item uniquely correspond to a query clause, it can ensure that each list item can be calculated independently, thereby improving the data query response speed.

[0154] Embodiment 5

[0155] Figure 7 is a schematic diagram of a data query device provided by Embodiment 5 of the present invention, such as Figure 7 As shown, the device includes: a list item identification module 710, a target list item identification module 720, a query result data acquisition module 730 and a query result data display module 740, wherein:

[0156] The list item identification module 710 is used to identify at least one list item in the Web page in response to a target user's data query request for the Web page; the list item includes at least one data field to be displayed;

[0157] The target list item identification module 720 is used to detect whether the list item screening conditions of the target user for the Web page are stored, and if so, to identify at least one target list item to be displayed in each of the list items according to the list item screening conditions;

[0158] The query result data acquisition module 730 is used to construct a data query clause corresponding to all target list items, and to construct a data query statement corresponding to the data query request according to the data query clause, so as to obtain query result data matching the data query statement;

[0159] The query result data display module 740 is used to display the query result data in the target list item in the Web page.

[0160] According to the technical solution of this embodiment, the data query system identifies at least one list item in the Web page in response to the data query request of the target user for the Web page, and detects whether the list item filtering conditions of the target user for the Web page are stored. When detecting and storing the list item filtering conditions of the target user for the Web page, at least one target list item to be displayed in each list item is identified according to the list item filtering conditions, and a data query clause corresponding to all the target list items is constructed, so as to construct a data query statement corresponding to the data query request according to the data query clause, thereby obtaining query result data matching the data query statement, and then displaying the query result data in the target list item in the Web page, which solves the problem that the existing data query method cannot quickly filter data results due to the slow data query rate, and can improve the data query response speed, thereby improving the data query rate.

[0161] Optionally, the target list item identification module 720 can be specifically used to: identify the target access record corresponding to the Web page in the historical page access record corresponding to the target user; parse the target access record to detect whether the target user has set a filter list item for the Web page; if so, determine the filter list item set by the target user as the list item filtering condition.

[0162] Optionally, the target list item identification module 720 can also be specifically used to: after detecting whether the target user's list item filtering conditions for the Web page are stored, if not, provide the target user with a filtering setting interface for each list item in the Web page; in response to at least one filtering list item selected by the target user in the filtering setting interface, construct a data query statement corresponding to the filtering list item, and obtain query result data matching the data query statement; and display the query result data in the filtering list item in the Web page.

[0163] Optionally, the query result data acquisition module 730 can be specifically used to: for the current processing target list item, query a pre-constructed query clause list according to each target data field included in the current processing target list item to obtain the query clause corresponding to each target data field; combine the query clauses to form an inner query statement corresponding to the current processing target list item; combine the inner query statements of each current processing target list item to construct a data query clause corresponding to all target list items; form an outer query statement corresponding to all target list items according to the storage form of each target data field in the original database; and construct a data query statement corresponding to the data query request based on the data query clause and the outer query statement.

[0164] Optionally, the target list item identification module 720 can also be specifically used to: split the data query request into at least one query task according to the query time period in the data query request; each query task is used to query the data within a set time interval within the query time period; accordingly, the query result data acquisition module 730 can also be specifically used to: construct data query clauses for all target list items for all query tasks, and construct a data query statement corresponding to the data query request based on the data query clause, so as to obtain query result data that matches the data query statement.

[0165] Optionally, the query result data acquisition module 730 can be further used to: obtain the starting time point and the ending time point that match the query time period; determine the whole unit division time point of at least one preset time unit type that matches the starting time point along the direction from the starting time point toward the ending time point; different time unit types correspond to different time spans; determine the whole unit division time point of at least one preset time unit type that matches the ending time point along the direction from the ending time point toward the starting time point; form at least one time interval based on the starting time point, the ending time point, and each whole unit division time point; and split the data query request into at least one query task according to each time interval.

[0166] Optionally, the query result data acquisition module 730 can be further used to: obtain a target data query clause that matches the currently processed target query task, and obtain a target time interval that matches the target query task; determine whether the target time interval matches the target time unit type; if so, update the target data query clause according to the cache query format, and obtain query result data that matches the data query statement in the data cache area; wherein the data cache area is used to store cache data that matches the target time unit type; if not, obtain query result data that matches the data query statement in the original data table.

[0167] The data query device provided in the embodiment of the present invention can execute the data query method provided in any embodiment of the present invention, and has the corresponding functional modules and beneficial effects of the execution method.

[0168] Embodiment 6

[0169] Figure 8 A schematic diagram of the structure of an electronic device 10 that can be used to implement an embodiment of the present invention is shown. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device can also represent various forms of mobile devices, such as personal digital processing, cellular phones, smart phones, wearable devices (such as helmets, glasses, watches, etc.) and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely examples and are not intended to limit the implementation of the present invention described and / or required herein.

[0170] like Figure 8 As shown, the electronic device 10 includes at least one processor 11, and a memory connected to the at least one processor 11, such as a read-only memory (ROM) 12, a random access memory (RAM) 13, etc., wherein the memory stores a computer program that can be executed by at least one processor, and the processor 11 can perform various appropriate actions and processes according to the computer program stored in the read-only memory (ROM) 12 or the computer program loaded from the storage unit 18 to the random access memory (RAM) 13. In the RAM 13, various programs and data required for the operation of the electronic device 10 can also be stored. The processor 11, the ROM 12, and the RAM 13 are connected to each other through a bus 14. An input / output (I / O) interface 15 is also connected to the bus 14.

[0171] A number of components in the electronic device 10 are connected to the I / O interface 15, including: an input unit 16, such as a keyboard, a mouse, etc.; an output unit 17, such as various types of displays, speakers, etc.; a storage unit 18, such as a disk, an optical disk, etc.; and a communication unit 19, such as a network card, a modem, a wireless communication transceiver, etc. The communication unit 19 allows the electronic device 10 to exchange information / data with other devices through a computer network such as the Internet and / or various telecommunication networks.

[0172] The processor 11 may be a variety of general and / or special processing components with processing and computing capabilities. Some examples of the processor 11 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various special artificial intelligence (AI) computing chips, various processors running machine learning model algorithms, a digital signal processor (DSP), and any appropriate processor, controller, microcontroller, etc. The processor 11 executes the various methods and processes described above, such as a data query method.

[0173] In some embodiments, the data query method may be implemented as a computer program, which is tangibly contained in a computer-readable storage medium, such as a storage unit 18. In some embodiments, part or all of the computer program may be loaded and / or installed on the electronic device 10 via the ROM 12 and / or the communication unit 19. When the computer program is loaded into the RAM 13 and executed by the processor 11, one or more steps of the data query method described above may be performed. Alternatively, in other embodiments, the processor 11 may be configured to perform the data query method in any other appropriate manner (e.g., by means of firmware).

[0174] Various implementations of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chips (SOCs), load programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various implementations can include: being implemented in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which can be a special purpose or general purpose programmable processor that can receive data and instructions from a storage system, at least one input device, and at least one output device, and transmit data and instructions to the storage system, the at least one input device, and the at least one output device.

[0175] Computer programs for implementing the methods of the present invention may be written in any combination of one or more programming languages. These computer programs may be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device, so that when the computer program is executed by the processor, the functions / operations specified in the flow chart and / or block diagram are implemented. The computer program may be executed entirely on the machine, partially on the machine, partially on the machine and partially on a remote machine as a stand-alone software package, or entirely on a remote machine or server.

[0176] In the context of the present invention, a computer-readable storage medium may be a tangible medium that may contain or store a computer program for use by or in combination with an instruction execution system, device or equipment. A computer-readable storage medium may include, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, devices or equipment, or any suitable combination of the foregoing. Alternatively, a computer-readable storage medium may be a machine-readable signal medium. A more specific example of a machine-readable storage medium may include an electrical connection based on one or more lines, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.

[0177] To provide interaction with a user, the systems and techniques described herein may be implemented on an electronic device having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and a pointing device (e.g., a mouse or trackball) through which the user can provide input to the electronic device. Other types of devices may also be used to provide interaction with the user; for example, the feedback provided to the user may be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user may be received in any form (including acoustic input, voice input, or tactile input).

[0178] The systems and techniques described herein may be implemented in a computing system that includes backend components (e.g., as a data server), or a computing system that includes middleware components (e.g., an application server), or a computing system that includes frontend components (e.g., a user computer with a graphical user interface or a web browser through which a user can interact with implementations of the systems and techniques described herein), or a computing system that includes any combination of such backend components, middleware components, or frontend components. The components of the system may be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: a local area network (LAN), a wide area network (WAN), a blockchain network, and the Internet.

[0179] A computing system may include a client and a server. The client and the server are generally remote from each other and usually interact through a communication network. The client and server relationship is generated by computer programs running on the corresponding computers and having a client-server relationship with each other. The server may be a cloud server, also known as a cloud computing server or cloud host, which is a host product in the cloud computing service system to solve the defects of difficult management and weak business scalability in traditional physical hosts and VPS services.

[0180] It should be understood that the various forms of processes shown above can be used to reorder, add or delete steps. For example, the steps described in the present invention can be executed in parallel, sequentially or in different orders, as long as the desired results of the technical solution of the present invention can be achieved, and this document does not limit this.

[0181] The above specific implementations do not constitute a limitation on the protection scope of the present invention. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions can be made according to design requirements and other factors. Any modification, equivalent substitution and improvement made within the spirit and principle of the present invention should be included in the protection scope of the present invention.

Claims

1. A data query method, characterized in that: include: In response to a target user's data query request for a Web page, identifying at least one list item in the Web page; The list item includes at least one data field to be displayed; According to the query time period in the data query request, the data query request is split into at least one query task; each query task is used to query data within a set time interval within the query time period; Detecting whether a target user's list item filtering condition for the Web page is stored, and if so, identifying at least one target list item to be displayed from each of the list items according to the list item filtering condition; Constructing a data query clause corresponding to all target list items, and constructing a data query statement corresponding to the data query request according to the data query clause, so as to obtain query result data matching the data query statement; Displaying the query result data in the target list item in the Web page; The step of splitting the data query request into at least one query task according to the query time period in the data query request includes: Obtaining a start time point and an end time point that match the query time period; Along the direction from the starting time point to the ending time point, determining at least one whole unit division time point of a preset time unit type matching the starting time point; different time unit types correspond to different time spans; Along the direction from the end time point to the start time point, determine at least one whole unit division time point of a preset time unit type matching the end time point; At least one time interval is formed according to the starting time point, the ending time point, and each of the whole unit division time points; According to each of the time intervals, the data query request is split into at least one query task.

2. The method according to claim 1, characterized in that Check whether the target user's list item filtering criteria for the web page are stored, including: In the historical page access records corresponding to the target user, identifying the target access record corresponding to the Web page; Parsing the target access record to detect whether the target user sets a filter list item for the Web page; If so, the filtering list item set by the target user is determined as the list item filtering condition.

3. The method according to claim 1 or 2, characterized in that: After detecting whether the target user's list item screening condition for the Web page is stored, the method further includes: If not, providing the target user with a filter setting interface for each list item in the Web page; In response to at least one filter list item selected by the target user in the filter setting interface, construct a data query statement corresponding to the filter list item, and obtain query result data matching the data query statement; The query result data is displayed in the filter list item in the Web page.

4. The method according to claim 1, characterized in that Constructing a data query clause corresponding to all target list items, and constructing a data query statement corresponding to the data query request according to the data query clause, including: For the current processing target list item, according to each target data field included in the current processing target list item, a pre-built query clause list is queried to obtain a query clause corresponding to each target data field; Combining the query clauses to form an inner query statement corresponding to the current processing target list item; Combining the inner query statements of the currently processed target list items to construct a data query clause corresponding to all target list items; According to the storage form of each of the target data fields in the original database, an outer query statement corresponding to all the target list items is formed; A data query statement corresponding to the data query request is constructed according to the data query clause and the outer query statement.

5. The method according to claim 1, characterized in that Constructing a data query clause corresponding to all target list items, and constructing a data query statement corresponding to the data query request according to the data query clause to obtain query result data matching the data query statement, including: Construct data query clauses for all target list items for all query tasks, and construct data query statements corresponding to the data query request based on the data query clauses to obtain query result data matching the data query statements.

6. The method according to claim 5, characterized in that Constructing data query clauses for all target list items for all query tasks, and constructing a data query statement corresponding to the data query request according to the data query clause to obtain query result data matching the data query statement, including: Obtain a target data query clause that matches the target query task currently being processed, and obtain a target time interval that matches the target query task; Determining whether the target time interval matches the target time unit type; If yes, then after updating the target data query clause according to the cache query format, query result data matching the data query clause is obtained in the data cache area; wherein the data cache area is used to store cache data matching the target time unit type; If not, then in the original data table, the query result data matching the data query statement is obtained.

7. A data query device, characterized in that: include: A list item identification module, configured to identify at least one list item in the Web page in response to a target user's data query request for the Web page; The list item includes at least one data field to be displayed; A target list item identification module is used to detect whether the target user's list item screening conditions for the Web page are stored, and if so, to identify at least one target list item to be displayed in each of the list items according to the list item screening conditions; A query result data acquisition module, used to construct a data query clause corresponding to all target list items, and to construct a data query statement corresponding to the data query request according to the data query clause, so as to obtain query result data matching the data query statement; A query result data display module, used to display the query result data in the target list item in the Web page; The device is also used for: Before detecting whether the target user's list item screening condition for the Web page is stored, the data query request is split into at least one query task according to the query time period in the data query request; each query task is used to query data within a set time interval within the query time period; The step of splitting the data query request into at least one query task according to the query time period in the data query request includes: Obtaining a start time point and an end time point that match the query time period; Along the direction from the starting time point to the ending time point, determining at least one whole unit division time point of a preset time unit type matching the starting time point; different time unit types correspond to different time spans; Along the direction from the end time point to the start time point, determine at least one whole unit division time point of a preset time unit type matching the end time point; At least one time interval is formed according to the starting time point, the ending time point, and each of the whole unit division time points; According to each of the time intervals, the data query request is split into at least one query task.

8. An electronic device, characterized in that: The electronic device comprises: at least one processor; and a memory communicatively connected to the at least one processor; wherein, The memory stores a computer program executable by the at least one processor, and the computer program is executed by the at least one processor so that the at least one processor can execute the data query method according to any one of claims 1 to 6.

9. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a processor to implement the data query method according to any one of claims 1 to 6 when executed.

Citation Information

Patent Citations

  • Data query method and device

    CN113779060A

  • Page display method and device for query conditions, equipment and storage medium

    CN114297535A