Data query processing method and system, equipment, medium and program product

By obtaining and extending historical query parameter samples, generating predicted query parameters and caching, the problem of insufficient query capabilities of the underlying query engine is solved, and faster and more stable data queries are achieved.

CN120448429APending Publication Date: 2025-08-08KE COM (BEIJING) TECHNOLOGY CO LTD
View PDF 4 Cites 0 Cited by

Patent Information

Application Number
CN202510637686.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-05-16
Publication Date
2025-08-08

AI Technical Summary

Technical Problem

In enterprises, due to the limited query capability of the underlying query engine during data query, the query speed is too slow or failed, and even causes stability risks, such as query engine downtime and service crashes.

Method used

By responding to preset time trigger conditions, obtain historical query parameter samples, update query parameter preference information, use parameter extension configuration information to expand, generate predicted query parameters, and cache them in the data cache unit, and directly obtain results from the cache in response to client query requests, reducing the load on the underlying query engine.

Benefits of technology

It improves the speed and effectiveness of data query, avoids query pressure during peak business periods, reduces query failure and engine stability risks, and improves user query efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120448429A_ABST
    Figure CN120448429A_ABST
Patent Text Reader

Abstract

The embodiment of the invention discloses a data query processing method and system, equipment, a medium and a program product, and the method comprises the steps: obtaining a target historical query parameter sample meeting a pre-query condition in a first historical period in response to a preset time triggering condition, obtaining query parameter preference information based on a target historical query parameter sample corresponding to any user identifier, and for any target historical query parameter sample, expanding the corresponding target historical query parameter sample by using the parameter expansion configuration information and the corresponding query parameter preference information to obtain at least one prediction query parameter, and calling a query engine to query the database, caching the predicted query parameter and the obtained first data query result in a data caching unit, and in response to the data query request, obtaining the corresponding first data query result from the data caching unit and returning the first data query result to the client, so that the data query speed and validity can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to computer technology and data processing technology, and in particular to a data query processing method and system, device, medium and program product. Background Art

[0002] With the development of internet technology, employees in various industries often regularly query and analyze relevant data to provide more accurate decisions and services. At the same time, the volume of relevant data is rapidly increasing as enterprises and organizations accumulate data, meet market development needs, and grow their user base. Every time an enterprise employee performs a data query, they must query the database using the underlying query engine. Within an enterprise, employees often perform data queries at concentrated times, sending a large number of query requests to the underlying query engine. Due to the limited query capabilities of the underlying query engine, some data queries may be slow or fail, potentially posing stability risks to the underlying query engine, leading to downtime and service crashes.

[0003] Therefore, how to query data quickly and effectively is an urgent problem to be solved. Summary of the Invention

[0004] The embodiments of the present disclosure provide a data query processing method and apparatus, system, device, medium, and program product to improve data query speed and effectiveness.

[0005] One aspect of an embodiment of the present disclosure provides a data query processing method, including:

[0006] In response to a preset time trigger condition, obtaining historical query parameter samples that meet the pre-query condition within a first historical period to obtain at least one target historical query parameter sample; wherein the historical query parameter sample includes a user identifier and a query parameter;

[0007] Based on the target historical query parameter sample corresponding to any user identifier, the query parameter preference information corresponding to the corresponding user identifier is updated to obtain updated query parameter preference information;

[0008] For each of the target historical query parameter samples, using the parameter expansion configuration information and the updated query parameter preference information corresponding to the corresponding user identifier, the corresponding target historical query parameter sample is expanded to obtain at least one predicted query parameter corresponding to the target historical query parameter sample;

[0009] Based on any of the predicted query parameters, respectively, a query engine is called to query the database to obtain a first data query result corresponding to any of the predicted query parameters, and any of the predicted query parameters and the corresponding first data query result are cached in a data cache unit;

[0010] In response to a data query request sent by a client, determining whether there is a target prediction query parameter consistent with the query parameter in the data query request in the data cache unit;

[0011] In response to the existence of the target prediction query parameter, a first data query result corresponding to the target prediction query parameter is obtained from the data cache unit and returned to the client.

[0012] In one aspect of an embodiment of the present disclosure, a data query processing device is provided, comprising:

[0013] A sample acquisition module, configured to acquire, in response to a preset time trigger condition, historical query parameter samples that meet the pre-query condition within a first historical period, and obtain at least one target historical query parameter sample; wherein the historical query parameter sample includes a user identifier and a query parameter;

[0014] An updating module, configured to update the query parameter preference information corresponding to a corresponding user identifier based on the target historical query parameter sample corresponding to any user identifier, to obtain updated query parameter preference information;

[0015] a parameter expansion module, configured to expand the corresponding target historical query parameter sample using the parameter expansion configuration information and the updated query parameter preference information corresponding to the corresponding user identifier, for each of the target historical query parameter samples, to obtain at least one predicted query parameter corresponding to the target historical query parameter sample;

[0016] a pre-query module, configured to call a query engine to query a database based on any of the predicted query parameters, obtain a first data query result corresponding to any of the predicted query parameters, and cache any of the predicted query parameters and the corresponding first data query result in a data cache unit;

[0017] a determination module, configured to determine, in response to a data query request sent by a client, whether there is a target prediction query parameter in the data cache unit that is consistent with the query parameter in the data query request;

[0018] The query processing module is configured to return a first data query result corresponding to the target prediction query parameter as a data query response to the client in response to the existence of the target prediction query parameter sample.

[0019] Another aspect of the embodiments of the present disclosure provides a data query processing system, comprising: a trigger unit, a data acquisition unit, a pre-processing unit, a data cache unit, and a business processing unit; the data acquisition unit comprises a sample acquisition module, an update module, and a parameter expansion module;

[0020] The trigger unit is configured to send a trigger instruction to the data acquisition unit based on a preset time trigger condition;

[0021] The sample acquisition module is configured to acquire, based on the trigger instruction, historical query parameter samples that meet the pre-query condition within the first historical period to obtain at least one target historical query parameter sample; wherein the historical query parameter sample includes a user identifier and a query parameter;

[0022] The updating module is configured to update the query parameter preference information corresponding to the corresponding user identifier based on the target historical query parameter sample corresponding to any user identifier, to obtain updated query parameter preference information;

[0023] The parameter expansion module is configured to expand the corresponding target historical query parameter sample using the parameter expansion configuration information and the updated query parameter preference information corresponding to the corresponding user identifier, respectively, to obtain at least one predicted query parameter corresponding to any of the target historical query parameter samples;

[0024] The preprocessing unit is configured to call a query engine to query a database based on any of the predicted query parameters, obtain a first data query result corresponding to any of the predicted query parameters, and cache any of the predicted query parameters and the corresponding first data query result in a data cache unit;

[0025] The data cache unit is configured to cache the predicted query parameter and the corresponding first data query result;

[0026] The business processing unit is used to respond to a data query request sent by a client, determine whether there is a target prediction query parameter consistent with the query parameter in the data query request in the data cache unit; in response to the existence of the target prediction query parameter, obtain the first data query result corresponding to the target prediction query parameter from the data cache unit and return it to the client.

[0027] Another aspect of the present disclosure provides an electronic device, including:

[0028] Memory for storing computer programs;

[0029] The processor is configured to execute the computer program stored in the memory, and when the computer program is executed, the method described in any of the above embodiments of the present disclosure is implemented.

[0030] Another aspect of the embodiments of the present disclosure provides a computer-readable storage medium having a computer program stored thereon. When the computer program is executed by a processor, the method described in any of the above embodiments of the present disclosure is implemented.

[0031] According to another aspect of the embodiments of the present disclosure, a computer program product is provided, comprising computer program instructions, which implement the method of any of the above embodiments of the present disclosure when executed by a processor.

[0032] Based on the data query processing method and apparatus, system, equipment, medium and program product provided by the above-mentioned embodiments of the present disclosure, reasonable time trigger conditions (such as the off-peak business period of data query) can be preset according to data query requirements, and historical query parameter samples that meet the pre-query conditions within the first historical period are obtained. The historical query parameter samples are expanded in combination with the user's query parameter preference information and the pre-configured parameter extension configuration information. Based on the obtained predicted query parameters, the query engine is called to query data from the database and cache it in the data cache unit. During the off-peak business period, the pressure on the query engine is relatively small and the computing power is relatively abundant, which can improve the data query speed and the effectiveness of the data query results. When a data query request with the same query parameter is subsequently received, the corresponding data is directly obtained and returned from the data cache unit, and the data is no longer queried from the database through the underlying query engine. This can avoid the situation where a large number of query requests are concentratedly sent to the underlying query engine during the peak business period of data query, resulting in slow query speed or failure of some data, as well as the stability risks brought to the underlying query engine, and avoid the resulting downtime of the underlying query engine, service crash, etc., thereby improving the user's data query efficiency.

