Data retrieval method and device based on optimal strategy

By statistically analyzing parameter distribution and determining the retention rate in the database and optimizing the search order, the problem of low efficiency of multi-condition coupling search in the existing technology is solved, and efficient data retrieval is achieved.

CN120705171APending Publication Date: 2025-09-26YIXING SUPER NETWORK TECHNOLOGY CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510965296.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-07-11
Publication Date
2025-09-26

AI Technical Summary

Technical Problem

Existing database management systems are inefficient in multi-condition coupled retrieval tasks, especially in complex hierarchical conditions where it is difficult to identify the strength of determinism, resulting in slow retrieval speed.

Method used

By statistically analyzing the distribution of all parameters in the target database, the retention rate of the retrieval conditions is determined, and the optimal retrieval order is determined based on the coupling relationship between the retrieval conditions and the retention rate. The retrieval order of the retrieval conditions is optimized to improve the retrieval efficiency.

Benefits of technology

It has greatly improved the retrieval speed and reduced the number of retrievals, especially under complex conditions, reducing the retrieval time by more than 70%.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120705171A_ABST
    Figure CN120705171A_ABST
Patent Text Reader

Abstract

The invention discloses a data retrieval method and device based on an optimal strategy. The data retrieval method comprises the steps that the distribution situation of all parameters in a target database is counted; determining the screening rate of the corresponding retrieval condition according to the distribution condition of each retrieval condition in the database; determining a retrieval sequence of each retrieval condition in the whole retrieval formula according to the coupling relationship between the retrieval conditions and the screening rate of the retrieval conditions; retrieving the whole database according to the retrieval sequence to obtain a retrieval result; according to the method, the retrieval sequence of all the retrieval conditions of the retrieval mode can be dynamically optimized, and the retrieval speed is greatly increased.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of data processing, and in particular to a data retrieval method and device. Background Art

[0002] For databases where each parameter of each object is primarily numerical, the target objects to be screened must meet multiple coupling conditions, with a single condition often requiring a parameter to be within a certain range. Existing mainstream database management systems first search the entire database using large categories or primary key indexes to obtain potential matching objects. These matching objects are then individually checked for each coupling condition. This results in slow search speeds when there are many coupling conditions.

[0003] For example, in a recipe management system, common product designs typically require different recipes to be categorized and have primary keys. This categorization allows for a quick list of recipes, such as those for customer A, customer B, high-temperature environments, and low-temperature environments. Furthermore, if all recipes have a numerical metric, a primary key can be established within the distribution range of that metric. For example, if all 1 million recipes have a density parameter distributed in the range [0.8250, 1.2400], a primary key can be established based on this parameter and assigned to a sequence. For a search with a density of [0.9555, 0.9871], sequences 150,000 to 220,000 can be quickly selected as matching entries. However, if further search is required to identify matching entries with a percentage of component X between [5, 15], a percentage of component Y between [5, 15], and a performance parameter Z between [200, 300], existing search methods would individually check the three conditions for each of the 70,000 initially selected recipes before ultimately determining whether each recipe meets the requirements.

[0004] When existing retrieval methods examine multiple coupling conditions for initially screened items, they generally judge all conditions according to the user-designed order before making a final judgment on the initially screened items. Under single coupling conditions between certain layers, only some systems with some initial intelligence will make a final judgment on the initially screened items after judging some of the conditions. For example, when all conditions must be met, any one unsatisfied item can be eliminated. However, there are basically no systems that can identify the strength of determinism among multiple conditions and prioritize the conditions with strong determinism. Moreover, most coupling conditions have complex hierarchies, making it difficult to identify determinism. Therefore, database management systems for such scenarios are generally inefficient in index-free multi-condition coupling retrieval tasks that are not based on a single primary key condition. Summary of the Invention

[0005] In order to solve the above problems, the present invention provides a data retrieval solution with high retrieval efficiency.

[0006] In order to achieve the above-mentioned objectives, the present invention provides, on the one hand, a data retrieval method based on an optimal strategy, comprising: statistically calculating the distribution of all parameters in a target database; determining the retention rate of corresponding retrieval conditions according to the distribution of each retrieval condition in the database; determining the optimal retrieval order of each retrieval condition in the entire retrieval formula according to the coupling relationship between the retrieval conditions and the retention rate of the retrieval conditions; and searching the entire database according to the optimal retrieval order to obtain retrieval results.

