CN113051287B - Query statement generation method, device, equipment and storage medium - Google Patents

Query statement generation method, device, equipment and storage medium Download PDF

Info

Publication number
CN113051287B
CN113051287B CN202110607407.0A CN202110607407A CN113051287B CN 113051287 B CN113051287 B CN 113051287B CN 202110607407 A CN202110607407 A CN 202110607407A CN 113051287 B CN113051287 B CN 113051287B
Authority
CN
China
Prior art keywords
query
data table
parameter
target
level
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202110607407.0A
Other languages
Chinese (zh)
Other versions
CN113051287A (en
Inventor
陈硕
梁博
徐澍
温九
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Dajia Internet Information Technology Co Ltd
Original Assignee
Beijing Dajia Internet Information Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Dajia Internet Information Technology Co Ltd filed Critical Beijing Dajia Internet Information Technology Co Ltd
Priority to CN202110607407.0A priority Critical patent/CN113051287B/en
Publication of CN113051287A publication Critical patent/CN113051287A/en
Application granted granted Critical
Publication of CN113051287B publication Critical patent/CN113051287B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/24Querying
    • G06F16/242Query formulation
    • G06F16/2433Query languages

Abstract

The disclosure relates to a generation method, a device, equipment and a storage medium of a query statement, wherein the method comprises the steps of generating a hierarchy structure matched with a query request; at each level except the lowest level in the hierarchical structure, keywords determined based on a target grammatical rule (a grammatical rule of a query engine of a target database) exist; determining the level of each query parameter in the query request in the hierarchy; determining a corresponding query element of the query parameter in the target data table by utilizing the binding relationship between the query parameter and the target data table and the category to which each query parameter belongs; combining the query statement of each level with the keyword of the previous level according to a target grammatical rule from the lowest level to obtain the query statement of the previous level until the query statement of the highest level is obtained; the lowest level query statement is: inquiring the inquiry elements corresponding to the parameters; and combining the query sentences of all the highest levels according to the target grammar rule to obtain the query sentences meeting the query requests.

Description

Query statement generation method, device, equipment and storage medium
Technical Field
The present disclosure relates to the field of database technologies, and in particular, to a method, an apparatus, a device, and a storage medium for generating a query statement.
Background
The method is an important application of database technology, and corresponding data can be inquired in a database according to a certain inquiry request. In order to reduce the database use threshold, a query system in the related art generally configures corresponding query statement templates for various common query requests in advance to obtain a statement template library, after a user inputs a query request, the query system can automatically fill query parameters in the corresponding query statement templates to obtain query statements matched with the query request, and then invokes a query engine to execute the query statements, thereby completing the query.
The method has the problems that when the query engines used by a plurality of connected databases contained in one query system are different from each other, a corresponding statement template library needs to be configured for each query engine, so that the query system occupies more storage resources to store the statement template libraries of different query engines.
Disclosure of Invention
The present disclosure provides a method, an apparatus, a device and a storage medium for generating query statements to reduce storage resources occupied by a query system, and the technical scheme of the present disclosure is as follows:
according to a first aspect of the embodiments of the present disclosure, there is provided a method for generating a query statement, including:
acquiring a query request aiming at a target database; wherein the query request contains a plurality of query parameters;
generating a hierarchy matching the type of the query request; wherein the hierarchical structure is a multi-layer structure; each level except the lowest level in the level structure corresponds to a keyword determined based on a target grammar rule, and the target grammar rule is a grammar rule of a query engine of the target database;
determining the belonged level of each query parameter in the hierarchical framework according to the belonged category of each query parameter and the position of each query parameter in the query request;
determining a corresponding query element of the query parameter in the target data table by using a binding relationship between the query parameter configured in the data model and the target data table and the category of each query parameter; wherein the target data table is a data table contained in the target database; the query element is a field in the target data table, or an expression containing the field in the target data table;
combining the query statement of each level with the keyword of the previous level according to the target grammatical rule from the lowest level of the hierarchical structure to obtain the query statement of the previous level until the query statement of the highest level in the hierarchical structure is obtained; wherein the query statement of the lowest level of the hierarchy structure matched with the query request is: query elements corresponding to the query parameters contained in the lowest hierarchy;
and combining the query sentences of the highest levels according to the target grammar rule to obtain the query sentences of the query requests.
Optionally, the determining, by using a binding relationship between query parameters configured in the data model and the target data table and a category to which each query parameter belongs, a query element corresponding to the query parameter in the target data table includes:
for each query parameter, when the category of the query parameter is an atomic index or a dimension, searching a field corresponding to the query parameter in a target data table according to the binding relationship between the query parameter and the target data table;
when the category of the query parameter is a filtering condition or a composite index, searching and obtaining a field associated with the query parameter in a target data table according to the binding relationship between the query parameter and the target data table, and combining an expression template and the field associated with the query parameter to obtain an expression containing the field in the target data table; wherein the expression template is set according to the target grammar rule.
Optionally, after determining the hierarchy to which each query parameter belongs in the hierarchy according to the category to which each query parameter belongs and the location of each query parameter in the query request, the method further includes:
when the query request is a composite query request for querying a plurality of data tables and the query request carries a type of query parameters, adjusting the hierarchy to which the type of query parameters belong in the hierarchy to which the type of query parameters belong; the category of the query parameters refers to the query parameters of which the category is the filtering condition, and the fields contained in the query elements corresponding to the homologous query parameters and the fields contained in the query elements corresponding to the category of the query parameters belong to the same target data table.
According to a second aspect of the embodiments of the present disclosure, there is provided a query statement generation apparatus, including:
the device comprises an acquisition unit, a query unit and a query unit, wherein the acquisition unit is used for acquiring a query request aiming at a target database; wherein the query request contains a plurality of query parameters;
the generating unit is used for generating a hierarchical structure matched with the type of the query request; wherein the hierarchical structure is a multi-layer structure; each level except the lowest level in the level structure corresponds to a keyword determined based on a target grammar rule, and the target grammar rule is a grammar rule of a query engine of the target database;
a first determining unit, configured to determine, according to the category to which each query parameter belongs and the location of each query parameter in the query request, a hierarchy to which each query parameter belongs in the hierarchy;
the second determining unit is used for determining a corresponding query element of the query parameter in the target data table by utilizing the binding relationship between the query parameter configured in the data model and the target data table and the category of each query parameter; wherein the target data table is a data table contained in the target database; the query element is a field in the target data table, or an expression containing the field in the target data table;
a first combination unit, configured to combine, starting from a lowest level of the hierarchical structure and according to the target syntax rule, the query statement of each level with the keyword of a previous level to obtain a query statement of the previous level until a query statement of a highest level in the hierarchical structure is obtained; wherein the query statement of the lowest level of the hierarchy is: query elements corresponding to the query parameters contained in the lowest hierarchy;
and the second combination unit is used for combining the query statements of the highest level according to the target grammar rule to obtain the query statement of the query request.
Optionally, when the second determining unit determines the query element corresponding to the query parameter in the target data table by using the binding relationship between the query parameter configured in the data model and the target data table and the category to which each query parameter belongs, the second determining unit is specifically configured to:
for each query parameter, when the category of the query parameter is an atomic index or a dimension, searching a field corresponding to the query parameter in a target data table according to the binding relationship between the query parameter and the target data table;
when the category of the query parameter is a filtering condition or a composite index, searching and obtaining a field associated with the query parameter in a target data table according to the binding relationship between the query parameter and the target data table, and combining an expression template and the field associated with the query parameter to obtain an expression containing the field in the target data table; wherein the expression template is set according to the target grammar rule.
Optionally, the generating device further includes:
the optimization unit is used for adjusting the belonged level of the query parameters in the hierarchical structure to the belonged level of the homologous query parameters when the query request is a composite query request for querying a plurality of data tables and the query request carries the query parameters of one type; the category of the query parameters refers to the query parameters of which the category is the filtering condition, and the fields contained in the query elements corresponding to the homologous query parameters and the fields contained in the query elements corresponding to the category of the query parameters belong to the same target data table.
According to a third aspect of the embodiments of the present disclosure, there is provided an electronic apparatus including:
a processor;
a memory for storing the processor-executable instructions;
wherein the processor is configured to execute the instructions to implement the method for generating a query statement as provided in any one of the first aspect of the embodiments of the present disclosure.
According to a fourth aspect of the embodiments of the present disclosure, there is provided a storage medium, where instructions, when executed by a processor of an electronic device, enable the electronic device to perform the method for generating a query statement provided in any one of the first aspect of the embodiments of the present disclosure.
According to a fifth aspect of the embodiments of the present disclosure, there is provided a computer program product, including computer instructions stored in a computer storage medium, where the computer instructions, when executed, are specifically configured to implement the method for generating a query statement provided in any one of the first aspect of the embodiments of the present disclosure.
The technical scheme provided by the embodiment of the disclosure at least brings the following beneficial effects:
the query request is converted into the target syntax tree of the corresponding type, the query statement which accords with the syntax rule of the specific query engine is generated through the target syntax tree, and the query statement can be generated without using query statement templates of different query engines, so that a query system does not need to store statement template libraries of different query engines, and the storage resources occupied by the query system are reduced.
It is to be understood that both the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the disclosure.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present disclosure and, together with the description, serve to explain the principles of the disclosure and are not to be construed as limiting the disclosure.
FIG. 1 is a diagram illustrating a connection relationship of data tables in accordance with an exemplary embodiment;
FIG. 2 is a flow diagram illustrating a method of generation of a query statement in accordance with an illustrative embodiment;
FIG. 3 is a diagram illustrating the structure of an abstract syntax tree in accordance with one illustrative embodiment;
FIG. 4 is a diagram illustrating the structure of another abstract syntax tree, according to an exemplary embodiment;
FIG. 5 is a block diagram illustrating an apparatus for generating a query statement in accordance with an illustrative embodiment;
fig. 6 is a schematic structural diagram of an electronic device according to an exemplary embodiment.
Detailed Description
In order to make the technical solutions of the present disclosure better understood by those of ordinary skill in the art, the technical solutions in the embodiments of the present disclosure will be clearly and completely described below with reference to the accompanying drawings.
Before the query statement generation method provided by the application is applied, a corresponding data model needs to be built for each database. The data model to which the present application relates will therefore be briefly described.
Generally, a database may include a plurality of data tables, which may be divided into a fact table and a dimension table according to different data contained therein, and a connection relationship between the data tables may be defined in a corresponding data model, for example, fig. 1 is an exemplary connection manner of the data tables.
A database can correspond to one or more data models, one data model comprises a fact table and a plurality of dimension tables connected with the fact table, and when a plurality of fact tables exist in the database, a plurality of data models need to be constructed for the database.
In addition to defining connections between data tables, the data model also defines mappings between dimensions in a database and fields in a data table, and mappings between metrics and fields in a data table.
The dimension, the index, the filtering condition including the dimension or the index, and the table name of the data table can be regarded as the query parameter carried by the query request. The dimension is used for defining the environment attribute of the occurrence of the business event, and the index defines the measurement attribute of the business fact.
Generally, if an attribute value of a certain attribute can be represented by a specific numerical value, the attribute can be defined as an index, and if the attribute value of a certain attribute cannot be represented by a numerical value, the attribute can be defined as a dimension, such as an attribute having a text as an attribute value, such as a place of manufacture, a category of a product, a nationality, and the like, the attribute can be defined as a dimension.
The mapping relationship between the index and the field may include:
first, a part of the indicators may be directly mapped to a certain field in the data table, such indicators may be referred to as atomic indicators, for example, the "sales amount" field in fig. 1 may itself be used as an indicator, i.e., "sales amount" indicator, and for such atomic indicators, the mapping relationship between the indicators and the fields is the "sales amount" indicator, which corresponds to the "sales amount" field.
Secondly, other indexes besides the atomic indexes are called composite indexes, and the composite indexes are generally calculated by one or more fields through a specific aggregation operator. For example, the "sales amount per day" index needs to be obtained by summing up the "sales amount" field in fig. 1 by date, and the "sales profit" index needs to be obtained by subtracting the "sales amount" field and the "purchase cost" field in fig. 1, and for such composite index, the mapping relationship between the index and the fields includes two parts, namely the field corresponding to the index and the aggregation operator.
If the index of 'single-day sales amount' corresponds to the field of 'sales amount' and the aggregation operator, summing up according to the date; the "sales profit" indicator corresponds to the "sales amount" and "cost of purchase" fields, and the aggregation operator makes the difference.
In addition, in order to avoid errors caused by different data types of different fields when the composite index is calculated, the data type of the field mapped by the composite index may be recorded in the mapping relationship of the composite index.
In particular, if one index needs to be calculated by integrating fields in multiple data models, such an index is called a cross-model composite index.
The mapping relationship between the dimension and the field is similar to the atomic index, for example, the field corresponding to the "city" dimension is the "city" field in fig. 1.
Optionally, the data table may be divided into a snapshot table and a full table according to a difference in time range of data stored in the data table, where the snapshot table is only used for storing data generated in the last day, the full table is used for storing all historical data, and the data model may mark which data tables are snapshot tables and which data tables are full tables.
After a corresponding data model is defined for each database in any query system connected with a plurality of databases, the query statement generation method provided by the application can be utilized to generate corresponding query statements according to the query request of a user, and then the query statements are executed to query data in the corresponding databases.
Referring to fig. 2, a method for generating a query statement according to an embodiment of the present application may include the following steps:
s201, acquiring a query request aiming at a target database.
Wherein the query request includes a plurality of query parameters.
The query request may be represented in the form of a quintuple, where the quintuple specifically includes five items, namely, a data set, an index, other dimensions, a filtering condition, and a time range, where the data set is used to specify which database data is to be queried this time, for example, if the data set is an e-commerce data set, a target database to which the query request is directed is an e-commerce database. The filter criteria may be used to define that the query requires the screening of records from the database that meet the filter criteria (each row of data is referred to as a record in the data sheet). For example, the e-commerce operator wants to query the amount of each sex's deal order for the last 7 days of men's clothing. Decomposed into quintuple, the data set is a predefined e-commerce data set. The index is the amount of the deal order, the dimension is the sex, the time is the last 7 days, and the filtering condition is that the commodity category is men's clothing. Wherein the time range can be considered as a special filtering condition.
In a specific query process, the user may define other items besides the five-tuple according to actual situations, for example, a sorting condition, a grouping condition, and the like may be set, and five items listed in the five-tuple may not be set, for example, the user may not set a filtering condition or a time dimension.
The filtering condition is mainly used for limiting a specific index or dimension within a certain value range to filter the query result, for example, if the filtering condition is that the commodity category is men's clothing, the filtering condition includes the dimension ' commodity category ', and is used for limiting the query result, the value of the dimension of the commodity category should be ' men ' clothing; if the score is greater than 60 points, the filter condition comprises an index "test score", and the value of the index "test score" in the query result is limited to be greater than 60 points.
And S202, generating a hierarchical structure matched with the type of the query request.
The hierarchy structure matched with the query request is a multilayer structure; each level except the lowest level in the level structure corresponds to a keyword determined based on a target grammar rule, and the target grammar rule is a grammar rule of a query engine of a target database.
In this embodiment, the hierarchical structure matching the type of the query request may be embodied as an Abstract Syntax Tree (AST), in other words, step S202 is equivalent to generating the Abstract Syntax Tree matching the type of the query request. An abstract syntax tree belongs to an abstract representation of the syntax structure of a source code, which expresses the syntax structure of a programming language in a tree-like structure. Specifically, in the present application, the generated syntax tree corresponds to the syntax structure of the query language expressed in a tree structure.
The query language may be understood as a programming language that can be recognized by a query engine, generally, different query engines are suitable for query languages with similar grammatical structures, but certain differences exist in concrete expression, which results in the prior art that different query statement templates need to be configured for different query engines, so that a query system needs to occupy more storage resources to store the query statement templates. The scheme can generate a hierarchical structure suitable for various different query engines based on the syntactic structure of the query language, and generates the query statement by using the hierarchical structure, so that a large number of query statement templates do not need to be stored, and the storage resources consumed by a query system are effectively reduced.
For a query request, the query requests can be divided into two types, namely a single query request and a composite query request according to the number of data tables to be queried by the query request, where a query request belongs to a single query request if only one query request relates to querying one data table, and a query request belongs to a composite query request if a query request relates to querying a plurality of data tables, where a hierarchical structure as shown in fig. 3 can be generated for a single query request, and a hierarchical structure as shown in fig. 4 can be generated for a composite query request.
In step S202, it may be determined whether the current query request relates to fields of different data tables, for example, according to a binding relationship between the query parameter and the data table defined in the data model, if the dimension included in the query request corresponds to field 1 of data table 1, and the index corresponds to field 2 of data table 2, it may be determined that the query request relates to multiple data tables, that is, the query request belongs to a composite query request, otherwise, if it is determined that (and associated) fields corresponding to each query parameter of the query request belong to the same data table according to the binding relationship, it is determined that the query request only relates to one data table, that is, the query request belongs to a single query request, and then a corresponding syntax tree generated according to the type of the query request may be queried.
S203, determining the belonged level of each query parameter in the level structure according to the belonged category of each query parameter and the position of each query parameter in the query request.
Taking fig. 3 as an example, after the hierarchy is generated, the indexes and dimensions in the query request may be first placed at the next level of the Select Items node in fig. 3.
For example, for the following quintuple:
(e-commerce data set; amount of transaction order; gender; last 7 days; category of goods for men).
The amount of the deal order can be identified as an index, the gender of the deal order can be identified as a dimension, and further, the amount of the deal order can be determined as an atomic index according to a predefined data model.
When the hierarchical structure is the abstract syntax tree shown in fig. 3, the same hierarchical level may include one or more nodes, and the query parameter of the same hierarchical level may be placed in different nodes according to the different categories, for example, in fig. 3, the query parameter of the amount of the transaction order is placed in the atomic index node connected below the Select Items node in fig. 3, and the gender is placed in the dimension node connected below the Select Items node, and since the query request does not include the composite index, the composite index node in fig. 3 does not add the query parameter, and at this time, the composite index node may be deleted.
When the name of the data table to be queried is specified in the query request, the name of the data table carried by the query request may be positioned at a level below a From close node, and specifically, in the hierarchical architecture shown in fig. 3, the name of the data table may be positioned at a data table node below the From close node of the level.
The filtering condition may filter the indicator or the dimension, if the filtering condition is to filter the indicator, the filtering condition may be placed at a next level of the Having node in fig. 3, that is, at a node indicating the filtering condition in fig. 3, and if the filtering condition is to filter the dimension, the filtering condition may be placed at a next level of the Where class node in fig. 3, that is, at a node indicating the filtering condition in fig. 3.
Further, taking fig. 4 as an example, when the query request is a composite query request, the query parameters of the same type in the query request may be located at different levels of the hierarchy, for example, in fig. 4, the query parameters of the atomic index type may be located at a level where the Left Join node is located, or at a level below the node, and at this time, which level each query parameter specifically belongs to needs to be determined according to the position of the query parameter in the query request.
S204, determining a corresponding query element of the query parameter in the target data table by using the binding relationship between the query parameter configured in the data model and the target data table and the category of each query parameter.
Wherein, the target data table is a data table contained in the target database; the query element is a field in the target data table, or an expression containing a field in the target data table.
Step S204 may specifically include:
and for each query parameter, when the category of the query parameter is an atomic index or a dimension, searching for a field corresponding to the query parameter in the target data table according to the binding relationship between the query parameter and the target data table.
And when the category of the query parameter is the filtering condition or the composite index, searching and obtaining a field associated with the query parameter in the target data table according to the binding relationship between the query parameter and the target data table, and combining the expression template and the field associated with the query parameter to obtain an expression containing the field in the target data table.
Wherein the expression template is set according to the target grammar rule. For a query engine, the syntax rules specify in which format the filter condition is represented in the corresponding query language, in which format a specific aggregation operator is represented, and so on, so that the expression template can be directly established by using the syntax rules of the query engine of the target database.
The expression template may be recorded in a binding relationship of the query parameters to the target data table.
The following description is made with reference to specific examples:
in one example, the query request may include a query parameter "price", and the query parameter may be determined to belong to the atomic index category through a pre-constructed data model, and in step S204, a field "Fare" corresponding to the "price" may be found in the target data table according to a binding relationship between the "price" and the field "Fare" defined in the data model, and the field is determined as a query element corresponding to the query parameter "price".
Similarly, if the query request includes a query parameter "Address", the data model can determine that the parameter belongs to the dimension category, and then according to the binding relationship in the data model, a field corresponding to the "Address" can be found in the target data table as "Address", and the field is determined as a query element corresponding to the query parameter "Address".
When the query parameter is a filter condition, the field associated with the query parameter may be understood as a field corresponding to the index (or dimension) of the filter condition in the target data table, for example, one filter condition may be "price is greater than 10 and less than 20", the index of the filter condition is "price", and the field "Fare" corresponding to the price "in the target data table is the field associated with the filter condition.
Taking the filtering condition "price is greater than 10 and less than 20" as an example, assuming that the data engine applicable to the target database is Hive (an existing query engine), according to the grammar rule corresponding to the data engine, the expression template representing the filtering condition may be "field < value 1 and field > value 2", combining the expression template with the field "Fare" associated with the filtering condition, and adding the value carried in the filtering condition, the query element corresponding to the filtering condition, that is, "Fare <20 and Fare > 10", may be obtained.
The query parameter of the composite index category, and the associated field thereof, may be understood as a field used for calculating the composite index.
For query parameters of a compound index class, the corresponding expression template may be an aggregation function defined in the target grammar rule. For example, assuming that a query parameter is "average price", it can be determined that the parameter belongs to a composite index through a data model, and further, according to a binding relationship between the query parameter defined in the data model and a target data table, a field associated with the composite index is "Fare", a corresponding expression template is Avg (), and the two are combined to obtain a query element "Avg (Fare)", which corresponds to "average price".
And S205, combining the query statement of each level with the keyword of the previous level according to a target grammatical rule from the lowest level of the hierarchy structure matched with the query request to obtain the query statement of the previous level until the query statement of the highest level in the hierarchy structure is obtained.
The query statement of the lowest level of the hierarchy structure matched with the query request is as follows: and query elements corresponding to the query parameters contained in the lowest level.
It should be noted that, when step S205 is executed, there may be keywords or may not be keywords in the previous level, if there are related keywords, the query statement in the next level and the keywords in the previous level are combined to obtain the query statement in the previous level, and if there are no keywords, multiple query statements in the next level may be directly combined into the query statement in the previous level, or a single query statement in the next level may be determined as the query statement in the previous level.
Taking fig. 3 as an example, the hierarchy where the atomic index and the dimension node are located in fig. 3 is the lowest hierarchy, and it is assumed that through the foregoing steps, it is determined that the query element corresponding to the query parameter of the atomic index Class is "Fare", and the query element corresponding to the query parameter of the dimension Class is "Commodity Class", and "Fare" and "Commodity Class" can be determined as the query statement of the hierarchy, respectively.
The hierarchy of the Select Item node is not configured with keywords, and the hierarchy is a hierarchy above the hierarchy of the atomic index and the dimension node, so that the "Commodity Class" and "Fare" can be combined in the hierarchy to obtain the query statement of the hierarchy: "Commodity Class, Fare".
The hierarchy of the Select Class is a hierarchy that is higher than the hierarchy of the Select Item, the hierarchy of the Select Class is configured with the keyword Select, and at this hierarchy, the query statement "Commodity Class, Fare" of the next hierarchy (i.e., the hierarchy of the Select Item) and the keyword of this hierarchy can be combined to obtain the following query statement:
“Select Commodity Class,Fare”。
in fig. 3, the level where the Select class is located is the highest level of the hierarchy, and thus a query statement of the highest level is obtained.
For another example, in fig. 3, the query parameter of the level where the index filter condition node is located is determined through the foregoing steps, that the corresponding query element is "Age > 10", and the level where the index filter condition node is located is the lowest level, and after the query element of the level is transmitted to the upper level (i.e., the level where Having is located) as a query statement, the keyword Having configured in the level where Having is located and "Age > 10" may be combined to obtain the following query statement:
"Having Age > 10". This statement is also a top-level query statement.
Similarly, taking the table name (e.g. Student) of the data table node as a query element, combining the query element with the key From configured by the From class node at the higher level, the following query statement at the highest level can be obtained:
“From Student”。
and S206, combining the query sentences of all the highest levels according to the target grammar rule to obtain the query sentences meeting the query requests.
Finally, in the Root node shown in fig. 3, the query statements at the respective highest levels can be combined to obtain a query statement satisfying the query request. It should be noted that, in step S206, the combination manner of the query statements at the highest level is determined according to the target grammar rule, for example, the target grammar rule may specify the sequence of different keywords in combination, so that in step S206, the query statements with different keywords may be combined according to the sequence.
Because the query element of the lowest level is determined according to the query parameter of the query request and the expression template regulated by the target grammar rule, and the query element and the keyword are combined according to the target grammar rule in the combining process, the query statement combined in the step S206 can be ensured to accord with the grammar rule specified by the query engine of the target database, can be identified and executed by the query engine of the target database, and simultaneously can be ensured to accord with the query request provided by the user.
The query statement satisfying the query request finally combined in step S206 may also be referred to as a target query statement.
The following is a specific example:
assuming that the current user needs to query the names and achievements of students older than 12 years, the quintuple can be entered as follows:
(dataset: Student dataset; spreadsheet name: Student; dimension: name; index: score; filtering condition: age greater than 12 years), wherein one item of the time range is not set and the spreadsheet name is additionally specified.
Since the query request only relates to one data table, the generated hierarchy can be represented by using the abstract syntax tree shown in fig. 3, the hierarchy of the dimension in which the name parameter is located is determined, the hierarchy of the primitive index in which the score is located is determined to be located in fig. 3, the hierarchy of the index filtering condition in which the filtering range is determined to be 'more than 12 years old' is determined, and the hierarchy of the data table in which the data table name 'Student' is located is determined.
Then, according to the binding relation defined in the corresponding data model, determining the Name corresponding field 'Name', scoring the Score corresponding field 'Score', and converting the filtering condition, namely 'more than 12 years old', into the corresponding query element, namely 'Age > 12'.
And finally, combining the query elements and keywords of a higher level, wherein a query statement obtained by the combination of Select class is 'Select Name, Score', a query statement of the combination of From class is 'From Student', a query statement of the combination of Having is 'Having Age > 12', and then combining the query statements of the three highest levels in Root to obtain the following target query statement:
“Select Name,Score
From Student
Having Age > 12”。
after the target query statement is input to a query engine corresponding to the student database, the query engine executes the target query statement to query corresponding data.
According to the embodiments, it can be found that the method provided by the application can generate the query statement which can be executed by the query engine only through the hierarchical structure corresponding to the query statement and the grammar rule defined by the query engine, and does not need to rely on the query statement template which is pre-constructed for each query engine, so that the query system does not need to store a large number of query statement templates in advance.
Meanwhile, the user only needs to input the query request in the input interface in the form of quintuple according to the self requirement, and the query system can automatically generate the query statement which accords with the query request, so that the corresponding data can be queried for the user, and the use threshold of the query system is obviously reduced.
Optionally, before the step S204 is executed, that is, before the target syntax tree is converted into the target query statement, the target syntax tree may be optimized according to a certain optimization rule, so as to improve the execution efficiency of the target query statement and obtain the query result meeting the query request of the user more quickly.
That is, after step S203 is completed and before step S204 is executed, the query statement generating method provided by the present application may further include the following steps:
when the query request is a composite query request for querying a plurality of data tables and carries a class of query parameters, adjusting the hierarchy of the class of query parameters in the hierarchy architecture to the hierarchy of the homologous query parameters; the first type of query parameters refer to the query parameters of which the category belongs to the filtering condition, the fields contained in the query elements corresponding to the homologous query parameters belong to the same target data table, and the fields contained in the query elements corresponding to the first type of query parameters belong to the same target data table.
In the above steps, the query parameter of one category refers to a query parameter belonging to a filtering condition category, for example, the query request: in (dataset: Student dataset; data sheet name: Student; dimension: name; index: score; filtering condition: age greater than 12 years), the query parameter of "age greater than 12 years" may be referred to as a query parameter of the type described above.
For one type of query parameter and another query parameter, if the field included in the query element corresponding to the type of query parameter and the field included in the query element corresponding to the another query parameter belong to the same data table, the another query parameter may be considered to be homologous with the type of query parameter, in other words, the another query parameter may be referred to as a homologous query parameter of the type of query parameter.
For example, a field associated with a type of query parameter "Age is greater than 12 years", a field "Age" of a data table Student is included in a corresponding query element "Age > 12", and a query parameter "Student Name" is determined by a binding relationship between the query parameter and the data table, so that the query element corresponding to the "Student Name" is a field "Name" in the data table Student, and thus the "Student Name" can be referred to as a type of homologous query parameter "Age is greater than 12 years".
For another example, a field associated with a type of query parameter "Age is greater than 12 years", a corresponding query element "Age > 12" includes a field "Age" of a data table Student, the query parameter "average Score" is a composite index, and a query element corresponding to "average Score" can be determined to be "avg (Score)", where "Score" is a field in the data table Student, and thus "average Score" also belongs to a homologous query parameter of a type of query parameter "Age is greater than 12 years".
In step S201, the query request input by the user may be expressed by using a Backus-Naur Form (BNF) in addition to the quintuple. The BNF paradigm can more accurately represent the query requirement of the user than the quintuple form, thereby avoiding the error of the query result obtained by finally executing the target query statement.
According to the method for generating a query statement provided by the embodiment of the present application, an embodiment of the present application further provides a device for generating a query statement, please refer to fig. 5, where the device may include the following units:
an obtaining unit 501 is configured to obtain a query request for a target database.
Wherein the query request includes a plurality of query parameters.
A generating unit 502, configured to generate a hierarchy that matches the type of the query request.
Wherein, the hierarchy matched with the query request is a multilayer structure; each level except the lowest level in the level structure corresponds to a keyword determined based on a target grammar rule, and the target grammar rule is a grammar rule of a query engine of a target database.
A first determining unit 503, configured to determine a hierarchy to which each query parameter belongs in the hierarchy according to the category to which each query parameter belongs and a location of each query parameter in the query request.
The second determining unit 504 is configured to determine, by using the binding relationship between the query parameters configured in the data model and the target data table, and the category to which each query parameter belongs, a query element corresponding to the query parameter in the target data table.
Wherein, the target data table is a data table contained in the target database; the query element is a field in the target data table, or an expression containing a field in the target data table.
A first combining unit 505, configured to combine, from a lowest level of a hierarchical structure matching the query request, the query statement of each level with the keyword of a previous level according to a target syntax rule, so as to obtain the query statement of the previous level until a query statement of a highest level in the hierarchical structure is obtained.
The query statement of the lowest level of the hierarchy structure matched with the query request is as follows: and query elements corresponding to the query parameters contained in the lowest level.
And a second combining unit 506, configured to combine the query statements at the highest levels according to the target syntax rule to obtain a query statement that satisfies the query request.
Optionally, when the second determining unit 504 determines the query element corresponding to the query parameter in the target data table by using the binding relationship between the query parameter configured in the data model and the target data table, and the category to which each query parameter belongs, the second determining unit is specifically configured to:
for each query parameter, when the category of the query parameter is an atomic index or a dimension, searching for a field corresponding to the query parameter in a target data table according to the binding relationship between the query parameter and the target data table;
when the category of the query parameter is a filtering condition or a composite index, searching and obtaining a field associated with the query parameter in the target data table according to the binding relationship between the query parameter and the target data table, and combining the expression template and the field associated with the query parameter to obtain an expression containing the field in the target data table; wherein the expression template is set according to the target grammar rule.
Optionally, the generating device further includes:
an optimizing unit 507, configured to adjust a hierarchy to which a type of query parameter belongs in a hierarchy to which a type of query parameter belongs in a hierarchy when the query request is a composite query request for querying a plurality of data tables and the query request carries the type of query parameter; the first type of query parameters refer to the query parameters of which the category belongs to the filtering condition, the fields contained in the query elements corresponding to the homologous query parameters belong to the same target data table, and the fields contained in the query elements corresponding to the first type of query parameters belong to the same target data table.
For the specific working principle of the apparatus for generating a query statement provided by the present disclosure, reference may be made to relevant steps in the method for generating a query statement provided by the embodiment of the present disclosure, and details are not repeated here.
The present disclosure relates to a query statement generation apparatus, wherein an obtaining unit 501 is configured to obtain a query request for a target database. Wherein the query request includes a plurality of query parameters. A generating unit 502, configured to generate a hierarchical structure with a type matching the query request. The hierarchy structure matched with the query request is a multilayer structure; each level except the lowest level in the level structure corresponds to a keyword determined based on a target grammar rule, and the target grammar rule is a grammar rule of a query engine of a target database. A first determining unit 503, configured to determine a hierarchy to which each query parameter belongs in the hierarchy according to the category to which each query parameter belongs and a location of each query parameter in the query request. The second determining unit 504 is configured to determine, by using the binding relationship between the query parameters configured in the data model and the target data table, and the category to which each query parameter belongs, a query element corresponding to the query parameter in the target data table. Wherein, the target data table is a data table contained in the target database; the query element is a field in the target data table, or an expression containing a field in the target data table. A first combining unit 505, configured to, starting from the lowest level of the hierarchical structure matched with the query request, combine the query statement of each level with the keyword of the previous level according to the target syntax rule to obtain the query statement of the previous level until the query statement of the highest level in the hierarchical structure is obtained. The query statement of the lowest level of the hierarchy structure matched with the query request is as follows: and query elements corresponding to the query parameters contained in the lowest level. And a second combining unit 506, configured to combine the query statements at the highest levels according to the target syntax rule to obtain a query statement that satisfies the query request. The scheme converts the query request into a corresponding hierarchical structure, generates the query statement according with the grammar rule of the specific query engine through the hierarchical structure, and can generate the query statement without using query statement templates of different query engines, so that the query system does not need to store statement template libraries of different query engines, and the storage resources occupied by the query system are reduced.
Fig. 6 is a block diagram illustrating an electronic device for performing the foregoing query statement generation method according to an exemplary embodiment. For example, the electronic device may be a terminal device such as a mobile phone, a computer, a tablet device, or the like, and may also be a server device.
Referring to fig. 6, the electronic device may include one or more of the following components: a processing component 602, a memory 604, a power component 606, a multimedia component 608, an audio component 610, an input/output interface 612, a sensor component 614, and a communication component 616.
The processing component 602 is generally operative to perform overall operations of the electronic device, such as operations associated with display, telephone calls, data communications, camera operations, and recording operations. The processing component 602 may include one or more processors 620 to execute instructions to perform all or a portion of the steps of the methods described above. Further, the processing component 602 can include one or more modules that facilitate interaction between the processing component 602 and other components. For example, the processing component 602 can include a multimedia module to facilitate interaction between the multimedia component 608 and the processing component 602.
The memory 604 is configured to store various types of data to support operations at the electronic device. Examples of such data include instructions for any application or method operating on the electronic device, contact data, phonebook data, messages, pictures, videos, and so forth. The memory 604 may be implemented by any type or combination of volatile or non-volatile memory devices such as Static Random Access Memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic or optical disks.
The power supply component 606 provides power to the various components of the electronic device. The power components 606 may include a power management system, one or more power supplies, and other components associated with generating, managing, and distributing power for an electronic device.
The multimedia component 608 includes a screen that provides an output interface between the electronic device and the user. In some embodiments, the screen may include a Liquid Crystal Display (LCD) and a Touch Panel (TP). If the screen includes a touch panel, the screen may be implemented as a touch screen to receive an input signal from a user. The touch panel includes one or more touch sensors to sense touch, slide, and gestures on the touch panel. The touch sensor may not only sense the boundary of a touch or slide action, but also detect the duration and pressure associated with the touch or slide operation. In some embodiments, the multimedia component 608 includes a front facing camera and/or a rear facing camera. The front camera and/or the rear camera may receive external multimedia data when the electronic device is in an operating mode, such as a shooting mode or a video mode. Each front camera and rear camera may be a fixed optical lens system or have a focal length and optical zoom capability.
The audio component 610 is configured to output and/or input audio signals. For example, the audio component 610 includes a Microphone (MIC) configured to receive external audio signals when the electronic device is in an operational mode, such as a call mode, a recording mode, and a voice recognition mode. The received audio signal may further be stored in the memory 604 or transmitted via the communication component 616. In some embodiments, audio component 610 further includes a speaker for outputting audio signals.
The input/output interface 612 provides an interface between the processing component 602 and peripheral interface modules, which may be keyboards, click wheels, buttons, etc. These buttons may include, but are not limited to: a home button, a volume button, a start button, and a lock button.
The sensor component 614 includes one or more sensors for providing various aspects of status assessment for the electronic device. For example, the sensor component 614 may detect an open/closed state of the electronic device, the relative positioning of components, such as a display and keypad of the electronic device, the sensor component 614 may also detect a change in the position of the electronic device or a component of the electronic device, the presence or absence of user contact with the electronic device, orientation or acceleration/deceleration of the electronic device, and a change in the temperature of the electronic device. The sensor assembly 614 may include a proximity sensor configured to detect the presence of a nearby object without any physical contact. The sensor assembly 614 may also include a light sensor, such as a CMOS or CCD image sensor, for use in imaging applications. In some embodiments, the sensor assembly 614 may also include an acceleration sensor, a gyroscope sensor, a magnetic sensor, a pressure sensor, or a temperature sensor.
The communication component 616 is configured to facilitate wired or wireless communication between the electronic device and other devices. The electronic device may access a wireless network based on a communication standard, such as WiFi, a carrier network (such as 2G, 3G, 4G, or 5G), or a combination thereof. In an exemplary embodiment, the communication component 616 receives broadcast signals or broadcast related information from an external broadcast management system via a broadcast channel. In an exemplary embodiment, the communication component 616 further includes a Near Field Communication (NFC) module to facilitate short-range communications. For example, the NFC module may be implemented based on Radio Frequency Identification (RFID) technology, infrared data association (IrDA) technology, Ultra Wideband (UWB) technology, Bluetooth (BT) technology, and other technologies.
In an exemplary embodiment, the electronic device may be implemented by one or more Application Specific Integrated Circuits (ASICs), Digital Signal Processors (DSPs), Digital Signal Processing Devices (DSPDs), Programmable Logic Devices (PLDs), Field Programmable Gate Arrays (FPGAs), controllers, micro-controllers, microprocessors or other electronic components for performing the processing method of the screen recording video provided by any of the embodiments of the present disclosure.
Where the electronic device is a terminal device such as a mobile phone, a computer, a tablet device, etc., the electronic device may include each of the components shown in fig. 6, and where the electronic device is a server device, the electronic device may include only the memory 604, the power component 606, the processing component 602, and the communication component 616 of fig. 6.
The embodiments of the present disclosure also provide a computer storage medium for storing a computer program, where the computer program is specifically configured to implement the method for generating a query statement provided in any embodiment of the present disclosure when executed.
The embodiment of the present disclosure provides a computer program product, which includes computer instructions stored in a computer storage medium, and when the computer instructions are executed, the computer instructions are used for implementing the method for generating the query statement provided by any embodiment of the present disclosure.
Other embodiments of the disclosure will be apparent to those skilled in the art from consideration of the specification and practice of the disclosure disclosed herein. This application is intended to cover any variations, uses, or adaptations of the disclosure following, in general, the principles of the disclosure and including such departures from the present disclosure as come within known or customary practice within the art to which the disclosure pertains. It is intended that the specification and examples be considered as exemplary only, with a true scope and spirit of the disclosure being indicated by the following claims.
It will be understood that the present disclosure is not limited to the precise arrangements described above and shown in the drawings and that various modifications and changes may be made without departing from the scope thereof. The scope of the present disclosure is limited only by the appended claims.

Claims (8)

1. A method for generating a query statement, comprising:
acquiring a query request aiming at a target database; wherein the query request contains a plurality of query parameters;
generating a hierarchy matching the type of the query request; wherein the hierarchical structure is a multi-layer structure; each level except the lowest level in the level structure corresponds to a keyword determined based on a target grammar rule, and the target grammar rule is a grammar rule of a query engine of the target database;
determining the belonged level of each query parameter in the hierarchical framework according to the belonged category of each query parameter and the position of each query parameter in the query request;
determining a corresponding query element of the query parameter in the target data table by using a binding relationship between the query parameter configured in the data model and the target data table and the category of each query parameter; wherein the target data table is a data table contained in the target database; the query elements are fields in the target data table, or expressions comprising the fields in the target data table, and the categories of the query parameters comprise atom indexes, dimensionality, filtering conditions and composite indexes;
combining the query statement of each level with the keyword of the previous level according to the target grammatical rule from the lowest level of the level structure matched with the query request to obtain the query statement of the previous level until the query statement of the highest level in the level structure is obtained; wherein the query statement of the lowest level of the hierarchy is: query elements corresponding to the query parameters contained in the lowest hierarchy;
and combining the query sentences of the highest levels according to the target grammar rule to obtain the query sentences of the query requests.
2. The generation method according to claim 1, wherein the determining, by using the binding relationship between the query parameters configured in the data model and the target data table and the category to which each query parameter belongs, the query element corresponding to the query parameter in the target data table includes:
for each query parameter, when the category of the query parameter is an atomic index or a dimension, searching a field corresponding to the query parameter in a target data table according to the binding relationship between the query parameter and the target data table;
when the category of the query parameter is a filtering condition or a composite index, searching and obtaining a field associated with the query parameter in a target data table according to the binding relationship between the query parameter and the target data table, and combining an expression template and the field associated with the query parameter to obtain an expression containing the field in the target data table; wherein the expression template is set according to the target grammar rule.
3. The method of generating as claimed in claim 1, wherein said determining the hierarchy to which each of said query parameters belongs in said hierarchy according to the category to which each of said query parameters belongs and the location of each of said query parameters in said query request further comprises:
when the query request is a composite query request for querying a plurality of data tables and the query request carries a type of query parameters, adjusting the hierarchy to which the type of query parameters belong in the hierarchy to which the type of query parameters belong; the category of the query parameters refers to the query parameters of which the category is the filtering condition, and the fields contained in the query elements corresponding to the homologous query parameters and the fields contained in the query elements corresponding to the category of the query parameters belong to the same target data table.
4. An apparatus for generating a query statement, comprising:
the device comprises an acquisition unit, a query unit and a query unit, wherein the acquisition unit is used for acquiring a query request aiming at a target database; wherein the query request contains a plurality of query parameters;
the generating unit is used for generating a hierarchical structure matched with the type of the query request; wherein the hierarchical structure is a multi-layer structure; each level except the lowest level in the level structure corresponds to a keyword determined based on a target grammar rule, and the target grammar rule is a grammar rule of a query engine of the target database;
a first determining unit, configured to determine, according to the category to which each query parameter belongs and the location of each query parameter in the query request, a hierarchy to which each query parameter belongs in the hierarchy;
the second determining unit is used for determining a corresponding query element of the query parameter in the target data table by utilizing the binding relationship between the query parameter configured in the data model and the target data table and the category of each query parameter; wherein the target data table is a data table contained in the target database; the query elements are fields in the target data table, or expressions comprising the fields in the target data table, and the categories of the query parameters comprise atom indexes, dimensionality, filtering conditions and composite indexes;
a first combination unit, configured to combine, starting from a lowest level of the hierarchical structure and according to the target syntax rule, the query statement of each level with the keyword of a previous level to obtain a query statement of the previous level until a query statement of a highest level in the hierarchical structure is obtained; wherein the query statement of the lowest level of the hierarchy structure matched with the query request is: query elements corresponding to the query parameters contained in the lowest hierarchy;
and the second combination unit is used for combining the query statements of the highest level according to the target grammar rule to obtain the query statement of the query request.
5. The generating apparatus according to claim 4, wherein the second determining unit is specifically configured to, when determining the corresponding query element of the query parameter in the target data table by using a binding relationship between the query parameter configured in the data model and the target data table and a category to which each query parameter belongs, determine:
for each query parameter, when the category of the query parameter is an atomic index or a dimension, searching a field corresponding to the query parameter in a target data table according to the binding relationship between the query parameter and the target data table;
when the category of the query parameter is a filtering condition or a composite index, searching and obtaining a field associated with the query parameter in a target data table according to the binding relationship between the query parameter and the target data table, and combining an expression template and the field associated with the query parameter to obtain an expression containing the field in the target data table; wherein the expression template is set according to the target grammar rule.
6. The generation apparatus according to claim 4, characterized in that the generation apparatus further comprises:
the optimization unit is used for adjusting the belonged level of the query parameters in the hierarchical structure to the belonged level of the homologous query parameters when the query request is a composite query request for querying a plurality of data tables and the query request carries the query parameters of one type; the category of the query parameters refers to the query parameters of which the category is the filtering condition, and the fields contained in the query elements corresponding to the homologous query parameters and the fields contained in the query elements corresponding to the category of the query parameters belong to the same target data table.
7. An electronic device comprising a memory and a processor;
wherein the memory is for storing a computer program;
the processor is configured to execute the computer program, and in particular to implement the method for generating a query statement according to any one of claims 1 to 3.
8. A computer storage medium storing a computer program which, when executed, is particularly adapted to implement the method of generating a query statement according to any one of claims 1 to 3.
CN202110607407.0A 2021-06-01 2021-06-01 Query statement generation method, device, equipment and storage medium Active CN113051287B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110607407.0A CN113051287B (en) 2021-06-01 2021-06-01 Query statement generation method, device, equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110607407.0A CN113051287B (en) 2021-06-01 2021-06-01 Query statement generation method, device, equipment and storage medium

Publications (2)

Publication Number Publication Date
CN113051287A CN113051287A (en) 2021-06-29
CN113051287B true CN113051287B (en) 2021-08-20

Family

ID=76518549

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110607407.0A Active CN113051287B (en) 2021-06-01 2021-06-01 Query statement generation method, device, equipment and storage medium

Country Status (1)

Country Link
CN (1) CN113051287B (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113590648A (en) * 2021-07-30 2021-11-02 高途教育科技集团有限公司 Data query method, device, equipment and readable storage medium
CN114090619B (en) * 2022-01-19 2022-09-20 支付宝(杭州)信息技术有限公司 Query processing method and device for natural language
CN114579619B (en) * 2022-04-28 2023-01-20 北京达佳互联信息技术有限公司 Data query method and device, electronic equipment and storage medium

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104484392A (en) * 2014-12-11 2015-04-01 北京国双科技有限公司 Method and device for generating database query statement
CN107391739A (en) * 2017-08-07 2017-11-24 北京奇艺世纪科技有限公司 A kind of query statement generation method, device and electronic equipment
CN111143359A (en) * 2019-12-18 2020-05-12 口碑(上海)信息技术有限公司 Query statement generation method and device
CN112559554A (en) * 2020-12-24 2021-03-26 北京百家科技集团有限公司 Query statement optimization method and device

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105183735B (en) * 2014-06-18 2019-02-19 阿里巴巴集团控股有限公司 The querying method and inquiry unit of data

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104484392A (en) * 2014-12-11 2015-04-01 北京国双科技有限公司 Method and device for generating database query statement
CN107391739A (en) * 2017-08-07 2017-11-24 北京奇艺世纪科技有限公司 A kind of query statement generation method, device and electronic equipment
CN111143359A (en) * 2019-12-18 2020-05-12 口碑(上海)信息技术有限公司 Query statement generation method and device
CN112559554A (en) * 2020-12-24 2021-03-26 北京百家科技集团有限公司 Query statement optimization method and device

Also Published As

Publication number Publication date
CN113051287A (en) 2021-06-29

Similar Documents

Publication Publication Date Title
CN113051287B (en) Query statement generation method, device, equipment and storage medium
JP6736173B2 (en) Method, system, recording medium and computer program for natural language interface to a database
US9031920B2 (en) Objects in a storage environment for connected applications
CN110674408A (en) Service platform, and real-time generation method and device of training sample
US11281568B2 (en) Automation of enterprise software inventory and testing
US8413109B2 (en) Systems and methods for metamodel transformation
US10430802B2 (en) Screen-image based classification
CN110619050A (en) Intention recognition method and equipment
US10733240B1 (en) Predicting contract details using an unstructured data source
US8707262B2 (en) Code scoring
US10324951B1 (en) Tracking and viewing model changes based on time
CN111522840B (en) Label configuration method, device, equipment and computer readable storage medium
US10203841B2 (en) In place creation of objects
US20220284060A1 (en) Question Answering Method and Apparatus Based on Knowledge Graph
US10019295B2 (en) Method and system for managing and linking software applications
US11687568B2 (en) Data catalog system for generating synthetic datasets
CN114036917A (en) Report generation method and device, computer equipment and storage medium
CN112988822A (en) Data query method, device, equipment, readable storage medium and product
CN114138817A (en) Data query method, device, medium and product based on relational database
US7694307B2 (en) Analytical task invocation
CN113672660A (en) Data query method, device and equipment
US20120173584A1 (en) Storage and usage of report positions for navigation
US11755572B1 (en) Systems, methods, and apparatus for natural language queries and data visualizations
CN116523674A (en) Data management and visualization method, device, server and storage medium
US20220405792A1 (en) Method and apparatus for processing commodity information, device and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant