A data query method and device, electronic equipment and storage medium
By automatically generating data query logic and statements through a visual interface, it solves the problem that ordinary users have difficulty performing data queries, and improves the flexibility and speed of complex data queries.
Patent Information
- Application Number
- CN202111630201.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-12-28
- Publication Date
- 2025-12-05
- Estimated Expiration
- 2041-12-28
AI Technical Summary
Current technologies require a high level of expertise to perform data queries, making them difficult for ordinary users to implement.
This paper provides a visual data query method that allows users to input relevant commands on a terminal device through a visual interface, automatically generating query logic and query statements, thus reducing the difficulty of operation for users.
It enables ordinary users to perform complex data queries, reduces the requirement for professional knowledge, and improves the speed and flexibility of data querying.
Smart Images

Figure CN114416772B_ABST
Abstract
Description
Technical Field
[0001] This disclosure relates to the field of computer technology, and more particularly to the field of data retrieval technology. Background Technology
[0002] Data querying is a crucial component of data platform products. Currently, data querying is typically achieved by specialized technical personnel who write backend Structured Query Language (SQL) code and then execute the SQL statements within a specific database environment. This approach requires a high level of expertise and is difficult for ordinary users to implement. Summary of the Invention
[0003] This disclosure provides a data query method, apparatus, electronic device, and storage medium.
[0004] According to one aspect of this disclosure, a data query method is provided, comprising:
[0005] Determine the dataset to be queried, which may include a database or a table;
[0006] Based on the pre-configured data model, determine the multiple fields contained in the dataset to be queried;
[0007] Display the multiple fields, and in response to a selection instruction for the multiple fields, determine at least one output field from the multiple fields;
[0008] In response to a setting instruction for each of the at least one output fields, determine whether each output field corresponds to aggregation logic;
[0009] The query logic is determined based on whether each output field corresponds to aggregation logic.
[0010] According to another aspect of this disclosure, a data query apparatus is provided, comprising:
[0011] The dataset determination module is used to determine the dataset to be queried, which may include a database or a table.
[0012] The field determination module is used to determine the multiple fields contained in the dataset to be queried based on the pre-configured data model.
[0013] A display module is used to display the plurality of fields and, in response to a selection instruction for the plurality of fields, determine at least one output field from the plurality of fields;
[0014] The instruction setting module is used to determine whether each output field corresponds to aggregation logic in response to a setting instruction for each of the at least one output fields;
[0015] The logic determination module is used to determine the query logic based on whether each output field corresponds to aggregation logic.
[0016] According to another aspect of this disclosure, an electronic device is provided, comprising:
[0017] At least one processor; and
[0018] A memory communicatively connected to the at least one processor; wherein,
[0019] The memory stores instructions executable by the at least one processor, which, when executed by the at least one processor, enables the at least one processor to perform the method described in any aspect of this disclosure.
[0020] According to another aspect of this disclosure, a non-transitory computer-readable storage medium is provided storing computer instructions, wherein the computer instructions are configured to cause the computer to perform the method described according to any aspect of this disclosure.
[0021] According to another aspect of this disclosure, a computer program product is provided, including a computer program that, when executed by a processor, implements the method described in any aspect of this disclosure.
[0022] It should be understood that the description in this section is not intended to identify key or essential features of the embodiments of this disclosure, nor is it intended to limit the scope of this disclosure. Other features of this disclosure will become readily apparent from the following description. Attached Figure Description
[0023] The accompanying drawings are provided to better understand this solution and do not constitute a limitation of this disclosure. Wherein:
[0024] Figure 1 This is a flowchart illustrating the implementation of a data query method according to an embodiment of the present disclosure;
[0025] Figure 2 This is a schematic diagram of an application scenario according to an embodiment of the present disclosure;
[0026] Figure 3 This is a schematic diagram of a data model configuration page according to one embodiment of the present disclosure;
[0027] Figure 4 This is a schematic diagram of a visual operation page according to one embodiment of the present disclosure;
[0028] Figure 5 This is a flowchart illustrating the implementation of a data query method according to another embodiment of this disclosure;
[0029] Figure 6This is a flowchart illustrating the implementation of data initialization in a visual operation page within a data query method according to an embodiment of this disclosure;
[0030] Figure 7 This is a flowchart illustrating the implementation of a data query method according to another embodiment of this disclosure;
[0031] Figure 8 This is a schematic diagram of the structure of a data query device according to an embodiment of the present disclosure;
[0032] Figure 9 This is a schematic diagram of the structure of a data query device according to another embodiment of the present disclosure;
[0033] Figure 10 This is a schematic diagram of the structure of a data query device according to another embodiment of the present disclosure;
[0034] Figure 11 This is a schematic diagram of the structure of a data query device according to another embodiment of the present disclosure;
[0035] Figure 12 This is a schematic diagram of the structure of a data query device according to another embodiment of the present disclosure;
[0036] Figure 13 This is a schematic diagram of the structure of a data query device according to another embodiment of the present disclosure;
[0037] Figure 14 This is a block diagram of an electronic device used to implement the methods of the embodiments of this disclosure. Detailed Implementation
[0038] The exemplary embodiments of this disclosure are described below with reference to the accompanying drawings, including various details of the embodiments to aid understanding, and should be considered merely exemplary. Therefore, those skilled in the art will recognize that various changes and modifications can be made to the embodiments described herein without departing from the scope and spirit of this disclosure. Similarly, for clarity and brevity, descriptions of well-known functions and structures are omitted in the following description.
[0039] This disclosure proposes a data query method that provides a visual query logic generation method with low requirements for professional expertise. Users can input relevant commands on a visual interface, thereby automatically generating query logic based on user commands.
[0040] In this embodiment, the user can be a professional technician or an ordinary user without database expertise. This embodiment involves concepts from database technology such as data source, database, table, and field. Simply put, a data source can refer to a device or medium used to provide data. A data source can contain multiple databases, each database can contain multiple tables, and each table can contain multiple fields. Both databases and tables can be referred to as datasets. Fields can include field names and other relevant information, such as the field's Chinese alias, data type, control type for filtering conditions, and field type. The attribute information of the data source can include the names of all databases set in the data source, the names of tables in each database, and the field names and other relevant information for each field in each table. Field types can include three types: dimension, measure, and unknown. For example, when the data type is string, date, etc., the corresponding field type defaults to "dimension"; when the data type is integer, floating-point, etc., the corresponding field type defaults to "measure"; for keywords, such as identifiers (ID), the corresponding field type can be "unknown".
[0041] This disclosure provides a data query method. Figure 1 This is a flowchart illustrating a data query method according to an embodiment of the present disclosure, including:
[0042] S110: Determine the dataset to be queried, wherein the dataset to be queried includes a database or a table;
[0043] S120: Based on the pre-configured data model, determine the multiple fields contained in the dataset to be queried;
[0044] S130: Display the plurality of fields, and in response to a selection instruction for the plurality of fields, determine at least one output field from the plurality of fields;
[0045] S140: In response to a setting instruction for each of the at least one output fields, determine whether each output field corresponds to aggregation logic;
[0046] S150: Determine the query logic based on whether each output field corresponds to aggregation logic.
[0047] Based on the above query logic, upon receiving a query statement generation instruction, a query statement corresponding to the query logic can be generated. Through the above process, the embodiments of this disclosure can achieve automated data querying.
[0048] Furthermore, the query statement can be sent to the data engine corresponding to the dataset to be queried, so that the data engine can perform data retrieval based on the query statement.
[0049] Figure 2 This is a schematic diagram illustrating an application scenario of one embodiment of this disclosure. For example... Figure 2 As shown, the user can input relevant commands on the terminal device 210, which then sends the input commands to the data query device 220. The data query device 220 determines the query logic based on the user commands uploaded by the terminal device 210 and further generates a query statement. The generated query statement is then sent to the data engine 230 corresponding to the dataset to be queried. The data engine 230 uses the query statement to query data from the data source 240 corresponding to the dataset.
[0050] Subsequently, the data engine 230 sends the query results to the terminal device 210 or the query result display device 250, which then displays the data query results. Alternatively, the data engine 230 sends the query results to the data query device 220, which then sends the query results to the terminal device 210 or the query result display device 250, which then displays the data query results.
[0051] The query statement mentioned above can refer to an SQL query statement, and correspondingly, the query logic mentioned above can refer to the query logic that generates the SQL query statement. The query logic may include at least the following:
[0052] (1) Conditional query, which is to output which fields from which databases or tables that meet certain conditions. The corresponding SQL query statement is "Select[field name1, field name2, ..., field nameN] from[table name1, table name2, ..., table nameM] where[filter condition1 and / or filter condition2, ...]".
[0053] (2) Sorting, that is, sorting the output content according to which field(s). It corresponds to "Order[field_name1, field_name2, ..., field_nameL]" in the SQL query statement.
[0054] (3) Limit on the number of output records, which corresponds to "Limit[number of output records]" in the SQL query statement.
[0055] (4) Aggregate functions or logic, mainly used for vertical operations. They correspond to "Sum(field_name1)" in SQL queries, used to calculate the sum of the column containing field_name1; or "Avg(field_name2)" in SQL queries, used to calculate the average of the column containing field_name2; or "Distinct Count(field_name3)" in SQL queries, used to perform deduplication and summation based on field_name3. Other SQL queries representing aggregation logic can also be used, but these will not be listed exhaustively here.
[0056] (5) The output content is grouped by which field(s). This corresponds to "Group by [field_name1, field_name2, ..., field_nameH]" in the SQL query statement.
[0057] This disclosure provides a visual data query method that offers flexible query statement (such as SQL statement) assembly capabilities, including free output of fields, sorting, support for aggregate functions and corresponding aggregation logic, and support for complex condition filtering.
[0058] To achieve the above capabilities, users can input relevant commands through a visual interface on a terminal device by clicking or dragging. Based on the user's input commands, this embodiment can determine the corresponding query logic and generate a query statement using the determined query logic. Furthermore, this disclosure supports multi-table multi-dimensional aggregation queries. Users can determine multiple datasets to be queried and input the connection relationships between the datasets. Based on the multiple datasets to be queried determined by the user and the connection relationships between the datasets, the required fields can be queried from the multiple datasets.
[0059] This disclosure provides users with a visual interface for inputting relevant commands; users only need to select the fields and query conditions to be queried through simple clicks or drags in the visual interface, without needing to understand the relevant query logic, query statement generation methods and other professional knowledge, thus greatly reducing the difficulty of operation for users.
[0060] The visual interface provided in this disclosure can be implemented using at least the following two pages:
[0061] Page 1 – Data Model Configuration Page:
[0062] Figure 3 A schematic diagram of a data model configuration page according to one embodiment of this disclosure. The user can input identification information for multiple datasets to be configured; these datasets can be databases or tables, and correspondingly, the identification information for these datasets can include database names and table names; the user can also input the source information of the datasets. Figure 3On the data model configuration page shown, users can enter at least one of the following for the data sets to be configured: field names (including aliases), data types, field types, and filter control types. Field types include dimension types, measure types, and unknown types; for example, when the data type is string, date, etc., the corresponding field type is generally "dimension"; when the data type is integer, floating-point, etc., the corresponding field type is generally "measure"; for keywords, such as identifiers (ID), the corresponding field type can be "unknown". Users can enter the aforementioned information by typing or clicking in the input area of the data model configuration page. Figure 3 For example, in the "Parameter Name" text input box on the data model configuration page, the user enters the parameter name "ctime"; in the "Alias" text input box on the data model configuration page, the user enters the alias "date"; in the "Data Type" option input box on the data model configuration page, the user selects the data type "datetime", indicating that the data type represents date data; in the "Control Type" option input box on the data model configuration page, the user selects the control type "datetime", indicating that the control type for this filter condition is a control related to date data; since the user enters the data type as date, the field type option input box displays the measure type by default. The user can directly click on the measure type to select, or click on the drop-down menu to select other types as the field type for this field.
[0063] Through the aforementioned click and input operations, the user inputs identification information for multiple datasets to be configured, including at least one of the following: field name, data type, field type, and control type for filtering conditions in each dataset; wherein, the field type includes dimension type, measure type, and unknown type;
[0064] In response to the information input command, a data model can be configured that records the information contained in the information input command.
[0065] After configuring the data model described above, data initialization can be completed on page 2 (the visual operation page) to facilitate user input of relevant commands. Then, the user-selected output fields and other settings are determined based on the user's commands. Page 2 is described in detail below:
[0066] Page 2 - Visual Operation Page
[0067] Figure 4 This is a visual operation page diagram according to one embodiment of the present disclosure. For example... Figure 4As shown, the visual operation page includes at least four areas. Users input relevant commands in each area, and the system responds to these commands by determining the output fields, whether the output fields correspond to aggregation logic, the filtering conditions for the output content, the sorting method for the output content, the maximum number of records, and other related information. The four areas are as follows:
[0068] Area 1:
[0069] Region 1 is used for the user to select the dataset to be queried. In response to the information entered by the user in Region 1, the process of determining the dataset to be queried in the data query method proposed in this embodiment can be realized, corresponding to step S110 in the above embodiment.
[0070] This disclosure can utilize region 1 to determine the dataset to be queried. In some embodiments, it may include the following steps:
[0071] Based on the pre-configured data model, determine the identification information of multiple datasets to be configured;
[0072] Display the identification information of the above-mentioned datasets to be configured;
[0073] In response to a selection instruction for any identifier among the identifier information of multiple datasets to be configured, at least two datasets to be queried are determined.
[0074] like Figure 4 As shown in Region 1, based on the information recorded in the data model described above, Region 1 can display information contained in the data model, such as the identification information of multiple datasets to be configured. Figure 4 In Zone 1, the identification information for multiple datasets to be configured is displayed, including multiple table names, such as the student table, test table, and grade table. Users can enter selection instructions for any table name by clicking, such as clicking on the student table and test table displayed in Zone 1; based on this selection instruction, it can be determined that the datasets selected by the user to be queried include the student table and test table, and finally the student table and test table selected by the user are displayed in Zone 1.
[0075] The embodiments disclosed herein support users in selecting multiple datasets to be queried and enabling multidimensional aggregated queries based on multiple datasets to be queried. That is, it is possible to query field information contained in multiple datasets to be queried, rather than being limited to field information in a single dataset.
[0076] In addition, in region 1, the embodiments of this disclosure can also support users to drag and drop multiple datasets to be queried, thereby inputting the connection relationship between the datasets to be queried.
[0077] For example, in some implementations, after the user selects at least two datasets to be queried, the process further includes:
[0078] Display the identification information of each dataset in the at least two datasets to be queried;
[0079] In response to a drag-and-drop instruction on the identifier information of any dataset to be queried, the connection relationship between any dataset to be queried in the at least two datasets to be queried is determined.
[0080] The connection relationships mentioned above can include inner joins, outer joins, and left joins. An inner join, also called a join, can also be referred to as a normal join or a natural join. An inner join removes all rows from the result table that do not have a matching row with the other joined tables. An outer join, also called a full outer join, returns all rows from both the left and right tables; if a row in the other table has no matching row, the select list column of the other table will contain null values. If there are matching rows between the tables, the entire result set will contain the data values from the base tables. A left join, also called a left outer join, returns all rows from the right table; if a row in the left table has no matching row in the right table, it will return null values for the right table. A right outer join returns all rows from the right table; if a row in the right table has no matching row in the left table, it will return null values for the left table.
[0081] like Figure 4 As shown, in response to the user's drag command, the connection between the student table and the test table is determined to be a left join, and the corresponding icon is displayed.
[0082] The above connection relationship and Figure 4 The connection relationship icons shown are merely examples. This disclosure does not limit the connection relationships between the datasets to be queried, nor does it limit the views of various connection relationships. Furthermore, this disclosure also supports setting the connection relationship between any two datasets to be queried from multiple datasets to be queried. Users can... Figure 4 In Region 1, drag and drop to input the connection relationship between any two datasets to be queried.
[0083] Area Two:
[0084] Region 2 is used for users to select output fields. In response to the information entered by the user in Region 2, the process of determining the output fields and determining whether each output field corresponds to the aggregation logic in the data query method proposed in this embodiment can be realized, corresponding to steps S120 to S140 in the above embodiments.
[0085] Combination Figure 4 The embodiments disclosed herein can utilize region 2 to determine the output field, specifically including:
[0086] Based on a pre-configured data model, determine the multiple fields contained in the dataset to be queried, and display these multiple fields. Figure 4 In Zone 2, the dataset to be queried includes a student table and a test table. Based on the field information of the dataset to be configured, which is included in the pre-configured data model, the fields contained in the dataset to be configured can be determined and displayed in Zone 2. For example, Figure 4 Area 2 shows that the student table contains fields including date, ID, student name, age, gender, and credits; the test table contains fields including user ID, course name, and course grade.
[0087] Users can click on fields displayed in area 2. This click indicates a selection instruction for that field, designating it as an output field. In response to these selection instructions, at least one output field is determined from the multiple fields displayed in area 2. For example, Figure 4 In Zone 2, the user clicks on the fields "ID" and "Student Name" in the student table, and clicks on the fields "Course Name" and "Course Grade" in the test table, thus inputting a selection command. Based on this selection command, it can be determined that the user has selected "Student Name," "Course Name," "Course Grade," and "ID" as the output fields. In some implementations, this can be done in a fixed area of Zone 2 (e.g., Figure 4 The middle section (the upper half of region 2) displays the names of these output fields.
[0088] Furthermore, in the aforementioned fixed area of region 2 (such as...) Figure 4 In the upper half of region 2, user input for setting instructions for output fields is also provided; in response to setting instructions for any output field, it can be determined whether the output field corresponds to aggregation logic.
[0089] In some implementations, the methods for determining whether each output field corresponds to aggregation logic include:
[0090] For any output field among at least one output field, display multiple statistical methods for that arbitrary output field;
[0091] In response to the instruction to select one of the multiple statistical methods, determine the calculation function corresponding to any output field;
[0092] Based on the calculation function corresponding to the arbitrary output field, determine whether the arbitrary output field corresponds to aggregation logic.
[0093] In some possible implementations, the various statistical methods for the aforementioned arbitrary output field include: statistics based on the original value, general count statistics, deduplicated count statistics, statistical average, summation statistics, statistical maximum value, statistical minimum value, and statistical median. Optionally, when the field type of the aforementioned arbitrary output field is a measurement type or an unknown type, the various statistical methods for the arbitrary output field are determined.
[0094] by Figure 4 For example, in the fixed region of region 2, multiple statistical methods can be provided for any output field, such as... Figure 4 As shown, the output field "ID" has the following optional statistical methods: statistical analysis based on the original value (corresponding to...). Figure 4 The "original value" in the text), general counting statistics (corresponding to) Figure 4 The "count" in the text), deduplication count statistics (corresponding to) Figure 4 "Duplicate count" and statistical average (corresponding to) Figure 4 (See "Average" in the example). Users can select from these optional statistical methods to determine the calculation function corresponding to any output field; based on the calculation function, it can be determined whether the output field corresponds to aggregation logic. Specifically, the different statistical methods mentioned above correspond to different calculation functions. For example, the calculation function corresponding to deduplication counting is "Distinct Count()" (the field name is included in the function's parentheses), and the calculation function corresponding to averaging is "AVG()", and so on.
[0095] If the calculation function corresponding to the output field is "Sum()", "AVG()", or "Distinct Count()", then the aggregation logic corresponding to that output field can be determined.
[0096] Furthermore, in the above embodiments, for any output field among at least one output field, displaying multiple statistical methods for that arbitrary output field may include:
[0097] Determine the field type of the arbitrary output field based on the pre-configured data model;
[0098] Based on the field type of the arbitrary output field, determine the various statistical methods for the arbitrary output field;
[0099] Displays various statistical methods for this arbitrary output field.
[0100] Since different statistical methods may be supported for output fields of different field types, the present invention determines the statistical method of the output field according to the field type, allowing users to choose the appropriate statistical method. This is very user-friendly for inexperienced users; users do not need to understand complex database knowledge and only need to make selections in the visual interface.
[0101] Furthermore, users do not need to understand how the aggregation logic is determined when generating query statements (such as SQL statements). They only need to select from the statistical methods supported by the system provided in the visual interface to set the output fields. The solution for implementing data query proposed in this disclosure can automatically determine whether each output field corresponds to the aggregation logic according to the user's setting instructions, and determine the query logic according to whether the output fields correspond to the aggregation logic, thereby generating query statements (such as SQL statements).
[0102] In some implementations, if there is an output field with corresponding aggregation logic in at least one of the above-mentioned output fields, the query logic is determined to be the first query logic.
[0103] The first query logic includes: querying at least one of the above output fields from the dataset to be queried, and grouping and outputting the query results according to the output fields of the corresponding aggregation logic.
[0104] Alternatively, if there is no corresponding aggregate logic output field among at least one of the above output fields, the query logic is determined to be the second query logic.
[0105] The second query logic includes: querying at least one of the above output fields from the dataset to be queried, and directly outputting the query results.
[0106] As can be seen, the present invention can automatically determine the query logic based on whether there is an output field corresponding to the aggregation logic, that is, determine whether to group and output according to the output field of the aggregation logic or directly output the query results; users do not need to determine the query logic based on the characteristics of the output field, thus reducing the requirements for users' professional knowledge and enabling flexible and multi-dimensional aggregation queries of multiple tables in a simple and convenient way.
[0107] Specifically, when one or more output fields correspond to aggregation logic (the corresponding calculation functions are SUM, AVG, COUNT DISTINCT, etc.), this embodiment performs statistics on the dimension fields and metric fields appearing in the output fields; its query logic is to query the output fields from the dataset (such as a database or table) according to the filtering conditions, and group the output results (group by); the corresponding SQL statement is as follows:
[0108] SELECT [function(metric)or dimension] FROM table_name WHERE [filter condition] GROUP BY [dimension] ORDER BY [metric or dimension] LIMIT [number of rows to output].
[0109] When none of the multiple output fields correspond to aggregation logic, this embodiment directly outputs the query results; the query logic is to query the output fields from the dataset (such as a database or table) based on the filtering conditions, and the corresponding SQL statement is as follows:
[0110] SELECT [metric or dimension] FROM table_name WHERE [filter condition] ORDER BY [metric or dimension] LIMIT [number of rows to output].
[0111] By default, this function aggregates data based on the output dimension fields when the output fields contain functions or aggregation logic; otherwise, it only queries the data. This function can meet the data query needs of complex scenarios and satisfy 90% of aggregation scenarios. Additionally, to meet query scenarios involving unknown output fields (such as ID or other unique fields), this function uses the unknown output field as a measure field when it contains aggregation logic or functions, and as a dimension field when it does not. An example is shown below:
[0112] (1) When an output field of unknown type (such as ID) contains aggregate logic or functions, it is used as a measure field. ID does not participate in the grouping of the output results. The corresponding SQL statement example is as follows:
[0113] SELECT sum(ID),name GROUP BY name
[0114] (2) When an output field of unknown type (such as ID) does not contain aggregation logic or functions, it is used as a dimension field. ID participates in the grouping of the output results. The corresponding SQL statement example is as follows:
[0115] SELECT ID,name GROUP BY ID,name
[0116] The above introduces the user's experience. Figure 4 Enter the command in area 2, and determine the implementation process of the query logic based on the user's command.
[0117] Continue back Figure 4 The visual operation page shown is Figure 4 The visual operation page also includes the following areas:
[0118] Area 3:
[0119] Zone 3 is used for filtering conditions of user input and output content. For example... Figure 4 As shown in region 3, users can click on the fields and filtering methods displayed on the visualization operation page to input the fields and filtering methods in the filtering conditions; in response to the user's input, the data query method proposed in this embodiment can determine the filtering conditions. Figure 4 For example, a user selects "Gender" in the test table displayed on the visualization operation page, selects the value "Male" for the "Gender" field, and selects the corresponding filter method as "Not". In response to the user's above selection instruction, it can be determined that the corresponding filter condition is: the value of the "Gender" field in the test table is not equal to "Male".
[0120] This filter condition can be used as part of the query logic, indicating that the output query content does not contain information where the "gender" field in the test table has a value of "male". This part of the query logic corresponds to the WHERE clause in the query statement (such as an SQL statement).
[0121] Area 3 also supports grouping of filter conditions. For example, after inputting multiple filter conditions, the user can select multiple filter conditions and click the "Group" button in Area 3 to group the selected filter conditions. In response to the user's grouping settings, the data query method proposed in this embodiment can group the user-selected filter conditions. For example, if the user selects filter condition 1 and filter condition 2, and chooses to group filter condition 1 and filter condition 2, then filter condition 3 can be determined. Filter condition 3 represents (filter condition 1 and filter condition 2), that is, it simultaneously satisfies filter condition 1 and filter condition 2.
[0122] Area 4:
[0123] Area 4 is used to determine the maximum amount of user input and output content. For example... Figure 4 As shown in area 4, users can enter a value in the "Result Limit" input box to indicate the maximum number of output contents.
[0124] Utilizing users Figure 4 The instructions entered in each area of the visual operation page shown in this embodiment can determine the query logic. It should be noted that... Figure 4The aforementioned areas are merely illustrative examples. This disclosure does not limit the display method of the visual operation page or the input method of user commands, and may also support input of other content. For example, the visual operation page may also support user input of the sorting method for query results. The visual operation page can select multiple fields for sorting. When the user clicks on any one or more of the multiple fields for sorting, it indicates that the output results should be arranged and displayed according to those fields; this content may correspond to the ORDER section of a query statement (such as an SQL statement).
[0125] In response to user input instructions, query logic is generated. The data query method provided in this disclosure may further include:
[0126] In response to the query statement generation command, generate the query statement corresponding to the query logic;
[0127] The query statement is sent to the data engine corresponding to the dataset to be queried, so that the data engine can use the query statement to perform data retrieval.
[0128] For example, in Figure 4 The visualized operation page includes a "Submit" button. Users can click this button to send a query statement generation command. After detecting the user's click on the "Submit" button, this embodiment automatically generates a query statement corresponding to the query logic, locates the data engine corresponding to the dataset (such as a database or table) to be queried, and sends the generated query statement to the data engine for data querying. This provides users with a simple one-click query operation, eliminating the need for users to understand the syntax rules and logic of the query statement or the determination method of the relevant data engine. Therefore, the data query method proposed in this embodiment reduces the cost of data understanding, decreases reliance on technical personnel, and reduces the difficulty of SQL queries. Through drag-and-drop configuration and modular functional areas, the query structure is visually clear and easy to understand, and it can greatly improve data query speed. By controlling the data throughput, it can achieve targeted, second-level return of small datasets.
[0129] The following is based on user feedback. Figure 3 and Figure 4 The operation shown on the visualization page illustrates a data query method proposed in this disclosure. Figure 5 Here is a flowchart of a data query method according to another embodiment of this disclosure, which includes the following stages:
[0130] S510: Model configuration, where users configure data source access and data fields.
[0131] Specifically, users can... Figure 3 Configure the model on the data model configuration page shown, determine the dataset to be configured, and configure each data field in the dataset, including the field name, alias, data type, field type, and control type of the filter conditions.
[0132] S520: Obtain the user's selected data source and field configuration information, and place them in the corresponding field input area and condition selection area.
[0133] Specifically, users can... Figure 4 The dataset to be queried is determined in area 1 shown. This dataset can be any dataset from the datasets to be configured determined in step S510. After the user selects the dataset to be queried, it can be... Figure 4 The fields contained in the dataset to be queried are shown in areas 2 and 3. Users can... Figure 4 Clicking on a field displayed in area 2 serves as an instruction to select that field as the output field; in response to the user's instruction, the user's selected output field can be determined. Furthermore, the user can... Figure 4 In area 3, click on the field shown above, and then click on the field value and calculation logic (such as "AND", "OR", "NOT") corresponding to the filter condition; in response to the user's click command, determine the filter condition in the generated query logic.
[0134] S530: Obtain the user's field selection and condition configuration, and perform logical processing on the field output and grouping parts of the SQL based on the field function information.
[0135] Specifically, users can... Figure 4 After determining the output field in area 2, select the statistical method for that output field. Based on this method, the corresponding function information can be determined, and logical processing can be performed on the field output and grouping parts of the SQL based on this function information. The specific query logic and query statements have been described in the above implementation method and will not be repeated here.
[0136] S540: Obtain the condition selection and number limit information, and concatenate it with the part that has been processed by the aforementioned logic.
[0137] Specifically, users can... Figure 4 The input condition restriction information in region 4 shown, combined with the condition selection in S520 above, can be concatenated with the part that has been completed by the aforementioned logical processing to obtain the complete query logic.
[0138] S550: Based on the data source information selected by the user, the assembled SQL is assigned to different data engines for execution.
[0139] Specifically, the corresponding data engine can be determined based on the dataset (such as a database or table) selected by the user. After receiving the user's query statement generation instruction, a query statement can be generated according to the query logic obtained in S540, and the query statement can be sent to the aforementioned data engine so that the data engine can perform data querying using the query statement (such as an SQL statement).
[0140] In some implementations, in response to the user's... Figure 3 After configuring the data model on the data model configuration page shown, this embodiment of the disclosure can... Figure 4 Data initialization is performed on the visual operation page shown. Figure 6 This is a flowchart illustrating the implementation of data initialization in a visual operation page within a data query method according to an embodiment of this disclosure, including:
[0141] S610: Retrieve the data source in region 1.
[0142] Specifically, the datasets selectable by the user for querying are initialized based on a pre-configured data model. For example, all datasets corresponding to the pre-configured data model are used as the datasets selectable by the user for querying.
[0143] S620: Obtain the field type from the data source and initialize the filter conditions and output fields.
[0144] Specifically, based on the pre-configured data model, the fields and field types in the dataset to be queried can be determined, thereby initializing the selectable output fields in region 2 and the fields involved in the conditional filtering in region 3.
[0145] S630: Place the initialized fields in area 2 and area 3 respectively, and wait for user input.
[0146] Then, the user can make selections in the initialized fields of region 2. In response to the user's selection command, the selected output field can be determined. Furthermore, the user can make selections in the initialized fields of region 3. In response to the user's selection command and the choice of filtering algorithm, the selected filtering method can be determined.
[0147] In this embodiment of the disclosure, the user inputs relevant instructions through a visual page, and in response to the user's input instructions, an SQL query statement can be generated and data can be queried. Figure 7 This is a flowchart of a data query method according to another embodiment of the present disclosure, which mainly describes the relevant operations in response to different user commands, including the following stages:
[0148] S710: In response to user commands, retrieve the output field selected by the user in area 2 of the visual operation page, and generate a field statement based on the output field, such as the SELECT part of an SQL statement.
[0149] S720: Determine the output field corresponding to the aggregation logic among the user-selected output fields and generate a grouping statement, such as the GEOUP BY part of an SQL statement. If a corresponding aggregation logic output field exists among the user-selected output fields, the output content is grouped based on that output field; if no corresponding aggregation logic output field exists among the user-selected output fields, the query content is directly output and displayed.
[0150] S730: Collects the sorting order of the output content and generates sorting conditions, such as the ORDER BY part of an SQL statement.
[0151] S740: Obtain the structure of the filtering conditions in region 3 and generate the filtering condition statement, such as the WHERE part of the SQL statement.
[0152] S750: Get the maximum number of output records that the user inputs in zone 4, and generate an output record limit statement, such as the LIMIT part of an SQL statement.
[0153] S760: Combine the above conditions to obtain the SQL query statement, such as:
[0154] Select(sum(a),b)from table where(c)group by(b)order(d)limit(e).
[0155] S770: Determines the corresponding query engine based on different data sources and sends the SQL query statement to the determined query engine.
[0156] For example, the corresponding query engine can be determined based on the dataset (such as a database or table) selected by the user, the SQL statement can be sent to the query engine, the query engine can execute the data query and return the data query results.
[0157] This disclosure also proposes a data query device. Figure 8 ,include:
[0158] Data set determination module 810 is used to determine the dataset to be queried, wherein the dataset to be queried includes a database or a table;
[0159] The field determination module 820 is used to determine multiple fields contained in the dataset to be queried based on a pre-configured data model.
[0160] Display module 830 is configured to display the plurality of fields and, in response to a selection instruction for the plurality of fields, determine at least one output field from the plurality of fields;
[0161] The instruction setting module 840 is configured to determine whether each output field corresponds to aggregation logic in response to a setting instruction for each of the at least one output fields.
[0162] The logic determination module 850 is used to determine the query logic based on whether each output field corresponds to aggregation logic.
[0163] Figure 9 This is a schematic diagram of a data query device according to another embodiment of the present disclosure. The device includes one or more features of the above-described data query device embodiment. The logic determination module 850 includes:
[0164] The first query submodule 910 is used to determine the query logic as the first query logic when there is an output field with corresponding aggregation logic in the at least one output field;
[0165] The first query logic includes: querying at least one output field from the dataset to be queried, and grouping and outputting the query results according to the output fields of the corresponding aggregation logic.
[0166] The second query submodule 920 is used to determine the query logic as the second query logic when there is no corresponding output field for aggregation logic in the at least one output field;
[0167] The second query logic includes: querying at least one output field from the dataset to be queried, and directly outputting the query result.
[0168] Figure 10 This is a schematic diagram of a data query device according to another embodiment of the present disclosure. The device includes one or more features of the above-described data query device embodiment. The instruction setting module 840 includes:
[0169] The first display submodule 1010 is used to display multiple statistical methods of any output field among the at least one output field;
[0170] The first determining submodule 1020 is used to determine the calculation function corresponding to the arbitrary output field in response to the selection instruction of one of the multiple statistical methods;
[0171] The second determining submodule 1030 is used to determine whether the arbitrary output field corresponds to aggregation logic based on the calculation function corresponding to the arbitrary output field.
[0172] The third determining submodule 1040 is used to determine the aggregation logic corresponding to the arbitrary output field when the calculation function corresponding to the arbitrary output field is summation, average calculation or deduplication counting.
[0173] In one possible implementation, the first display submodule includes:
[0174] Based on the pre-configured data model, determine the field type of the arbitrary output field;
[0175] Based on the field type of the arbitrary output field, determine multiple statistical methods for the arbitrary output field;
[0176] Displays various statistical methods for any of the output fields.
[0177] In one possible implementation, the various statistical methods for the arbitrary output field include: statistics based on the original value, general count statistics, deduplication count statistics, statistical average, summation statistics, statistical maximum value, statistical minimum value, and statistical median.
[0178] In one possible implementation, determining multiple statistical methods for the arbitrary output field based on its field type includes:
[0179] When the field type of any output field is a metric or an unknown type, multiple statistical methods are determined for the arbitrary output field. Generally, output fields of the metric type have corresponding statistical methods; the unknown type is a variable type proposed in this disclosure. In some cases, the output field of the unknown type is equivalent to the metric type, and in other cases, it is equivalent to the dimension type. In this disclosure, the output field of the unknown type is also set to have corresponding statistical methods, which can make the application of statistical methods more flexible.
[0180] Figure 11 This is a schematic diagram of a data query device according to another embodiment of the present disclosure. The device includes one or more features of the above-described data query device embodiment, and before the dataset determination module 810, it further includes:
[0181] Configuration module 1110 is used to configure the data model in response to an information input command; wherein,
[0182] The information input instruction includes identification information of multiple datasets to be configured, and also includes at least one of the following: field name, data type, field type, and control type of the filtering condition in each dataset to be configured; wherein, the field type includes dimension type, metric type, and unknown type;
[0183] The data model records the information contained in the information input instructions.
[0184] Figure 12 This is a schematic diagram of a data query device according to another embodiment of the present disclosure. The device includes one or more features of the above-described data query device embodiment. The dataset determination module 810 includes:
[0185] The fourth determining submodule 1210 is used to determine the identification information of the plurality of datasets to be configured according to the pre-configured data model;
[0186] The second display submodule 1220 is used to display the identification information of the plurality of datasets to be configured;
[0187] Selection submodule 1230 is used to determine at least two datasets to be queried in response to a selection instruction for any identifier information among the identifier information of the plurality of datasets to be configured.
[0188] Display the identification information of each dataset in the at least two datasets to be queried;
[0189] In response to a drag-and-drop instruction on the identifier information of any dataset to be queried, the connection relationship between any dataset to be queried in the at least two datasets to be queried is determined.
[0190] Figure 13 This is a schematic diagram of a data query device according to another embodiment of the present disclosure, the device including one or more features of the above-described data query device embodiment. In one possible implementation, the device further includes:
[0191] The generation module 1310 is used to generate a query statement corresponding to the query logic in response to a query statement generation instruction.
[0192] The sending module 1320 is used to send the query statement to the data engine corresponding to the dataset to be queried, so that the data engine can perform data query based on the query statement.
[0193] The acquisition, storage, and application of user personal information involved in the technical solution disclosed herein comply with the provisions of relevant laws and regulations and do not violate public order and good morals.
[0194] According to embodiments of this disclosure, this disclosure also provides an electronic device, a readable storage medium, and a computer program product.
[0195] Figure 14A schematic block diagram of an example electronic device 1400 that can be used to implement embodiments of the present disclosure is shown. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device may also represent various forms of mobile devices, such as personal digital processors, cellular phones, smartphones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely illustrative and are not intended to limit the implementation of the present disclosure described and / or claimed herein.
[0196] like Figure 14 As shown, device 1400 includes a computing unit 1401, which can perform various appropriate actions and processes according to a computer program stored in read-only memory (ROM) 1402 or a computer program loaded from storage unit 1408 into random access memory (RAM) 1403. The RAM 1403 may also store various programs and data required for the operation of device 1400. The computing unit 1401, ROM 1402, and RAM 1403 are interconnected via bus 1404. Input / output (I / O) interface 1405 is also connected to bus 1404.
[0197] Multiple components in device 1400 are connected to I / O interface 1405, including: input unit 1406, such as a keyboard, mouse, etc.; output unit 1407, such as various types of displays, speakers, etc.; storage unit 1408, such as a disk, optical disk, etc.; and communication unit 1409, such as a network card, modem, wireless transceiver, etc. Communication unit 1409 allows device 1400 to exchange information / data with other devices through computer networks such as the Internet and / or various telecommunications networks.
[0198] The computing unit 1401 can be a variety of general-purpose and / or special-purpose processing components with processing and computing capabilities. Some examples of the computing unit 1401 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various special-purpose artificial intelligence (AI) computing chips, various computing units running machine learning model algorithms, a digital signal processor (DSP), and any suitable processor, controller, microcontroller, etc. The computing unit 1401 performs the various methods and processes described above, such as a data query method. For example, in some embodiments, a data query method may be implemented as a computer software program tangibly contained in a machine-readable medium, such as storage unit 1408. In some embodiments, part or all of the computer program may be loaded and / or installed on device 1400 via ROM 1402 and / or communication unit 1409. When the computer program is loaded into RAM 1403 and executed by the computing unit 1401, one or more steps of a data query method described above may be performed. Alternatively, in other embodiments, the computing unit 1401 may be configured to perform a data query method by any other suitable means (e.g., by means of firmware).
[0199] Various embodiments of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field-programmable gate arrays (FPGAs), application-specific integrated circuits (ASICs), application-specific standard products (ASSPs), systems-on-a-chip (SoCs), payload-programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various embodiments may include implementations in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which may be a dedicated or general-purpose programmable processor, capable of receiving data and instructions from a storage system, at least one input device, and at least one output device, and transmitting data and instructions to the storage system, the at least one input device, and the at least one output device.
[0200] The program code used to implement the methods of this disclosure may be written in any combination of one or more programming languages. This program code may be provided to a processor or controller of a general-purpose computer, special-purpose computer, or other programmable data processing apparatus, such that when executed by the processor or controller, the program code causes the functions / operations specified in the flowcharts and / or block diagrams to be implemented. The program code may be executed entirely on a machine, partially on a machine, as a standalone software package partially on a machine and partially on a remote machine, or entirely on a remote machine or server.
[0201] In the context of this disclosure, a machine-readable medium can be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, apparatus, or device. A machine-readable medium can be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium can be, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatus, or devices, or any suitable combination of the foregoing. More specific examples of machine-readable storage media include electrical connections based on one or more wires, portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination of the foregoing.
[0202] To provide interaction with a user, the systems and techniques described herein can be implemented on a computer having: a display device for displaying information to the user (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor); and a keyboard and pointing device (e.g., a mouse or trackball) through which the user provides input to the computer. Other types of devices can also be used to provide interaction with the user; for example, feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including sound input, voice input, or tactile input).
[0203] The systems and technologies described herein can be implemented in computing systems that include backend components (e.g., as a data server), or computing systems that include middleware components (e.g., an application server), or computing systems that include frontend components (e.g., a user computer with a graphical user interface or web browser through which a user can interact with embodiments of the systems and technologies described herein), or any combination of such backend, middleware, or frontend components. The components of the system can be interconnected via digital data communication of any form or medium (e.g., a communication network). Examples of communication networks include local area networks (LANs), wide area networks (WANs), and the Internet.
[0204] Computer systems can include clients and servers. Clients and servers are generally located far apart and typically interact via communication networks. Client-server relationships are created by computer programs running on the respective computers and having a client-server relationship with each other. Servers can be cloud servers, servers in distributed systems, or servers incorporating blockchain technology.
[0205] It should be understood that the various forms of processes shown above can be used to rearrange, add, or delete steps. For example, the steps described in this disclosure can be executed in parallel, sequentially, or in different orders, as long as the desired result of the technical solution disclosed in this disclosure can be achieved, and this is not limited herein.
[0206] The specific embodiments described above do not constitute a limitation on the scope of protection of this disclosure. Those skilled in the art should understand that various modifications, combinations, sub-combinations, and substitutions can be made according to design requirements and other factors. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of this disclosure should be included within the scope of protection of this disclosure.
Claims
1. A data query method, comprising: configuring a data model in response to an information input instruction, the data model recording information contained in the information input instruction; displaying identification information of a plurality of data sets to be configured according to the data model, determining at least two data sets to be queried in response to a selection instruction for any identification information of the plurality of data sets to be configured, the data sets to be queried including databases or tables; displaying identification information of each data set to be queried in the at least two data sets to be queried, determining a connection relationship between any data sets to be queried in the at least two data sets to be queried in response to a drag instruction for the identification information of any data set to be queried; determining a plurality of fields contained in the at least two data sets to be queried according to field related information in the data model and the connection relationship; displaying the plurality of fields, determining at least one output field from the plurality of fields in response to a selection instruction for the plurality of fields; determining whether each output field of the at least one output field corresponds to aggregation logic in response to a setting instruction for the each output field; determining query logic according to whether the each output field corresponds to aggregation logic.
2. The method of claim 1, wherein, The determining query logic according to whether the each output field corresponds to aggregation logic comprises: in a case where there is an output field corresponding to aggregation logic in the at least one output field, determining that the query logic is first query logic; the first query logic comprises querying the at least one output field from the data sets to be queried and grouping and outputting query results according to the output field corresponding to aggregation logic.
3. The method of claim 1 or 2, wherein, The determining query logic according to whether the each output field corresponds to aggregation logic comprises: in a case where there is no output field corresponding to aggregation logic in the at least one output field, determining that the query logic is second query logic; the second query logic comprises querying the at least one output field from the data sets to be queried and directly outputting query results.
4. The method of claim 3, wherein, The determining whether the each output field of the at least one output field corresponds to aggregation logic in response to a setting instruction for the each output field comprises: displaying a plurality of statistical methods of any output field of the at least one output field; determining a calculation function corresponding to the any output field in response to a selection instruction for one statistical method of the plurality of statistical methods; determining whether the any output field corresponds to aggregation logic according to the calculation function corresponding to the any output field.
5. The method of claim 4, wherein, The determining whether the any output field corresponds to aggregation logic according to the calculation function corresponding to the any output field comprises: in a case where the calculation function corresponding to the any output field is summation, average or de-duplication count, determining that the any output field corresponds to aggregation logic.
6. The method of claim 4, wherein, The displaying the plurality of statistical methods of any output field of the at least one output field comprises: According to the data model, a field type of the arbitrary output field is determined; According to the field type of the arbitrary output field, a plurality of statistical manners of the arbitrary output field are determined; The plurality of statistical manners of the arbitrary output field are displayed.
7. The method of claim 6, wherein, The plurality of statistical manners of the arbitrary output field include: a raw value statistics, a general count statistics, a de-duplication count statistics, a statistical average, a summation statistics, a statistical maximum, a statistical minimum and a statistical median.
8. The method of claim 7, wherein, The determining of the plurality of statistical manners of the arbitrary output field according to the field type of the arbitrary output field includes: In a case where the field type of the arbitrary output field is a metric type or an unknown type, the plurality of statistical manners of the arbitrary output field are determined.
9. The method of claim 1 or 2, wherein, The information input instruction includes identification information of a plurality of to-be-configured data sets, and further includes at least one of a name, a data type, a field type and a control type of a filter condition of a field in each of the to-be-configured data sets, wherein the field type includes a dimension type, a metric type and an unknown type.
10. The method of claim 1, further comprising: generating a query statement corresponding to the query logic in response to a query statement generation instruction; sending the query statement to a data engine corresponding to the to-be-queried data set, so that the data engine performs data query by using the query statement.
11. A data query apparatus, comprising: a configuration module configured to configure a data model in response to an information input instruction, the data model recording information included in the information input instruction; a data set determination module configured to display identification information of a plurality of to-be-configured data sets according to the data model, determine at least two to-be-queried data sets in response to a selection instruction for any identification information of the identification information of the plurality of to-be-configured data sets, the to-be-queried data set including a database or a table, and further display identification information of each to-be-queried data set in the at least two to-be-queried data sets, and determine a connection relationship between any to-be-queried data sets in the at least two to-be-queried data sets in response to a drag instruction for the identification information of any to-be-queried data set; a field determination module configured to determine a plurality of fields included in the at least two to-be-queried data sets according to field-related information of the to-be-configured data sets included in the data model and the connection relationship; a display module configured to display the plurality of fields, and determine at least one output field from the plurality of fields in response to a selection instruction for the plurality of fields; an instruction setting module configured to determine whether each output field of the at least one output field corresponds to aggregation logic in response to a setting instruction for the each output field; a logic determination module configured to determine query logic according to whether the each output field corresponds to the aggregation logic.
12. The apparatus of claim 11, wherein, The logic determination module includes: a first query sub-module configured to determine the query logic as first query logic in a case where there is an output field corresponding to the aggregation logic in the at least one output field. The first query logic comprises: querying the at least one output field from the data set to be queried, and grouping and outputting the query result according to the output field of the corresponding aggregation logic.
13. The apparatus of claim 11 or 12, wherein, The logic determination module further comprises: The second query submodule is configured to determine the query logic as second query logic in a case where the output field of the corresponding aggregation logic does not exist in the at least one output field. The second query logic comprises: querying the at least one output field from the data set to be queried, and directly outputting the query result.
14. The apparatus of claim 13, wherein, The instruction setting module comprises: The first display submodule is configured to display a plurality of statistical manners of any output field in the at least one output field. The first determination submodule is configured to determine a calculation function corresponding to the any output field in response to a selection instruction of one statistical manner in the plurality of statistical manners. The second determination submodule is configured to determine whether the any output field corresponds to aggregation logic according to the calculation function corresponding to the any output field.
15. The apparatus of claim 14, wherein, The instruction setting module further comprises: The third determination submodule is configured to determine that the any output field corresponds to aggregation logic in a case where the calculation function corresponding to the any output field is summation, average value or de-duplication count.
16. The apparatus of claim 14, wherein, The first display submodule comprises: determining a field type of the any output field according to the data model; determining a plurality of statistical manners of the any output field according to the field type of the any output field; displaying the plurality of statistical manners of the any output field.
17. The apparatus of claim 16, wherein, The plurality of statistical manners of the any output field comprise: original value statistics, general count statistics, de-duplication count statistics, average value statistics, summation statistics, maximum value statistics, minimum value statistics and median value statistics.
18. The apparatus of claim 17, wherein, The determining a plurality of statistical manners of the any output field according to the field type of the any output field comprises: determining the plurality of statistical manners of the any output field in a case where the field type of the any output field is a metric type or an unknown type.
19. The apparatus of claim 11 or 12, wherein, The information input instruction comprises identification information of a plurality of data sets to be configured, and further comprises at least one of a name, a data type, a field type and a control type of a filter condition of a field in each of the data sets to be configured; wherein the field type comprises a dimension type, a metric type and an unknown type.
20. The apparatus of claim 11, further comprising: a generation module configured to generate a query statement corresponding to the query logic in response to a query statement generation instruction; a sending module configured to send the query statement to a data engine corresponding to the data set to be queried, so that the data engine performs data query according to the query statement.
21. An electronic device, comprising: at least one processor; and a memory connected to the at least one processor in communication; wherein, The memory stores instructions executable by the at least one processor, the instructions being executed by the at least one processor to enable the at least one processor to perform the method of any one of claims 1-10.
22. A non-transitory computer readable storage medium having stored thereon computer instructions, wherein, The computer instructions are for causing the computer to perform the method of any one of claims 1-10.
23. A computer program product comprising a computer program which, when executed by a processor, implements the method of any one of claims 1-10.
Citation Information
Patent Citations
Data query method and device and server
CN113032420A