[0007] Optionally, the retention rate of the corresponding search conditions is determined based on the distribution of each search condition in the database, including: determining the logical priority between the search conditions based on the logical operator of the search formula; merging the same parameters within the same logical priority to determine the retention rate of the search conditions; performing logical operations on the same parameters within different logical priorities and merging them to determine the retention rate of the merged search conditions.

[0008] Optionally, the same parameters within different logical priorities are logically operated and then merged to determine the retention rate of the merged retrieval conditions, including: determining the retention rates of all parameters within the retrieval conditions; calculating the retention rates of retrieval blocks within the same logical priority in sequence according to a logical order; performing logical operations on all retrieval blocks according to the logical operators between the retrieval blocks to obtain the retention rate of the entire retrieval conditions.

[0009] Optionally, the retention rates of retrieval blocks within the same logical priority are calculated sequentially in logical order, including: determining whether there is a correlation between different parameters within the same logical priority; if there is a correlation between different parameters, determining the retention rate of the retrieval block based on the correlation and the retention rate of the parameters; if there is no correlation between different parameters, determining the retention rate of the retrieval block based on the retention rate of the parameters.

[0010] Optionally, if there is a correlation between different parameters, the screening rate of the retrieval block is determined based on the correlation and the screening rate of the parameters, including: combining the screening rates of the two parameters according to the correlation of the two parameters to obtain a comprehensive screening rate of the two parameters; determining the mathematical expectation of the theoretical optimal average number of retrievals according to the coupling relationship between the two retrieval conditions and the screening rate of the retrieval conditions; when the mathematical expectations of the theoretical optimal average number of retrievals of the two retrieval conditions are equal when any one of the retrieval conditions is prioritized, taking any retrieval order as the optimal retrieval order; when the mathematical expectations of the theoretical optimal average number of retrievals of the two retrieval conditions are not equal when any one of the retrieval conditions is prioritized, calculating the mathematical expectations of the theoretical optimal average number of retrievals under different retrieval orders according to the comprehensive screening rate, and determining the optimal retrieval order according to the mathematical expectations.

[0011] Optionally, the retention rates of the two parameters are combined according to the correlation between the two parameters to obtain a comprehensive retention rate of the two parameters, including: calculating the cumulative distribution rate of the parameters to be combined under the corresponding indicators; converting one of the parameters into an interval under the same cumulative distribution rate of the other indicator according to the correlation between the two parameters, and overlapping it with the interval originally contained in the other indicator to obtain the comprehensive retention rate.

[0012] Optionally, when the mathematical expectations of the theoretically optimal average number of searches between two search conditions are not equal when any one of the search conditions is preferentially searched, the mathematical expectations of the theoretically optimal average number of searches under different search orders are calculated according to the comprehensive screening retention rate, and the optimal search order is determined according to the mathematical expectations and the comprehensive screening retention rate, including: calculating the mathematical expectations of the theoretically optimal average number of searches under different search orders; and taking the search order corresponding to the smaller mathematical expectation as the optimal search order.

[0013] Optionally, the theoretical optimal number of searches is determined based on the coupling relationship between the search conditions and the screening retention rate of the search conditions, including: when the coupling condition between the two search conditions is AND, the mathematical expectation of the theoretical optimal average number of searches = the mathematical expectation of the theoretical optimal average number of searches of the first search condition itself + the screening retention rate of the first search condition itself * the mathematical expectation of the theoretical optimal average number of searches of the second search condition; when the coupling condition between the two search conditions is OR, the mathematical expectation of the theoretical optimal average number of searches: the mathematical expectation of the theoretical optimal number of searches = the mathematical expectation of the theoretical optimal average number of searches of the first search condition itself + (1-the screening retention rate of the first search condition itself) * the mathematical expectation of the theoretical optimal average number of searches of the second search condition.

[0014] On the other hand, the present invention also provides a data retrieval device based on an optimal strategy, including: a statistical module for statistically analyzing the distribution of all parameters in the target database; a screening retention rate determination module for determining the screening retention rate of the corresponding retrieval condition based on the distribution of each retrieval condition in the database; a retrieval order determination module for determining the optimal retrieval order of each retrieval condition in the entire retrieval formula based on the coupling relationship between the retrieval conditions and the screening retention rate of the retrieval conditions; and a retrieval module for searching the entire database according to the optimal retrieval order to obtain retrieval results.

