Data query method, device and terminal equipment

By obtaining the matching degree of feature values ​​and distribution features of candidate data from the database, the problem of low accuracy of data feedback was solved, and the stability and accuracy of the data were improved.

CN116186074BActive Publication Date: 2025-11-07CHINA CONSTRUCTION BANK +1
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202310016844.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-01-06
Publication Date
2025-11-07
Estimated Expiration
2043-01-06

AI Technical Summary

Technical Problem

In existing technologies, the accuracy of data feedback obtained from databases is relatively low, and further filtering is needed to improve data quality.

Method used

By obtaining the feature values ​​of candidate data in each query dimension, we can determine its distribution characteristics, and then determine whether the candidate data is the data to be returned based on the matching degree between the distribution characteristics of each query dimension.

Benefits of technology

This improved the stability and accuracy of the returned data, and enhanced the user experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116186074B_ABST
    Figure CN116186074B_ABST
Patent Text Reader

Abstract

The present disclosure provides a data query method and device and a terminal device, and relates to the technical field of big data. The method comprises the following steps: obtaining candidate data matched with the query condition of each query dimension and the characteristic value of the candidate data in the query dimension from a database; determining the distribution characteristics of the candidate data in each query dimension according to the characteristic value of the candidate data in each query dimension; determining the matching degree between the distribution characteristics of the candidate data in each query dimension; and determining whether the candidate data is the data to be returned according to the matching degree between the distribution characteristics of the candidate data in each query dimension. Thus, the stability of the returned data can be ensured, the quality and accuracy of the returned data are improved, the satisfaction of the user with the returned data is improved, and the user experience is improved.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present disclosure relates to the technical field of big data, and particularly relates to a data query method and device and a terminal device. BACKGROUND

[0002] In the related art, after data is obtained from a database, the data is directly fed back to a user according to the order in which each piece of data is obtained. When the queried data is relatively large, the data needs to be further filtered to feed back data with better quality to the user, so as to improve the quality and accuracy of the fed back data. SUMMARY

[0003] The present disclosure provides a data query method and device to at least solve the problem of low accuracy of fed back data. The technical solutions of the present disclosure are as follows.

[0004] According to a first aspect of an embodiment of the present disclosure, the embodiment of the present disclosure provides a data query method, comprising:

[0005] obtaining candidate data matched with a query condition of each query dimension and a feature value of the candidate data in the query dimension from a database;

[0006] determining a distribution feature of the candidate data in each query dimension according to the feature value of the candidate data in each query dimension;

[0007] determining a matching degree between the distribution features of the candidate data in each query dimension;

[0008] determining whether the candidate data is to-be-returned data according to the matching degree between the distribution features of the candidate data in each query dimension.

[0009] According to a second aspect of an embodiment of the present disclosure, the embodiment of the present disclosure provides a data query device, comprising:

[0010] an obtaining module, configured to obtain candidate data matched with a query condition of each query dimension and a feature value of the candidate data in the query dimension from a database;

[0011] a determining module, configured to determine a distribution feature of the candidate data in each query dimension according to the feature value of the candidate data in each query dimension;

[0012] a matching module, configured to determine a matching degree between the distribution features of the candidate data in each query dimension;

[0013] a returning module, configured to determine whether the candidate data is to-be-returned data according to the matching degree between the distribution features of the candidate data in each query dimension.

[0014] According to a third aspect of an embodiment of the present disclosure, a terminal device is provided, comprising:

[0015] a processor;

[0016] a memory for storing processor-executable instructions;

[0017] The processor is configured to execute the instructions to implement the data query method according to the first aspect.

[0018] According to a fourth aspect of the embodiments of the present disclosure, a computer-readable storage medium is provided, when the instructions in the computer-readable storage medium are executed by the processor of the terminal device, the terminal device can execute the data query method according to the first aspect.

[0019] According to a fifth aspect of the embodiments of the present disclosure, a computer program product is provided, comprising a computer program, when the computer program is executed by the processor, the data query method according to the first aspect is implemented.

[0020] The technical solutions provided by the embodiments of the present disclosure at least have the following beneficial effects: after the candidate data matched with the query condition of each query dimension is obtained from the database and the feature value of the candidate data in the query dimension, the distribution characteristics of the candidate data in each query dimension can be determined according to the feature value of the candidate data in each query dimension, then the matching degree between the distribution characteristics of the candidate data in each query dimension is determined, and whether the candidate data is the data to be returned is determined according to the matching degree between the distribution characteristics of the candidate data in each query dimension. Therefore, by determining the distribution characteristics of the candidate data in each query dimension according to the feature value of the candidate data in each query dimension, and determining whether the candidate data is the data to be returned according to the matching degree between the distribution characteristics of the candidate data in each query dimension, the stability of the returned data is guaranteed, the quality and accuracy of the returned data are improved, and the user's satisfaction with the returned data is improved, and the user experience is improved.