[0033] In addition, in the embodiment of the present disclosure, by pre-configuring pre-query conditions, historical query parameter samples that meet the pre-query conditions within the first historical period are obtained for pre-query, and historical query parameter samples that are desired to be pre-queried are screened out in a configurable manner, which can effectively utilize computing resources and improve the query performance in actual use in a targeted manner.

[0034] In addition, in the embodiment of the present disclosure, the historical query parameter samples are expanded in combination with the user's query parameter preference information and the pre-configured parameter extension configuration information, and each historical query parameter sample is expanded into several predicted query parameters, and the expected pre-query is expanded, thereby improving the hit rate of queries that the user may perform in actual use, and can specifically improve the data query efficiency in actual use.

[0035] The technical solution of the present disclosure is further described in detail below through the accompanying drawings and examples. BRIEF DESCRIPTION OF THE DRAWINGS

[0036] The accompanying drawings, which are incorporated in and constitute a part of the specification, illustrate embodiments of the present disclosure and, together with the description, serve to explain the principles of the present disclosure.

[0037] The present disclosure can be more clearly understood from the following detailed description with reference to the accompanying drawings, in which:

[0038] Figure 1 The flowchart of one embodiment of the data query processing method disclosed herein.

[0039] Figure 2 This is a flowchart of another embodiment of the data query processing method disclosed herein.

[0040] Figure 3 This is a flowchart of an embodiment of obtaining historical query parameter samples that meet pre-query conditions within a first historical period in an embodiment of the present disclosure.

[0041] Figure 4 The flowchart is a flowchart of an embodiment of expanding a target history query parameter sample in an embodiment of the present disclosure.

[0042] Figure 5 This is a flowchart of an embodiment of the present disclosure in which a query engine is called to query a database based on any predicted query parameter.

[0043] Figure 6 This is a flowchart of another embodiment of the data query processing method disclosed herein.

[0044] Figure 7 This is a structural diagram of an embodiment of the data query processing device disclosed in the present invention.

[0045] Figure 8 This is a structural diagram of an embodiment of the data query processing system disclosed in the present invention.

[0046] Figure 9 This is a structural diagram of another embodiment of the data query processing system disclosed in the present invention.

[0047] Figure 10 The figure is a schematic structural diagram of an application embodiment of the electronic device disclosed herein. DETAILED DESCRIPTION

[0048] Various exemplary embodiments of the present disclosure will now be described in detail with reference to the accompanying drawings. It should be noted that unless otherwise specifically stated, the relative arrangement of components and steps, numerical expressions and numerical values set forth in these embodiments do not limit the scope of the present disclosure.

[0049] Those skilled in the art will understand that the terms "first" and "second" in the embodiments of the present disclosure are only used to distinguish different steps, devices or modules, and do not represent any specific technical meanings, nor do they indicate a necessary logical order between them.

[0050] It should also be understood that in the embodiments of the present disclosure, “a plurality of” may refer to two or more than two, and “at least one” may refer to one, two, or more than two.

[0051] It should also be understood that any component, data or structure mentioned in the embodiments of the present disclosure can generally be understood as one or more, unless explicitly limited or otherwise indicated in the context.

[0052] In addition, the term "and / or" in this disclosure is merely a description of the association relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent three situations: A exists alone, A and B exist simultaneously, and B exists alone. In addition, the character " / " in this disclosure generally indicates that the related objects are in an "or" relationship.

[0053] It should also be understood that the description of the various embodiments in this disclosure focuses on the differences between the various embodiments, and the same or similar aspects thereof can be referenced with each other. For the sake of brevity, they will not be described one by one.

[0054] At the same time, it should be understood that for the convenience of description, the sizes of the various parts shown in the drawings are not drawn according to the actual proportional relationship.

[0055] The following description of at least one exemplary embodiment is merely illustrative in nature and is in no way intended to limit the present disclosure, its application, or uses.

[0056] Technologies, methods, and equipment known to ordinary technicians in the relevant art may not be discussed in detail, but where appropriate, the technologies, methods, and equipment should be considered part of the specification.

[0057] It should be noted that like reference numerals and letters refer to like items in the following figures, and therefore, once an item is defined in one figure, it need not be further discussed in subsequent figures.

[0058] The embodiments of the present disclosure can be applied to electronic devices such as terminal devices, computer systems, and servers, and can operate in conjunction with numerous other general-purpose or specialized computing system environments or configurations. Examples of well-known terminal devices, computing systems, environments, and / or configurations suitable for use with terminal devices, computer systems, servers, and other electronic devices include, but are not limited to, personal computer systems, server computer systems, thin clients, thick clients, handheld or laptop devices, microprocessor-based systems, set-top boxes, programmable consumer electronics, network personal computers, minicomputer systems, mainframe computer systems, and distributed cloud computing technology environments including any of the above systems, among others.

[0059] Electronic devices such as terminal devices, computer systems, and servers can be described in the general context of computer system-executable instructions (such as program modules) executed by a computer system. Generally, program modules can include routines, programs, object programs, components, logic, data structures, etc., which perform specific tasks or implement specific abstract data types. Computer systems / servers can be implemented in a distributed cloud computing environment, where tasks are performed by remote processing devices linked via a communication network. In a distributed cloud computing environment, program modules can be located on local or remote computing system storage media, including storage devices.

[0060] Figure 1 This is a flow chart of an embodiment of the data query processing method disclosed herein. Figure 1 As shown, a data query processing method according to an embodiment of the present disclosure includes:

[0061] 102 . In response to a preset time trigger condition, obtain historical query parameter samples that meet a pre-query condition within a first historical period to obtain at least one target historical query parameter sample.

[0062] Each historical query parameter sample may include a user ID and query parameters, wherein the query parameters may include but are not limited to at least one of the following: query indicators, query dimensions, query time range, etc. Each user ID is used to uniquely identify a user.

[0063] In the embodiments of the present disclosure, the preset time trigger condition is pre-set time information used as a trigger condition. The preset time trigger condition can be a periodic time, such as 23:00 every day, or a time period, such as 23:00 every day to 5:00 the next day, etc. In the embodiments of the present disclosure, reasonable time trigger conditions can be preset based on data query requirements. For example, the off-peak business period for data query can be set as the time trigger condition, and the embodiments of the present disclosure are not limited to this.

[0064] In the embodiment of the present disclosure, the indicators are parameters or measurement values used to quantitatively evaluate the performance, efficiency, status, capability, etc. in various industry fields, and reflect the key features and potential problems of the corresponding aspects in a data-based manner. The indicators in the embodiment of the present disclosure can be set according to specific needs. For example, in the field of real estate transactions, the indicators may include but are not limited to: transaction volume, viewing volume, number of online visitors, number of online consultations, etc. The query indicators in the embodiment of the present disclosure are used to obtain relevant data for the calculation of the corresponding indicators by querying the database to calculate the corresponding indicators. The query dimension is the dimension of the query indicator, which is a different angle for classifying or evaluating the query indicator. The query dimension in the embodiment of the present disclosure can be set according to specific needs. For example, in the field of real estate transactions, the query dimension may include but is not limited to: region, gender, age, etc. The query time range is the time range of the relevant data requested for query, such as a specific start and end time, the past day, the past three days, the past week, etc.

[0065] In the embodiments of the present disclosure, the first historical period can be set based on actual data query requirements. For example, the first historical period can be one day, two days, one week, etc., and the embodiments of the present disclosure do not impose any restrictions on this. Accordingly, historical query parameter samples that meet the pre-query conditions within the one day, two days, one week, etc. immediately preceding the current period can be obtained.

[0066] 104 : Based on the target historical query parameter sample corresponding to any user ID, update the historical query parameter preference information corresponding to the corresponding user ID to obtain updated query parameter preference information.

[0067] The historical query parameter preference information corresponding to each user ID is obtained by analyzing the query parameter information corresponding to the same user ID in a second historical period, where the second historical period is before the first historical period.

[0068] In the embodiment of the present disclosure, the second historical period can be set according to actual data query requirements. For example, the second historical period can be one week, two weeks, one month, three months, etc., and the embodiment of the present disclosure does not impose any restrictions on this. Taking the second historical period as one month as an example, the historical query parameter preference information corresponding to each user ID is obtained based on the query parameter information corresponding to the same user ID in the most recent month. That is, the historical query parameter preference information corresponding to each user ID is obtained by analyzing the query parameter information corresponding to each user ID in the most recent month.

[0069] In an embodiment of the present disclosure, operation 104 can be performed separately for each user ID included in the historical query parameter sample that meets the pre-query condition within the first historical period to obtain updated query parameter preference information corresponding to each user ID. The updated query parameter preference information corresponding to each user ID is used to ensure the query parameter preference of the user identified by each user ID.