[0015] The beneficial effects of the present invention compared to the prior art are as follows: the present invention statistically calculates the distribution of all parameters in the target database, determines the retention rate of the corresponding search conditions based on the distribution, and then determines the retrieval order of each search condition in the entire search formula based on the coupling relationship between the search conditions and the retention rate of the search conditions; finally, the entire database is searched according to the search order to obtain the search results; in this way, the retrieval order of each search condition of the search formula can be dynamically optimized, thereby greatly improving the search speed. BRIEF DESCRIPTION OF THE DRAWINGS

[0016] Figure 1 is a flow chart of a data retrieval method based on an optimal strategy provided by one embodiment of the present invention;

[0017] Figure 2 is a distribution diagram of density values ​​provided by an embodiment of the present invention;

[0018] Figure 3 is a distribution diagram of the content of component A provided in one embodiment of the present invention;

[0019] Figure 4 is a flowchart of step S20 in the data retrieval method based on the optimal strategy provided by one embodiment of the present invention;

[0020] Figure 5 is a schematic diagram of a logical operation provided by an embodiment of the present invention;

[0021] Figure 6 It is a structural diagram of a data retrieval device based on an optimal strategy provided by one embodiment of the present invention. DETAILED DESCRIPTION

[0022] The following will clearly and completely describe the technical solutions in the embodiments of the present invention in conjunction with the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. All other embodiments obtained by ordinary technicians in this field based on the embodiments of the present invention without making any creative efforts shall fall within the scope of protection of the present invention.

[0023] This embodiment provides a data retrieval method based on an optimal strategy. The method dynamically optimizes the retrieval order of each retrieval condition of a retrieval formula, thereby significantly improving the retrieval speed.

[0024] It should be noted that the data retrieval method provided in this embodiment can perform the following search order optimization within the scope of primary key or index tree screening, and is not mutually exclusive with conventional primary key or index tree methods. This means that this method can be implemented as a standalone database search solution or after primary key or index tree screening.

[0025] Specifically, refer to Figure 1 , the data retrieval method comprises the following steps:

[0026] S10: Count the distribution of all parameters in the target database.

[0027] Specifically, we first calculate the distribution of parameters in the entire database, such as composition, density, quality, performance, etc., and then obtain the corresponding distribution curve based on the distribution.

[0028] It should be noted that the distribution of the parameters recorded in this embodiment includes the distribution rate and cumulative distribution rate of the parameters in the target database.

[0029] S20: Determine the retention rate of the corresponding search condition according to the distribution of each search condition in the database.

[0030] It should be noted that the retention rate reported in this embodiment refers to the percentage of the search condition parameters in the entire database. For example, if the search condition is density greater than or equal to 1 and less than or equal to 1.05, the parameter distribution statistics previously show that this interval accounts for 6.43% of the entire database, thus indicating a retention rate of 6.43% for this search condition.

[0031] When there are two search conditions and the number of searches required for a single search condition is equal to 1, the retention rate can be calculated by the logical relationship between the search conditions. For example, in one embodiment, search condition 1 is that the density is greater than or equal to 1 AND less than or equal to 1.05. Figure 2 It can be seen that the retention rate of this search condition is 6.43%. Condition 2 is that component A is less than or equal to 25. Figure 3 It can be seen that the retention rate of this search condition is 40.34%.

[0032] In some embodiments, as Figure 4 As shown, step S20 includes the following steps:

[0033] Step S201: Determine the logical priority between the search conditions according to the logical operators of the search formula.

[0034] Specifically, the search logic priority is brackets > NOT > AND > OR, so the search conditions in the brackets are searched first, followed by NOT, AND, and OR.

[0035] Step S202: merging the same parameters within the same logical priority level to determine the retention rate of the search condition.

[0036] Specifically, for the same parameters of the same priority, they need to be merged first. For example, if the search formula is A and B, the search condition A is that the component is greater than 20 and less than 30, and the search condition B is that the component is greater than 10 and less than 25. After merging, it can be seen that the search formula is that the component is greater than 20 and less than 25.

[0037] Step S203: performing a logical operation on the same parameters in different logical priorities and merging them, thereby determining the retention rate of the merged search conditions.

[0038] Specifically, first, determine the retention rate of all parameters in the search condition; then calculate the retention rate of the search blocks in the same logical priority in sequence according to the logical order; finally, perform logical operations on all search blocks according to the logical operators between the search blocks to obtain the retention rate of the entire search condition.

