Data query method, device, equipment and storage medium

By dynamically adjusting the query processing order of the target underlying report and prioritizing filtering and sorting operations, the problem of low efficiency in multi-data table connection queries is solved, and resource saving and query performance improvement are achieved.

CN112131253BActive Publication Date: 2024-09-20BEIJING WODONG TIANJUN INFORMATION TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN201910553694.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2019-06-25
Publication Date
2024-09-20
Estimated Expiration
2039-06-25

AI Technical Summary

Technical Problem

During the multi-data table connection query process, the existing technology leads to an increase in the number of data connections, wastes IO and memory resources, and reduces data query efficiency.

Method used

By dynamically adjusting the query processing order of the target underlying report in the report to be queried, first determine the fields to be matched for filtering and sorting, prioritize the target object data that meets the query conditions, and then associate multiple data reports to reduce the scope of data query and Connection volume.

Benefits of technology

It improves data query efficiency, saves memory resources, reduces the number of data report connections, and improves query performance.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN112131253B
    Figure CN112131253B
Patent Text Reader

Abstract

The embodiment of the present invention discloses a data query method, device, equipment and storage medium. The method comprises: according to the query conditions in the query request obtained, determining the target underlying report associated with the to-be-matched field on which the screening and / or sorting operation depends from the query report to be connected; according to the to-be-matched field, matching the target object that meets the query conditions from the target underlying report, and obtaining the target report data of the target object; according to the target report data of the target object, associating and obtaining the associated data of the target object under other fields from the query report to be connected. The embodiment of the present invention overcomes the technical problem of low data query efficiency caused by performing data query based on full information by adopting the technical means of dynamically adjusting the query processing order of the target underlying report in the report to be queried, narrows the data query scope, and reduces the amount of data report connections, thereby achieving the technical effect of improving data query efficiency and saving memory resources.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

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

[0002] With the rapid development of Internet technology, a large number of data reports are generated all the time in various systems for query use.

[0003] At present, in the existing multi-table join query process, all data reports are usually first joined to obtain an intermediate report containing all summary information, and then query and display related data according to query conditions based on the intermediate report with full information. For example, Prefix join, Bloom filter join and MySQL join multi-table join query methods perform query operations such as sorting and filtering based on the full amount of information connected.

[0004] In the process of implementing the present invention, the inventors found that there are at least the following problems in the prior art: performing data query based on all report connections not only increases the number of data connections and wastes huge IO and memory resources, but also increases the data query cardinality for subsequent data sorting and filtering operations, thereby reducing data query efficiency. Summary of the invention

[0005] The embodiments of the present invention provide a data query method, device, equipment and storage medium, which can improve the query efficiency of data.

[0006] In a first aspect, an embodiment of the present invention provides a data query method, including:

[0007] According to the query conditions in the query request obtained, from the query report to be connected, determine the target underlying report associated with the to-be-matched field on which the filtering and / or sorting operations depend;

[0008] According to the to-be-matched field, a target object that meets the query condition is matched from the target underlying report, and target report data of the target object is obtained;

[0009] According to the target report data of the target object, the associated data of the target object under other fields are obtained from the query report to be connected.

[0010] In a second aspect, an embodiment of the present invention provides a data query device, including:

[0011] A target underlying report determination module is used to determine, from the query reports to be connected, the target underlying report associated with the to-be-matched field on which the filtering and / or sorting operations depend, based on the query conditions in the query request obtained;

[0012] A target object query module is used to match the target object that meets the query condition from the target underlying report according to the to-be-matched field, and obtain the target report data of the target object;

[0013] The data association module is used to obtain the associated data of the target object under other fields from the query report to be connected according to the target report data of the target object.

[0014] In a third aspect, an embodiment of the present invention provides a device, including:

[0015] one or more processors;

[0016] A memory for storing one or more programs;

[0017] When the one or more programs are executed by the one or more processors, the one or more processors implement the data query method described in any embodiment of the present invention.

[0018] In a fourth aspect, an embodiment of the present invention provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the data query method described in any embodiment of the present invention.