[0070] 106 , for each target historical query parameter sample, using the parameter expansion configuration information and the updated query parameter preference information corresponding to the corresponding user ID, expand the corresponding target historical query parameter sample to obtain at least one predicted query parameter corresponding to each target historical query parameter sample.

[0071] In the embodiment of the present disclosure, operation 106 may be performed for each target historical query parameter sample to obtain updated query parameter preference information corresponding to each user ID. The updated query parameter preference information corresponding to each user ID is used to ensure the query parameter preference of the user identified by each user ID.

[0072] 108 , based on any prediction query parameter, call a query engine to query the database, obtain a first data query result corresponding to any prediction query parameter, and cache any prediction query parameter and the corresponding first data query result in a data cache unit.

[0073] The data cache unit in the embodiment of the present disclosure can be any type of database (such as a MYSQL database) or data table, and the embodiment of the present disclosure does not limit this.

[0074] In some implementations, a structured storage method, such as a key-value pair method, can be used to store each prediction query parameter and its corresponding first data query result. For example, each prediction query parameter is used as a key and the corresponding first data query result is used as a value to store each prediction query parameter and its corresponding first data query result. The embodiment of the present disclosure does not limit the data storage method in the data cache unit.

[0075] Optionally, in a specific implementation, for each pre-set index (Index), after the data corresponding to the query index in the database is ready and can be queried normally, the index status of the index can be set to a queryable state (e.g., 1). In this embodiment, after confirming that the index status of each predicted query parameter is a queryable state, operation 108 is performed for the predicted query parameter. The data corresponding to a query index is ready, which means that the data before the data query cycle to which the current moment belongs has been produced. For example, if the data query cycle is daily (natural day), then when the update time of the data corresponding to the query index is today, it means that the data corresponding to yesterday for the query index has been produced and can be queried normally.

[0076] In the embodiment of the present disclosure, the operation 108 can be performed separately for each predicted query parameter of each target historical query parameter sample, and each predicted query parameter and the corresponding first data query result are obtained and cached in the data cache unit. Optionally, in the embodiment of the present disclosure, the data cached in the data cache unit can be deleted based on a preset data update cycle, wherein the preset data update cycle can be set according to the actual data query requirements. For example, when data query is required every day (as a data query cycle), the data update cycle can be preset to one day. Since the data in the database is changing, the data queried from the database every day may be different. In order to feedback the latest data query results to the user, the first data query result of the pre-query can be cached for one day. When the next data query cycle arrives or at the end of the current data query cycle, the data cached in the data cache unit is deleted to release the cache resources in time and improve the utilization rate of the cache resources.

[0077] 110 , in response to a data query request sent by a client, determining whether a target prediction query parameter consistent with the query parameter in the data query request exists in a data cache unit.

[0078] 112. In response to the target prediction query parameter existing in the data cache unit, obtain a first data query result corresponding to the target prediction query parameter from the data cache unit and return it to the client.

[0079] Based on this embodiment, a reasonable time trigger condition (such as a low-peak business period for data query) can be preset according to the data query demand, and historical query parameter samples that meet the pre-query conditions within the first historical period are obtained. The historical query parameter samples are expanded in combination with the user's query parameter preference information and the pre-configured parameter extension configuration information. Based on the obtained predicted query parameters, the query engine is called to query data from the database and cache it in the data cache unit. During the low-peak business period, the pressure on the query engine is relatively small and the computing power is relatively abundant, which can improve the data query speed and the effectiveness of the data query results. When a data query request with the same query parameter is subsequently received, the corresponding data is directly obtained from the data cache unit and returned, and the data is no longer queried from the database through the underlying query engine. This can avoid the situation where a large number of query requests are concentratedly sent to the underlying query engine during the peak business period of data query, resulting in a slow query speed or failure of some data, as well as the stability risks brought to the underlying query engine, and avoid the resulting downtime of the underlying query engine, service crash, etc., thereby improving the user's data query efficiency. In addition, by pre-configuring pre-query conditions, historical query parameter samples that meet the pre-query conditions within the first historical period are obtained for pre-query. This allows for configurable screening of historical query parameter samples for desired pre-queries, effectively utilizing computing resources and specifically improving query performance in actual use. Furthermore, by combining the user's query parameter preference information with pre-configured parameter expansion configuration information, historical query parameter samples are expanded, each of which is expanded into several predicted query parameters, thereby expanding the desired pre-queries. This improves the hit rate of queries that users are likely to perform in actual use, thereby specifically improving data query efficiency in actual use.

[0080] Figure 2 This is a flow chart of another embodiment of the data query processing method disclosed herein. Figure 2 ,exist Figure 1 On the basis of the embodiment shown, this embodiment may further include:

[0081] 202. In response to the target prediction query parameter not existing in the data cache unit, based on the query parameter in the data query request, calling the query engine to query the database, obtain a second data query result, and return the second data query result to the client.

[0082] Based on this embodiment, the query engine can be directly called to query the database without pre-querying the target prediction query parameters. Since the pre-query has effectively reduced the number of data query requests during business peak periods, the pressure on the query engine during business peak periods is reduced. At this time, directly calling the query engine to query the database can effectively improve the data query speed and the effectiveness of the data query results, and avoid sending a large number of query requests to the underlying query engine during business peak periods of data queries, which may cause the underlying query engine to crash, service crash, etc.

[0083] Optionally, in some implementations of the embodiments of the present disclosure, the pre-query condition may include, but is not limited to, at least one of the following: a query duration greater than a first preset time threshold, a query frequency greater than a first preset frequency threshold, a preset screening rule, etc. Wherein, a query duration greater than the first preset time threshold indicates that it is necessary to screen out all historical query parameter samples whose query duration is greater than the first preset time threshold (without paying attention to the query parameters in the historical query parameter samples); a query frequency greater than the first preset frequency threshold indicates that it is necessary to screen out historical query parameter samples (historical query parameter samples or those in which the query parameters are the same) whose query frequency is greater than the first preset frequency threshold; and a preset screening rule indicates that it is necessary to screen out historical query parameter samples that meet the preset screening rule.

[0084] The preset screening rules may include, for example, but are not limited to, at least one of the following: query duration greater than a second preset time threshold, query frequency greater than a second preset frequency threshold, target indicator, target dimension, target time range, etc. That is, the preset screening rules may be any one or a combination of multiple of the above rules. The target indicator is the indicator set as the screening criterion in the preset screening rule, the target dimension is the dimension set as the screening criterion in the preset screening rule, and the target time range is the time range set as the screening criterion in the preset screening rule.

[0085] In the embodiments of the present disclosure, the specific values of the first preset time threshold and the second preset time threshold may be the same or different; similarly, the specific values of the first preset frequency threshold and the second preset time threshold may be the same or different. The specific values of the first preset time threshold, the second preset time threshold, the first preset frequency threshold, and the second preset time threshold can be set according to actual needs and can be updated as needed. For example, in a specific example, the first preset time threshold or the second preset time threshold may be, for example, 1000ms, and the first preset frequency threshold or the second preset time threshold may be, for example, 10 times.

[0086] In specific usage, if one of the pre-query conditions is that the query time is greater than a specific time, you can directly set the query time greater than the specific time as the pre-query condition, or you can configure the query time greater than the specific time through the preset filtering rules; similarly, if one of the pre-query conditions is that the query frequency is greater than a specific frequency, you can directly set the query frequency greater than the specific frequency as the pre-query condition, or you can configure the query frequency greater than the specific frequency through the preset filtering rules.

[0087] Among them, when the preset screening rule is a combination of two or more rules, it means that it is necessary to screen out historical query parameter samples that simultaneously meet the conditions specified by the rules in the combination. Among them, when the rules in the combination include query time greater than the second preset time threshold and query frequency greater than the second preset frequency threshold, it means that it is necessary to screen out historical query parameter samples whose query time is greater than the second preset time threshold and whose query frequency in the first historical period is greater than the second preset frequency threshold. When the rules in the combination include at least one of the target query parameters (i.e., target indicator, target dimension, target time range), it means that it is necessary to screen out historical query parameter samples including the target query parameters corresponding to the rules in the combination. When the rules in the combination include at least one of query time greater than the second preset time threshold and query frequency greater than the second preset frequency threshold, and at least one of the target query parameters (i.e., target indicator, target dimension, target time range), it means that it is necessary to screen out historical query parameter samples that meet "query time greater than the second preset time threshold and query frequency greater than the second preset frequency threshold" and include the target query parameters corresponding to the rules in the combination.