[0021] It should be understood that the above general description and the following detailed description are only exemplary and explanatory, and cannot limit the present disclosure. BRIEF DESCRIPTION OF DRAWINGS

[0022] The accompanying drawings incorporated in the specification and constituting a part of it illustrate embodiments consistent with the present disclosure and serve to explain the principles of the present disclosure together with the specification, and do not limit the present disclosure.

[0023] Figure 1 A flowchart of a data query method provided for the first embodiment of the present disclosure;

[0024] Figure 2 A flowchart of another data query method provided for the second embodiment of the present disclosure;

[0025] Figure 3 A flowchart of another data query method provided by a third embodiment of the present disclosure is shown in FIG. 6.

[0026] Figure 4 A structural diagram of a data query device provided by a fourth embodiment of the present disclosure is shown in FIG. 7.

[0027] Figure 5 A block diagram of a terminal device for data query is shown according to an exemplary embodiment. DETAILED DESCRIPTION

[0028] In order for those skilled in the art to better understand the technical solutions of the present disclosure, the technical solutions in the embodiments of the present disclosure will be described clearly and completely below with reference to the drawings.

[0029] In the technical solutions of the present disclosure, the acquisition, storage, use, processing, etc. of data all comply with relevant provisions of national laws and regulations.

[0030] It should be noted that the terms "first", "second", etc. in the specification and claims of the present disclosure and the above-mentioned drawings are used to distinguish similar objects, and do not necessarily describe a specific order or sequence. It should be understood that the data thus used can be interchanged under appropriate circumstances, so that the embodiments of the present disclosure described herein can be implemented in an order other than that illustrated or described herein. The implementation described in the following exemplary embodiments does not represent all implementations consistent with the present disclosure. Rather, they are merely examples of devices and methods consistent with some aspects of the present disclosure as detailed in the appended claims.

[0031] In the present disclosure, by determining the distribution characteristics of the candidate data in each query dimension according to the characteristic values of the candidate data in each query dimension, and determining whether the candidate data is the data to be returned according to the matching degree between the distribution characteristics of the candidate data in each query dimension, the stability of the returned data is ensured, thereby improving the quality and accuracy of the returned data, and further improving the user's satisfaction with the returned data and improving the user experience.

[0032] The data query method of the embodiments of the present disclosure is executed by the data query device (hereinafter referred to as the query device) provided by the embodiments of the present disclosure. The device can be configured in a computer device or the like to solve the problem of low accuracy of the feedback data.

[0033] The data query method and device of the embodiments of the present disclosure will be described below with reference to the drawings.

[0034] Figure 1 A flowchart of a data query method provided by an embodiment of the present disclosure includes the following steps.

[0035] Step 101, obtaining candidate data matching the query condition of each query dimension and the characteristic value of the candidate data in the query dimension from the database.

[0036] In the present disclosure, when the user needs to query the customer group satisfying the condition, the user can configure each query dimension, the query condition corresponding to each query dimension and the logical relationship between each query condition in the client page. After the configuration is completed, the user can trigger the query control to query the data. When the client detects that the query control is triggered, the client can obtain and send each query dimension configured by the user, the query condition corresponding to each query dimension and the logical relationship between each query condition to the query device. Then the query device can obtain the candidate data matching the query condition of each query dimension and the characteristic value of the candidate data in the query dimension from the database.

[0037] Optionally, when the characteristic value of a certain candidate data in a certain query dimension is empty, similar data matching the characteristic value of the candidate data in the remaining dimensions can be obtained from the database. Then, the characteristic value of the candidate data in the query dimension can be completed based on the characteristic value of the similar data in the query dimension, so that the data is complete.

[0038] Step 102, determining the distribution feature of the candidate data in each query dimension according to the characteristic value of the candidate data in each query dimension.

[0039] In the present disclosure, the difference between the maximum characteristic value and the minimum characteristic value of a certain query dimension of the candidate data can be calculated, and the difference is divided by a preset value to determine the reference interval length. Then, the minimum characteristic value of the query dimension is added by 1 to the preset value times the reference interval length to determine each reference interval corresponding to the query dimension, and each reference interval is hierarchically divided according to the value size in each reference interval. Then, the characteristic value of the candidate data in the query dimension is matched with each reference interval to determine the level corresponding to the characteristic value of the candidate data in the query dimension, which is the distribution feature of the candidate data in the query dimension.

[0040] For example, the maximum characteristic value of a certain query dimension is 10 and the minimum characteristic value is 2, and the query dimension is divided into 4 levels. Then, the reference interval corresponding to the first level is 10-8, the reference interval corresponding to the second level is 8-6, the reference interval corresponding to the third level is 6-4, and the reference interval corresponding to the fourth level is 4-2. Assuming that the characteristic value of a candidate data in the query dimension is 3, the distribution feature of the candidate data in the query dimension corresponds to the fourth level.

[0041] Optionally, the characteristic value of the candidate data in each query dimension can also be normalized to determine the distribution feature of the candidate data in each query dimension.

[0042] Step 103, determining the matching degree between the distribution characteristics of the candidate data in each query dimension.

[0043] In the present disclosure, the higher the stability of the candidate data, the better the quality of the candidate data. The stability of the candidate data can be indicated by the matching degree between the distribution characteristics of the candidate data in each query dimension. The higher the matching degree between the distribution characteristics of the candidate data in each query dimension, the more consistent the distribution of the candidate data in each query dimension, and the better the stability of the candidate data.

[0044] In the present disclosure, the matching degree between the distribution characteristics of the candidate data in each query dimension can be determined according to the difference between the distribution characteristics of the candidate data in each query dimension. The greater the difference between the distribution characteristics of the candidate data in each query dimension, the lower the matching degree between the distribution characteristics of the candidate data in each query dimension. For example, the distribution characteristics of a certain candidate data in a certain query dimension is four levels, and the distribution characteristics of another query dimension is two levels, then the difference between the distribution characteristics of the above two query dimensions is two levels.

[0045] Step 104, determining whether the candidate data is the data to be returned according to the matching degree between the distribution characteristics of the candidate data in each query dimension.

[0046] In the present disclosure, the sum of the matching degrees between the distribution characteristics of the candidate data in each query dimension can be compared with a preset threshold. When the sum of the matching degrees between the distribution characteristics of the candidate data in each query dimension is greater than the preset threshold, it indicates that the candidate data fluctuates less, the stability of the candidate data meets the user's demand, and the candidate data can be determined as the data to be returned. When the sum of the matching degrees between the distribution characteristics of the candidate data in each query dimension is less than the preset threshold, it indicates that the candidate data fluctuates more, the stability of the candidate data does not meet the user's demand, and the candidate data can be determined as not the data to be returned.

[0047] Optionally, when the matching degree between the distribution characteristics of any candidate data in each query dimension is greater than or equal to the threshold, it indicates that the candidate data fluctuates less, the stability of the candidate data meets the user's demand, and the candidate data can be determined as the data to be returned.

[0048] Optionally, when the matching degree between the distribution characteristics of any candidate data in at least one query dimension and the distribution characteristics of other query dimensions is less than the threshold, it indicates that the candidate data fluctuates more, the stability of the candidate data does not meet the user's demand, and the candidate data is determined as not the data to be returned.

[0049] Optionally, each data to be returned can be sorted in order of the matching degree between the distribution characteristics in each query dimension from high to low and returned. So as to facilitate the user to select the data with higher stability.

[0050] Optionally, the credit risk detection indexes in the candidate data, such as the non-performing loan rate, the overdue loan rate, the loan risk migration rate, the expected loss rate, and the associated credit ratio, can be weighted and averaged to determine the credit risk gray degree of the candidate data. Then, the candidate data with a risk gray degree greater than a threshold value is deleted, thereby improving the quality of the candidate data.

[0051] In the present disclosure, after the candidate data matching the query condition of each query dimension and the feature values of the candidate data in the query dimension are obtained from the database, the distribution characteristics of the candidate data in each query dimension can be determined according to the feature values of the candidate data in each query dimension. Then, the matching degree between the distribution characteristics of the candidate data in each query dimension is determined, and whether the candidate data is the data to be returned is determined according to the matching degree between the distribution characteristics of the candidate data in each query dimension. In this way, by determining the distribution characteristics of the candidate data in each query dimension according to the feature values of the candidate data in each query dimension, and determining whether the candidate data is the data to be returned according to the matching degree between the distribution characteristics of the candidate data in each query dimension, the stability of the returned data is ensured, the quality and accuracy of the returned data are improved, and the user's satisfaction with the returned data is improved, thereby improving the user experience.

[0052] Figure 2 Another data query method is provided in the present disclosure.

[0053] As shown in Figure 2 , the method comprises:

[0054] Step 201: obtaining, from a database, candidate data matching the query condition of each query dimension and feature values of the candidate data in the query dimension.

[0055] In the present disclosure, the specific implementation process of step 201 can be referred to the detailed description of any embodiment of the present disclosure, which will not be repeated here.

[0056] Step 202: in response to any query dimension being a first type dimension, determining the number of quantile points of each candidate data in any query dimension according to the feature values of the candidate data in the query dimension.

[0057] The first type dimension can be a dimension in which the larger the user-specified feature value is, the better it is. For example, the deposit balance, the fund investment amount, etc.

[0058] In the present disclosure, the feature values of each candidate data in a certain query dimension can be normalized, and the normalized values corresponding to the feature values are determined as the quantile points of the corresponding candidate data in the query dimension.

[0059] Optionally, in order to improve the accuracy of the data to be returned, candidate data in extreme cases can be deleted. The number of quantile points of each candidate data on each query dimension can be compared with a preset range, and when any quantile point is not within the preset range, the candidate data is determined as data in an extreme case. For example, the number of quantile points of the candidate data on a certain query dimension is not between 0.02-0.97, and the candidate data is deleted.

[0060] In step 203, the number of quantile points of the candidate data corresponding to any query dimension is determined as the distribution feature of the candidate data on any query dimension.

[0061] In the present disclosure, the number of quantile points of the candidate data corresponding to a certain query dimension can be directly determined as the distribution feature of the candidate data on the query dimension.

[0062] Alternatively, the number of quantile points of the candidate data corresponding to the query dimension can also be processed by grading, and the grade of the candidate data corresponding to the query dimension is determined as the distribution feature of the candidate data on the query dimension.

[0063] It can be understood that the greater the distribution feature of the candidate data corresponding to the first type dimension, the better the quality of the candidate data.

[0064] In step 204, in response to any query dimension being a second type dimension, the number of quantile points of each candidate data corresponding to any query dimension is determined according to the feature value of each candidate data on any query dimension.

[0065] The second type dimension can be a dimension in which the smaller the feature value specified by the user, the better. For example, the number of overdue days, the overdue amount, etc.

[0066] In step 205, the difference between the preset value and the number of quantile points of the candidate data corresponding to the query dimension is determined as the distribution feature of the candidate data on the query dimension.

[0067] In the present disclosure, in order to ensure that the trend of the distribution feature on the second type dimension is the same as the trend of the distribution feature on the first type dimension, in the case of a certain query dimension being a second type dimension, the difference between the preset value and the number of quantile points of the candidate data corresponding to the query dimension can be determined as the distribution feature of the candidate data on the query dimension. Thus, the stability of each candidate data can be determined according to the distribution feature of each candidate data on each query dimension.

[0068] For example, the preset value is 1, and the number of quantile points of a certain candidate data on the number of overdue days dimension is 0.01. 0.99 can be determined as the distribution feature of the candidate data on the number of overdue days dimension. Thus, on the number of overdue days dimension, the greater the distribution feature of the candidate data corresponding to the candidate data, the better the quality of the candidate data, which is consistent with the trend of the distribution feature on the first type dimension.

[0069] Step 206, determining the matching degree between the distribution characteristics of the candidate data in each query dimension.

[0070] Step 207, determining whether the candidate data is the data to be returned according to the matching degree between the distribution characteristics of the candidate data in each query dimension.

[0071] In the present disclosure, the specific implementation process of steps 206-207 can refer to the detailed description of any embodiment of the present disclosure, which will not be repeated here.

[0072] In the present disclosure, in the case that any query dimension is the first type dimension, the number of quantile points corresponding to each candidate data in any query dimension is determined according to the characteristic value of each candidate data in the query dimension, and the number of quantile points corresponding to the candidate data in any query dimension is determined as the distribution characteristic of the candidate data in the query dimension. In the case that any query dimension is the second type dimension, the number of quantile points corresponding to each candidate data in any query dimension is determined according to the characteristic value of each candidate data in the query dimension, and the difference between the preset value and the number of quantile points corresponding to the candidate data in the query dimension is determined as the distribution characteristic of the candidate data in the query dimension. Thus, it is ensured that the distribution characteristic trend on the first type dimension is the same as the distribution characteristic trend on the second type dimension, so as to accurately determine the stability of each candidate data according to the distribution characteristic of each candidate data in each query dimension, which is further conducive to improving the accuracy of the data to be returned.

[0073] Figure 3 Another data query method provided by the embodiment of the present disclosure.

[0074] As shown in the method, the method comprises: Figure 3

[0075] Step 301, obtaining a data query request, wherein the query request includes at least one query dimension and the query condition of the query dimension.

[0076] ​In the present disclosure, when a user needs to query a customer group meeting some conditions, the user can select one or more tags corresponding to the customer group in the client page. For example, the tags corresponding to the pre-set enterprise customer group can include but are not limited to: financial characteristics, association relationship, business status, risk compliance, ecological scenario, etc. In addition, the tags corresponding to the pre-set individual customer group that can be selected include but are not limited to: identity characteristics, behavior preference, performance ability, credit record, etc. Then, the client can display one or more query dimensions corresponding to each tag selected by the user in the page, and the user can input the operator and value corresponding to each query dimension in the page. When the user completes the setting of the operator and value corresponding to each query dimension and triggers the query button, the client can analyze the operator and value corresponding to each query dimension to generate the query condition corresponding to each query dimension. Then, the client can generate a query request according to the query dimension and the query condition of the query dimension, and send the query statement to the query device.

[0077] In addition, when the feature values in a certain query dimension corresponding to each tag selected by the user are enumerable, and the feature values in the query dimension have a containing relationship, for example, agriculture contains grain planting in the industry tag, and grain planting contains rice planting. The client can display each feature value of the query dimension in the page based on the query tree structure. The user can select the maximum range of feature values corresponding to the query range in the query tree according to the demand of the query range demand, without the need to select each feature value in the query range. Thus, the efficiency of data query is improved.

[0078] Step 302, in the case that there is a corresponding query tree in any query dimension, the query tree corresponding to any query dimension is traversed to obtain the sub-feature values associated with the feature values in the query condition corresponding to any query dimension.

[0079] In the present disclosure, the query tree corresponding to the query dimension can be pre-set in the system. Then, the query tree corresponding to a certain query dimension is determined through query. Then, the sub-feature values contained in the feature values in the query condition can be obtained from the query tree.

[0080] Step 303, based on the sub-feature values, the query condition corresponding to any query dimension is expanded.

[0081] In the present disclosure, after obtaining the sub-feature values corresponding to a certain query dimension, the sub-feature values can be added to the query condition corresponding to the query dimension.

[0082] Step 304, the candidate data matching the query condition of each query dimension and the feature values of the candidate data in the query dimension are obtained from the database.

[0083] In step 305, distribution features of the candidate data in each query dimension are determined according to the feature values of the candidate data in each query dimension.

[0084] In step 306, a matching degree between the distribution features of the candidate data in each query dimension is determined.

[0085] In step 307, whether the candidate data is the data to be returned is determined according to the matching degree between the distribution features of the candidate data in each query dimension.

[0086] In the present disclosure, the specific implementation process of steps 304-307 can be referred to the detailed description of any embodiment of the present disclosure, which will not be repeated here.

[0087] In the present disclosure, by determining the distribution features of the candidate data in each query dimension according to the feature values of the candidate data in each query dimension, and determining whether the candidate data is the data to be returned according to the matching degree between the distribution features of the candidate data in each query dimension, the stability of the returned data is ensured, the quality and accuracy of the returned data are improved, and the user satisfaction with the returned data is improved, and the user experience is improved.

[0088] Figure 4 is a block diagram of a data query device according to an exemplary embodiment. Referring to Figure 4 The device includes an acquisition module 410, a determination module 420, a matching module 430, and a return module 440.

[0089] The acquisition module 410 is configured to acquire candidate data matched with the query condition of each query dimension and feature values of the candidate data in the query dimension from a database.

[0090] The determination module 420 is configured to determine distribution features of the candidate data in each query dimension according to the feature values of the candidate data in each query dimension.

[0091] The matching module 430 is configured to determine a matching degree between the distribution features of the candidate data in each query dimension.

[0092] The return module 440 is configured to determine whether the candidate data is the data to be returned according to the matching degree between the distribution features of the candidate data in each query dimension.

[0093] In a possible implementation manner of the present disclosure, the determination module 420 is configured to:

[0094] In response to any query dimension being a first type dimension, a number of quantile points of each candidate data in any query dimension is determined according to the feature values of the candidate data in any query dimension.

[0095] The number of quantile points corresponding to the candidate data in any query dimension is determined as the distribution feature of the candidate data in any query dimension.

[0096] In a possible implementation of the embodiment of the present disclosure, the determination module 420 is configured to:

[0097] In response to any query dimension being a second type dimension, the number of quantile points corresponding to each candidate data in any query dimension is determined according to the feature value of the candidate data in any query dimension.

[0098] The difference between the preset value and the number of quantile points corresponding to the candidate data in any query dimension is determined as the distribution feature of the candidate data in any query dimension.

[0099] In a possible implementation of the embodiment of the present disclosure, the return module 440 is configured to:

[0100] In response to the matching degree between the distribution features of any candidate data in each query dimension being greater than or equal to a threshold value, the candidate data is determined as the data to be returned; or

[0101] In response to the matching degree between the distribution feature of any candidate data in at least one query dimension and the distribution features of other query dimensions being less than a threshold value, the candidate data is determined as non-data to be returned.