[0039] In this embodiment, if Figure 5 As shown, for the search block [(performance greater than 20, and, lifespan greater than 30) or (performance greater than 30, and, lifespan greater than 20)], if 80% of the performance and lifespan are distributed above 20, and 40% are distributed above 30, the predicted retention rate of this block is calculated to be 48% after logical operation.

[0040] It should also be noted that when calculating the retention rate of search blocks within the same logical priority in logical order, it is necessary to determine whether there is a correlation between different parameters within the same logical priority. If there is a correlation between different parameters, the retention rate of the search block is determined based on the correlation and the retention rate of the parameters. If there is no correlation between different parameters, the retention rate of the search block is determined based on the retention rate of the parameters. For example, in the above embodiment, if there is no correlation between performance and lifespan, the retention rate after the logical operation is 48%. If there is a correlation between performance and lifespan, in this embodiment, taking a single correlation as an example, the data distribution is Figure 3 The final calculated retention rate is 40%.

[0041] Specifically, when there is a correlation between two parameters, the retention rates of the two parameters are first combined according to the correlation of the two parameters to obtain a comprehensive retention rate of the two parameters; then, the mathematical expectation of the theoretical optimal average number of searches is determined according to the coupling relationship between the two retrieval conditions and the retention rates of the retrieval conditions; when the mathematical expectations of the theoretical optimal average number of searches between the two retrieval conditions are equal when any one of the retrieval conditions is prioritized, any retrieval order is taken as the optimal retrieval order; when the mathematical expectations of the theoretical optimal average number of searches between the two retrieval conditions are not equal when any one of the retrieval conditions is prioritized, the mathematical expectations of the theoretical optimal average number of searches under different retrieval orders are calculated according to the comprehensive retention rate, and the optimal retrieval order is determined according to the mathematical expectations.

[0042] The following example illustrates this:

[0043] For example, if the system detects that weight and height are highly correlated in a certain population, then in a scenario where it is necessary to screen out people whose weight and height are within a certain range, the cumulative distribution rate of one of the indicators can be converted into an interval with the same cumulative distribution rate of another indicator, and then overlapped with the original interval of the other indicator. For example, it is necessary to screen out people whose height is between 160cm and 168cm and whose weight is between 40kg and 55kg.

[0044] Through statistics, it is found that the cumulative distribution rate of height of 160cm in this group is 30%, and that of 168cm is 60%. The system identifies that height and weight are positively correlated in this population, so the cumulative distribution rates of weight of 30% and 60% can be examined. Assuming that the result is 45kg to 70kg, the original screening retention rates of height and weight in a certain interval are merged and converted into a single condition of weight, which must be in the common interval formed by both 40kg to 55kg and 45kg to 70kg, that is, 45kg to 55kg. By counting the screening retention rate in this interval, the comprehensive screening retention rate is obtained.

[0045] It should be noted that the above interval merging may be discontinuous or may be an OR merger.

[0046] S30: Determine the optimal search order of each search condition in the entire search formula according to the coupling relationship between the search conditions and the screening retention rate of the search conditions.

[0047] In one embodiment, the search condition 1 is that the density is greater than or equal to 1 AND less than or equal to 1.05. Figure 2 It can be seen that the retention rate of this search condition is 6.43%. Condition 2 is that component A is less than or equal to 25. Figure 3 It can be seen that the retention rate of this search condition is 40.34%.

[0048] During the search, when checking whether 10,000 entries meet the above two search conditions, if the logical relationship between the two search conditions is AND, search condition 1 should be searched first, and only the approximately 600 entries that meet the conditions should be searched to see whether condition 2 is met.

[0049] When the logical relationship between two search conditions is OR (the logical priority is lower than AND within search condition 1), search condition 2 should be searched first, and only the approximately 6,000 entries that do not meet the conditions should be checked to see whether condition 1 is met.

[0050] The above example is a simple case of sorting two blocks that only require a single search. However, when the mathematical expectation of the theoretically optimal average number of searches for two blocks is not 1, the following approach can be used as an example to sort the blocks.

[0051] Suppose we need to filter out 10,000 models to find the ones that meet the criteria. The criteria are that the models must have a speed score greater than 90 and a safety score greater than 80, or an economy score greater than 90.

[0052] It has been determined that the mathematical expectation of the theoretical optimal average number of searches required to determine whether a certain vehicle model meets both the speed score and the safety score is 1.5 times, the comprehensive retention rate is 28%, and the retention rate for vehicles with a qualified economic score is 20%.

