Data query method and device, equipment and storage medium

By storing and reusing historical query results in the query service of Hucang integrated architecture, the problems of slow data query speed and limited user storage capacity are solved, and a more efficient data query process is achieved.

CN120216539APending Publication Date: 2025-06-27BEIJING KINGSOFT CLOUD NETWORK TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510293738.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-03-12
Publication Date
2025-06-27

AI Technical Summary

Technical Problem

In the integrated architecture of Hucang, data query speed is slow and the local disk storage capacity of the user side is limited, resulting in regular clearing of historical data or overwriting old query results, increasing the amount of calculation of re-query in the data lake component.

Method used

Provide a data query method, which stores historical query results through the query service, avoids the user from regularly clearing historical data, and allows re-queries in the query service based on previous query conditions, reducing the amount of calculation.

Benefits of technology

By storing and reusing historical query results in the query service, the dependence on the local disk on the user side and the calculation amount of requeries is reduced, and the efficiency of data query is improved.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120216539A_ABST
    Figure CN120216539A_ABST
Patent Text Reader

Abstract

The invention relates to a data query method and device, equipment and a storage medium, and the method comprises the steps: receiving a query request sent by a user side, and the query request comprises a target query condition; the query request is sent to a query service, so that the query service performs query according to the target query condition and returns a target result, and historical query results are stored in the query service; when the target result comprises a target query result, sending the target query result to the user side, so that the user side performs corresponding processing based on the target query result; wherein the target query result is a query result corresponding to the target query condition. According to the method, the calculation amount can be reduced.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of computer technology, and in particular, to a data query method, apparatus, device, and storage medium. Background Art

[0002] With the development of big data technology, the lakehouse architecture has been recognized by more and more customers and applied to the actual environment. The data in the lakehouse architecture is stored separately in the data lake component. Therefore, when querying data, it is necessary to query in the data lake component, and the query speed is relatively slow.

[0003] To solve the problem of relatively slow query speed, every time the user terminal obtains a query result, it will store the query result in the local disk. Then, when querying based on the same query conditions next time, it will first query in the local disk. If the query fails, it will then query from the data lake component.

[0004] However, due to the small size of the user terminal, the storage capacity of its local disk is limited. To avoid the local disk affecting the performance of the user terminal, the user terminal will regularly clear historical data or use new query results to overwrite old query results, resulting in a relatively large amount of calculation for re-querying in the data lake component based on previous query conditions. Summary of the Invention

[0005] This application provides a data query method, apparatus, device, and storage medium. Since the query service in this method does not need to regularly clear historical query results or use new query results to overwrite old query results, it can re-query in the query service based on previous query conditions, reducing the amount of calculation.

[0006] In a first aspect, this application provides a data query method, which includes:

[0007] Receiving a query request sent by a user terminal, where the query request includes a target query condition;

[0008] Sending the query request to a query service so that the query service queries according to the target query condition and returns a target result, where the query service stores historical query results;

[0009] When the target result includes a target query result, sending the target query result to the user terminal so that the user terminal performs corresponding processing based on the target query result;

[0010] Wherein, the target query result is the query result corresponding to the target query condition.

[0011] Optionally, the query request further includes a target business type, and the method further includes:

[0012] When the target result does not include the target query result, determine a first component to be used in the set of data lake components according to the target business type;

[0013] Send the query request to the first component so that the first component uses the target query condition to perform a query and obtain the target query result.

[0014] Optionally, the query service includes query services corresponding to different data lake components. The query according to the target query condition and returning the target result includes:

[0015] Determine a second component to be used in the set of data lake components according to the target business type;

[0016] Send the query request to the query service corresponding to the second component so that the query service corresponding to the second component performs a query according to the target query condition, obtains the target result, and returns the target result.

[0017] Optionally, the query according to the target query condition and returning the target result includes:

[0018] Obtain the corresponding relationship between the pre-created query conditions and query results;

[0019] Detect whether there is a target query result corresponding to the target query condition in the corresponding relationship;

[0020] When there is a target query result corresponding to the target query condition, obtain the target result according to the target query result;

[0021] When there is no target query result corresponding to the target query condition, use a preset result determination strategy to determine the target result;

[0022] Send the target result to the proxy service.