[0088] For example, in a specific instance, when the preset filtering rules include target indicators and target dimensions, it means that it is necessary to filter out historical query parameter samples that include both the target indicators and target dimensions; when the preset filtering rules include query time greater than a second preset time threshold and query frequency greater than a second preset frequency threshold, it means that it is necessary to filter out historical query parameter samples whose query time is greater than the second preset time threshold and whose query frequency is greater than the second preset frequency threshold; when the preset filtering rules include target indicators and query time greater than the second preset time threshold, it means that it is necessary to filter out historical query parameter samples for the target indicator whose query time is greater than the second preset time threshold; when the preset filtering rules include target indicators, target time range and query time greater than the second preset time threshold, it means that it is necessary to filter out historical query parameter samples for the target indicator whose query parameters are in the target time range and whose query time is greater than the second preset time threshold; and so on, and so on. The combination of various rules will not be described in detail here.

[0089] Figure 3This is a flow chart of an embodiment of the present disclosure for obtaining historical query parameter samples that meet the pre-query conditions within the first historical period. Figure 3 As shown, in Figure 1-Figure 2 Based on any of the illustrated embodiments, in this embodiment, operation 102 may include:

[0090] 1022. In response to a preset time trigger condition, obtain historical query parameter samples within a first historical period before a time corresponding to the preset time trigger condition.

[0091] Among them, the preset time trigger condition corresponds to a moment, that is, the moment when the data query processing method flow of the embodiment of the present disclosure is triggered based on the preset time trigger condition. Specifically, it can be the starting moment of the time information pre-set as the trigger condition, or it can be any moment within a certain time period before or after the starting moment (for example, 30 seconds, 3 minutes, etc.). The embodiment of the present disclosure does not impose any restrictions on this.

[0092] Afterwards, at least one of operations 1024-1028 corresponding to the pre-query condition is executed based on the pre-query condition. For example, if the pre-query condition includes query duration greater than a preset time threshold, query frequency greater than a preset frequency threshold, and a preset screening rule, operations 1024-1028 are executed; if the pre-query condition includes query duration greater than a preset time threshold and query frequency greater than a preset frequency threshold, operations 1024-1026 are executed; if the pre-query condition includes query duration greater than a preset time threshold and a preset screening rule, operations 1024 and 1028 are executed; if the pre-query condition includes query frequency greater than a preset frequency threshold and a preset screening rule, operations 1024-1026 are executed; if the pre-query condition includes query duration greater than a preset time threshold, query frequency greater than a preset frequency threshold, and a preset screening rule, corresponding operations 1024, 1026, or 1028 are executed.

[0093] 1024 , based on the query time information of each historical query parameter sample in the historical query record table, obtain historical query parameter samples in the first historical period whose query time is greater than a preset time threshold to obtain a first historical query parameter sample.

[0094] Thereafter, operation 1030 is performed.

[0095] 1026 , based on the query frequency information about each historical query parameter sample in the historical query record table, obtain historical query parameter samples with a query frequency greater than a preset frequency threshold among the historical query parameter samples in the first historical period to obtain a second historical query parameter sample.

[0096] Thereafter, operation 1030 is performed.

[0097] 1028 : Based on the query information about each historical query parameter sample in the historical query record table, filter out a third historical query parameter sample that meets a preset filtering rule from the historical query parameter samples in the first historical period.

[0098] 1030 : Obtain a historical query parameter sample that meets a pre-query condition within a first historical period based on at least one of the first historical query parameter sample, the second historical query parameter sample, and the third historical query parameter sample.

[0099] Based on this embodiment, after obtaining the historical query parameter samples within the first historical period, the historical query parameter samples within the first historical period can be filtered based on the actual configured query time being greater than the preset time threshold, the query frequency being greater than the preset frequency threshold, and the preset filtering rules to obtain the historical query parameter samples that need to be pre-queried.

[0100] Optionally, in some implementations of the embodiments of the present disclosure, user query behavior analysis can be performed based on the target historical query parameter samples corresponding to any user ID to obtain user query behavior analysis information, including the user ID and query parameters such as query indicators, query dimensions, and query time range extracted from each target historical query parameter sample. Based on the user query behavior analysis information of the same user ID, the historical query parameter preference information corresponding to the corresponding user ID is updated to obtain updated query parameter preference information. The updated query parameter preference information is used to characterize the query parameter preferences of the user identified by the user ID in the past period of time, that is, the preferred query indicators, query dimensions, query time range, etc., so as to predict the query parameters that the user may perform in the future.

[0101] Based on this embodiment, the query parameters that the user has been accustomed to in the past period of time can be analyzed based on the user's historical query parameter samples, so as to more accurately and comprehensively understand the user's query parameter preferences, thereby accurately predicting the query parameters that the user may use in the future, and pre-querying these query parameters in advance to improve the coverage of pre-queries.

[0102] Alternatively, see Figure 2 In any of the above embodiments of the present disclosure, after calling the query engine to query the database in operation 108 or 202, the following steps may also be included:

[0103] 204 , the query engine records the query information of the data query request in the historical query record table. The query information includes the user ID in the data query request, the query parameters in the data query request, and the query time information.

[0104] Optionally, in some implementations of the embodiments of the present disclosure, in operation 1024, a first task query request may be sent to the query engine, the first task query request including information of the first historical period and a preset time threshold, and the query engine queries the query information of the historical query parameter samples within the first historical period in the historical query record table based on the information of the first historical period and the preset time threshold to obtain the first historical query parameter samples. This operation may be implemented by a sample recall module based on query time consumption (referred to as a first sample recall module). In a specific implementation, the first sample recall module may generate an executable Structured Query Language (SQL) statement based on a preset time threshold and a trigger instruction based on a preset time trigger condition and send it to the underlying query engine, such as a SPARK query engine, and the query engine generates a query task and executes the query task, and queries the historical query record table (such as a HIVE table) according to the SQL statement to obtain the first historical query parameter sample.

[0105] Optionally, in some implementations of the embodiments of the present disclosure, in operation 1026, a second task query request may be sent to the query engine, the second task query request including information of the first historical period and query frequency information, and the query engine queries the historical query parameter sample within the first historical period in the historical query record table based on the information of the first historical period and the query frequency information to obtain a second historical query parameter sample. This operation may be implemented by a frequency-based sample recall module (referred to as a second sample recall module). In a specific implementation, the second sample recall module may generate an executable SQL statement based on the query frequency information and a trigger instruction based on a preset time trigger condition and send it to the underlying query engine, such as a SPARK query engine, and the query engine generates a query task and executes the query task, and queries the historical query record table (such as a HIVE table) according to the SQL statement to obtain a second historical query parameter sample.

[0106] Optionally, in some implementations of the embodiments of the present disclosure, in operation 1028, a third task query request may be sent to the query engine, the third task query request including information of the first historical period and preset screening rules, and the query engine queries the query information of the historical query parameter samples within the first historical period in the historical query record table based on the information of the first historical period and the preset screening rules, and screens out the third historical query parameter samples that meet the preset screening rules. This operation can be implemented by a rule-based sample recall module (referred to as a third sample recall module). In a specific implementation, the third sample recall module can generate an executable SQL statement based on the preset screening rules and the trigger instruction based on the preset time trigger condition, and send it to the underlying query engine, such as the SPARK query engine, and the query engine generates a query task and executes the query task, and queries the historical query record table (such as the HIVE table) according to the SQL statement to obtain the third historical query parameter sample.

[0107] Figure 4 This is a flow chart of an embodiment of the present disclosure for extending a target history query parameter sample. In some implementations, the parameter extension configuration information may include time parameter extension information and dimension parameter extension information. Figure 4 As shown, in Figure 1-Figure 3 Based on any of the embodiments shown, in some implementations, operation 106 may include:

[0108] 1062. For each target historical query parameter sample, the query time range parameter in the corresponding target historical query parameter sample is expanded using the pre-configured time parameter extension information and the updated query parameter preference information corresponding to the corresponding user ID to obtain at least one predicted query parameter sample corresponding to each target historical query parameter sample.

[0109] Among them, the time parameter extension information is used to determine the extension rules for the query time range parameter, and is used to extend the query time range parameter in the target historical query parameter sample. In specific applications, the query time range that may be involved can be analyzed statistically based on the existing historical query parameter samples, and the time parameter extension information can be configured accordingly. For example, if the target historical query parameter sample is to query data from the past week, the query time range parameter can be expanded to: the past week, last week, the past two weeks, the past month, etc. based on the updated query parameter preference information corresponding to the corresponding user ID, so as to query the relevant data of the past week, last week, the past month, and the past two weeks.

[0110] In operation 1062 , when the query time range parameter in the corresponding target historical query parameter sample is expanded, other parameters in the corresponding target historical query parameter sample may be kept unchanged, and only the query time range parameter may be expanded.

[0111] Based on operation 1062, the time range that the user may query in the future can be predicted based on the user's query parameter preference information and time parameter expansion information, and the query time range parameter in each target historical query parameter sample can be expanded, and each target historical query parameter sample can be expanded into multiple query parameter samples with different query time ranges (i.e., predicted query parameter samples).

[0112] 1064 , using the pre-configured dimension parameter extension information and the updated query parameter preference information corresponding to the corresponding user ID, the dimension parameters in the corresponding predicted query parameter sample are expanded to obtain at least one predicted query parameter corresponding to any predicted query parameter sample.

[0113] Among them, the dimension parameter extension information is used to determine the extension rules for the dimension parameters, and is used to expand the dimension parameters (i.e., query dimensions) in the target historical query parameter samples. Each predicted query parameter sample can be expanded into multiple predicted query parameter samples with different query dimension values, while keeping other parameters unchanged. For example, the query indicator in the target historical query parameter sample is housing transaction volume, and the query dimension is: region-Beijing City, that is, it is used to query the housing transaction volume in Beijing City. Then, according to the updated query parameter preference information corresponding to the corresponding user ID, the query dimension can be expanded to: Beijing City, Chaoyang District, Haidian District, Dongcheng District and other areas to query the housing transaction volume data in Beijing City, Chaoyang District, Haidian District, Dongcheng District and other areas.

[0114] Based on operation 1064, the dimensions that the user may query in the future can be predicted based on the user's query parameter preference information and dimension parameter expansion information, and the dimension query parameters in each predicted query parameter sample can be expanded, and each predicted query parameter sample can be expanded into multiple query parameter samples (i.e., predicted query parameters) with different query dimensions.

[0115] Or, in Figure 1-Figure 3 On the basis of any of the embodiments shown, in other implementations, operation 106 may include: for each target historical query parameter sample, using pre-configured time parameter extension information and dimension parameter extension information, as well as updated query parameter preference information corresponding to the corresponding user ID, respectively extending the query time range parameter and dimension parameter in the corresponding target historical query parameter sample, that is, simultaneously extending the query time range parameter and dimension parameter in the target historical query parameter sample to obtain at least one predicted query parameter. The specific extension method can be referred to Figure 4The description of the illustrated embodiment will not be repeated here.

[0116] Or, in Figure 1-Figure 3 On the basis of any of the embodiments shown, in some further implementations, operation 106 may include: respectively for any target historical query parameter sample, using pre-configured dimension parameter extension information and updated query parameter preference information corresponding to the corresponding user ID, expanding the dimension parameters in the corresponding historical query parameter sample to obtain at least one predicted query parameter sample corresponding to any target historical query parameter sample. The method for expanding the dimension parameters can refer to the implementation method of operation 1064, which will not be repeated here; respectively based on any predicted query parameter sample and the updated query parameter preference information corresponding to the corresponding user ID, expanding the query time range parameter in any predicted query parameter sample to obtain at least one predicted query parameter corresponding to any predicted query parameter sample. The method for expanding the query time range parameter can refer to the implementation method of operation 1062, which will not be repeated here.

[0117] Based on this embodiment, combined with the user's query parameter preference information, as well as the pre-configured time parameter extension information and dimension parameter extension information, the dimensions and time ranges that the user may query in the future are predicted, and the corresponding parameters in the historical query parameter samples are expanded in turn, and each historical query parameter sample is expanded into several predicted query parameters, thereby improving the hit rate of queries that the user may perform in actual use, and can specifically improve the efficiency of data queries in actual use.

[0118] Figure 5 This is a flow chart of an embodiment of the present disclosure in which a query engine is called to query a database based on any predicted query parameter. Figure 5 As shown, in some implementations, operation 108 may include:

[0119] 1082 : Distribute the predicted query parameter corresponding to at least one target historical query parameter sample to multiple pre-query execution units.

[0120] In some implementations, the predicted query parameter corresponding to at least one target historical query parameter sample can be distributed to multiple pre-query execution units according to a preset distribution method, such as a sequential distribution method, a random distribution method, a load balancing-based method, etc.

[0121] 1084. Each pre-query execution unit calls a query engine to query the database based on the received prediction query parameters, obtains a corresponding first data query result, and caches the received prediction query parameters and the corresponding first data query result in a data cache unit.

[0122] Based on this embodiment, multiple pre-query execution units may be provided to query the database in parallel based on the predicted query parameters, so as to improve the pre-query efficiency.

[0123] Figure 6 This is a flow chart of another embodiment of the data query processing method disclosed herein. Figure 6 As shown in the above Figure 1-Figure 5 Based on any of the above embodiments, the data query processing method of this embodiment includes:

[0124] 302 , in response to a preset time trigger condition, obtain historical query parameter samples that meet the pre-query condition within a first historical period, obtain at least one target historical query parameter sample, and store the at least one target historical query parameter sample in a data storage unit.

[0125] Each historical query parameter sample may include a user ID and at least one of the following query parameters: a query indicator, a query dimension, and a query time range. Each user ID is used to uniquely identify a user.

[0126] 304 : Based on the target historical query parameter samples corresponding to any user ID, update the query parameter preference information corresponding to the corresponding user ID in the data storage unit to obtain updated query parameter preference information.

[0127] 306. Obtain a target historical query parameter sample from the data storage unit in turn, expand the corresponding target historical query parameter sample using the parameter extension configuration information and the updated query parameter preference information corresponding to the corresponding user ID in the data storage unit, obtain at least one predicted query parameter corresponding to the obtained target historical query parameter sample, and store the at least one predicted query parameter in the data storage unit.

[0128] 308. Obtain a prediction query parameter from the data storage unit in turn, call the query engine to query the database based on the obtained prediction query parameter, obtain a first data query result corresponding to any prediction query parameter, and cache any prediction query parameter and the corresponding first data query result in the data cache unit.

[0129] 310 , in response to a data query request sent by a client, determining whether a target prediction query parameter consistent with the query parameter in the data query request exists in a data cache unit.

[0130] 312 . In response to the existence of the target prediction query parameter, obtain a first data query result corresponding to the target prediction query parameter from the data cache unit and return it to the client.

[0131] 314 , in response to the absence of the target prediction query parameter, calling the query engine to query the database based on the query parameter in the data query request, obtaining a second data query result, and returning the second data query result to the client.

[0132] Based on this embodiment, the intermediate data involved in the intermediate links of the data query processing method of this embodiment can be stored in the data storage unit, and the corresponding data can be read from the data storage unit for processing in the next link, thereby realizing parallel pipeline processing of different links, which helps to improve the utilization rate of computing resources and improve pre-query efficiency.

[0133] Any data query processing method provided in the embodiments of the present disclosure can be executed by any appropriate device with data processing capabilities, including but not limited to a terminal device and a server. Alternatively, any data query processing method provided in the embodiments of the present disclosure can be executed by a processor, such as a processor that executes any data query processing method mentioned in the embodiments of the present disclosure by invoking corresponding instructions stored in a memory. This will not be further described below.

[0134] Those skilled in the art will understand that all or part of the steps of implementing the above-mentioned method embodiment can be completed by hardware related to program instructions, and the aforementioned program can be stored in a computer-readable storage medium. When the program is executed, it executes the steps of the above-mentioned method embodiment; and the aforementioned storage medium includes: ROM, RAM, disk or optical disk, etc. Various media that can store program codes.

[0135] Figure 7 The data query processing device of any embodiment of the present disclosure can be used to implement the data query processing method of any embodiment of the present disclosure. Figure 7 As shown, the data query processing device of this embodiment includes: a sample acquisition module 402, an update module 404, a parameter expansion module 406, a pre-query module 408, a determination module 410 and a query processing module 412. Among them:

[0136] Sample acquisition module 402 is configured to, in response to a preset time trigger condition, acquire historical query parameter samples that meet the pre-query condition within a first historical period to obtain at least one target historical query parameter sample. The historical query parameter samples include a user ID and query parameters (e.g., including but not limited to at least one of a query metric, a query dimension, a query time range, etc.).

[0137] The updating module 404 is configured to update the query parameter preference information corresponding to any user ID based on the target historical query parameter sample corresponding to any user ID, and obtain updated query parameter preference information.

[0138] The parameter expansion module 406 is used to expand the corresponding target historical query parameter sample for each target historical query parameter sample using the parameter expansion configuration information and the updated query parameter preference information corresponding to the corresponding user ID, and obtain at least one predicted query parameter for the user ID corresponding to any target historical query parameter sample.

[0139] The pre-query module 408 is used to call the query engine to query the database based on any predicted query parameter, obtain the first data query result corresponding to any predicted query parameter, and cache any predicted query parameter and the corresponding first data query result in the data cache unit.

[0140] The determination module 410 is configured to determine, in response to a data query request sent by a client, whether there is a target prediction query parameter in the data cache unit that is consistent with the query parameter in the data query request.

[0141] The query processing module 412 is configured to return a first data query result corresponding to the target prediction query parameter as a data query response to the client in response to the existence of the target prediction query parameter sample.