[0053] First, the mathematical expectation of the theoretical optimal average number of searches under different search orders is calculated using the following formula:

[0054] When the coupling condition between two search conditions is AND, the mathematical expectation of the theoretical optimal average search times = the mathematical expectation of the theoretical optimal average search times of the first search condition + the retention rate of the first search condition * the mathematical expectation of the theoretical optimal average search times of the second search condition;

[0055] When the coupling condition between two search conditions is OR, the mathematical expectation of the theoretical optimal average search times = the mathematical expectation of the theoretical optimal average search times of the first search condition + (1-the screening retention rate of the first search condition) * the mathematical expectation of the theoretical optimal average search times of the second search condition.

[0056] In this embodiment, the coupling relationship between the two search conditions is OR, so the second formula is used for calculation.

[0057] It should be noted that the "search condition" recorded in the above calculation formula can be a search block consisting of a single condition or a search block consisting of multiple conditions. For example, in this embodiment, a speed score greater than 90 points and a safety score greater than 80 points are a search block consisting of two conditions, and an economic score greater than 90 points are a search block consisting of one condition.

[0058] When the speed score and the safety score are prioritized in the search blocks, and the economic score is the second search block, the mathematical expectation of the theoretical optimal average number of searches = 1.5 + (1-0.28) * 1 = 2.22.

[0059] When the economic score is the first search block, and the speed score and the safety score are the second search block, the mathematical expectation of the theoretical optimal average search times = 1 + (1-0.2) * 1.5 = 2.2.

[0060] The retrieval order corresponding to the smaller mathematical expectation is the optimal retrieval order. Therefore, the solution with the economic score as the first priority retrieval block and the speed score and safety score as the second priority retrieval block is the optimal retrieval solution.

[0061] Specifically, firstly, the theoretical optimal number of searches is determined based on the coupling relationship between the search conditions and the screening rate of the search conditions; then, the search order of the search conditions is determined based on the theoretical optimal number of searches.

[0062] In this embodiment, assume that we need to retrieve entries that meet the following 10 conditions from 10,000 entries. Each condition is a different parameter and does not need to be merged. Each entry has the following predicted retention rate as an independent event, as shown in Table 1. In the logical priority of Table 1, the number 1 indicates the highest priority, and so on, the number 6 indicates the lowest priority.

[0063] Table 1 Retention rate and logical relationship of search conditions

[0064] Search conditions Screening rate Logical relationship with the previous search condition Logical priority A 80% - - B 50% AND 1 C 30% AND 1 D 90% OR 2 E 70% AND 5 F 30% OR 2 G 50% OR 6 H 10% AND 1 J 80% AND 3 I 20% OR 4

[0065] In this embodiment, the logical operation between the search conditions A, B, and C and the logical operation between G and H are of the first priority, and their logical relationship is AND.

[0066] After the retrieval blocks A, B, and C are merged, the theoretical optimal retrieval order is calculated to be C→B→A, and the mathematical expectation of the theoretical optimal average number of retrieval times is 1.54.

[0067] After the retrieval blocks G and H are merged, the theoretical optimal retrieval order is calculated to be H→G, and the mathematical expectation of the theoretical optimal average number of retrieval times is 1.1.

[0068] After completing the operation of the first logic priority, the operation of the second logic priority is performed.

[0069] The logical operation between the search conditions C→B→A and D and the logical operation between E and F are of the second priority, and their logical relationship is OR.

[0070] Taking C→B→A and D as examples, after calculation, the theoretical optimal search order of the merged retrieval blocks is D→C→B→A, and the mathematical expectation of the theoretical optimal average number of searches is 1.154.

[0071] As shown above, after logical operations in sequence, it can be concluded that the search can be completed fastest in the following order: E→F→D→C→B→A→J→H→G→I.

[0072] That is, if the set of objects that meet each individual condition in the search scope is represented by the corresponding letter, then the set of objects that meet the above coupled whole can be represented as:

[0073] (((A∩B∩C)∪D)∩(E∪F))∪(((G∩H)∩I)∪J);

[0074] And is completely equivalent to the following formula:

[0075] ((E∪F)∩(D∪(C∩B∩A)))∪(J∪((H∩G)∩I)).