[0019] The embodiment of the present invention has the following beneficial effects: based on the query conditions in the query request, the to-be-matched fields used for the screening and / or sorting operations in the query process are determined, and the underlying report where the to-be-matched fields are located is determined as the target underlying report, and then the screening and / or sorting operations on the target underlying report are adjusted to be executed before the full connection of the query report to be connected, firstly the target object and target report data that meet the query conditions are obtained, and finally the association of multiple data reports is performed to obtain the associated data of the target object under other fields. Therefore, in the process of multi-data table connection query, the embodiment of the present invention overcomes the technical problem of low data query efficiency caused by data query based on full information by adopting the technical means of dynamically adjusting the query processing order of the target underlying report in the report to be queried, and realizes the priority processing of the data used for screening or sorting, and then connects the full report based on the priority processing result to obtain the associated data, narrows the data query range, and reduces the amount of data report connections, thereby achieving the technical effect of improving data query efficiency and saving memory resources. BRIEF DESCRIPTION OF THE DRAWINGS

[0020] Figure 1A flowchart of a data query method provided in Embodiment 1 of the present invention;

[0021] Figure 2 A data query flow chart for the prior art;

[0022] Figure 3 A dynamically adjusted data query flow chart provided in Embodiment 1 of the present invention;

[0023] Figure 4 A flowchart of a data query method provided in Embodiment 2 of the present invention;

[0024] Figure 5 An example diagram of a data query process after dynamically adjusting field expansion provided in Embodiment 2 of the present invention;

[0025] Figure 6 Another example diagram of a data query process after dynamically adjusting the field expansion provided in the second embodiment of the present invention;

[0026] Figure 7 Another example diagram of a data query process after dynamically adjusting the field expansion provided in the second embodiment of the present invention;

[0027] Figure 8 A flowchart of data query after dynamically adjusting the field expansion provided in the second embodiment of the present invention;

[0028] Fig. 9 A schematic diagram of the structure of a data query device provided in Embodiment 3 of the present invention;

[0029] Fig.10 A schematic diagram of the structure of a device provided in Embodiment 4 of the present invention. DETAILED DESCRIPTION

[0030] The embodiments of the present invention are further described in detail below in conjunction with the accompanying drawings and embodiments. It is to be understood that the specific embodiments described herein are only used to explain the embodiments of the present invention, rather than to limit the present invention. It should also be noted that, for ease of description, only parts related to the embodiments of the present invention are shown in the accompanying drawings, rather than all structures.

[0031] Embodiment 1

[0032] Figure 1 This is a flow chart of a data query method provided in Embodiment 1 of the present invention. This embodiment is applicable to the case of performing data query based on big data reports. The method can be executed by a data query device, which can be implemented in software and / or hardware. The method specifically includes the following steps:

[0033] Step 110: According to the query conditions in the query request obtained, determine the target underlying report associated with the to-be-matched field on which the screening and / or sorting operations depend from the query reports to be connected.

[0034] In a specific embodiment of the present invention, a connection query is mainly a query method for a relational database, including inner connection, outer connection, cross connection, left connection and right connection. Multiple table queries can be implemented through the connection operator. In a relational database management system, the relationship between each data does not need to be determined when the table is established, and all information of an entity is often stored in one table. When retrieving data, the information of different entities stored in multiple tables is queried through the connection operation.

[0035] Correspondingly, the query reports to be connected are all data reports for connection query in the bottom layer. The query reports to be connected can originate from different data sources, for example, generated by different bottom-level systems. The report can include one or more data description entities. The entities can be described by data values ​​under different fields. Different reports can be associated with description data of the same entity under different fields, and different reports can have a hierarchical relationship. For example, in the student report, Table 1 is a grade report of a school, Table 2 is a class report, Table 3 is a student report, which can include fields such as student ID, name, gender and age, and Table 4 is a student report, which can include fields such as student ID and grades in various subjects.

[0036] In this embodiment, the query request includes query conditions, and the query conditions can be limited from the various field dimensions of all query reports to be connected. It can be understood that in the data query process, based on the query conditions, the query process may include at least one of data screening and data sorting. Accordingly, the data sorting operation is also associated with the operation of obtaining the entity data ranked in the query conditions. For example, data filtering is used to screen out entity data that meets the query conditions, or data sorting is used to obtain the top-ranked entity data.

[0037] Correspondingly, the query process is based on at least one field dimension for matching query, so in the query conditions, the field used for filtering and / or sorting operations depends on the field to be matched. The field to be matched can be a field in the query report to be connected, or it can be the concatenation or calculation of multiple fields in the query report to be connected that are located in the same report or different reports. In this embodiment, in order to reduce the data query basis and the amount of data connection, the report where the field to be matched or the field constituting the field to be matched is located is determined as the target underlying report, so as to perform data query within the small range of data in the target underlying report, and then connect and associate other data based on the query results. For example, in the student report, assuming that the information of male students is queried, the field to be matched is gender, and the report where the gender field is located is determined as the target underlying report.