[0142] Optionally, the query processing module 412 can also be used to call the query engine to query the database based on the query parameters in the data query request in response to the absence of a target prediction query parameter sample, obtain a second data query result, and return the second data query result to the client as a data query response.

[0143] The data query processing device of the disclosed embodiments corresponds to the embodiments of the data query processing method and system of the disclosed embodiments, and the relevant contents can be referenced and cited in each other, and will not be repeated here. The corresponding beneficial technical effects of the data query processing device of the disclosed embodiments can be found in the corresponding beneficial technical effects of the corresponding exemplary method section above, and will not be repeated here.

[0144] Figure 8 The data query processing system of any embodiment of the present disclosure can be used to implement the data query processing method of any embodiment of the present disclosure. Figure 8 As shown, the data query processing system of this embodiment includes: a trigger unit 502, a data acquisition unit 504, a pre-processing unit 506, a data cache unit 508 and a business processing unit 510. The data acquisition unit 504 includes a sample acquisition module 5042, an update module 5044 and a parameter expansion module 5046.

[0145] The trigger unit 502 is configured to send a trigger instruction to the data acquisition unit 504 based on a preset time trigger condition.

[0146] The sample acquisition module 5042 is configured to acquire, based on the trigger instruction, historical query parameter samples that meet the pre-query condition within the first historical period, and obtain at least one target historical query parameter sample. The historical query parameter samples include a user ID and query parameters (e.g., including but not limited to at least one of a query metric, a query dimension, a query time range, etc.).

[0147] The updating module 5044 is configured to update the query parameter preference information corresponding to any user ID based on the target historical query parameter sample corresponding to any user ID, and obtain updated query parameter preference information.

[0148] The parameter expansion module 5046 is used to expand the corresponding target historical query parameter sample for each target historical query parameter sample using the parameter expansion configuration information and the updated query parameter preference information corresponding to the corresponding user ID to obtain at least one predicted query parameter corresponding to each target historical query parameter sample.

[0149] The preprocessing unit 506 is used to call the query engine to query the database based on any prediction query parameter, obtain the first data query result corresponding to any prediction query parameter, and cache any prediction query parameter and the corresponding first data query result in the data cache unit 508.

[0150] The data cache unit 508 is configured to cache the predicted query parameters and the corresponding first data query results.

[0151] The business processing unit 510 is used to respond to the data query request sent by the client and determine whether there is a target prediction query parameter consistent with the query parameter in the data query request in the data cache unit 508; in response to the existence of the target prediction query parameter in the data cache unit 508, obtain the first data query result corresponding to the target prediction query parameter from the data cache unit 508 and return it to the client.

[0152] Optionally, the business processing unit 510 can also be used to respond to the absence of target prediction query parameters in the data cache unit 508, call the query engine to query the database based on the query parameters in the data query request, obtain a second data query result, and return the second data query result to the client.

[0153] Optionally, in some implementations, the pre-query condition may include, but is not limited to, at least one of the following: query duration greater than a preset time threshold, query frequency greater than a preset frequency threshold, preset screening rules, etc. Preset screening rules may include, but are not limited to, at least one of the following: query duration greater than a preset time threshold, query frequency greater than a preset frequency threshold, target indicator, target dimension, target time range, etc.

[0154] Optionally, in some implementations, the sample acquisition module 5042 may include an acquisition submodule, a first sample recall submodule, a second sample recall submodule, and a third sample recall submodule (not shown in the figure). The acquisition submodule is configured to acquire historical query parameter samples within a first historical period before the time corresponding to the preset time trigger condition. The first sample recall submodule is configured to acquire, based on the query time information about each historical query parameter sample in the historical query record table, historical query parameter samples whose query time is greater than a preset time threshold from the historical query parameter samples within the first historical period, thereby obtaining a first historical query parameter sample. The second sample recall submodule is configured to acquire, based on the query frequency information about each historical query parameter sample in the historical query record table, historical query parameter samples whose query frequency is greater than a preset frequency threshold from the historical query parameter samples within the first historical period, thereby obtaining a second historical query parameter sample; and / or, based on the query information about each historical query parameter sample in the historical query record table, filter out a third historical query parameter sample that meets the preset filtering rule from the historical query parameter samples within the first historical period. The third sample recall submodule is configured to obtain historical query parameter samples that meet the pre-query condition within the first historical period based on at least one of the first historical query parameter sample, the second historical query parameter sample, and the third historical query parameter sample.

[0155] Figure 9 FIG. 1 is a structural diagram of another embodiment of the data query processing system disclosed herein. Figure 9 As shown, in another embodiment of the data query processing system, a query engine 602 may also be included, which is used to record the query information of the data query request in the historical query record table after querying the database, including the user ID in the data query request, the query parameters in the data query request and the query time information.

[0156] Optionally, in some implementations, the first sample recall submodule can send a first task query request to the query engine 602, where the first task query request includes information of the first historical period and a preset time threshold. The query engine 602 queries the query information of the historical query parameter sample within the first historical period in the historical query record table based on the information of the first historical period and the preset time threshold to obtain the first historical query parameter sample.

[0157] Optionally, in some implementations, the second sample recall submodule can send a second task query request to the query engine 602, where the second task query request includes information of the first historical period and query frequency information. The query engine 602 queries the query information of the historical query parameter samples within the first historical period in the historical query record table based on the information of the first historical period and the query frequency information to obtain a second historical query parameter sample.

[0158] Optionally, in some implementations, the third sample recall submodule sends a third task query request to the query engine 602, which includes information of the first historical period and preset filtering rules. The query engine 602 queries the query information of the historical query parameter samples within the first historical period in the historical query record table based on the information of the first historical period and the preset filtering rules, and filters out the third historical query parameter samples that meet the preset filtering rules.

[0159] Optionally, in some of the implementations, the above-mentioned parameter extension configuration information may include time parameter extension information and dimension parameter extension information. Accordingly, in some implementations, the parameter extension module 5046 may include a time parameter extension submodule and a dimension parameter extension submodule (not shown in the figure). Among them, the time parameter extension submodule is used to respectively, for any target historical query parameter sample, use the time parameter extension information and the updated query parameter preference information corresponding to the corresponding user identifier to expand the query time range parameter in the corresponding target historical query parameter sample, and obtain at least one predicted query parameter sample corresponding to any target historical query parameter sample. The dimension parameter extension submodule is used to use the dimension parameter extension information and the updated query parameter preference information corresponding to the corresponding user identifier to expand the dimension parameters in the corresponding predicted query parameter sample, and obtain at least one predicted query parameter corresponding to any predicted query parameter sample;

[0160] Alternatively, the dimension parameter expansion submodule is configured to, for each target historical query parameter sample, expand the dimension parameters in the corresponding historical query parameter sample using the dimension parameter expansion information and the updated query parameter preference information corresponding to the corresponding user identifier, thereby obtaining at least one predicted query parameter sample corresponding to the target historical query parameter sample. The time parameter expansion submodule is configured to expand the query time range parameter in any predicted query parameter sample based on the predicted query parameter sample and the updated query parameter preference information corresponding to the corresponding user identifier, thereby obtaining at least one predicted query parameter corresponding to the predicted query parameter sample.

[0161] Alternatively, in other implementations, the parameter expansion module 5046 is specifically used to expand the query time range parameter and dimension parameter in the corresponding target historical query parameter sample for any target historical query parameter sample using the time parameter expansion information and dimension parameter expansion information, as well as the updated query parameter preference information corresponding to the corresponding user identifier, to obtain at least one predicted query parameter.

[0162] Alternatively, see Figure 9 In some implementations, the pre-processing unit 506 may include a scheduling module 5062 and multiple pre-query execution modules 5064. The scheduling module 5062 is configured to distribute the predicted query parameters corresponding to at least one target historical query parameter sample to the multiple pre-query execution units 5064. Each pre-query execution unit 5064, based on the received predicted query parameters, calls the query engine 602 to query the database, obtains a corresponding first data query result, and caches the received predicted query parameters and the corresponding first data query result in the data cache unit 508.

[0163] Alternatively, see Figure 9 In another embodiment of the data query processing system, a data storage unit 604 may also be included. In this embodiment, the sample acquisition module 5042 is further configured to store at least one obtained target historical query parameter sample in the data storage unit 604. The update module 5044 is specifically configured to update the query parameter preference information corresponding to the corresponding user identifier in the data storage unit 604 based on the target historical query parameter sample corresponding to any user identifier. The parameter expansion module 5046 is specifically configured to sequentially obtain a target historical query parameter sample from the data storage unit 604, and using the parameter expansion configuration information, based on the obtained target historical query parameter sample and the updated query parameter preference information corresponding to the corresponding user identifier in the data storage unit, expand the corresponding target historical query parameter sample to obtain at least one predicted query parameter corresponding to the obtained target historical query parameter sample, and store the at least one predicted query parameter in the data storage unit 604. The preprocessing unit 506 is specifically configured to sequentially obtain a predicted query parameter from the data storage unit and invoke the query engine to query the database based on the obtained predicted query parameter.

[0164] Alternatively, see Figure 9In another embodiment of the data query processing system, a task trigger unit 606 may be further included, which is used to confirm that the indicator status of each predicted query parameter is a queryable state, and then send a pre-query trigger instruction to the scheduling module 5062 for the predicted query parameter to trigger a pre-query operation for the predicted query parameter, so as to trigger the pre-query operation for the predicted query parameter, and the pre-query trigger instruction includes the predicted query parameter; accordingly, the scheduling module 5062 is used to distribute the predicted query parameter in the pre-query trigger instruction to one of the pre-query execution units 5064.

[0165] The data query processing system of the disclosed embodiments corresponds to the embodiments of the data query processing method and apparatus described above. The relevant contents may be referenced and cited in conjunction with each other and are not further elaborated here. The beneficial technical effects corresponding to the data query processing system of the disclosed embodiments can be found in the corresponding beneficial technical effects of the exemplary method described above and are not further elaborated here.

[0166] In addition, an embodiment of the present disclosure further provides an electronic device, including:

[0167] Memory for storing computer programs;

[0168] The processor is configured to execute the computer program stored in the memory, and when the computer program is executed, the data query processing method described in any one of the above embodiments of the present disclosure is implemented.

[0169] Figure 10 This is a schematic diagram of the structure of an application embodiment of the electronic device disclosed in the present invention. Figure 10 The electronic device according to the embodiment of the present disclosure is described. The electronic device may be either or both of the first device and the second device, or a standalone device independent of them, and the standalone device may communicate with the first device and the second device to receive collected input signals from them.

[0170] like Figure 10 As shown, the electronic device includes one or more processors and memory.

[0171] The processor may be a central processing unit (CPU) or other forms of processing units having data processing capabilities and / or instruction execution capabilities, and may control other components in the electronic device to perform desired functions.

[0172] The memory may store one or more computer program products, and the memory may include various forms of computer-readable storage media, such as volatile memory and / or non-volatile memory. The volatile memory may include, for example, random access memory (RAM) and / or cache memory. The non-volatile memory may include, for example, read-only memory (ROM), a hard disk, a flash memory, etc. One or more computer program products may be stored on the computer-readable storage medium, and the processor may execute the computer program products to implement the data query processing methods of the various embodiments of the present disclosure described above and / or other desired functions.

[0173] In one example, the electronic device may further include an input device and an output device, wherein these components are interconnected via a bus system and / or other forms of connection mechanisms (not shown). The input device may include, for example, a keyboard, a mouse, etc. The output device may output various information to the outside, including determined distance information, direction information, etc. The output device may include, for example, a display, a speaker, a printer, a communication network, and a remote output device connected thereto.

[0174] Of course, to simplify, Figure 10 Only some of the components related to the present disclosure in the electronic device are shown, and components such as a bus, an input / output interface, etc. are omitted. In addition, the electronic device may further include any other appropriate components according to specific application scenarios.

[0175] In addition to the above-mentioned methods and devices, an embodiment of the present disclosure may also be a computer program product, which includes computer program instructions, which, when executed by a processor, enable the processor to execute the steps of the data query processing method according to various embodiments of the present disclosure described in the above part of this specification.

[0176] The computer program product may be written in any combination of one or more programming languages to implement the operations of the disclosed embodiments, including object-oriented programming languages such as Java, C++, and conventional procedural programming languages such as C or similar programming languages. The program code may be executed entirely on the user's computing device, partially on the user's computing device, as a standalone software package, partially on the user's computing device and partially on a remote computing device, or entirely on a remote computing device or server.

[0177] In addition, an embodiment of the present disclosure may also be a computer-readable storage medium having computer program instructions stored thereon, which, when executed by a processor, enables the processor to execute the steps of the data query processing method according to various embodiments of the present disclosure described in the above part of this specification.

[0178] The computer-readable storage medium can adopt any combination of one or more readable media. The readable medium can be a readable signal medium or a readable storage medium. The readable storage medium can, for example, include but is not limited to a system, device or component of electricity, magnetism, light, electromagnetic, infrared, or semiconductor, or any combination thereof. More specific examples (non-exhaustive list) of readable storage media include: an electrical connection with one or more wires, a portable 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 thereof.

[0179] The basic principles of the present disclosure have been described above in conjunction with specific embodiments. However, it should be noted that the advantages, strengths, and effects mentioned in this disclosure are merely illustrative and not restrictive, and should not be construed as necessarily possessed by each embodiment of the present disclosure. Furthermore, the specific details disclosed above are provided for illustrative purposes and to facilitate understanding, rather than as limitations. These details do not limit the present disclosure to necessarily being implemented using these specific details.

[0180] Each embodiment in this specification is described in a progressive manner, with each embodiment focusing on its differences from the other embodiments. References to the same or similar parts between the various embodiments are sufficient. For system embodiments, since they largely correspond to method embodiments, their description is relatively simple. For relevant parts, references to the description of the method embodiments are sufficient.

[0181] The block diagrams of the devices, devices, equipment, and systems involved in this disclosure are merely illustrative examples and are not intended to require or imply that they must be connected, arranged, or configured in the manner shown in the block diagrams. As will be appreciated by those skilled in the art, these devices, devices, equipment, and systems can be connected, arranged, or configured in any manner. Words such as "include," "comprise," "have," and the like are open-ended words, meaning "including but not limited to," and can be used interchangeably therewith. The words "or" and "and" used herein refer to the words "and / or" and can be used interchangeably therewith, unless the context clearly indicates otherwise. The word "such as" used herein refers to the phrase "such as but not limited to," and can be used interchangeably therewith.

[0182] The methods and apparatus of the present disclosure may be implemented in many ways. For example, the methods and apparatus of the present disclosure may be implemented by software, hardware, firmware, or any combination of software, hardware, and firmware. The above order of steps for the method is for illustration only, and the steps of the method of the present disclosure are not limited to the order specifically described above unless otherwise specified. In addition, in some embodiments, the present disclosure may also be implemented as programs recorded in a recording medium, which include machine-readable instructions for implementing the methods according to the present disclosure. Thus, the present disclosure also covers recording media that store programs for executing the methods according to the present disclosure.

[0183] It should also be noted that in the apparatus, device, and method of the present disclosure, each component or each step can be decomposed and / or recombined. Such decomposition and / or recombination should be regarded as equivalent solutions of the present disclosure.

[0184] The above description of the disclosed aspects is provided to enable any person skilled in the art to make or use the present disclosure. Various modifications to these aspects will be readily apparent to those skilled in the art, and the general principles defined herein may be applied to other aspects without departing from the scope of the present disclosure. Therefore, the present disclosure is not intended to be limited to the aspects shown herein, but rather to be accorded the widest scope consistent with the principles and novel features disclosed herein.

[0185] The above description has been provided for the purpose of illustration and description. In addition, this description is not intended to limit the embodiments of the present disclosure to the forms disclosed herein. Although a number of example aspects and embodiments have been discussed above, those skilled in the art will recognize certain variations, modifications, alterations, additions, and sub-combinations thereof.

Claims

1. A data query processing method, characterized in that: include: In response to a preset time trigger condition, obtaining historical query parameter samples that meet the pre-query condition within a first historical period to obtain at least one target historical query parameter sample; wherein the historical query parameter sample includes a user identifier and a query parameter; Based on the target historical query parameter sample corresponding to any user identifier, the query parameter preference information corresponding to the corresponding user identifier is updated to obtain updated query parameter preference information; For each of the target historical query parameter samples, using the parameter expansion configuration information and the updated query parameter preference information corresponding to the corresponding user identifier, the corresponding target historical query parameter sample is expanded to obtain at least one predicted query parameter corresponding to the target historical query parameter sample; Based on any of the predicted query parameters, respectively, a query engine is called to query the database to obtain a first data query result corresponding to any of the predicted query parameters, and any of the predicted query parameters and the corresponding first data query result are cached in a data cache unit; In response to a data query request sent by a client, determining whether there is a target prediction query parameter consistent with the query parameter in the data query request in the data cache unit; In response to the existence of the target prediction query parameter, a first data query result corresponding to the target prediction query parameter is obtained from the data cache unit and returned to the client.

2. The method according to claim 1, characterized in that Also includes: In response to the absence of the target prediction query parameter, the query engine is called to query the database based on the query parameter in the data query request to obtain a second data query result, and the second data query result is returned to the client.