[0102] In a possible implementation of the embodiment of the present disclosure, the embodiment further comprises a correction module configured to:

[0103] In response to the feature value of any candidate data in at least one query dimension being empty, similar data associated with any candidate data is obtained from a database based on the feature value of any candidate data in the remaining dimensions.

[0104] The feature value of any candidate data in at least one query dimension is completed based on the feature value of the similar data in at least one query dimension.

[0105] In a possible implementation of the embodiment of the present disclosure, the return module 440 is further configured to:

[0106] The data to be returned is returned in an order from high to low according to the matching degree between the distribution features of each query dimension.

[0107] In a possible implementation of the embodiment of the present disclosure, the acquisition module 410 is further configured to:

[0108] The data query request is acquired, wherein the query request includes at least one query dimension and a query condition of the query dimension.

[0109] In a case that there is a corresponding query tree for any query dimension, a query tree corresponding to the any query dimension is traversed to obtain a sub-feature value associated with a feature value in a query condition corresponding to the any query dimension;

[0110] The query condition corresponding to the any query dimension is extended based on the sub-feature value.

[0111] As to the apparatus in the above embodiments, the specific manners in which the respective modules perform operations have been described in detail in the embodiments of the method, and thus will not be described in detail here.

[0112] In the present disclosure, after obtaining the candidate data matching the query condition of each query dimension and the feature value of the query dimension of the candidate data from the database, the distribution characteristics of the candidate data in each query dimension can be determined according to the feature value of the candidate data in each query dimension, and then the matching degree between the distribution characteristics of the candidate data in each query dimension is determined, and whether the candidate data is the data to be returned is determined according to the matching degree between the distribution characteristics of the candidate data in each query dimension. Therefore, by determining the distribution characteristics of the candidate data in each query dimension according to the feature value of the candidate data in each query dimension, and determining whether the candidate data is the data to be returned according to the matching degree between the distribution characteristics of the candidate data in each query dimension, the stability of the returned data is ensured, the quality and accuracy of the returned data are improved, and the user's satisfaction with the returned data is improved, and the user experience is improved.

[0113] Figure 5 is a block diagram of a terminal device for data query according to an example embodiment.

[0114] As shown in Figure 5 the terminal device 500 includes:

[0115] a memory 510 and a processor 520, a bus 530 connecting different components including the memory 510 and the processor 520, and the memory 510 storing a computer program which, when executed by the processor 520, implements the data query method described in the embodiments of the present disclosure.

[0116] The bus 530 represents one or more of several types of bus structures, including a memory bus or memory controller, a peripheral bus, a graphics acceleration port, a processor or a local bus using any of a variety of bus structures. For example, these architectures include but are not limited to industry standard architecture (ISA) bus, micro channel architecture (MAC) bus, enhanced ISA bus, video electronics standards association (VESA) local bus, and peripheral component interconnect (PCI) bus.

[0117] Terminal device 500 typically includes a variety of computer system readable media. These media can be any available media that is accessible by terminal device 500 and includes both volatile and non- volatile media, removable and non-removable media.

[0118] The memory 510 also can include computer system readable media in the form of volatile memory, such as random access memory (RAM) 540 and / or cache memory 550. Terminal device 500 can further include other removable / non-removable, volatile / non-volatile computer system storage media. By way of example only, a storage system 560 can be provided for reading from and writing to a non-removable, non-volatile magnetic media (e.g., a "hard drive"). Figure 5 Although not shown, a magnetic disk drive can also be utilized in some embodiments to access and read / write from / to one or more magnetic disk drives (not shown) that can also be part of the storage system 560. As stated above, a disk drive can also be utilized in some embodiments to access and read / write from / to one or more non-volatile memory disk drives (not shown) that can also be part of the storage system 560. Figure 5 In some embodiments, a disk drive can be utilized to access and read / write from / to a non-volatile memory disk drive (not shown) that can also be part of the storage system 560. In such embodiments, one or more disk drives can be utilized to access and read / write from / to one or more non-volatile memory disk drives (not shown) that can also be part of the storage system 560. In these cases, the disk drive and / or disk drives and / or disk drives and / or disk drives can be connected to the bus 530 via one or more data media interfaces. The storage system 510 can include one or more program product(s) 570 having sets (e.g., one or more) of instructions 570 executable by the computer system 500. A set of the instructions 570 can represent a

[0119] Program / utility 580 having a set of instructions 570 for implementing embodiments of the disclosure can be stored in memory 510. The set of instructions 570 can include software elements of embodiments of the disclosure embodied in computer code, which can be implemented in software (e.g., object code), firmware, hardware, or a combination of software, firmware, and hardware appropriate for the particular computing platform 500. The set of instructions 570 can control the computer system 500 to perform the functions and / or methods of embodiments of the disclosure as described herein.