[0038] Specifically, after obtaining a query request, this embodiment will not immediately connect all reports to be queried to generate an intermediate report, but will first determine the target underlying report associated with the to-be-matched fields on which the filtering and / or sorting operations depend from all reports to be connected based on the query conditions in the query request, thereby providing a basis for small-scale and accurate data queries.

[0039] Step 120: According to the to-be-matched fields, a target object that meets the query conditions is matched from the target underlying report, and target report data of the target object is obtained.

[0040] In the connection query process of this embodiment, it is not necessary to perform query operations such as screening and / or sorting based on the full amount of information after all query reports to be connected are connected. Instead, after the target underlying report is determined, the screening and / or sorting operations on the target underlying report that are relied on when matching the fields to be matched are adjusted to be executed before the full amount of query reports to be connected are connected. That is, the specific processing process in the query process is dynamically adjusted according to the query conditions, so that the operations that can minimize the data processing scope are dynamically adjusted to the early stage for execution, so as to improve the data query efficiency.

[0041] In this embodiment, the target object may be a data value under a to-be-matched field obtained by querying the target underlying report, or an entity associated with the data value. When the screening and / or sorting operation of the target underlying report that is relied upon when matching the to-be-matched field is dynamically adjusted to the early stage, the query condition may be first matched with the data value under the to-be-matched field in the target underlying report, the successfully matched data value or the entity associated with the data value may be determined as the target object, and the data under each field of the target object in the target underlying report may be determined as the target report data of the target object.

[0042] For example, assuming that the information of male students is queried in the student report, and the report where the gender field is located is the target underlying report, then before all the query reports to be connected are processed, the gender field is first used as the field to be matched, and the target underlying report is filtered. The data value of male under the gender field and / or the entity associated with the data value male are determined as the target object, and the data of male students under all fields in the target underlying report are used as the target report data of the target object.

[0043] Step 130: According to the target report data of the target object, obtain the associated data of the target object under other fields from the query report to be connected.

[0044] In a specific embodiment of the present invention, the target report data of the target object is the data of the target object in the target underlying report. In the data query scenario of the connection query, it is necessary to display the associated data of the target object in all query reports to be connected. It can be understood that the query condition is only based on one or more fields in the query report to be connected as the query condition, and the purpose of the query is to obtain the complete data information of the queried entity. The data under other fields may be the valid data information to be obtained by the query. Therefore, after obtaining the target object based on a small range of data screening and / or sorting processing, this embodiment connects the target report data of the target object in the form of a report with at least one other report in the query report to be connected except the target underlying report, so as to obtain the associated data of the target object under other fields from the connected intermediate report. Finally, the target report data of the target object and the associated data of the target object under other fields are displayed as the connection query result data.

[0045] For example, in the connection query process, it usually involves multiple data table connection operations such as join, filter, sorting operation, and limit associated with sorting operation. Assume that the report to be connected includes 4 reports, Table 1 includes student ID field and student name field, Table 2 includes student ID field and gender field, Table 3 includes student ID field and age field, Table 4 includes student ID field and parent information field. Assume that the query condition is to query the information of male students. Then the data query process of the prior art is as follows: Figure 2 As shown, first, Tables 1 to 4 are joined to obtain an intermediate report containing all the information, and then based on the full information in the intermediate report, a filter operation is performed according to the query conditions to filter out male students from the full information. In other words, the prior art requires data to be queried from all report information, which not only requires the connection of the report to occupy a large amount of IO and memory, but also requires a large data base for subsequent screening.

[0046] In the above example, the data query process after dynamic adjustment in this embodiment is as follows: Figure 3As shown, first determine Table 2 as the target underlying report, perform filter operation in Table 2 according to the query conditions, obtain the data of male students in Table 2, complete data screening, and generate a target object report. Finally, join the screened target object report with other Tables 1, 3 and 4 to associate and obtain other information of these male students. In other words, this embodiment dynamically adjusts the operations involving data query and capable of reducing the amount of data processing or narrowing the scope of data processing to the early stage processing by dynamically adjusting the processing processes such as join, filter, order by and limit in data query, which not only reduces the resource occupation of IO and memory during the later data connection, but also greatly reduces the data cardinality during the early stage screening.