3. The method according to claim 1, characterized in that The pre-query condition includes at least one of the following: query time greater than a first preset time threshold, query frequency greater than a first preset frequency threshold, and a preset screening rule; or, The preset screening rules include at least one of the following rules: query time is greater than a second preset time threshold, query frequency is greater than a second preset frequency threshold, target indicator, target dimension, and target time range.

4. The method according to claim 3, characterized in that Obtain a sample of historical query parameters that meet the pre-query conditions within the first historical period, including: Obtain historical query parameter samples within a first historical period before the moment corresponding to the preset time trigger condition; Based on the query time information about each of the historical query parameter samples in the historical query record table, obtain the historical query parameter samples in the historical query parameter samples within the first historical period whose query time is greater than the preset time threshold, to obtain the first historical query parameter sample; and / or, based on the query frequency information about each of the historical query parameter samples in the historical query record table, obtain the historical query parameter samples in the historical query parameter samples within the first historical period whose query frequency is greater than the preset frequency threshold, to obtain the second historical query parameter sample; and / or, based on the query information about each of the historical query parameter samples in the historical query record table, filter out the third historical query parameter sample that meets the preset filtering rule from the historical query parameter samples within the first historical period; Based on at least one of the first historical query parameter sample, the second historical query parameter sample, and the third historical query parameter sample, a historical query parameter sample that meets the pre-query condition within the first historical period is obtained.

5. The method according to claim 4, characterized in that After calling the query engine to query the database, it also includes: The query engine records the query information of the data query request in a historical query record table, where the query information includes: the user identifier in the data query request, the query parameters in the data query request, and query time information.

6. The method according to claim 5, characterized in that Based on the query time information about each of the historical query parameter samples in the historical query record table, obtaining historical query parameter samples whose query time is greater than the preset time threshold among the historical query parameter samples in the first historical period, to obtain the first historical query parameter sample, includes: Sending a first task query request to the query engine, where the first task query request includes information about the first historical period and the preset time threshold, and the query engine queries the historical query record table for query information of historical query parameter samples within the first historical period based on the information about the first historical period and the preset time threshold, to obtain the first historical query parameter samples; and / or, Based on the query frequency information about each of the historical query parameter samples in the historical query record table, obtaining a historical query parameter sample whose query frequency is greater than the preset frequency threshold among the historical query parameter samples in the first historical period to obtain a second historical query parameter sample, including: Sending a second task query request to the query engine, where the second task query request includes information about the first historical period and the query frequency information, and the query engine queries the historical query record table for query information of historical query parameter samples within the first historical period based on the information about the first historical period and the query frequency information to obtain the second historical query parameter samples; and / or, Based on the query information about each of the historical query parameter samples in the historical query record table, filtering out a third historical query parameter sample that meets the preset filtering rule from the historical query parameter samples within the first historical period includes: A third task query request is sent to the query engine, where the third task query request includes information of the first historical period and the preset filtering rules. The query engine queries the query information of the historical query parameter samples within the first historical period in the historical query record table based on the information of the first historical period and the preset filtering rules to obtain the third historical query parameter samples that meet the preset filtering rules.

7. The method according to any one of claims 1 to 6, characterized in that: The parameter extension configuration information includes time parameter extension information and dimension parameter extension information; Using the parameter extension configuration information and the updated query parameter preference information corresponding to the corresponding user identifier, the corresponding target historical query parameter sample is extended to obtain at least one predicted query parameter corresponding to any of the target historical query parameter samples, including: Using the time parameter expansion information and the dimension parameter expansion information, based on the updated query parameter preference information corresponding to the corresponding user identifier, respectively expand the query time range parameter and the dimension parameter in the corresponding target historical query parameter sample to obtain at least one predicted query parameter; and / or, Using the time parameter extension information, based on the updated query parameter preference information corresponding to the corresponding user identifier, the query time range parameter in the corresponding target historical query parameter sample is expanded to obtain at least one predicted query parameter sample corresponding to any of the target historical query parameter samples; Using the dimension parameter extension information, based on any of the predicted query parameter samples and the updated query parameter preference information corresponding to the corresponding user identifier, the dimension parameters in the corresponding predicted query parameter sample are expanded to obtain at least one predicted query parameter corresponding to any of the predicted query parameter samples; and / or, Using the dimension parameter extension information, based on the updated query parameter preference information corresponding to the corresponding user identifier, the dimension parameters in the corresponding historical query parameter samples are expanded to obtain at least one predicted query parameter sample corresponding to any of the target historical query parameter samples; Based on any of the predicted query parameter samples and the updated query parameter preference information corresponding to the corresponding user identifier, the query time range parameter in any of the predicted query parameter samples is expanded to obtain at least one predicted query parameter corresponding to any of the predicted query parameter samples.

8. The method according to any one of claims 1 to 6, characterized in that: Based on any of the predicted query parameters, respectively, calling a query engine to query a database, obtaining a first data query result corresponding to any of the predicted query parameters, and caching any of the predicted query parameters and the corresponding first data query result in a data cache unit, including: Distributing the predicted query parameter corresponding to the at least one target historical query parameter sample to multiple pre-query execution units; Each of the pre-query execution units calls a query engine to query the database based on the received prediction query parameters, obtains a corresponding first data query result, and caches the received prediction query parameters and the corresponding first data query result in a data cache unit.

9. The method according to any one of claims 1 to 6, characterized in that: After acquiring historical query parameter samples that meet the pre-query condition within the first historical period and obtaining at least one target historical query parameter sample, the method further includes: storing the at least one target historical query parameter sample in a data storage unit; Based on the target historical query parameter samples corresponding to any user identifier, respectively, updating the query parameter preference information corresponding to the corresponding user identifier in the data storage unit, respectively, based on the target historical query parameter samples corresponding to any user identifier; For each of the target historical query parameter samples, the corresponding target historical query parameter sample is expanded using the parameter expansion configuration information and the updated query parameter preference information corresponding to the corresponding user identifier to obtain at least one predicted query parameter corresponding to the target historical query parameter sample, including: sequentially acquiring one of the target historical query parameter samples from the data storage unit, expanding the corresponding target historical query parameter sample using the parameter expansion configuration information and the updated query parameter preference information corresponding to the corresponding user identifier in the data storage unit to obtain at least one predicted query parameter corresponding to the acquired target historical query parameter sample, and storing the at least one predicted query parameter in the data storage unit; Based on any of the predicted query parameters, calling the query engine to query the database includes: sequentially obtaining one of the predicted query parameters from the data storage unit, and calling the query engine to query the database based on the obtained one of the predicted query parameters.

10. A data query processing system, characterized in that: include: Trigger unit, data acquisition unit, pre-processing unit, data cache unit and business processing unit; the data acquisition unit includes a sample acquisition module, an update module and a parameter expansion module; The trigger unit is configured to send a trigger instruction to the data acquisition unit based on a preset time trigger condition; The sample acquisition module is configured to acquire, based on the trigger instruction, historical query parameter samples that meet the pre-query condition within the first historical period to obtain at least one target historical query parameter sample; wherein the historical query parameter sample includes a user identifier and a query parameter; The updating module is configured to update the query parameter preference information corresponding to the corresponding user identifier based on the target historical query parameter sample corresponding to any user identifier, to obtain updated query parameter preference information; The parameter expansion module is configured to expand the corresponding target historical query parameter sample using the parameter expansion configuration information and the updated query parameter preference information corresponding to the corresponding user identifier, respectively, to obtain at least one predicted query parameter corresponding to any of the target historical query parameter samples; The preprocessing unit is configured to call a query engine to query a database based on any of the predicted query parameters, obtain a first data query result corresponding to any of the predicted query parameters, and cache any of the predicted query parameters and the corresponding first data query result in a data cache unit; The data cache unit is configured to cache the predicted query parameter and the corresponding first data query result; The business processing unit is used to respond to a data query request sent by a client, determine whether there is a target prediction query parameter consistent with the query parameter in the data query request in the data cache unit; in response to the existence of the target prediction query parameter, obtain the first data query result corresponding to the target prediction query parameter from the data cache unit and return it to the client.

11. An electronic device, characterized in that: include: a memory for storing a computer program product; A processor is configured to execute a computer program product stored in the memory, and when the computer program product is executed, implements the method described in any one of claims 1 to 9.

12. A computer-readable storage medium having computer program instructions stored thereon, characterized in that: When the computer program instructions are executed by a processor, the method described in any one of claims 1 to 9 is implemented.

13. A computer program product comprising computer program instructions, characterized in that When the computer program instructions are executed by a processor, the method according to any one of claims 1 to 9 is implemented.

Citation Information

Patent Citations

  • Data query method and device, computer equipment and storage medium

    CN113886426A

  • Cross-source data retrieval method based on space-time asset directory, medium and equipment

    CN117312688A

  • Data query method based on pre-query

    CN118503276A

  • Predictive data caching

    US20110055202A1