[0120] Terminal device 500 can also be in communication with one or more devices external to terminal device 500 (such as a keyboard, a pointing device, a display 591, etc.) and can communicate with one or more devices enabling user interaction with terminal device 500 and / or communication with one or more other computing devices (such as a network card, a modem, etc.). Such communication can occur via Input / Output (I / O) interface 592. Still yet, terminal device 500 can communicate with one or more networks (such as a local area network (LAN), a wide area network (WAN), and / or the Internet) through network adapter 593. As depicted, network adapter 593 is in communication with the other components of terminal device 500 through bus 530. It should be appreciated that although not shown, other hardware and / or software modules could be used in conjunction with terminal device 500. For example, microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, and data archival storage systems, etc., can be utilized.

[0121] Processor 520 executes the various functional applications and data processing by running programs stored in memory 510.

[0122] It should be noted that the implementation process and technical principles of the terminal device of the embodiment are described above in the explanation of the data query method of the embodiment of the present disclosure, which will not be described here.

[0123] In the present disclosure, after the candidate data matching the query condition of each query dimension and the feature value of the candidate data in the query dimension are obtained from the database, the distribution characteristics of the candidate data in each query dimension can be determined according to the feature value of the candidate data in each query dimension, and then the matching degree between the distribution characteristics of the candidate data in each query dimension is determined, and whether the candidate data is the data to be returned is determined according to the matching degree between the distribution characteristics of the candidate data in each query dimension. Therefore, by determining the distribution characteristics of the candidate data in each query dimension according to the feature value of the candidate data in each query dimension, and determining whether the candidate data is the data to be returned according to the matching degree between the distribution characteristics of the candidate data in each query dimension, the stability of the returned data is guaranteed, the quality and accuracy of the returned data are improved, and the user's satisfaction with the returned data is improved, and the user experience is improved.

[0124] In the exemplary embodiments, the present disclosure also provides a computer readable storage medium including instructions, such as a memory including instructions, which can be executed by the processor of the terminal device to complete the above method. Alternatively, the computer readable storage medium can be a ROM, a random access memory (RAM), a CD-ROM, a magnetic tape, a floppy disk, and an optical data storage device, etc.

[0125] To achieve the above-mentioned embodiments, the present disclosure further provides a computer program product, which is executed by a processor of a terminal device, so that the terminal device is capable of performing the data query method as previously described.

[0126] Other embodiments of the present disclosure will be apparent to those skilled in the art from consideration of the specification and practice of the features disclosed herein. It is intended that the present disclosure cover any and all variations of the present disclosure including combinations of features falling within the general scope of the disclosure. The specification and examples are to be regarded as exemplary only, and the true scope and spirit of the present disclosure is indicated by the following claims.

[0127] It should be understood that the present disclosure is not limited to the precise structures as herein described and illustrated in the drawings, and that various modifications and changes can be made without departing from its scope. The scope of the present disclosure is limited only by the claims that follow.

Claims

1. A data query method, characterized by, The method comprises: obtaining candidate data matching the query condition of each query dimension and the characteristic value of the candidate data in the query dimension from the database; determining the distribution characteristics of the candidate data in each query dimension according to the characteristic value of the candidate data in each query dimension; determining the matching degree between the distribution characteristics of the candidate data in each query dimension; determining whether the candidate data is the data to be returned according to the matching degree between the distribution characteristics of the candidate data in each query dimension; the determining of the distribution characteristics of the candidate data in each query dimension according to the characteristic value of the candidate data in each query dimension comprises: in response to any query dimension being a first type dimension, determining the number of quantile points corresponding to the any query dimension for each candidate data according to the characteristic value of the candidate data in the any query dimension; determining the number of quantile points corresponding to the any query dimension for the candidate data as the distribution characteristics of the candidate data in the any query dimension.

2. The method of claim 1, wherein, the determining of the distribution characteristics of the candidate data in each query dimension according to the characteristic value of the candidate data in each query dimension further comprises: in response to any query dimension being a second type dimension, determining the number of quantile points corresponding to the any query dimension for each candidate data according to the characteristic value of the candidate data in the any query dimension; determining the difference between the preset value and the number of quantile points corresponding to the any query dimension for the candidate data as the distribution characteristics of the candidate data in the any query dimension.

