CN117931858B - Data query method, device, computer equipment and storage medium - Google Patents

Data query method, device, computer equipment and storage medium Download PDF

Info

Publication number
CN117931858B
CN117931858B CN202410325663.4A CN202410325663A CN117931858B CN 117931858 B CN117931858 B CN 117931858B CN 202410325663 A CN202410325663 A CN 202410325663A CN 117931858 B CN117931858 B CN 117931858B
Authority
CN
China
Prior art keywords
text
data
data query
query
keyword
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
CN202410325663.4A
Other languages
Chinese (zh)
Other versions
CN117931858A (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.)
Kingdee Software China Co Ltd
Original Assignee
Kingdee Software China 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 Kingdee Software China Co Ltd filed Critical Kingdee Software China Co Ltd
Priority to CN202410325663.4A priority Critical patent/CN117931858B/en
Publication of CN117931858A publication Critical patent/CN117931858A/en
Application granted granted Critical
Publication of CN117931858B publication Critical patent/CN117931858B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

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/245Query processing
    • G06F16/2453Query optimisation
    • 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/245Query processing
    • G06F16/2455Query execution
    • 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/245Query processing
    • G06F16/2458Special types of queries, e.g. statistical queries, fuzzy queries or distributed queries
    • G06F16/2462Approximate or statistical queries
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • Computational Linguistics (AREA)
  • Data Mining & Analysis (AREA)
  • Databases & Information Systems (AREA)
  • General Physics & Mathematics (AREA)
  • Probability & Statistics with Applications (AREA)
  • Mathematical Physics (AREA)
  • Software Systems (AREA)
  • Fuzzy Systems (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The present application relates to a data query method, apparatus, computer device, storage medium and computer program product. The method comprises the following steps: acquiring a data query text; extracting keywords in the data query text to obtain a keyword set corresponding to the data query text; determining a target data table corresponding to the data query text according to the keyword set; constructing a query sentence template corresponding to the data query text based on the data query text, the keyword set and a target field set corresponding to the target data table; filling a query sentence template based on the keyword set to obtain a query sentence corresponding to the data query text; the query statement is used for determining a data query result corresponding to the data query text. By adopting the method, the data query efficiency can be improved.

Description

Data query method, device, computer equipment and storage medium
Technical Field
The present application relates to the field of computer technology, and in particular, to a data query method, apparatus, computer device, storage medium, and computer program product.
Background
With the rapid development of the internet, the information and data volumes are continuously increasing, and the importance of databases is increasingly prominent. The database stores massive valuable structured data, and technicians interact with the database mainly through database query sentences, but for most non-technicians, the problem of query is often directly input into an information query system, so that the interaction with the database is realized.
In the conventional technology, in the process of converting a problem input by a user into a corresponding database query language to query data, there is a problem of low data query efficiency.
Disclosure of Invention
In view of the foregoing, it is desirable to provide a data query method, apparatus, computer device, computer-readable storage medium, and computer program product that can improve data query efficiency.
The application provides a data query method. The method comprises the following steps:
acquiring a data query text;
extracting keywords in the data query text to obtain a keyword set corresponding to the data query text;
determining a target data table corresponding to the data query text according to the keyword set;
Constructing a query sentence template corresponding to the data query text based on the data query text, the keyword set and a target field set corresponding to the target data table;
Filling a query sentence template based on the keyword set to obtain a query sentence corresponding to the data query text; the query statement is used for determining a data query result corresponding to the data query text.
The application also provides a data query device. The device comprises:
the text acquisition module is used for acquiring a data query text;
The keyword extraction module is used for extracting keywords in the data query text to obtain a keyword set corresponding to the data query text;
The data table determining module is used for determining a target data table corresponding to the data query text according to the keyword set;
the template construction module is used for constructing a query statement template corresponding to the data query text based on the data query text, the keyword set and the target field set corresponding to the target data table;
The statement determining module is used for filling a query statement template based on the keyword set to obtain a query statement corresponding to the data query text; the query statement is used for determining a data query result corresponding to the data query text.
A computer device comprising a memory storing a computer program and a processor implementing the steps of the data query method described above when the processor executes the computer program.
A computer readable storage medium having stored thereon a computer program which, when executed by a processor, performs the steps of the data querying method described above.
A computer program product comprising a computer program which, when executed by a processor, implements the steps of the data query method described above.
The data query method, the data query device, the computer equipment, the storage medium and the computer program product extract the keyword set from the data query text by acquiring the data query text. And determining a target data table for the data query text according to the keyword set. And constructing a query sentence template corresponding to the data query text based on the data query text, the keyword set and the target field set corresponding to the target data table. And filling the query sentence templates according to the keyword sets to obtain the query sentences corresponding to the data query text. Executing the query sentence can obtain the data query result corresponding to the data query text. When the data query text is acquired, a target data table queried by the data query text is determined based on the keyword set corresponding to the data query text, then a query sentence template is constructed according to the target data table and the keyword set, the keyword set is filled into the query sentence template, the query sentence corresponding to the data query text can be rapidly and accurately obtained, and the generation efficiency of the query sentence is effectively improved, so that the efficiency of data query is improved.
Drawings
FIG. 1 is an application environment diagram of a data polling method in one embodiment;
FIG. 2 is a flow diagram of a method of data polling in one embodiment;
FIG. 3 is a flow diagram of determining a target data table in one embodiment;
FIG. 4 is a block diagram of the structure of a data polling device in one embodiment;
FIG. 5 is an internal block diagram of a computer device in one embodiment;
Fig. 6 is an internal structural view of a computer device in another embodiment.
Detailed Description
The present application will be described in further detail with reference to the drawings and examples, in order to make the objects, technical solutions and advantages of the present application more apparent. It should be understood that the specific embodiments described herein are for purposes of illustration only and are not intended to limit the scope of the application.
The data query method provided by the embodiment of the application can be applied to an application environment shown in figure 1. Wherein the terminal 102 communicates with the server 104 via a network. The data storage system may store data that the server 104 needs to process. The data storage system may be integrated on the server 104 or may be located on a cloud or other network server. The terminal 102 may be, but not limited to, various personal computers, notebook computers, smart phones, tablet computers, internet of things devices, and portable wearable devices, which may be smart televisions, smart car devices, and the like. The portable wearable device may be a smart watch, smart bracelet, headset, or the like. The server 104 may be implemented as a stand-alone server or as a server cluster of multiple servers. The terminal 102 and the server 104 may be directly or indirectly connected through wired or wireless communication, and the present application is not limited herein.
The terminal and the server can be independently used for executing the data query method provided in the embodiment of the application.
The terminal and the server can also cooperate to perform the data query method provided in the embodiments of the present application.
For example, the terminal transmits the acquired data query text to the server. And the server extracts keywords in the data query text to obtain a keyword set corresponding to the data query text. And the server determines a target data table corresponding to the data query text according to the keyword set. The server constructs a query sentence template corresponding to the data query text based on the data query text, the keyword set and the target field set corresponding to the target data table. The server fills in a query statement template based on the keyword set to obtain a query statement corresponding to the data query text, wherein the query statement is used for determining a data query result corresponding to the data query text. The server can return the query statement to the terminal, can execute the query statement, obtain the data query result corresponding to the data query text, and terminal the range value of the data query result.
In one embodiment, as shown in fig. 2, a data query method is provided, and the method is applied to a computer device, which is a terminal or a server, and is executed by the terminal or the server, or may be implemented through interaction between the terminal and the server. The data query method comprises the following steps:
step S202, acquiring a data query text.
Wherein, the data query text refers to the text which is input by a user to the system and used for querying the data. The data query text may be any form of natural language text, such as questions, commands, or dialogs. For example, in the context of a profit query, a user may input the question "what is the product of group a 21 years revenue top 5? The question is the data query text.
Illustratively, a database stores a large amount of valuable structured data, technical users interact with the database mainly by inputting database query sentences conforming to database operation rules, and for most non-technical users who do not know database knowledge, data query texts in natural language form are often input, and computer equipment acquires the data query texts input by the users and converts the data query texts into corresponding database query sentences, so that the non-technical users can also have the capability of data query.
Step S204, extracting keywords in the data query text to obtain a keyword set corresponding to the data query text.
The keywords refer to words contained in the query text and used for generating data query sentences, namely specific words used for describing information such as a data table, a data table field, query conditions and the like in the data query text. A keyword set refers to a set of individual keywords contained in a data query text.
Illustratively, the computer device segments the data query text into a plurality of text words, and extracts keywords from the respective text words for generating the data query text, resulting in a keyword set. Specifically, a data query sample can be obtained from a plurality of service fields, keywords corresponding to the data query sample are manually marked, tag keyword sets corresponding to the data query samples are obtained, the data query sample is input into an initial keyword extraction model, a prediction keyword set corresponding to the data query sample is obtained, model loss is calculated based on differences between the tag keyword set and the prediction keyword set, model parameters of the keyword extraction model are adjusted based on the model loss until the model converges, and the keyword extraction model is obtained. And inputting the data query text into a keyword extraction model to obtain a keyword set corresponding to the data query text.
In one embodiment, the computer device may also extract semantic features corresponding to each text word, extract text features corresponding to the data query text based on context information corresponding to the data query text, and enable text meanings corresponding to the data query text to be represented more accurately based on the text features extracted by the context information. And comparing the text features corresponding to the text words with the text features corresponding to the data query text to obtain the key indexes corresponding to the text words, wherein the key indexes are used for representing the probability that the text words are key words. And extracting each keyword corresponding to the data query text based on the keyword index corresponding to each text word respectively to obtain a keyword set. In this way, the keywords are determined based on the text features corresponding to the text words and the text features corresponding to the data query text, so that the accuracy of the determined keywords can be improved, and the accuracy of the generated query sentences can be improved.
Step S206, determining a target data table corresponding to the data query text according to the keyword set.
The target data table is a data table queried by the data query text. For example, the text "what is the product of group a 21 year revenue top 5? The target data table corresponding to the data query text is a profit table in which the product revenue information corresponding to each group is recorded.
Illustratively, the computer device compares the keyword set with each candidate data table, and the candidate data table with highest relativity is used as the target data table corresponding to the data query text. Specifically, the data query text and the data table description information corresponding to each candidate data table can be compared to obtain a first matching degree corresponding to each candidate data table, and the candidate data table corresponding to the maximum value of the first matching degree is used as the target data table. And comparing the keyword set with the candidate field sets respectively corresponding to the candidate data tables to obtain second matching degrees respectively corresponding to the candidate data tables, and taking the candidate data table corresponding to the maximum value of the second matching degrees as the target data table. That is, based on at least one of the first matching degree and the second matching point corresponding to the candidate data table, the target matching degree corresponding to each candidate data table is calculated, and the candidate data table corresponding to the maximum value of the target matching degree is used as the target data table.
Step S208, a query sentence template corresponding to the data query text is constructed based on the data query text, the keyword set and the target field set corresponding to the target data table.
The target field set corresponding to the target data table refers to a set formed by each field in the target data table. The query statement template refers to the basic structure of the query statement and contains placeholders to be filled, and the placeholders can be replaced by actual character strings in subsequent processing, for example, the placeholders can be replaced by data table names, data table field names, query condition values and the like.
The computer device extracts feature vectors corresponding to the keywords in the keyword set respectively based on the data query text, and determines data table fields corresponding to the keywords in the target data table based on the feature vectors corresponding to the keywords respectively. And constructing a query statement template corresponding to the data query text through the data table fields corresponding to the keywords respectively. For example, the text "what is the product of group a 21 year revenue top 5? The keyword set is "product, group A, 21 years, top5", the keyword "product" corresponds to the data table field "product" in the target data table, the keyword "group A" corresponds to the data table field "company name" in the target data table, the keyword "21 years" corresponds to the data table field "year" in the target data table, and the keyword "top5" corresponds to the data table field "business income" in the target data table.
Step S210, filling a query sentence template based on a keyword set to obtain a query sentence corresponding to a data query text; the query statement is used for determining a data query result corresponding to the data query text.
The query statement refers to a database query statement generated based on the data query text, and is used for executing a query operation on the data table, for example, the query statement may be an SQL (Structured Query Language ) statement, and may be a non-relational database query statement.
The computer device extracts target entities corresponding to the keywords in the keyword set in the target data table, and fills the target entities corresponding to the keywords into the query statement template to obtain the query statement corresponding to the data query text. The target entity refers to a field value corresponding to the keyword in the target data table. Executing the query sentence to obtain a data query result corresponding to the data query text, and returning the data query result to the sender corresponding to the data query text.
In the data query method, the keyword set is extracted from the data query text by acquiring the data query text. And determining a target data table for the data query text according to the keyword set. And constructing a query sentence template corresponding to the data query text based on the data query text, the keyword set and the target field set corresponding to the target data table. And filling the query sentence templates according to the keyword sets to obtain the query sentences corresponding to the data query text. Executing the query sentence can obtain the data query result corresponding to the data query text. When the data query text is acquired, a target data table queried by the data query text is determined based on the keyword set corresponding to the data query text, then a query sentence template is constructed according to the target data table and the keyword set, the keyword set is filled into the query sentence template, the query sentence corresponding to the data query text can be rapidly and accurately obtained, and the generation efficiency of the query sentence is effectively improved, so that the efficiency of data query is improved.
In one embodiment, the data query method further comprises:
Inputting the data query text into a query sentence generation model to obtain a query sentence corresponding to the data query text; the query statement generation model is trained based on a plurality of data query samples and sample label sets respectively corresponding to the data query samples; the query sentence generation model comprises a keyword extraction branch for extracting a keyword set corresponding to the data query text, a template generation branch for generating a query sentence template corresponding to the data query text, and a sentence generation branch for generating a query sentence according to the keyword set and the query sentence template.
The query sentence generation model is a model for generating a query sentence corresponding to the data query text, input data of the query sentence generation model is the data query text, and output data is the query sentence corresponding to the data query text. The data query sample refers to a data query text obtained from a data query corpus corresponding to each of a plurality of business fields, and a sample tag set corresponding to the data query sample comprises at least one of a keyword set, a query statement template and a query statement corresponding to the data query sample.
Illustratively, the computer device inputs the data query text into the query statement generation model, and first extracts a branch from keywords in the query statement generation model to extract a keyword set corresponding to the data query text. The query sentence generation model determines a target data table corresponding to the data query text based on the keyword set, and further inputs the data query text, the keyword set and a target field set corresponding to the target data table into a template to generate branches, so that a query sentence template corresponding to the data query text is obtained. The query sentence generation model extracts target entities corresponding to the keywords in the target data table respectively, inputs the data query text and the target entities corresponding to the keywords respectively, and generates branches by inputting sentences to obtain query sentences corresponding to the data query text.
In the above embodiment, by acquiring the data query samples from the data query corpus corresponding to each of the plurality of different service areas and training the query statement generation model based on each of the data query samples, generalization of the query statement generation model can be improved, and thus accuracy of the generated query statement can be improved. The query sentence generation model firstly extracts a keyword set through a keyword extraction branch, then generates a branch through a template to generate a query sentence template, and finally completes the keyword on the query sentence template through sentences, so that the query sentence can be obtained quickly and accurately.
In one embodiment, extracting keywords in the data query text to obtain a keyword set corresponding to the data query text includes:
Extracting a plurality of text words in a data query text;
extracting text features corresponding to each text word respectively based on the association relation of each text word in the data query text;
Determining target words in each text word based on the text features corresponding to each text word;
And obtaining a keyword set corresponding to the data query text based on the target word.
The text words refer to various words obtained by word segmentation processing on the data query text, namely words forming the data query text. Text features refer to feature vectors used for representing semantic information corresponding to text words and association relations between the text words and other respective text words. The target word refers to a keyword contained in the query text.
Illustratively, the computer device pre-processes the data query text to remove extraneous information such as punctuation. A plurality of text words are extracted from the preprocessed data query text. And further, text features corresponding to each text word are extracted through a pre-trained text feature extraction model, the text feature extraction model is obtained through training based on a large number of corpus samples, and semantic relations among each text word in a data query text can be captured. Based on the text features corresponding to the text words respectively, comparing the text features corresponding to the text words respectively with the text features corresponding to the query text to obtain the key indexes corresponding to the text words respectively, wherein the key indexes are used for representing the probability that the text words are key words. And extracting each keyword corresponding to the data query text based on the keyword index corresponding to each text word respectively to obtain a keyword set. Specifically, a text word having a keyword index greater than a preset threshold may be used as the keyword.
In the above embodiment, the keywords are determined based on the text features corresponding to the text words and the text features corresponding to the data query text, and the semantic information of the text words and the context information corresponding to the text words in the data query text are comprehensively considered, so that the accuracy of the determined keywords can be improved, and the accuracy of the generated query sentences can be improved.
In one embodiment, as shown in fig. 3, determining a target data table corresponding to the data query text according to the keyword set includes:
step S302, data table description information corresponding to each of the plurality of candidate data tables is obtained.
Step S304, calculating the text similarity between the data query text and the data table description information corresponding to each candidate data table, and obtaining the first matching degree corresponding to each candidate data table.
And step S306, comparing the keyword set with the candidate field sets respectively corresponding to the candidate data tables to obtain second matching degrees respectively corresponding to the candidate data tables.
Step S308, fusing the first matching degree and the second matching degree corresponding to the same candidate data table to obtain target matching degrees corresponding to the candidate data tables respectively.
Step S310, determining a target data table corresponding to the data query text based on the target matching degree corresponding to each candidate data table.
The data table description information refers to information for explaining and describing the content, structure, field meaning and other information of the data table in natural language (such as Chinese, english and the like), and the basic information and the purpose of the data table are described through words which are easy to understand. The candidate data table is a data table stored in the database. A candidate field set refers to a set that contains the individual data table fields in the candidate data table.
The first degree of matching refers to the degree of matching between the query text and the candidate data table. The second matching degree refers to the matching degree between the keyword set and the candidate field set corresponding to the candidate data table. The target matching degree refers to the matching degree between the candidate data table obtained by fusing the first matching degree and the second matching degree and the data query text. The degree of matching is used to indicate the probability that the candidate data table is the data table queried by the data query text.
Illustratively, the computer device obtains data table description information corresponding to each candidate data table. And extracting text features corresponding to the description information of each data table and text features corresponding to the data query text. And calculating the text similarity between the text features corresponding to the data table description information and the data query text, and respectively obtaining the first matching degree between each candidate data table and the data query text. And comparing the keyword set with the candidate field set corresponding to the candidate data table to obtain the first matching degree corresponding to each candidate data table. Specifically, text features corresponding to each keyword in the keyword set can be extracted and fused to obtain comprehensive text features corresponding to the keyword set, text features corresponding to each candidate field in the candidate field set can be extracted and fused to obtain comprehensive text features corresponding to the candidate field set. And calculating the similarity between the comprehensive text features corresponding to the keyword sets and the comprehensive text features corresponding to the candidate field sets to obtain a second matching degree corresponding to the candidate data table. And fusing the first matching degree and the second matching degree corresponding to the same candidate data table to respectively obtain the target matching degree corresponding to each candidate data table. And further taking the candidate data table corresponding to the maximum value of the target matching degree as a target data table corresponding to the data query text.
In the above embodiment, the target data table is determined together based on the similarity between the data query text and the data table description information corresponding to the candidate data table, and the similarity between the keyword set and the candidate field set corresponding to the candidate data table, so that the accuracy of the determined target data table can be improved, and the accuracy of the generated query statement can be improved.
In one embodiment, constructing a query sentence template corresponding to the data query text based on the data query text, the keyword set, and a target field set corresponding to the target data table, includes:
extracting attribute features corresponding to each keyword in the keyword set respectively based on the data query text;
Determining a return attribute field and a condition attribute field corresponding to the data query text from each target field included in the target field set based on attribute characteristics respectively corresponding to each keyword;
and generating a query statement template corresponding to the data query text based on the returned attribute field and the conditional attribute field.
The attribute features are used for indicating the matching degree between the return attribute and the condition attribute of the keywords corresponding to the query statement templates respectively. The return attribute is used in the query statement to indicate the field queried in the data table. The condition attribute is used in the query statement to indicate the query condition. The return attribute field refers to a data table field corresponding to the return attribute determined in the data table. The condition attribute field refers to a field corresponding to the condition attribute determined in the data table. For example, what is the data query text "product of group a 21 years camp top 5? When the method is used, a keyword set corresponding to a data query text is a product, a group A, 21 years and a top5, a query statement template is a SELECT product FROM profit list WHERE company name= "candidate word" and year in "candidate word" order by business income limit "candidate word", wherein a first character string "product" following the SELECT is a return attribute field, a first character string "profit list" following the FROM is a data list identification, a company name "," year "and" business income "following the WHERE are condition attribute fields, and the" candidate word "is a placeholder and can be replaced by an actual query condition value.
Illustratively, the computer device extracts, based on the data query text, attribute features in the data query text corresponding to respective keywords in the keyword set. And determining the keywords corresponding to the return attribute and the keywords corresponding to the conditional attribute based on the attribute characteristics corresponding to each keyword. And further, in a target field set corresponding to the target data table, acquiring a target field corresponding to the keyword corresponding to the return attribute as a return attribute field, and acquiring a target field corresponding to the keyword corresponding to the condition attribute as a condition attribute field. For example, what is the data query text "product of group a 21 years camp top 5? When the method is used, the keyword set corresponding to the data query text is a keyword of which the return attribute is a product, an A group, 21 years and top5, the return attribute field corresponding to the keyword product in the target data table is a keyword of which the condition attribute is a condition attribute, the condition attribute field corresponding to the keyword A group in the target data table is a company name. And combining the statement connectives corresponding to the return attribute fields and the return attribute fields to obtain a first clause, wherein for example, in an SQL statement, the connectives corresponding to the return attribute fields are SELECT. And generating a second clause based on the statement junction word corresponding to the data table identification. And combining the statement connectives corresponding to the condition attribute fields and the condition attribute fields to obtain a third clause. And splicing the first clause, the second clause and the third clause to obtain a query statement template corresponding to the data query text.
In the above embodiment, the returned attribute fields and the condition attribute fields that form the query sentence template are extracted first, and then the corresponding clauses are respectively allocated to each attribute field and the data table identifier based on the corresponding sentence connection words, and finally each clause is spliced, so that the query sentence template corresponding to the data query text can be quickly and accurately generated, and the efficiency and accuracy of data query are improved.
In one embodiment, based on the keyword set, filling the query sentence template to obtain a query sentence corresponding to the data query text, including:
determining a conditional keyword corresponding to a conditional attribute field corresponding to the data query text from the keyword set;
extracting word features corresponding to conditional keywords based on the data query text and the conditional keywords;
determining a target entity corresponding to the conditional keyword based on the word characteristics corresponding to the conditional keyword;
and filling the target entity into the query statement template to obtain a query statement corresponding to the data query text.
The term "refers to a term in a term set that is used to indicate a field value (i.e., a query condition value) corresponding to a term attribute field. The word features corresponding to the conditional keywords refer to feature vectors used for representing semantic information of the conditional keywords in the data query text. The target entity refers to a field value corresponding to the conditional keyword in the database. For example, what is the data query text "product of group a 21 years camp top 5? When the query statement template is ' SELECT product FROM profit table WHERE company name= ' candidate word ' and year in ' candidate word ' order by business income limit ' candidate word ', ' group a ', ' 21 year ', ' top5 ' is a plurality of condition keywords corresponding to the data query text, the target entity corresponding to the ' group a ' is ' Axx Group ', ' 21 year ' is ' 2021 ', ' top5 ' is ' 5 ', and the query statement obtained by filling the target entity into the query statement template is ' SELECT product FROM profit table WHERE company name= ' Axx Group ' and year in (' 2021 ') order by business income limit 5 '.
Illustratively, the computer device determines, from the keyword set, a conditional keyword corresponding to a conditional attribute field corresponding to the data query text, i.e., a keyword belonging to the conditional attribute correspondence. The condition attribute fields can be one or more, and the condition keywords corresponding to the condition attribute fields respectively are determined. And extracting word characteristics corresponding to each condition keyword respectively, and determining target entities corresponding to each condition keyword respectively based on the word characteristics corresponding to each condition keyword respectively.
And the computer equipment fills the target entity corresponding to each condition keyword and the data table identifier corresponding to the target data table into the query statement template to obtain the query statement corresponding to the data query text. The data table identification is the table name of the data table. Specifically, in the query statement template, the data table identifier corresponds to one placeholder, each condition attribute field corresponds to one placeholder, the placeholder corresponding to the data table identifier is replaced based on the data table identifier, the placeholder corresponding to the condition attribute field is replaced based on the condition keyword corresponding to the condition attribute field until the placeholder corresponding to each condition attribute field is replaced by the corresponding condition keyword, and the query statement corresponding to the data query text is obtained.
In some embodiments, the data query text and the conditional keywords are input into an entity prediction model, and the entity prediction model firstly extracts word features corresponding to the conditional keywords in the data query text, and further predicts target entities corresponding to the conditional keywords based on the word features corresponding to the conditional keywords. The entity prediction model can be a single neural network model or can be a model branch contained in a query language generation model. The entity prediction model is obtained by training based on a plurality of data query samples and sample label sets corresponding to the data query samples in a corpus, wherein the sample label sets comprise keyword sets corresponding to the data query samples, and target entities, query statement templates and query statements of each keyword in the keyword sets.
In some embodiments, based on word features corresponding to the conditional keywords, semantic similarity between the conditional keywords and each field value in the target data table is determined, and the field value with the maximum semantic similarity is taken as a target entity corresponding to the conditional keywords. In this way, the target entity corresponding to the condition keyword is determined in each field value included in the target data table, and the accuracy of the determined target entity can be improved.
In the above embodiment, after determining the condition keywords corresponding to each condition attribute field, the word features corresponding to the condition keywords are further extracted based on the condition keywords and the data query text. And determining target entities corresponding to the keywords based on word characteristics corresponding to the keywords, and finally filling the target entities into a query sentence template, so that ambiguity caused by the diversity of natural language can be eliminated, the obtained query sentence is more accurate, and the accuracy of data query can be improved.
In one embodiment, determining the target entity corresponding to the conditional keyword based on the word feature corresponding to the conditional keyword includes:
Extracting a plurality of candidate entities corresponding to the conditional keywords from a target data table based on word characteristics corresponding to the conditional keywords;
Extracting basic entity characteristics corresponding to each candidate entity from data table description information corresponding to the target data table;
And determining target entities corresponding to the condition keywords in each candidate entity based on the matching degree between the basic entity features corresponding to each candidate entity and the context information corresponding to the data query text.
The candidate entity refers to a candidate field value obtained by mapping the conditional keyword to the target data table. The basic entity features are feature vectors obtained by extracting features of candidate entities, and comprise semantic information corresponding to the candidate entities, semantic relations between the candidate entities and other information. The context information corresponding to the data query text comprises a user query history and a user query state corresponding to the data query text, and is an important basis for assisting in understanding the data query text.
The computer device, in an exemplary manner, extracts a plurality of candidate entities corresponding to the conditional keywords from the respective field values contained in the target data table according to the word characteristics corresponding to the conditional keywords through a multi-recall strategy. For example, a plurality of candidate entities corresponding to each conditional keyword can be quickly retrieved from a large amount of data contained in the target data table through different recall algorithms such as keyword matching, vector retrieval, synonym hit, topic identification and the like. And extracting the basic entity characteristics corresponding to each candidate entity from the data table description information corresponding to the target data table. And further extracting the context characteristics corresponding to the data query text from the context information corresponding to the data query text. And determining the matching degree between each candidate entity and the context information corresponding to the data query text based on the basic entity characteristics and the context characteristics corresponding to each candidate entity, and taking the candidate entity with the highest matching degree as the target entity corresponding to the conditional keyword.
In the above embodiment, a small number of candidate entities corresponding to the condition keywords are rapidly determined in the target data table through the multi-way recall strategy, so that the search range of the target entity is greatly reduced, and the efficiency of determining the target entity can be improved. And further, based on the matching degree between the basic characteristic corresponding to the candidate entity and the context information corresponding to the data query text, the target entity can be rapidly and accurately determined in each candidate entity, and the efficiency and accuracy of the data query are improved.
In a specific embodiment, the data query method provided by the application can be applied to an information query system. The data query method comprises the following steps:
1. Construction of corpus
The information query system extracts various data query samples input by a user when the database data is queried in the information query system, and marks the data query samples through SQL experts to obtain sample labels respectively corresponding to the data query samples. And obtaining a corpus in the general field based on each data query sample and sample labels corresponding to the data query samples. For example, the corpus size may be 10000 data query samples, 8000 of which are training sets and 2000 of which are validation sets. The data format of the training sample comprises a problem of a user (namely, a data query sample) and a sample label, wherein the sample label comprises information such as the name of a data table for which the problem is aimed, the field mode of the data table, an SQL template and the like. For example, the training samples may be of the form:
{ form name: "profit table",
Form fields of "business income, business expenditure, product, company name, year, business income, etc.,
The question is what is the "21 year revenue top5 product for group a? ",
Keyword: "product, group A, 21 years, top5",
SQL template SELECT product FROM profit table WHERE company name = "candidate words" and year in "candidate words" order by "income" limit "candidate words;" }
2. Model construction
The information query system trains SQL sentence generation models based on the constructed corpus. The SQL statement generation model may be a large language model, i.e., a deep learning model trained based on massive text data. The SQL statement generation model comprises two branches of keyword recognition and SQL template generation. The training process of each branch mainly comprises three steps of data input, encoder work and result output. In the data input step, the input data of the SQL statement generation model may be any form of natural language text, such as questions, commands or dialogs. The input data is converted by the model into a "token" format, i.e., a data format that the model can understand and process. The encoder includes a multi-layer Self-attention mechanism (Self-Attention Mechanism) that captures various complex relationships in the text and generates a context-dependent word vector representation. After being processed by the encoder, a prediction sequence is generated, the prediction sequence consists of a series of token with highest probability, and the prediction sequence is converted into natural language text to obtain output data. For the keyword recognition model, the prediction sequence is the keywords, and for the SQL template generation model, the prediction sequence is the SQL template. After the data query text is obtained, inputting the data query text into an SQL sentence generating model to obtain a corresponding keyword set and an SQL template, carrying out entity alignment on the keyword set, mapping the keyword set into standard terms (namely target entities) in a database, and finally filling target entities corresponding to the keywords into the SQL template to obtain a final SQL sentence.
In the above embodiment, through the SQL template generation technique, the entity alignment technique, and the SQL statement completion technique, the data query text can be quickly converted into the corresponding SQL statement. The method solves the problem that the user directly queries in various information query systems through natural language, and improves the query efficiency of the user. And firstly, generating a more general SQL draft (namely an SQL template), and then carrying out keyword completion on the SQL draft by combining the generalization capability excellent in the large model, thereby improving the generalization capability of NL2SQL (Natural Language to SQL, namely a technology for converting the natural language of a user into executable SQL sentences) technology in the general field.
It should be understood that, although the steps in the flowcharts related to the above embodiments are sequentially shown as indicated by arrows, these steps are not necessarily sequentially performed in the order indicated by the arrows. The steps are not strictly limited to the order of execution unless explicitly recited herein, and the steps may be executed in other orders. Moreover, at least some of the steps in the flowcharts described in the above embodiments may include a plurality of steps or a plurality of stages, which are not necessarily performed at the same time, but may be performed at different times, and the order of the steps or stages is not necessarily performed sequentially, but may be performed alternately or alternately with at least some of the other steps or stages.
Based on the same inventive concept, the embodiment of the application also provides a data query device for realizing the above related data query method. The implementation of the solution provided by the device is similar to the implementation described in the above method, so the specific limitation in the embodiments of one or more data query devices provided below may refer to the limitation of the data query method hereinabove, and will not be repeated herein.
In one embodiment, as shown in fig. 4, there is provided a data query apparatus, including: a text acquisition module 402, a keyword extraction module 404, a data table determination module 406, a template construction module 408, and a sentence determination module 410, wherein:
A text acquisition module 402, configured to acquire a data query text.
The keyword extraction module 404 is configured to extract keywords in the data query text, and obtain a keyword set corresponding to the data query text.
The data table determining module 406 is configured to determine, according to the keyword set, a target data table corresponding to the data query text.
The template construction module 408 is configured to construct a query sentence template corresponding to the data query text based on the data query text, the keyword set, and the target field set corresponding to the target data table.
The sentence determining module 410 is configured to populate a query sentence template based on the keyword set to obtain a query sentence corresponding to the data query text; the query statement is used for determining a data query result corresponding to the data query text.
In one embodiment, the data query device further comprises a model processing module, wherein the model processing module is used for inputting the data query text into the query sentence to generate a model, and obtaining a query sentence corresponding to the data query text; the query statement generation model is trained based on a plurality of data query samples and sample label sets respectively corresponding to the data query samples; the query sentence generation model comprises a keyword extraction branch for extracting a keyword set corresponding to the data query text, a template generation branch for generating a query sentence template corresponding to the data query text, and a sentence generation branch for generating a query sentence according to the keyword set and the query sentence template.
In one embodiment, the keyword extraction module 404 is further configured to:
Extracting a plurality of text words in a data query text; extracting text features corresponding to each text word respectively based on the association relation of each text word in the data query text; and determining target words in the text words based on the text features corresponding to the text words respectively, and obtaining keyword sets corresponding to the data query text based on the target words.
In one embodiment, the data table determination module 406 is further configured to:
Acquiring data table description information corresponding to each of a plurality of candidate data tables; calculating text similarity between the data query text and data table description information corresponding to each candidate data table respectively to obtain first matching degree corresponding to each candidate data table respectively; comparing the keyword set with the candidate field sets respectively corresponding to the candidate data tables to obtain second matching degrees respectively corresponding to the candidate data tables; fusing a first matching degree and a second matching degree corresponding to the same candidate data table to respectively obtain target matching degrees corresponding to the candidate data tables; and determining a target data table corresponding to the data query text based on the target matching degree corresponding to each candidate data table.
In one embodiment, the template construction module 408 is further to:
Extracting attribute features corresponding to each keyword in the keyword set respectively based on the data query text; determining a return attribute field and a condition attribute field corresponding to the data query text from each target field included in the target field set based on attribute characteristics respectively corresponding to each keyword; and generating a query statement template corresponding to the data query text based on the returned attribute field and the conditional attribute field.
In one embodiment, the statement determination module 410 is further configured to:
Determining a conditional keyword corresponding to a conditional attribute field corresponding to the data query text from the keyword set; extracting word features corresponding to conditional keywords based on the data query text and the conditional keywords; determining a target entity corresponding to the conditional keyword based on the word characteristics corresponding to the conditional keyword; and filling the target entity into the query statement template to obtain a query statement corresponding to the data query text.
In one embodiment, the statement determination module 410 is further configured to:
Extracting a plurality of candidate entities corresponding to the conditional keywords from a target data table based on word characteristics corresponding to the conditional keywords; extracting basic entity characteristics corresponding to each candidate entity from data table description information corresponding to the target data table; and determining target entities corresponding to the condition keywords in each candidate entity based on the matching degree between the basic entity features corresponding to each candidate entity and the context information corresponding to the data query text.
According to the data query device, when the data query text is acquired, the target data table queried by the data query text is determined based on the keyword set corresponding to the data query text, and then the query statement template is constructed according to the target data table and the keyword set, and the keyword set is filled into the query statement template, so that the query statement corresponding to the data query text can be obtained quickly and accurately, the generation efficiency of the query statement is effectively improved, and the data query efficiency is improved.
The various modules in the data querying device described above may be implemented in whole or in part by software, hardware, and combinations thereof. The above modules may be embedded in hardware or may be independent of a processor in the computer device, or may be stored in software in a memory in the computer device, so that the processor may call and execute operations corresponding to the above modules.
In one embodiment, a computer device is provided, which may be a server, the internal structure of which may be as shown in fig. 5. The computer device includes a processor, a memory, an Input/Output interface (I/O) and a communication interface. The processor, the memory and the input/output interface are connected through a system bus, and the communication interface is connected to the system bus through the input/output interface. Wherein the processor of the computer device is configured to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, computer programs, and a database. The internal memory provides an environment for the operation of the operating system and computer programs in the non-volatile storage media. The database of the computer device is used for storing data such as keyword sets, target data tables and the like. The input/output interface of the computer device is used to exchange information between the processor and the external device. The communication interface of the computer device is used for communicating with an external terminal through a network connection. The computer program is executed by a processor to implement a data query method.
In one embodiment, a computer device is provided, which may be a terminal, and the internal structure of which may be as shown in fig. 6. The computer device includes a processor, a memory, an input/output interface, a communication interface, a display unit, and an input means. The processor, the memory and the input/output interface are connected through a system bus, and the communication interface, the display unit and the input device are connected to the system bus through the input/output interface. Wherein the processor of the computer device is configured to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of the operating system and computer programs in the non-volatile storage media. The input/output interface of the computer device is used to exchange information between the processor and the external device. The communication interface of the computer device is used for carrying out wired or wireless communication with an external terminal, and the wireless mode can be realized through WIFI, a mobile cellular network, NFC (near field communication) or other technologies. The computer program is executed by a processor to implement a data query method. The display unit of the computer device is used for forming a visual picture, and can be a display screen, a projection device or a virtual reality imaging device. The display screen can be a liquid crystal display screen or an electronic ink display screen, and the input device of the computer equipment can be a touch layer covered on the display screen, can also be a key, a track ball or a touch pad arranged on the shell of the computer equipment, and can also be an external keyboard, a touch pad or a mouse and the like.
It will be appreciated by persons skilled in the art that the structures shown in fig. 5 and 6 are merely block diagrams of portions of structures associated with aspects of the application and are not intended to limit the computer apparatus to which aspects of the application may be applied, and that a particular computer apparatus may include more or less components than those shown, or may combine some of the components, or have a different arrangement of components.
In one embodiment, a computer device is provided, comprising a memory and a processor, the memory having stored therein a computer program, the processor implementing the steps of the method embodiments described above when the computer program is executed.
In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored which, when executed by a processor, implements the steps of the method embodiments described above.
In one embodiment, a computer program product or computer program is provided that includes computer instructions stored in a computer readable storage medium. The processor of the computer device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, so that the computer device performs the steps in the above-described method embodiments.
It should be noted that, the user information (including but not limited to user equipment information, user personal information, etc.) and the data (including but not limited to data for analysis, stored data, presented data, etc.) related to the present application are information and data authorized by the user or sufficiently authorized by each party, and the collection, use and processing of the related data need to comply with the related laws and regulations and standards of the related country and region.
Those skilled in the art will appreciate that implementing all or part of the above described methods may be accomplished by way of a computer program stored on a non-transitory computer readable storage medium, which when executed, may comprise the steps of the embodiments of the methods described above. Any reference to memory, database, or other medium used in embodiments provided herein may include at least one of non-volatile and volatile memory. The nonvolatile Memory may include Read-Only Memory (ROM), magnetic tape, floppy disk, flash Memory, optical Memory, high density embedded nonvolatile Memory, resistive random access Memory (ReRAM), magneto-resistive random access Memory (Magnetoresistive Random Access Memory, MRAM), ferroelectric Memory (Ferroelectric Random Access Memory, FRAM), phase change Memory (PHASE CHANGE Memory, PCM), graphene Memory, and the like. Volatile memory can include random access memory (Random Access Memory, RAM) or external cache memory, and the like. By way of illustration, and not limitation, RAM can be in various forms such as static random access memory (Static Random Access Memory, SRAM) or dynamic random access memory (Dynamic Random Access Memory, DRAM), etc. The databases referred to in the embodiments provided herein may include at least one of a relational database and a non-relational database. The non-relational database may include, but is not limited to, a blockchain-based distributed database, and the like. The processor referred to in the embodiments provided in the present application may be a general-purpose processor, a central processing unit, a graphics processor, a digital signal processor, a programmable logic unit, a data processing logic unit based on quantum computing, or the like, but is not limited thereto.
The technical features of the above embodiments may be arbitrarily combined, and all possible combinations of the technical features in the above embodiments are not described for brevity of description, however, as long as there is no contradiction between the combinations of the technical features, they should be considered as the scope of the description.
The foregoing examples illustrate only a few embodiments of the application and are described in detail herein without thereby limiting the scope of the application. It should be noted that it will be apparent to those skilled in the art that several variations and modifications can be made without departing from the spirit of the application, which are all within the scope of the application. Accordingly, the scope of the application should be assessed as that of the appended claims.

Claims (11)

1. A method of querying data, the method comprising:
acquiring a data query text;
segmenting the data query text into a plurality of text words;
extracting text features corresponding to the text words respectively based on the association relation of the text words in the data query text, and extracting text features corresponding to the data query text based on the context information corresponding to the data query text;
comparing the text features corresponding to the text words with the text features corresponding to the data query text to obtain key indexes corresponding to the text words; the key index is used for representing the probability that the text word is a key word;
extracting each keyword corresponding to the data query text based on the keyword index corresponding to each text word respectively to obtain a keyword set corresponding to the data query text;
determining a target data table corresponding to the data query text according to the keyword set;
extracting attribute features corresponding to the keywords in the keyword set respectively based on the data query text;
determining a return attribute field and a condition attribute field corresponding to the data query text from each target field included in the target field set based on attribute characteristics corresponding to each keyword;
Generating a query statement template corresponding to the data query text based on the returned attribute field and the conditional attribute field;
Filling the query sentence templates based on the keyword set to obtain query sentences corresponding to the data query text; the query statement is used for determining a data query result corresponding to the data query text.
2. The method according to claim 1, wherein the method further comprises:
Inputting the data query text into a query sentence generation model to obtain a query sentence corresponding to the data query text; the query statement generation model is trained based on a plurality of data query samples and sample label sets respectively corresponding to the data query samples;
The query sentence generation model comprises a keyword extraction branch for extracting a keyword set corresponding to the data query text, a template generation branch for generating a query sentence template corresponding to the data query text, and a sentence generation branch for generating a query sentence according to the keyword set and the query sentence template.
3. The method of claim 1, wherein the determining the target data table corresponding to the data query text according to the keyword set comprises:
Acquiring data table description information corresponding to each of a plurality of candidate data tables;
Calculating text similarity between the data query text and data table description information corresponding to each candidate data table respectively to obtain first matching degree corresponding to each candidate data table respectively;
Comparing the keyword set with the candidate field sets respectively corresponding to the candidate data tables to obtain second matching degrees respectively corresponding to the candidate data tables;
fusing a first matching degree and a second matching degree corresponding to the same candidate data table to respectively obtain target matching degrees corresponding to the candidate data tables;
And determining the target data table corresponding to the data query text based on the target matching degree corresponding to each candidate data table.
4. The method of claim 3, wherein said comparing the keyword set with the candidate field sets respectively corresponding to the candidate data tables to obtain the second matching degree respectively corresponding to the candidate data tables includes:
extracting and fusing text features corresponding to the keywords in the keyword set respectively to obtain comprehensive text features corresponding to the keyword set;
Extracting and merging text features corresponding to each candidate field in the same candidate field set respectively to obtain comprehensive text features corresponding to each candidate field set respectively;
And calculating the similarity between the comprehensive text features corresponding to the keyword sets and the comprehensive text features corresponding to the candidate field sets, and respectively obtaining second matching degrees corresponding to the candidate data tables.
5. The method of claim 1, wherein generating a query statement template corresponding to the data query text based on the return attribute field and the condition attribute field comprises:
combining the sentence connection words corresponding to the return attribute fields and the return attribute fields to obtain a first clause;
Generating a second clause based on the statement junction word corresponding to the data table identifier;
Combining the sentence connection words corresponding to the condition attribute fields and the condition attribute fields to obtain a third clause;
And splicing the first clause, the second clause and the third clause to obtain a query statement template corresponding to the data query text.
6. The method according to claim 1, wherein the filling the query sentence template based on the keyword set to obtain the query sentence corresponding to the data query text includes:
Determining a conditional keyword corresponding to a conditional attribute field corresponding to the data query text from the keyword set;
extracting word features corresponding to the conditional keywords based on the data query text and the conditional keywords;
determining a target entity corresponding to the conditional keyword based on the word characteristics corresponding to the conditional keyword;
And filling the target entity into the query statement template to obtain a query statement corresponding to the data query text.
7. The method of claim 6, wherein the determining the target entity corresponding to the conditional keyword based on the word feature corresponding to the conditional keyword comprises:
Extracting a plurality of candidate entities corresponding to the conditional keywords from the target data table based on word characteristics corresponding to the conditional keywords;
extracting basic entity characteristics corresponding to each candidate entity from data table description information corresponding to the target data table;
and determining target entities corresponding to the conditional keywords in the candidate entities based on the matching degree between the basic entity features corresponding to the candidate entities and the context information corresponding to the data query text.
8. A data querying device, the device comprising:
the text acquisition module is used for acquiring a data query text;
The keyword extraction module is used for segmenting the data query text into a plurality of text words; extracting text features corresponding to the text words respectively based on the association relation of the text words in the data query text, and extracting text features corresponding to the data query text based on the context information corresponding to the data query text; comparing the text features corresponding to the text words with the text features corresponding to the data query text to obtain key indexes corresponding to the text words; the key index is used for representing the probability that the text word is a key word; extracting each keyword corresponding to the data query text based on the keyword index corresponding to each text word respectively to obtain a keyword set corresponding to the data query text;
the data table determining module is used for determining a target data table corresponding to the data query text according to the keyword set;
The template construction module is used for extracting attribute characteristics corresponding to the keywords in the keyword set based on the data query text, and determining a return attribute field and a condition attribute field corresponding to the data query text from the target fields included in the target field set based on the attribute characteristics corresponding to the keywords; generating a query statement template corresponding to the data query text based on the returned attribute field and the conditional attribute field;
the statement determining module is used for filling the query statement template based on the keyword set to obtain a query statement corresponding to the data query text; the query statement is used for determining a data query result corresponding to the data query text.
9. A computer device comprising a memory and a processor, the memory storing a computer program, characterized in that the processor implements the steps of the method of any of claims 1 to 7 when the computer program is executed.
10. A computer readable storage medium, on which a computer program is stored, characterized in that the computer program, when being executed by a processor, implements the steps of the method of any of claims 1 to 7.
11. A computer program product comprising a computer program, characterized in that the computer program, when being executed by a processor, implements the steps of the method of any of claims 1 to 7.
CN202410325663.4A 2024-03-21 2024-03-21 Data query method, device, computer equipment and storage medium Active CN117931858B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202410325663.4A CN117931858B (en) 2024-03-21 2024-03-21 Data query method, device, computer equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202410325663.4A CN117931858B (en) 2024-03-21 2024-03-21 Data query method, device, computer equipment and storage medium

Publications (2)

Publication Number Publication Date
CN117931858A CN117931858A (en) 2024-04-26
CN117931858B true CN117931858B (en) 2024-07-16

Family

ID=90759540

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202410325663.4A Active CN117931858B (en) 2024-03-21 2024-03-21 Data query method, device, computer equipment and storage medium

Country Status (1)

Country Link
CN (1) CN117931858B (en)

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116595026A (en) * 2023-04-17 2023-08-15 阿里巴巴(中国)有限公司 Information inquiry method
CN117591547A (en) * 2024-01-18 2024-02-23 中昊芯英(杭州)科技有限公司 Database query method and device, terminal equipment and storage medium

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20050283473A1 (en) * 2004-06-17 2005-12-22 Armand Rousso Apparatus, method and system of artificial intelligence for data searching applications
CN113495900B (en) * 2021-08-12 2024-03-15 国家电网有限公司大数据中心 Method and device for obtaining structured query language statement based on natural language
CN117708297A (en) * 2023-12-22 2024-03-15 武汉联影智元医疗科技有限公司 Query statement generation method and device, electronic equipment and storage medium

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116595026A (en) * 2023-04-17 2023-08-15 阿里巴巴(中国)有限公司 Information inquiry method
CN117591547A (en) * 2024-01-18 2024-02-23 中昊芯英(杭州)科技有限公司 Database query method and device, terminal equipment and storage medium

Also Published As

Publication number Publication date
CN117931858A (en) 2024-04-26

Similar Documents

Publication Publication Date Title
CN111753060B (en) Information retrieval method, apparatus, device and computer readable storage medium
CN110019732B (en) Intelligent question answering method and related device
CN112819023B (en) Sample set acquisition method, device, computer equipment and storage medium
CN109376222B (en) Question-answer matching degree calculation method, question-answer automatic matching method and device
CN111858940B (en) Multi-head attention-based legal case similarity calculation method and system
CN112016313B (en) Spoken language element recognition method and device and warning analysis system
CN110765277B (en) Knowledge-graph-based mobile terminal online equipment fault diagnosis method
CN112287069B (en) Information retrieval method and device based on voice semantics and computer equipment
CN113971210B (en) Data dictionary generation method and device, electronic equipment and storage medium
CN115062134B (en) Knowledge question-answering model training and knowledge question-answering method, device and computer equipment
WO2021190662A1 (en) Medical text sorting method and apparatus, electronic device, and storage medium
CN106570196B (en) Video program searching method and device
CN115525757A (en) Contract abstract generation method and device and contract key information extraction model training method
CN117494815A (en) File-oriented credible large language model training and reasoning method and device
CN117076636A (en) Information query method, system and equipment for intelligent customer service
CN116662495A (en) Question-answering processing method, and method and device for training question-answering processing model
CN110795942A (en) Keyword determination method and device based on semantic recognition and storage medium
CN114116971A (en) Model training method and device for generating similar texts and computer equipment
CN117931858B (en) Data query method, device, computer equipment and storage medium
CN117131155A (en) Multi-category identification method, device, electronic equipment and storage medium
CN117435685A (en) Document retrieval method, document retrieval device, computer equipment, storage medium and product
CN114911940A (en) Text emotion recognition method and device, electronic equipment and storage medium
CN114328894A (en) Document processing method, document processing device, electronic equipment and medium
CN116992874B (en) Text quotation auditing and tracing method, system, device and storage medium
CN118227910B (en) Media resource aggregation method, device, equipment 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