[0023] Optionally, when the query condition includes multiple sub-conditions, the use of a preset result determination strategy to determine the target result includes:

[0024] Combine multiple sub-conditions to obtain a reference query condition corresponding to each combination method;

[0025] In the corresponding relationship, determine a reference result set corresponding to each reference query condition;

[0026] When there is a target object in the reference result set, obtain a target query result according to the target object, and determine the target result according to the target query result, where the target object is an object existing in all reference result sets;

[0027] When there is no target object in the reference result set, determine a preset result as the target result.

[0028] Optionally, the query request further includes a target service type, and the querying according to the target query condition and returning a target result includes:

[0029] Obtain a target result set corresponding to the target service type;

[0030] Query in the target result set according to the target query condition, and return the target result.

[0031] Optionally, the method further includes:

[0032] Obtain a target query result obtained based on the first component;

[0033] Send the target query condition and the target query result to a query service, so that the query service stores based on the target query condition and the target query result.

[0034] In a second aspect, the present application provides a data query device, and the device includes:

[0035] A receiving unit, configured to receive a query request sent by a user terminal, where the query request includes a target query condition;

[0036] A first query unit, configured to send the query request to a query service, so that the query service queries according to the target query condition and returns a target result, where the query service stores historical query results;

[0037] A sending unit, configured to, when the target result includes a target query result, send the target query result to the user terminal, so that the user terminal performs corresponding processing based on the target query result; where the target query result is a query result corresponding to the target query condition.

[0038] Optionally, the query request further includes a target service type, and the device further includes a second query unit, and the second query unit is configured to:

[0039] When the target result does not include the target query result, determine a first component to be used in the data lake component set according to the target service type;

[0040] Send the query request to the first component so that the first component uses the target query condition to perform a query and obtain the target query result.

[0041] Optionally, the query service includes query services corresponding to different data lake components. The first query unit is configured to:

[0042] Determine a second component to be used in the data lake component set according to the target business type;

[0043] Send the query request to the query service corresponding to the second component so that the query service corresponding to the second component performs a query according to the target query condition, obtains a target result, and returns the target result.

[0044] Optionally, the first query unit is configured to:

[0045] Obtain the corresponding relationship between the pre-created query conditions and query results;

[0046] Detect whether there is a target query result corresponding to the target query condition in the corresponding relationship;

[0047] When there is a target query result corresponding to the target query condition, obtain the target result according to the target query result;

[0048] When there is no target query result corresponding to the target query condition, use a preset result determination strategy to determine the target result;

[0049] Send the target result to the proxy service.

[0050] Optionally, when the query condition includes multiple sub-conditions, the first query unit is configured to:

[0051] Combine multiple sub-conditions to obtain a reference query condition corresponding to each combination method;

[0052] Determine a reference result set corresponding to each reference query condition in the corresponding relationship;

[0053] When there is a target object in the reference result set, obtain the target query result according to the target object, and determine the target result according to the target query result, where the target object is an object existing in all reference result sets;

[0054] When there is no target object in the reference result set, determine the preset result as the target result.

[0055] Optionally, the query request further includes a target business type. The first query unit is configured to:

[0056] Obtain a target result set corresponding to the target service type;

[0057] Query in the target result set according to the target query condition, and return the target result.

[0058] Optionally, the device further includes a third query unit, and the third query unit is configured to:

[0059] Obtain a target query result obtained based on the first component;

[0060] Send the target query condition and the target query result to a query service, so that the query service stores them based on the target query condition and the target query result.

[0061] In a third aspect, the present application provides a data query device, including: at least one communication interface; at least one bus connected to the at least one communication interface; at least one processor connected to the at least one bus; at least one memory connected to the at least one bus, wherein the processor is configured to:

[0062] Receive a query request sent by a user terminal, where the query request includes a target query condition;

[0063] Send the query request to a query service, so that the query service queries according to the target query condition and returns a target result, where the query service stores historical query results;

[0064] When the target result includes a target query result, send the target query result to the user terminal, so that the user terminal performs corresponding processing based on the target query result;

[0065] Wherein, the target query result is a query result corresponding to the target query condition.

[0066] In a fourth aspect, the present application provides a computer-readable storage medium, on which a computer program is stored, and when the computer program is executed by a processor, the above-mentioned data query method is implemented.

[0067] The above technical solution provided by the embodiments of the present application has the following advantages compared with the prior art: In the embodiments of the present application, a query request sent by a user terminal is received, and the query request includes a target query condition; the query request is sent to a query service so that the query service performs a query according to the target query condition and returns a target result; when the target result includes a target query result, the target query result is sent to the user terminal so that the user terminal performs corresponding processing based on the target query result; wherein, the target query result is a query result corresponding to the target query condition. It can be seen that the present application first performs a query in the query service, and the query service is not affected by the user terminal, and there is no need to periodically clear historical query results or use new query results to overwrite old query results. Therefore, it is possible to re-query in the query service based on the previous query conditions, reducing the amount of calculation. BRIEF DESCRIPTION OF THE DRAWINGS

[0068] The accompanying drawings herein are incorporated into and constitute a part of this specification, showing embodiments consistent with the present invention and, together with the specification, are used to explain the principles of the present invention.

[0069] In order to more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the following will briefly introduce the accompanying drawings required for the description of the embodiments or the prior art. Obviously, for those of ordinary skill in the art, other drawings can be obtained based on these drawings without creative efforts.

[0070] One or more embodiments are illustrated by way of example in the accompanying drawings, and these exemplary illustrations do not constitute a limitation on the embodiments. Elements with the same reference numerals in the drawings are represented as similar elements, unless otherwise stated, and the drawings in the figures do not constitute a proportional limitation.

[0071] Figure 1 A schematic structural diagram of a data query method provided by an embodiment of the present application;

[0072] Figure 2 A schematic flowchart of a data query method provided by an embodiment of the present application;

[0073] Figure 3 A schematic flowchart of a data query method based on a first component provided by an embodiment of the present application;

[0074] Figure 4 A schematic structural diagram of another data query method provided by an embodiment of the present application;

[0075] Figure 5 A schematic flowchart of a target result determination method provided by an embodiment of the present application;

[0076] Figure 6A flowchart of yet another target result determination method provided by an embodiment of the present application;

[0077] Figure 7 A flowchart of another target result determination method provided by an embodiment of the present application;

[0078] Figure 8 A flowchart of yet another query method based on a query result set provided by an embodiment of the present application;

[0079] Figure 9 A flowchart of a data query device provided by an embodiment of the present application;

[0080] Figure 10 A schematic diagram of a data query device provided by an embodiment of the present application. Detailed implementation manners

[0081] To make the objectives, technical solutions, and advantages of the embodiments of the present application clearer, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present application. Apparently, the described embodiments are some but not all of the embodiments of the present application. All other embodiments obtained by those of ordinary skill in the art based on the embodiments of the present application without creative efforts shall fall within the protection scope of the present application.

[0082] The following disclosure provides many different embodiments or examples for implementing different structures of the present invention. To simplify the disclosure of the present invention, the components and settings of specific examples are described below. Of course, they are only examples and are not intended to limit the present invention. In addition, the present invention may repeat reference numerals and / or letters in different examples. Such repetition is for the purpose of simplification and clarity and does not in itself indicate the relationship between the various embodiments and / or settings discussed.

[0083] With the development of big data technology, the lakehouse architecture has been recognized by more and more customers and applied to actual environments. The data of the lakehouse architecture is stored separately in the data lake component. Therefore, when querying data, it is necessary to query in the data lake component, and the query speed is relatively slow. To solve the problem of relatively slow query speed, every time the user terminal obtains a query result, the query result will be stored in the local disk. Then, when querying again based on the same query conditions next time, the query will be first performed in the local disk. If the query fails, the query will be performed in the data lake component. However, due to the small size of the user terminal, the storage capacity of its local disk is limited. To avoid the local disk affecting the performance of the user terminal, the user terminal will regularly clear historical data or use new query results to overwrite old query results, resulting in a relatively large amount of calculation for re-querying in the data lake component based on previous query conditions.

[0084] To solve the above problems, an embodiment of the present application provides a data query method, which is applied to the Figure 1 structure shown. Among them, the user terminal is an intelligent device such as a mobile phone, a tablet computer, or a notebook. The user can trigger a data query operation in the user terminal, and then generate a query request according to this operation, and send the query request to the proxy service. The proxy service is a server for data forwarding and related processing. The proxy service can receive the query request sent by the user terminal and send the query request to the query service. The query service is used to query based on the query request in the historical query results and send the target result to the proxy service. When the proxy service receives the target result, the proxy service detects whether the target result includes the target query result. When the target result includes the target query result, the proxy service forwards the target query result to the user terminal. When the target result does not include the target query result, the proxy service sends the query request to the data lake component set to obtain the target query result in the data lake component set. When the proxy service receives the target query result obtained in the data lake component set, the proxy service sends the target query result to the user terminal and the query service.

[0085] In summary, an embodiment of the present application provides a data query method. Since the query service in this method does not need to regularly clear the historical query results or use new query results to overwrite the old query results, it can re-query in the query service based on the previous query conditions, reducing the amount of calculation. As Figure 2 shown, the specific steps include:

[0086] Step 201, receive the query request sent by the user terminal.

[0087] Among them, the query request includes the target query condition.

[0088] In this step, the user terminal can display a data query page, which includes a keyword input box and a query button. The user can enter a keyword in the keyword input box and click the query button. When the user terminal detects the trigger operation of the query button, it obtains the keyword in the keyword input box, generates a query request based on the keyword, and sends the query request to the proxy service so that the proxy service receives the query request.

[0089] Alternatively, the data query page includes multiple condition options and an OK button. The user can select the condition options and click the OK button. When the user terminal detects the trigger operation of the OK button, it obtains the selected conditions, generates a query request according to these conditions, and sends the query request to the proxy service so that the proxy service receives the query request.

[0090] Of course, other methods can also be used to trigger the client to generate a query request, which is not limited here.

[0091] Step 202: Send the query request to the query service so that the query service can perform a query according to the target query condition and return a target result.

[0092] Among them, the query service stores historical query results. In the embodiments of the present application, when it is necessary to use the data lake component to perform a data query, the data lake component will send the query result to the proxy service so that the proxy service can send the query result to the query service for storage. Based on such a method, historical query results will be stored in the query service.

[0093] In this step, the proxy service sends the query request to the query service. When the query service receives the query request, it parses the query request to obtain the target query condition, and then performs a query according to the target query condition to obtain a target result and returns it to the proxy service.

[0094] It should be noted that according to the target query condition, the query service may or may not query the corresponding result. Therefore, the target result may or may not include the query result.

[0095] Step 203: When the target result includes the target query result, send the target query result to the client so that the client can perform corresponding processing based on the target query result.

[0096] Among them, the target query result is the query result corresponding to the target query condition, that is, the query result obtained by performing a query based on the target query condition.

[0097] In this step, it is detected whether the target result includes the target query result. When the target result includes the target query result, the target query result is sent to the client so that the client can perform display or other processing based on the target query result.

[0098] Furthermore, when the query service fails to find the target query result, it will return a preset result to the proxy service to inform the proxy service that the target query result has not been queried. In this way, when the proxy service receives the target result returned by the query service, it detects whether the target result is the preset result. When the target result is not the preset result, it is determined that the target result includes the target query result. When the target result is the preset result, it is determined that the target result does not include the target query result. Among them, the preset result is used to indicate that the target query result has not been queried.

[0099] Further, a target parameter can be set in the target result. By detecting whether the target parameter is a preset value, it is determined whether the target result includes the target query result. The specific steps include: obtaining the target parameter in the target result, detecting whether the target parameter is a preset parameter. When the target parameter is a preset parameter, it is determined that the target result includes the target query result. When the target parameter is not a preset parameter, it is determined that the target result does not include the target query result.

[0100] Of course, other methods can also be used in this step to detect whether the target result includes the target query result, which is not limited here.

[0101] In the embodiment of the present application, a query request sent by the user terminal is received. The query request includes a target query condition; the query request is sent to the query service so that the query service performs a query according to the target query condition and returns a target result; when the target result includes the target query result, the target query result is sent to the user terminal so that the user terminal performs corresponding processing based on the target query result; where the target query result is the query result corresponding to the target query condition. It can be seen that the present application first performs a query in the query service, and the query service is not affected by the user terminal, and there is no need to regularly clear the historical query results or use new query results to overwrite the old query results. Therefore, it is possible to re-query in the query service based on the previous query conditions, reducing the amount of calculation.

[0102] Based on the above embodiment of the application, when the target result does not include the target query result, the proxy server needs to send the query request to the data lake component so that the data lake component performs a data query based on the query request. However, if the query is performed based on all data lake components, it will take a lot of time. Therefore, the proxy service can also determine the first component to be used according to the target business type in the query request, and then perform a data query in the first component. Therefore, the embodiment of the present application provides a method for performing data query based on the first component. The method is as Figure 3 shown, and the specific steps include:

[0103] Step 301, when the target result does not include the target query result, determine the first component to be used in the data lake component set according to the target business type.

[0104] Among them, the data lake component set includes multiple subsets, each subset corresponds to a business type, and each subset includes at least one data lake component.

[0105] In this step, when the target result does not include the target query result, it indicates that the query service has not queried the target query result. Therefore, the proxy service can determine the subset corresponding to the target business type according to the target business type in the query request, and determine the data lake components in this subset as the first components to be used.

[0106] Step 302: Send the query request to the first component so that the first component uses the target query condition to perform a query and obtain the target query result.

[0107] In this step, the proxy service can send the query request to the first component so that the first component performs a query based on the target query condition, obtains the target query result, and returns the target query result to the proxy service.

[0108] Furthermore, when there are multiple first components, the proxy service can send the query request to each first component and receive the results returned by each first component. Then, the proxy service performs related processing such as fusion and filtering on these results to obtain the target query result. Or, the proxy service sends the query request to the management device of the first component so that the management device returns the target query result.

[0109] In the implementation of this application, as Figure 4 shown, the query service includes query services corresponding to different data lake components. In this case, the proxy service needs to determine the second component to be used according to the target business type in the query request, and then perform a query in the query service corresponding to the second component according to the target query condition to obtain the target result. Therefore, the embodiments of this application provide a method for determining the target result, and the method is as Figure 5 described, and the specific steps include:

[0110] Step 501: Determine the second component to be used in the data lake component set according to the target business type.

[0111] This step is similar to step 401 and will not be elaborated here one by one.

[0112] Step 502: Send the query request to the query service corresponding to the second component so that the query service corresponding to the second component performs a query according to the target query condition, obtains the target result, and returns the target result.

[0113] Among them, the data lake component set includes multiple subsets, each subset corresponds to a business type and a query service, and the query service corresponding to this subset stores the historical query results obtained based on this subset, that is, when a query result is obtained based on a certain subset, the query result is stored in the query service corresponding to this subset.

[0114] In this step, the proxy service sends the query request to the query service corresponding to the second component. After receiving the query request, the query service performs a query according to the target query condition. When the target query result is found, the target result is obtained based on the target query result. When the target query result is not found, the preset result is determined as the target result, and then the target result is sent to the proxy service.

[0115] It should be noted that when the target result includes the target query result, the proxy service sends the target query result to the proxy service. When the target result does not include the target query result, the proxy service sends the query request to the second component so that the second component performs a query based on the target query condition to obtain the target query result.

[0116] In the embodiment of the present application, the query service stores the corresponding relationship between the query condition and the query result. Therefore, the query service can perform a query according to the target query condition and this corresponding relationship to obtain the target result. Therefore, the embodiment of the present application provides a method for determining the target result, and the method is as Figure 6 shown, and the specific steps include:

[0117] Step 601, obtain the corresponding relationship between the pre-created query condition and the query result.

[0118] In this step, the query service can receive the query condition and the query result sent by the proxy service, and create the corresponding relationship between the query condition and the query result based on the query condition and the query result.

[0119] It should be noted that when the proxy service receives the target query result returned by the first component, the proxy service sends the target query result and the target query condition to the query service so that the query service establishes a corresponding relationship based on the target query result and the target query condition. The specific steps are: obtain the target query result obtained based on the first component; send the target query condition and the target query result to the query service so that the query service stores them based on the target query condition and the target query result.

[0120] Step 602, in the corresponding relationship, detect whether there is a target query result corresponding to the target query condition.

[0121] Wherein, the target query result is the query result corresponding to the target query condition.

[0122] In this step, in the corresponding relationship between the query condition and the query result, detect whether there is a target query result. When there is a target query result, the target query result can be directly determined as the target result for return.

[0123] Step 603, when there is a target query result corresponding to the target query condition, obtain the target result according to the target query result.

[0124] In this step, when there is a target query result, the target result can be generated according to preset parameters and the target query result, or the target result can be generated only based on the target query result, which is not limited here.

[0125] Step 604, when there is no target query result corresponding to the target query condition, use a preset result determination strategy to determine the target result.

[0126] In this step, when there is no target query result, there are two cases. One is that the target query result can be determined based on the existing historical query results, and the other is that the target query result cannot be determined based on the existing historical query results, and only the preset result can be returned to the proxy service. Based on the above situation, the query service is set with a result determination strategy, and then based on this result determination strategy, the target result is determined.

[0127] Step 605, send the target result to the proxy service.

[0128] In this step, the query service sends the target result to the proxy service so that the proxy service can perform corresponding operations according to the target result.

[0129] In the embodiment of the present application, when there is no target query result in the query service, the target query result may also be calculated based on some query results. This situation often occurs when the target query condition includes multiple sub-conditions. When the target query condition includes multiple sub-conditions, the query service can find the query results that meet at least one sub-condition, and then based on these query results, detect whether there is a target query result corresponding to the target query condition, and then obtain the target result. Therefore, the embodiment of the present application provides a method for determining a target result, and this method is as Figure 7 shown, and the specific steps include:

[0130] Step 701, combine multiple sub-conditions to obtain a reference query condition corresponding to each combination method.

[0131] In this step, combine multiple sub-conditions to obtain all combination methods, and obtain the corresponding reference query condition for each combination method.

[0132] For example, assume that the target query condition includes three sub-conditions A, B, and C. The reference query conditions obtained based on this target query condition are A, B, C, AB, AC, and BC.

[0133] Step 702, in the corresponding relationship, determine the reference result set corresponding to each reference query condition.

[0134] For example, assume that the reference query conditions are A, B, C, AB, AC, and BC. Then, determine the reference result sets corresponding to A, B, C, AB, AC, and BC respectively.

[0135] Step 703, when there is a target object in the reference result sets, obtain a target query result according to the target object, and determine a target result according to the target query result.

[0136] Among them, each reference result set includes at least one object, and these objects all meet the corresponding reference query conditions. The target object is the object that exists in all reference result sets, which is the intersection of all reference result sets, that is, the target object is in all reference result sets.

[0137] In this step, compare the objects in these reference result sets, determine the objects included in all reference result sets, and determine these objects as target objects. Combine these target objects to obtain a target query result, and then determine a target result according to the target query result.

[0138] For example, in the reference result sets corresponding to A, B, C, AB, AC, and BC respectively, find the objects that these reference result sets have in common, determine this object as the target object, and obtain a target query result according to the target object.

[0139] It should be noted that if the query condition further includes an aggregation condition, the target object can also be divided according to this aggregation condition to obtain at least one target object set, and each target object set is aggregated to obtain a target query result. For example, the aggregation condition is to aggregate the objects belonging to the same user. Therefore, find the target objects belonging to the same user among these target objects to obtain at least one target object set, and aggregate each target object set to obtain a target query result.

[0140] Step 704, when there is no target object in the query result set, determine the preset result as the first query result.

[0141] Among them, the preset result is used to indicate that no target query result is found.

[0142] In the embodiments of the present application, the query service stores the result sets corresponding to each service type. Therefore, the target result set corresponding to the target service type can also be determined according to the target service type in the query request, and then the target result is queried in this target result set according to the target query condition and returned. Therefore, the embodiments of the present application provide a query method based on a query result set, and the method is as Figure 8 shown, and the specific steps include:

[0143] Step 801: Obtain the target result set corresponding to the target service type.

[0144] In this step, the query service stores the result set corresponding to each service type. Therefore, when the query service obtains the target service type in the query request, it determines the result set corresponding to the target service type and determines this result set as the target result set.

[0145] Step 802: Query according to the target query condition in the target result set and return the target result.

[0146] In this step, only when a query result that meets the target query condition is found in the target result set, so it is possible to query in the target result set according to the target query condition. Therefore, compared with finding results among all query results, the embodiments of the present application can save certain computing resources.

[0147] As Figure 9 shown, the embodiments of the present application provide a data query device, which corresponds to the method embodiments and specifically includes:

[0148] A receiving unit 901, configured to receive a query request sent by a user terminal, where the query request includes a target query condition;