[0076] The three most ideal situations in the final retrieval logic are as follows: Assume E is satisfied (F skipped) → D is satisfied → end; Assume E is not satisfied → F is satisfied → D is satisfied → end; Assume E is not satisfied → F is not satisfied (DCBA skipped) → J is satisfied → end.

[0077] It can be seen from this embodiment that each entry only needs to perform about 2.74 searches to determine whether the conditions are satisfied to complete the final judgment on whether the 10 search conditions are qualified as a whole, which greatly improves the search efficiency.

[0078] S40: Search the entire database according to the optimal search order to obtain a search result.

[0079] Specifically, for example, in the above embodiment, the three most ideal situations in the search logic are finally obtained, and the database can be searched in the search order of the three situations.

[0080] Through experimental data, it was found that when testing under randomly generated coupling conditions using computers with different hardware specifications, the search time required for 5,000 entries in the database with 5 search conditions was 1. After expanding to 100,000 entries and 30 search conditions, the time required under the conventional search method increased to about 100 times, while the time required for the method described in the present invention was only about 30 times, reducing the load by up to 70%, thereby achieving a significant reduction in the number of searches for the search conditions.

[0081] Reference Figure 6 This embodiment further provides a data retrieval device based on an optimal strategy, comprising:

[0082] The statistical module 100 is used to collect statistics on the distribution of all parameters in the target database. It should be noted that since the specific statistical method and process have been explained in detail in step S10 of the above-mentioned data retrieval method based on the optimal strategy, they will not be repeated here.

[0083] The retention rate determination module 200 is used to determine the retention rate of the corresponding search condition based on the distribution of each search condition in the database. It should be noted that since the specific retention rate determination method and process have been detailed in step S20 of the above-mentioned optimal strategy-based data retrieval method, they will not be repeated here.

[0084] The retrieval order determination module 300 is used to determine the optimal retrieval order of each retrieval condition in the entire retrieval formula based on the coupling relationship between the retrieval conditions and the screening retention rate of the retrieval conditions; it should be noted that since the specific retrieval order determination method and process have been explained in detail in step S30 of the above-mentioned data retrieval method based on the optimal strategy, they will not be repeated here.

[0085] The retrieval module 400 is used to search the entire database according to the optimal retrieval order to obtain the retrieval results; it should be noted that since the specific retrieval method and process have been explained in detail in step S40 of the above-mentioned data retrieval method based on the optimal strategy, they will not be repeated here.

[0086] In addition, an embodiment of the present invention further provides a computer-readable storage medium, wherein the computer-readable storage medium may store a program, which, when executed, includes some or all steps of any optimal strategy-based data retrieval method described in the above method embodiments.

[0087] In addition, the functional units in the various embodiments of the present invention may be integrated into a single processing unit, each unit may exist physically separately, or two or more units may be integrated into a single unit. The aforementioned integrated units may be implemented in the form of hardware or software functional units.

[0088] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable memory. Based on this understanding, the technical solution of the present invention, or the part that contributes to the prior art, or all or part of the technical solution can be embodied in the form of a software product. The computer software product is stored in a memory and includes several instructions for enabling a computer device (which can be a personal computer, server or network device, etc.) to execute all or part of the steps of the method described in each embodiment of the present invention. The aforementioned memory includes: U disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), mobile hard disk, magnetic disk or optical disk, and other media that can store program code.

[0089] Those skilled in the art will appreciate that all or part of the steps in the various methods of the above embodiments can be completed by instructing related hardware through a program. The program can be stored in a computer-readable memory, and the memory can include: a flash drive, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, etc.

[0090] The above describes, with reference to the accompanying drawings, exemplary flowcharts for implementing a data retrieval method according to an embodiment of the present invention. It should be noted that the numerous details included in the above description are merely illustrative of the present invention and are not intended to limit the present invention. In other embodiments of the present invention, the method may have more, fewer, or different steps, and the order, inclusion, functionality, and other relationships between the steps may differ from those described and illustrated.

Claims

1. A data retrieval method based on an optimal strategy, characterized in that include: Statistical distribution of all parameters in the target database; Determine the retention rate of the corresponding search conditions according to the distribution of each search condition in the database; Determine the optimal search order of each search condition in the entire search formula according to the coupling relationship between the search conditions and the screening rate of the search conditions; The search results are obtained by searching the entire database according to the optimal search order.