[0047] The technical solution of this embodiment has the following beneficial effects: based on the query conditions in the query request, the fields to be matched used in the screening and / or sorting operations during the query process are determined, and the underlying report where the fields to be matched are located is determined as the target underlying report, and then the screening and / or sorting operations on the target underlying report are adjusted to be executed before the full connection of the query report to be connected, firstly the target object and target report data that meet the query conditions are obtained, and finally the association of multiple data reports is performed to obtain the associated data of the target object under other fields. Therefore, in the process of multi-data table connection query, the embodiment of the present invention overcomes the technical problem of low data query efficiency caused by data query based on full information by adopting the technical means of dynamically adjusting the query processing order of the target underlying report in the report to be queried, and realizes the priority processing of the data used for screening or sorting, and then connects the full report based on the priority processing result to obtain the associated data, narrows the data query range, and reduces the number of data report connections, thereby achieving the technical effect of improving data query efficiency and saving memory resources.

[0048] Embodiment 2

[0049] This embodiment provides a preferred implementation of a data query method based on the above-mentioned embodiment 1, which can dynamically adjust the calculation process of real-time extended data. Figure 4 A flowchart of a data query method provided in Embodiment 2 of the present invention is shown in FIG. Figure 4 As shown, the method comprises the following specific steps:

[0050] Step 410: According to the query conditions in the query request obtained, determine the target underlying report associated with the to-be-matched field on which the screening and / or sorting operations depend from the query reports to be connected.

[0051] Step 420: If it is determined based on the query condition that the field to be matched is an extended field obtained by real-time calculation based on the field in the target underlying report, then an extended calculation is performed on the field in the target underlying report on which the extended field associated with the query condition depends to obtain the field to be matched.

[0052] In a specific embodiment of the present invention, an extended field refers to a field that does not exist in the query report to be connected, and can be obtained by processing such as concatenation or calculation of other fields. As time changes, the reports generated in the underlying system may be different, and the extended fields need to be processed in real time during data query. Accordingly, when it is determined that the extended field needs to be processed, the generation operation of the extended field that the query condition query depends on is adjusted to be executed before the screening and sorting operations of the target underlying report. That is, the generation process of the extended field in the query process is dynamically adjusted according to the query conditions for use in the screening and sorting operations, so that the operation that can minimize the scope of data processing is dynamically adjusted to the early stage for execution, so as to improve the efficiency of data query.

[0053] The fields that the extended field generation depends on can be different fields in the same report or different fields in different reports. The generation operation of the extended field can include field concatenation or calculation. The processing method of the target underlying report is different for different generation methods and the reports where the fields that the extended field generation depends on are located.

[0054] Specifically, if the fields that the extended field generation depends on are located in the same report, you can directly generate an extended column in the report and add the data values ​​obtained by concatenating or calculating different fields to the extended column. For example, Table 1 includes the number of clicks and the number of impressions fields, and the query condition is click-through rate. The data query process is as follows: Figure 5 As shown, first, an extended column can be generated in Table 1, and the ratio between the number of clicks and the number of impressions can be used as the corresponding extended field data value. For another example, Table 1 includes an age field and a gender field, and the query condition is 20-year-old males. Then, an extended column can be generated in Table 1, and the age field and the gender field can be concatenated to form a new attribute as the corresponding extended field data value. Exemplarily, based on the above two examples, the data query process including field extension is as follows: Figure 5 As shown. Figure 5 In the example, first, Table 1 is determined as the target underlying report, and the fields of Table 1 are extended according to the query conditions. Secondly, based on the real-time generation of extended fields, the data of Table 1 containing the extended fields is filtered or sorted according to the query conditions and extended fields. Finally, the filtered data is used to generate a target object report, and joined with other Tables 2 and N to associate and obtain other field information.

[0055] If the fields that the extended field generation depends on are located in different reports, and the extended fields need to be generated by splicing, first connect the different reports where the fields that the extended field generation depends on are located, and generate extended columns in the connected reports, and splice the fields corresponding to the extended field generation. For example, Table 1 includes the age field, Table 2 includes the gender field, and the query condition is 20-year-old male, then the data query process is as follows: Figure 6 As shown, first determine Table 1 and Table 2 as the target underlying report, then connect Table 1 and Table 2, generate an extended column in the connected report, splice the age field and the gender field to form a new attribute as the corresponding extended field data value, and then on the basis of real-time generation of extended fields, according to the query conditions and extended fields, filter or sort the data in the intermediate report after Table 1 and Table 2 are connected and contain extended fields, and finally generate the target object report with the filtered data, and join with other Table 3 and Table N to associate other field information. For another example, the combination of multidimensional features is usually used as the primary key value Key in the Redis database. When querying data, it is necessary to first calculate and generate the Key based on the query report to be connected, connect the target underlying report based on the Key, and generate the extended field with the Key column as the extended column for Key data query.

[0056] In addition, if the fields that the extended field generation depends on are located in different reports, and the extended fields need to be calculated, you can also directly obtain the data values ​​of the corresponding fields of the same entity and directly calculate the data values ​​under the extended fields. For example, Table 1 includes the number of clicks field, Table 2 includes the number of impressions field, and the query condition is click-through rate. The data query process is as follows: Figure 7 As shown, first, Table 1 and Table 2 are determined as target underlying reports, and then an extended column is generated in any report of Table 1 or Table 2 or in a new report, and the ratio between the number of clicks and the number of impressions is used as the corresponding extended field data value. Then, on the basis of real-time generation of extended fields, Table 1 or Table 2 containing the extended fields is connected with another target underlying report, or a new report containing the extended fields is connected with Table 1 and Table 2. After the target underlying reports are connected and based on the intermediate reports containing the extended fields, data is filtered or sorted according to query conditions and extended fields. Finally, the filtered data is used to generate a target object report, and joined with other Tables 3 and N to associate other field information.

[0057] For example, Figure 8 This is the data query flow chart after dynamically adjusting the field expansion. Figure 8As shown, in view of the different specific query conditions and the different fields included in the report, the expansion process of the extended field may appear at various stages in the data query process, such as before the target underlying report is filtered, before the target underlying report is connected, after the target underlying report is connected, or after the target underlying report is filtered or sorted, etc. Among them, the expansion process is split, and the expansion process that the filtering and / or sorting depends on is adjusted to before the filtering and / or sorting, and the remaining expansion processes can be processed after the filtering and / or sorting.

[0058] Optionally, based on the query conditions, the data values ​​under the required fields generated by the fields to be matched, and the association relationship between the data values ​​in the target underlying report, the data values ​​with an associated relationship under the required fields are determined; based on the data values ​​with an associated relationship under the required fields, an extended data value associated with the data value is generated under the extended field.

[0059] In this embodiment, the fields required for the generation of the to-be-matched fields can be determined according to the query conditions; in addition, the data values ​​under different fields of the same entity have an associated relationship, and they jointly describe the description information of the entity under different fields. Further, the data values ​​under the fields required for the generation of the to-be-matched fields can be determined, and the extended data values ​​associated with the data values ​​are generated under the extended fields by concatenating or calculating the determined data values.

[0060] For example, assume that Table 1 includes a student ID field, a student name field, and a gender field, and assume that the query condition is information about a boy named A. Based on the query condition, it can be determined that the field to be matched is a combination of name and gender, and such a field does not exist in Table 1. Therefore, an extended field is generated in Table 1, that is, the name field and the gender field are concatenated. Accordingly, the data values ​​of each entity in Table 1 in the name field and the gender field are concatenated to generate the data value of the entity under the extended field.

[0061] Optionally, before determining the data value with an associated relationship under the required field, it also includes: if it is determined according to the query condition that the extended field is the concatenation of fields in at least two target underlying reports, then connecting the at least two target underlying reports.

[0062] Among them, if the extended field is a data value calculated in real time, for example, the click rate is calculated based on the number of clicks and the number of impressions, then regardless of whether the number of clicks and the number of impressions are in the same report, the associated number of clicks data value and the number of impressions data value can be directly extracted for calculation to obtain the specific data value under the extended field, that is, the click rate field. In addition, if the extended field is a string obtained by real-time splicing, it is necessary to first determine whether the fields to be spliced ​​are in the same report. If the fields to be spliced ​​are all in the same report, the extended field can be directly generated in the report for string splicing; if the fields to be spliced ​​are not in the same report, it is necessary to first connect the report where the fields to be spliced ​​are located, and then splice the fields according to the connected report to obtain the extended field.

[0063] Step 430, match the query condition with the data value under the to-be-matched field in the target underlying report, determine the successfully matched data value as the target object; determine the data under each field of the target object in the target underlying report as the target report data of the target object.

[0064] In a specific embodiment of the present invention, it is not necessary to perform query operations such as screening and / or sorting based on the full amount of information after all query reports to be connected are connected. Instead, after the target underlying report is determined, the screening and / or sorting operations on the target underlying report that are relied upon when matching the fields to be matched are adjusted to be executed before the full amount of query reports to be connected are connected. That is, the specific processing process in the query process is dynamically adjusted according to the query conditions, so that the operations that can minimize the data processing scope are dynamically adjusted to the early stage for execution, so as to improve the data query efficiency.

[0065] Step 440: connect the target object report consisting of the target report data of the target object with at least one other report in the query report to be connected except the target underlying report; and determine the associated data of the target object under other fields from the connected intermediate report.