[0149] A first query unit 902, configured to send the query request to the query service, so that the query service queries according to the target query condition and returns a target result, where the query service stores historical query results;

[0150] A sending unit 903, configured to send the target query result to the user terminal when the target result includes the target query result, so that the user terminal performs corresponding processing based on the target query result; where the target query result is the query result corresponding to the target query condition.

[0151] Optionally, the query request further includes a target service type, and the device further includes a second query unit 904. The second query unit 904 is configured to:

[0152] When the target result does not include the target query result, determine a first component to be used in the data lake component set according to the target service type;

[0153] Send the query request to the first component, so that the first component queries using the target query condition to obtain the target query result.

[0154] Optionally, the query service includes query services corresponding to different data lake components. The first query unit 902 is configured to:

[0155] Determine a second component to be used in the set of data lake components according to the target business type;

[0156] Send the query request to the query service corresponding to the second component, so that the query service corresponding to the second component performs a query according to the target query condition, obtains a target result, and returns the target result.

[0157] Optionally, the first query unit 902 is used for:

[0158] Obtain the corresponding relationship between the pre-created query conditions and query results;

[0159] Detect whether there is a target query result corresponding to the target query condition in the corresponding relationship;

[0160] When there is a target query result corresponding to the target query condition, obtain the target result according to the target query result;

[0161] When there is no target query result corresponding to the target query condition, use a preset result determination strategy to determine the target result;

[0162] Send the target result to the proxy service.

[0163] Optionally, when the query condition includes multiple sub-conditions, the first query unit 902 is used for:

[0164] Combine multiple sub-conditions to obtain a reference query condition corresponding to each combination method;

[0165] In the corresponding relationship, determine a reference result set corresponding to each reference query condition;

[0166] When there is a target object in the reference result set, obtain a target query result according to the target object, and determine the target result according to the target query result, where the target object is an object existing in all reference result sets;

[0167] When there is no target object in the reference result set, determine the preset result as the target result.

[0168] Optionally, the query request further includes a target business type, and the first query unit 902 is used for:

[0169] Obtain a target result set corresponding to the target business type;

[0170] Query in the target result set according to the target query condition and return the target result.

[0171] Optionally, the device further includes a third query unit 905, and the third query unit 905 is configured to:

[0172] Obtain a target query result obtained based on the first component;

[0173] Send the target query condition and the target query result to the query service, so that the query service stores based on the target query condition and the target query result.

[0174] As Figure 10 shown, an embodiment of the present application provides a data query device, including a processor 1001, a communication interface 1002, a memory 1003, and a communication bus 1004. Among them, the processor 1001, the communication interface 1002, and the memory 1003 complete mutual communication through the communication bus 1004,

[0175] The memory 1003 is used to store computer programs;

[0176] In an embodiment of the present application, when the processor 1001 is used to execute the program stored on the memory 1003, it implements the data query method provided by any of the foregoing method embodiments, including:

[0177] Receive a query request sent by the user terminal, where the query request includes a target query condition;

[0178] Send the query request to the query service, so that the query service queries according to the target query condition and returns a target result, where the query service stores historical query results;

[0179] When the target result includes a target query result, send the target query result to the user terminal, so that the user terminal performs corresponding processing based on the target query result;

[0180] Wherein, the target query result is a query result corresponding to the target query condition.

[0181] An embodiment of the present application further provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, it implements the steps executed by the data query method provided by any of the foregoing method embodiments.

[0182] The device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed to multiple network units. Some or all of the modules can be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0183] Through the description of the above embodiments, those skilled in the art can clearly understand that each embodiment can be implemented by means of software plus a general hardware platform, and of course, it can also be implemented by hardware. Based on such an understanding, the above technical solution, in essence, or the part that makes a contribution to the related technology, can be embodied in the form of a software product. This computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, magnetic disk, optical disk, etc., and includes several instructions to enable a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in each embodiment or some parts of the embodiments.

[0184] It should be understood that the terms used herein are for the purpose of describing specific example embodiments only and are not intended to be limiting. Unless the context clearly indicates otherwise, the singular forms "a", "an", and "the" as used herein may also include the plural forms. The terms "comprising", "including", "containing", and "having" are inclusive and thus specify the presence of the stated features, steps, operations, elements, and / or components, but do not preclude the presence or addition of one or more other features, steps, operations, elements, components, and / or combinations thereof. The method steps, processes, and operations described herein are not to be construed as necessarily requiring them to be executed in the particular order described or illustrated, unless the execution order is explicitly stated. It should also be understood that additional or alternative steps can be used.

[0185] The above description is only the specific implementation manners of the present invention, enabling those skilled in the art to understand or implement the present invention. Various modifications to these embodiments will be obvious to those skilled in the art, and the general principles defined herein can be implemented in other embodiments without departing from the spirit or scope of the present invention. Therefore, the present invention will not be limited to these embodiments shown herein, but will be accorded the widest scope consistent with the principles and novel features claimed herein.

Claims

1. A data query method, characterized in that: The method comprises: Receiving a query request sent by a user terminal, wherein the query request includes a target query condition; Sending the query request to a query service, so that the query service performs a query according to the target query condition and returns a target result, wherein the query service stores historical query results; When the target result includes a target query result, sending the target query result to the user terminal, so that the user terminal performs corresponding processing based on the target query result; Among them, the target query result is the query result corresponding to the target query condition.

2. The method according to claim 1, characterized in that: The query request also includes a target business type, and the method further includes: When the target result does not include the target query result, determining a first component to be used in the data lake component set according to the target business type; The query request is sent to the first component, so that the first component uses the target query condition to perform a query and obtain the target query result.

3. The method according to claim 1, characterized in that: The query request also includes a target business type, the query service includes query services corresponding to different data lake components, and the query is performed according to the target query condition and the target result is returned, including: According to the target business type, determining a second component to be used in the data lake component set; The query request is sent to the query service corresponding to the second component, so that the query service corresponding to the second component performs a query according to the target query condition, obtains a target result, and returns the target result.

4. The method according to claim 1, characterized in that: The querying according to the target query condition and returning the target result includes: Get the correspondence between pre-created query conditions and query results; In the corresponding relationship, detecting whether there is a target query result corresponding to the target query condition; When there is a target query result corresponding to the target query condition, obtaining a target result according to the target query result; When there is no target query result corresponding to the target query condition, using a preset result determination strategy to determine the target result; The target result is sent to the proxy service.

5. The method according to claim 4, characterized in that: When the query condition includes multiple sub-conditions, the using a preset result determination strategy to determine the target result includes: Combine multiple sub-conditions to obtain reference query conditions corresponding to each combination; In the corresponding relationship, determining a reference result set corresponding to each reference query condition; When the target object exists in the reference result set, a target query result is obtained according to the target object, and the target result is determined according to the target query result, wherein the target object is an object existing in all reference result sets; When the target object does not exist in the reference result set, a preset result is determined as the target result.

6. The method according to claim 1, characterized in that: The query request also includes a target business type, and the query is performed according to the target query condition, and the target result is returned, including: Obtain a target result set corresponding to the target business type; According to the target query condition, a query is performed in the target result set, and the target result is returned.

7. The method according to claim 2, characterized in that: The method further comprises: Obtaining a target query result obtained based on the first component; The target query condition and the target query result are sent to a query service, so that the query service performs storage based on the target query condition and the target query result.

8. A data query device, characterized in that: The device comprises: A receiving unit, configured to receive a query request sent by a user terminal, wherein the query request includes a target query condition; A first query unit, configured to send the query request to a query service, so that the query service performs a query according to the target query condition and returns a target result, wherein the query service stores historical query results; A sending unit is used to send the target query result to the user terminal when the target result includes a target query result, so that the user terminal performs corresponding processing based on the target query result; wherein the target query result is a query result corresponding to the target query condition.

9. A data query device, characterized in that: include: at least one communication interface; at least one bus connected to the at least one communication interface; at least one processor connected to the at least one bus; at least one memory connected to the at least one bus, wherein the processor is configured to: Receiving a query request sent by a user terminal, wherein the query request includes a target query condition; Sending the query request to a query service, so that the query service performs a query according to the target query condition and returns a target result, wherein the query service stores historical query results; When the target result includes a target query result, sending the target query result to the user terminal, so that the user terminal performs corresponding processing based on the target query result; Among them, the target query result is the query result corresponding to the target query condition.

10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the data query method according to any one of claims 1 to 7 is implemented.