2. The data retrieval method according to claim 1, wherein: Determine the retention rate of the corresponding search conditions based on the distribution of each search condition in the database, including: Determine the logical priority between search conditions based on the logical operator of the search formula; Combining the same parameters within the same logical priority level to determine the retention rate of the search condition; The same parameters within different logical priorities are logically operated and then merged to determine the retention rate of the merged search conditions.

3. The data retrieval method according to claim 2, characterized in that: Perform logical operations on the same parameters within different logical priorities and merge them to determine the retention rate of the merged search conditions, including: Determine the retention rate of all parameters within the search criteria; Calculate the retention rate of retrieval blocks within the same logical priority level in logical order; All search blocks are logically operated according to the logical operators between the search blocks to obtain the screening rate of the entire search condition.

4. The data retrieval method according to claim 3, wherein: Calculate the retention rate of search blocks within the same logical priority in logical order, including: Determine if there are dependencies between different parameters within the same logical priority level; If there is correlation between different parameters, the retention rate of the search block is determined based on the correlation and the retention rate of the parameters; If there is no correlation between different parameters, the retention rate of the search block is determined according to the retention rate of the parameters.

5. The data retrieval method according to claim 4, characterized in that: If there is correlation between different parameters, the retention rate of the search block is determined based on the correlation and the retention rate of the parameters, including: According to the correlation between the two parameters, the retention rates of the two parameters are combined to obtain the comprehensive retention rate of the two parameters; Determine the mathematical expectation of the theoretical optimal average number of searches based on the coupling relationship between the two search conditions and the retention rate of the search conditions; When the mathematical expectations of the theoretical optimal average search times of two search conditions are equal when any one of the search conditions is searched first, any search order is regarded as the optimal search order; When the mathematical expectations of the theoretical optimal average search times of two search conditions are not equal when any one of the search conditions is preferentially searched, the mathematical expectations of the theoretical optimal average search times under different search orders are calculated according to the comprehensive screening retention rate, and the optimal search order is determined according to the mathematical expectations.

6. The data retrieval method according to claim 5, characterized in that: According to the correlation between the two parameters, the retention rates of the two parameters are combined to obtain the comprehensive retention rate of the two parameters, including: Calculate the cumulative distribution rate of the parameters that need to be merged under the corresponding indicators; According to the correlation between the two parameters, one of the parameters is converted into an interval with the same cumulative distribution rate of the other indicator, and overlapped with the original interval of the other indicator to obtain the comprehensive screening rate.

7. The data retrieval method according to claim 5, characterized in that: When the mathematical expectations of the theoretically optimal average search times between two search conditions are not equal when any one of the search conditions is preferentially searched, the mathematical expectations of the theoretically optimal average search times under different search orders are calculated according to the comprehensive screening retention rate, and the optimal search order is determined according to the mathematical expectations and the comprehensive screening retention rate, including: Calculate the mathematical expectation of the theoretical optimal average number of retrieval times under different retrieval orders; The retrieval order corresponding to the smaller mathematical expectation is the optimal retrieval order.

8. The data retrieval method according to claim 5, characterized in that: The mathematical expectation of the theoretical optimal average number of searches is determined based on the coupling relationship between the search conditions and the retention rate of the search conditions, including: When the coupling condition between two search conditions is AND, the mathematical expectation of the theoretical optimal average search times = the mathematical expectation of the theoretical optimal average search times of the first search condition + the retention rate of the first search condition * the mathematical expectation of the theoretical optimal average search times of the second search condition; When the coupling condition between two search conditions is OR, the mathematical expectation of the theoretical optimal average search times = the mathematical expectation of the theoretical optimal average search times of the first search condition + (1-the screening retention rate of the first search condition) * the mathematical expectation of the theoretical optimal average search times of the second search condition.

9. A data retrieval device based on an optimal strategy, characterized in that: include: Statistics module, used to count the distribution of all parameters in the target database; A screening retention rate determination module is used to determine the screening retention rate of the corresponding search condition according to the distribution of each search condition in the database; A retrieval order determination module is used to determine the optimal retrieval order of each retrieval condition in the entire retrieval formula based on the coupling relationship between the retrieval conditions and the screening retention rate of the retrieval conditions; The retrieval module is used to search the entire database according to the optimal retrieval order to obtain the retrieval results.

10. A computer-readable storage medium, comprising a computer program stored therein, characterized in that: When the computer program is executed by a processor, the steps of the data retrieval method based on the optimal strategy as claimed in any one of claims 1 to 8 are implemented.