[0066] In a specific embodiment of the present invention, the target report data of the target object is the data of the target object in the target underlying report. In the data query scenario of the connection query, it is necessary to display the associated data of the target object in all query reports to be connected. It can be understood that the query condition is only based on one or more fields in the query report to be connected as the query condition, and the purpose of the query is to obtain the complete data information of the queried entity. The data under other fields may be the valid data information to be obtained by the query. Therefore, after obtaining the target object based on a small range of data screening and / or sorting processing, this embodiment can connect the target report data of the target object in the form of a report, that is, to form a target object report, with at least one other report in the query report to be connected except the target underlying report, so as to obtain the associated data of the target object under other fields from the connected intermediate report.

[0067] The present embodiment does not limit the report connection mode, and any connection mode that can retain the target object can be applied to the present embodiment. For example, it is preferred to adopt the left connection mode, that is, the target object report is used as the left table, and other reports are used as the right table to generate a complete set of the left table, and the matching ones in the right table have values, and the non-matching ones are replaced with NULL values.

[0068] Step 450: Display the target report data of the target object and the associated data of the target object in other fields as connection query result data.

[0069] In a specific embodiment of the present invention, by dynamically adjusting operations such as connection, filtering, and sorting, the data is divided into two parts, namely, the data part that the filtering or sorting depends on, and the data part that is not dependent. Correspondingly, after the data is queried, the query results are also divided into two parts, namely, the query results of the data that the filtering or sorting depends on, and the query results associated with the data part that is not dependent. Finally, the two parts of the query results are displayed together as a connection query result.

[0070] The technical solution of this embodiment has the following beneficial effects: based on the query conditions in the query request, the fields to be matched used for the screening and / or sorting operations during the query process are determined; if the fields to be matched are extended fields generated in real time, the generation operation sequence of the extended fields is dynamically adjusted, firstly the generation operation of the extended fields is performed, then the screening and / or sorting operations of the target underlying report are performed, and finally the association of multiple data reports is performed to obtain and display the associated data. Therefore, in the process of multiple data table connection query, the embodiment of the present invention overcomes the technical problem of low data query efficiency caused by data query based on full information by adopting the technical means of dynamically adjusting the query processing sequence of the target underlying report in the report to be queried, and realizes the priority processing of the data used for screening or sorting, and then the full report is connected based on the priority processing result to obtain the associated data, thereby narrowing the data query scope and reducing the amount of data report connections, thereby achieving the technical effect of improving data query efficiency and saving memory resources.

[0071] Embodiment 3

[0072] Fig. 9 This is a schematic diagram of the structure of a data query device provided in Embodiment 3 of the present invention. This embodiment can be applied to the case of performing data query based on big data reports. The device can implement the data query method described in any embodiment of the present invention. The device specifically includes:

[0073] The target underlying report determination module 910 is used to determine the target underlying report associated with the to-be-matched field on which the filtering and / or sorting operations depend from the to-be-connected query reports according to the query conditions in the query request obtained;

[0074] A target object query module 920 is used to match the target object that meets the query condition from the target underlying report according to the to-be-matched field, and obtain the target report data of the target object;

[0075] The data association module 930 is used to obtain the associated data of the target object in other fields from the query report to be connected according to the target report data of the target object.

[0076] Optionally, the target bottom-level report determination module 910 is specifically used for:

[0077] Matching the query condition with the data value under the to-be-matched field in the target underlying report, and determining the successfully matched data value as the target object;

[0078] The data of the target object under each field in the target underlying report is determined as the target report data of the target object.

[0079] Furthermore, the device further includes an extended field processing module 940; the extended field processing module 940 is specifically used for:

[0080] Before obtaining the target object that meets the query condition from the target underlying report based on the field to be matched and obtaining the target report data of the target object, it also includes: if it is determined according to the query condition that the field to be matched is an extended field obtained by real-time calculation based on the field in the target underlying report, then an extended calculation is performed on the field in the target underlying report on which the extended field associated with the query condition depends, so as to obtain the field to be matched.

[0081] Optionally, the extended field processing module 940 is specifically used to:

[0082] Determine the data value with the associated relationship under the required field according to the query condition, the data value under the field to be matched, and the associated relationship between the data values ​​in the target underlying report;

[0083] According to the data value with an associated relationship under the required field, an extended data value associated with the data value is generated under the extended field.

[0084] The extended field processing module 940 is specifically used for:

[0085] Before determining the data value with an associated relationship under the required field, if it is determined according to the query condition that the extended field is a concatenation of fields in at least two target underlying reports, the at least two target underlying reports are connected.

[0086] Optionally, the data association module 930 is specifically used for:

[0087] Connecting the target object report formed by the target report data of the target object with at least one other report in the query report to be connected except the target underlying report;

[0088] From the connected intermediate report, determine the associated data of the target object under other fields.

[0089] Furthermore, the device further includes a query data display module 950; the query data display module 950 is specifically used for:

[0090] After obtaining the associated data of the target object in other fields from the query report to be connected based on the target report data of the target object, it also includes: displaying the target report data of the target object and the associated data of the target object in other fields as connection query result data.

[0091] The technical solution of this embodiment realizes the functions of dynamic adjustment of connection query, determination of fields to be matched, calculation of extended fields, determination of target underlying reports, matching of target objects, association and display of data, etc. through the mutual cooperation between various functional modules. Therefore, in the process of connection query of multiple data tables, the embodiment of the present invention overcomes the technical problem of low data query efficiency caused by data query based on full information by adopting the technical means of dynamically adjusting the query processing order of target underlying reports in the report to be queried, realizes the priority processing of data used for screening or sorting, and then connects the full report based on the priority processing result to obtain related data, narrows the data query scope, reduces the number of data report connections, and thus achieves the technical effect of improving data query efficiency and saving memory resources.

[0092] Embodiment 4

[0093] Fig.10 This is a schematic diagram of the structure of a device provided in Embodiment 4 of the present invention. Fig.10 As shown, the device specifically includes: one or more processors 1010, Fig.10 In the example, a processor 1010 is used; the memory 1020 is used to store one or more programs. When the one or more programs are executed by one or more processors 1010, the one or more processors 1010 implement the data query method described in any embodiment of the present invention. The processor 1010 and the memory 1020 can be connected via a bus or other means. Fig.10 The example of connecting through bus is taken in the following.

[0094] The memory 1020, as a computer-readable storage medium, can be used to store software programs, computer executable programs and modules, such as program instructions corresponding to the data query method in the embodiment of the present invention (for example, dynamic adjustment of real-time extended field calculation and dynamic adjustment of screening and / or sorting). The processor 1010 executes various functional applications and data processing of the device by running the software programs, instructions and modules stored in the memory 1020, that is, implements the above-mentioned data query method.

[0095] The memory 1020 may mainly include a program storage area and a data storage area, wherein the program storage area may store an operating system and at least one application required for a function; the data storage area may store data created according to the use of the device, etc. In addition, the memory 1020 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one disk storage device, a flash memory device, or other non-volatile solid-state storage device. In some instances, the memory 1020 may further include a memory remotely arranged relative to the processor 1010, and these remote memories may be connected to the device via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.

[0096] Embodiment 5

[0097] Embodiment 5 of the present invention further provides a computer-readable storage medium on which a computer program (or computer-executable instructions) is stored. When the program is executed by a processor, it is used to execute a data query method, which includes:

[0098] According to the query conditions in the query request obtained, from the query report to be connected, determine the target underlying report associated with the to-be-matched field on which the filtering and / or sorting operations depend;

[0099] According to the to-be-matched field, a target object that meets the query condition is matched from the target underlying report, and target report data of the target object is obtained;

[0100] According to the target report data of the target object, the associated data of the target object under other fields are obtained from the query report to be connected.

[0101] Of course, the computer-readable storage medium provided by an embodiment of the present invention, whose computer-executable instructions are not limited to the method operations described above, can also execute related operations in the data query method provided by any embodiment of the present invention.

[0102] Through the above description of the implementation method, the technicians in the relevant field can clearly understand that the embodiments of the present invention can be implemented by means of software and necessary general hardware, and of course can also be implemented by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the embodiments of the present invention is essentially or the part that contributes to the prior art can be embodied in the form of a software product, and the computer software product can be stored in a computer-readable storage medium, such as a computer floppy disk, read-only memory (ROM), random access memory (RAM), flash memory (FLASH), hard disk or optical disk, etc., including a number of instructions for a computer device (which can be a personal computer, server, or network device, etc.) to execute the methods described in each embodiment of the present invention.

[0103] It is worth noting that in the embodiment of the above-mentioned device, the various units and modules included are only divided according to functional logic, but are not limited to the above-mentioned division, as long as the corresponding functions can be achieved; in addition, the specific names of the functional units are only for the convenience of distinguishing each other, and are not used to limit the scope of protection of the present invention.