3. The method of claim 1, wherein, the determining of whether the candidate data is the data to be returned according to the matching degree between the distribution characteristics of the candidate data in each query dimension comprises: in response to the matching degree between the distribution characteristics of any candidate data in each query dimension being greater than or equal to a threshold value, determining that the candidate data is the data to be returned; or in response to the matching degree between the distribution characteristics of any candidate data in at least one query dimension and the distribution characteristics of other query dimensions being less than the threshold value, determining that the candidate data is not the data to be returned.

4. The method of claim 1, wherein, after the obtaining of the candidate data matching the query condition of each query dimension and the characteristic value of the candidate data in the query dimension from the database, the method further comprises: in response to the characteristic value of any candidate data in at least one query dimension being empty, obtaining similar data associated with the any candidate data from the database based on the characteristic value of the any candidate data in the remaining dimensions; completing the characteristic value of the any candidate data in the at least one query dimension based on the characteristic value of the similar data in the at least one query dimension.

5. The method of claim 1, wherein, after the determining of whether the candidate data is the data to be returned, the method further comprises: returning each data to be returned in order from high to low according to the matching degree between the distribution characteristics of the data to be returned in each query dimension.

6. The method of any one of claims 1-5, wherein, before the obtaining of the candidate data matching the query condition of each query dimension and the characteristic value of the candidate data in the query dimension from the database, the method further comprises: obtaining a data query request, wherein the query request comprises at least one query dimension and the query condition of the query dimension; In a case where there is a corresponding query tree for any query dimension, a query tree corresponding to the any query dimension is traversed to obtain a sub-feature value associated with a feature value in a query condition corresponding to the any query dimension; The query condition corresponding to the any query dimension is extended based on the sub-feature value.

7. A data query apparatus, characterized by comprising: Comprise: An acquisition module, configured to acquire, from a database, candidate data matched with a query condition of each query dimension and a feature value of the candidate data in the query dimension; A determination module, configured to determine a distribution feature of the candidate data in each query dimension according to the feature value of the candidate data in each query dimension; A matching module, configured to determine a matching degree between the distribution features of the candidate data in each query dimension; A return module, configured to determine whether the candidate data is to-be-returned data according to the matching degree between the distribution features of the candidate data in each query dimension; The determination module is configured to: In response to any query dimension being a first type dimension, determine a number of quantile points of each candidate data in the any query dimension according to the feature value of the candidate data in the any query dimension; The number of quantile points of the candidate data in the any query dimension is determined as the distribution feature of the candidate data in the any query dimension.

8. The apparatus of claim 7, wherein, The determination module is further configured to: In response to any query dimension being a second type dimension, determine a number of quantile points of each candidate data in the any query dimension according to the feature value of the candidate data in the any query dimension; A difference value between a preset value and the number of quantile points of the candidate data in the any query dimension is determined as the distribution feature of the candidate data in the any query dimension.

9. The apparatus of claim 7, wherein, The return module is configured to: In response to the matching degree between the distribution features of any candidate data in each query dimension being greater than or equal to a threshold value, determine that the candidate data is to-be-returned data; or In response to the matching degree between the distribution feature of any candidate data in at least one query dimension and the distribution features of other query dimensions being less than the threshold value, determine that the candidate data is not to-be-returned data.

10. The apparatus of claim 7, wherein, Further comprise a correction module, configured to: In response to a feature value of any candidate data in at least one query dimension being empty, acquire, from the database, similar data associated with the any candidate data based on feature values of the any candidate data in remaining dimensions; Based on the feature value of the similar data in the at least one query dimension, complete the feature value of the any candidate data in the at least one query dimension.

11. The apparatus of claim 7, wherein, The return module is further configured to: Sort each to-be-returned data in an order from high to low according to the matching degree between the distribution features of the to-be-returned data in each query dimension, and return the to-be-returned data.

12. The apparatus of any one of claims 7-11, wherein, The acquisition module is further configured to: Acquire a data query request, wherein the query request includes at least one query dimension and a query condition of the query dimension; In a case where there is a corresponding query tree for any query dimension, a query tree corresponding to the any query dimension is traversed to obtain a sub-feature value associated with a feature value in a query condition corresponding to the any query dimension; The query condition corresponding to the any query dimension is extended based on the sub-feature value.

13. A terminal device, comprising: Comprise: A processor; a memory for storing the processor-executable instructions; wherein the processor is configured to execute the instructions to implement the data query method of any one of claims 1-6.

14. A computer-readable storage medium, when instructions in the computer-readable storage medium are executed by a processor of a terminal device, enable the terminal device to perform the data query method of any one of claims 1-6.

15. A computer program product comprising a computer program, characterized in that, The computer program, when executed by a processor, implements the data query method of any one of claims 1-6.

Citation Information

Patent Citations

  • Searching method and device

    CN106776741A

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

    CN112632118A