[0104] Note that the above are only preferred embodiments of the present invention and the technical principles used. Those skilled in the art will understand that the present invention is not limited to the specific embodiments described herein, and that various obvious changes, readjustments and substitutions can be made by those skilled in the art without departing from the scope of protection of the present invention. Therefore, although the embodiments of the present invention are described in more detail through the above embodiments, the embodiments of the present invention are not limited to the above embodiments, and may include more other equivalent embodiments without departing from the concept of the present invention, and the scope of the present invention is determined by the scope of the appended claims.

Claims

1. A data query method, It is characterized in that include: According to the query conditions in the query request obtained, from the query report to be connected, determine the target underlying report associated with the to-be-matched field on which the filtering and / or sorting operations depend; According to the to-be-matched field, a target object that meets the query condition is matched from the target underlying report, and target report data of the target object is obtained; wherein the target object is a data value or an entity associated with the data value under the to-be-matched field obtained by querying the target underlying report; According to the target report data of the target object, the associated data of the target object in other fields are obtained from the query report to be connected; Before obtaining the target object that meets the query condition from the target underlying report according to the to-be-matched field and obtaining the target report data of the target object, the method further includes: If, according to the query condition, it is determined that the field to be matched is an extended field obtained by real-time calculation based on the field in the target underlying report, then an extended calculation is performed based on the field in the target underlying report on which the extended field associated with the query condition depends, so as to obtain the field to be matched; wherein the extended field is obtained by concatenation or calculation of fields; The method of performing an extended calculation on the field in the target underlying report that the extended field associated with the query condition depends on to obtain the field to be matched includes: Determine the data value with the associated relationship under the required field according to the query condition, the data value under the field to be matched, and the associated relationship between the data values ​​in the target underlying report; According to the data value with an associated relationship under the required field, generating an extended data value associated with the data value under the extended field; Before determining the data value with an associated relationship under the required field, the method further includes: If it is determined according to the query condition that the extended field is a concatenation of fields in at least two target underlying reports, the at least two target underlying reports are connected.

2. The method according to claim 1, It is characterized in that The step of matching the target object that meets the query condition from the target underlying report based on the to-be-matched field, and obtaining the target report data of the target object includes: Matching the query condition with the data value under the to-be-matched field in the target underlying report, and determining the successfully matched data value as the target object; The data of the target object under each field in the target underlying report is determined as the target report data of the target object.

3. The method according to claim 1, It is characterized in that The step of obtaining the associated data of the target object in other fields from the query report to be connected based on the target report data of the target object includes: Connecting the target object report formed by the target report data of the target object with at least one other report in the query report to be connected except the target underlying report; From the connected intermediate report, determine the associated data of the target object under other fields.

4. The method according to claim 1, It is characterized in that After obtaining the associated data of the target object in other fields from the query report to be connected based on the target report data of the target object, the method further includes: The target report data of the target object and the associated data of the target object under other fields are displayed as connection query result data.

5. A data query device, It is characterized in that include: A target underlying report determination module is used to determine, from the query reports to be connected, the target underlying report associated with the to-be-matched field on which the filtering and / or sorting operations depend, based on the query conditions in the query request obtained; A target object query module, used to match the target object that meets the query condition from the target underlying report according to the to-be-matched field, and obtain the target report data of the target object; wherein the target object is the data value or the entity associated with the data value under the to-be-matched field obtained by querying the target underlying report; A data association module, used for associating and obtaining the associated data of the target object under other fields from the query report to be connected according to the target report data of the target object; The extended field processing module is used for: before obtaining the target object that meets the query condition from the target underlying report according to the field to be matched and obtaining the target report data of the target object, if it is determined according to the query condition that the field to be matched is an extended field obtained by real-time calculation based on the field in the target underlying report, then performing extended calculation according to the field in the target underlying report on which the extended field associated with the query condition depends, so as to obtain the field to be matched; wherein the extended field is obtained by concatenation or calculation of fields; Wherein, the extended field processing module is specifically used for: Determine the data value with the associated relationship under the required field according to the query condition, the data value under the field to be matched, and the associated relationship between the data values ​​in the target underlying report; According to the data value with an associated relationship under the required field, generating an extended data value associated with the data value under the extended field; The extended field processing module is specifically used for: Before determining the data value with an associated relationship under the required field, if it is determined according to the query condition that the extended field is a concatenation of fields in at least two target underlying reports, the at least two target underlying reports are connected.

6. A data query device, It is characterized in that include: one or more processors; A memory for storing one or more programs; When the one or more programs are executed by the one or more processors, the one or more processors implement the data query method according to any one of claims 1 to 4.

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