CN114186026A - Natural language processing method, device, equipment and storage medium - Google Patents

Natural language processing method, device, equipment and storage medium Download PDF

Info

Publication number
CN114186026A
CN114186026A CN202111525733.3A CN202111525733A CN114186026A CN 114186026 A CN114186026 A CN 114186026A CN 202111525733 A CN202111525733 A CN 202111525733A CN 114186026 A CN114186026 A CN 114186026A
Authority
CN
China
Prior art keywords
query
slot position
position information
database
natural language
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.)
Pending
Application number
CN202111525733.3A
Other languages
Chinese (zh)
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.)
China Construction Bank Corp
Original Assignee
China Construction Bank Corp
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 China Construction Bank Corp filed Critical China Construction Bank Corp
Priority to CN202111525733.3A priority Critical patent/CN114186026A/en
Publication of CN114186026A publication Critical patent/CN114186026A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/30Information retrieval; Database structures therefor; File system structures therefor of unstructured textual data
    • G06F16/33Querying
    • G06F16/332Query formulation
    • G06F16/3329Natural language query formulation or dialogue systems
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/30Information retrieval; Database structures therefor; File system structures therefor of unstructured textual data
    • G06F16/33Querying
    • G06F16/3331Query processing
    • G06F16/334Query execution
    • G06F16/3344Query execution using natural language analysis
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/21Design or setup of recognition systems or techniques; Extraction of features in feature space; Blind source separation
    • G06F18/214Generating training patterns; Bootstrap methods, e.g. bagging or boosting

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Data Mining & Analysis (AREA)
  • General Engineering & Computer Science (AREA)
  • Artificial Intelligence (AREA)
  • General Physics & Mathematics (AREA)
  • Mathematical Physics (AREA)
  • Databases & Information Systems (AREA)
  • Computational Linguistics (AREA)
  • Bioinformatics & Cheminformatics (AREA)
  • Evolutionary Computation (AREA)
  • Evolutionary Biology (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Bioinformatics & Computational Biology (AREA)
  • Human Computer Interaction (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The invention belongs to the technical field of artificial intelligence, and particularly relates to a natural language processing method, a natural language processing device, natural language processing equipment and a storage medium. The method comprises the following steps: receiving a natural language question to be processed, and performing intention identification on the natural language question to obtain a database query intention and a database table to be queried; according to a database table to be queried and a natural language question, determining slot position information to be processed from all slot position information of a pre-configured intention and slot position association information table; generating a corresponding SQL sentence according to the database query intention, the database table to be queried and the slot position information to be processed, querying in the database according to the SQL sentence to obtain a result corresponding to the natural language question, obtaining the slot position information to be processed based on a preset intention and a slot position associated information table, and further generating the SQL sentence according to different slot position information without model training, wherein the SQL sentence determined based on the method has strong interpretability.

Description

Natural language processing method, device, equipment and storage medium
Technical Field
The invention relates to the technical field of artificial intelligence, in particular to a natural language processing method, a natural language processing device, natural language processing equipment and a storage medium.
Background
The intelligent question-answering robot can perform semantic recognition on questions provided by a user by using an artificial intelligence algorithm, and searches answers which are most matched with the questions from a document library to be used as replies, and the intelligent question-answering robot is widely applied to various fields.
When an intelligent question-answering robot is constructed, sufficient knowledge base corpora of question-answer needs to be prepared, and a large amount of manpower needs to be invested for combing. However, at present, a large amount of data and knowledge exist in a relational database, so that the NL2SQL technology is considered to be introduced into the intelligent question-answering robot, and the initialization construction of the question-answering system can be completed quickly by directly utilizing the existing knowledge base without sorting question-answer pairs. When the NL2SQL technique is used to obtain the SQL query problem, the method is usually implemented based on deep learning, and the method needs to prepare a plurality of natural language question sentences and prior knowledge such as corresponding SQL sentences in advance and then train the natural language question sentences and the SQL sentences to determine the mapping relationship between the natural language question sentences and the SQL sentences.
The method needs a large amount of prior knowledge for model training, and has the problems of poor interpretability and long time consumption for model training.
Disclosure of Invention
The invention provides a natural language processing method, a natural language processing device, natural language processing equipment and a storage medium, which are used for solving the problems that when an NL2SQL technology is applied to an intelligent question-answering robot, a large amount of priori knowledge is needed for model training, the interpretability is poor, and the time consumed for model training is long.
In a first aspect, the present invention provides a natural language processing method, including:
receiving a natural language question to be processed, and performing intention identification on the natural language question to obtain a database query intention and a database table to be queried;
according to the database table to be queried and the natural language question, determining slot position information to be processed from all slot position information of a pre-configured intention and slot position association information table; the pre-configured slot position information at least comprises returned result slot position information and inquiry condition slot position information; the returned result slot position information is each column name entity in the database table to be queried; the query condition slot position information is each column name entity for determining the returned result slot position information in the database table to be queried; each inquiry condition slot position information corresponds to a dictionary, and a data entity of a column name corresponding to the inquiry condition slot position information is stored in the dictionary;
and generating a corresponding SQL statement according to the database query intention, the database table to be queried and the slot position information to be processed, and querying in a database according to the SQL statement to obtain a result corresponding to the natural language question sentence.
Optionally, determining slot position information to be processed from all slot position information of a preconfigured intention and slot position associated information table according to the database table to be queried and the natural language question, including:
acquiring all slot position information of a pre-configured intention and slot position association information table according to the database table to be queried;
and determining slot position information to be processed from all the slot position information according to the natural language question sentence.
Optionally, the slot position information of the returned result and the slot position information of the query condition have a corresponding relationship; determining slot position information to be processed from all the slot position information according to the natural language question sentence, wherein the slot position information comprises the following steps:
determining at least one keyword corresponding to the natural language question;
matching the at least one keyword with dictionaries corresponding to the returned result slot position information and/or the query condition slot position information to obtain returned result slot position information to be processed and at least one query condition slot position information;
and if the unidentified inquiry condition slot position information is determined to exist according to the corresponding relation between the returned result slot position information and the inquiry condition slot position information, determining the unidentified inquiry condition slot position information in a multi-round clarification mode.
Optionally, the determining the unidentified query condition slot information by means of multi-round clarification includes:
outputting default replies configured for the unidentified query condition slots so that a user can input corresponding natural languages according to the default replies;
and determining the received keywords corresponding to the natural language as the unidentified query condition slot information.
Optionally, the database query intent includes: single-column queries, aggregate queries, and sort queries; identifying the intention of the natural language question to obtain a database query intention, wherein the method comprises the following steps:
judging whether all the keywords corresponding to the natural language question sentence are any one of a plurality of first keywords corresponding to the aggregation query and a plurality of second keywords corresponding to the sequencing query;
if the query is any one of the first keywords, determining the type of the aggregated query according to the first keywords; if the second keyword is any one of the second keywords, determining the type of the sequencing query according to the second keyword;
and if the query is not any one of the first keyword and the second keyword, determining that the query intention of the database is a single-column query.
Optionally, performing intent recognition on the natural language question to obtain a database table to be queried, including:
aiming at each database table, judging the matching degree between all keywords corresponding to the natural language question and the name of the database table, and if the matching degree is greater than a preset value, determining the database table as the database table to be queried;
judging whether connection fields exist between the determined database table to be queried and the rest database tables;
and if the connection field exists, determining the database table with the connection field as the database table to be queried.
Optionally, the generating a corresponding SQL statement according to the database query intention, the database table to be queried, and the slot information to be processed includes:
generating a corresponding database query condition according to the database query intention, the database table to be queried and the slot position information to be processed; the database query conditions include: database table name query conditions, return result conditions, query limit conditions and sequencing conditions;
and generating SQL sentences according to preset templates according to the database table name query conditions, the return result conditions, the query limit conditions and the sequencing conditions.
Optionally, generating a corresponding database query condition according to the database query intention, the database table to be queried, and the slot position information to be processed includes:
when the number of the database tables to be queried is at least two, generating a database table name query condition according to the database tables to be queried and the connection field;
when the database query intention is single-column query, putting the returned result slot position information into a returned condition set to generate returned result conditions; or if the database query is an aggregation query, determining an aggregation operator according to the type of the aggregation query, and putting the aggregation operator and the returned result slot information into a returned condition set to generate a returned result condition; when the database query intention is a sequencing query, putting the sequencing query operator and the returned result slot position information into a sequencing condition set to generate a sequencing condition;
and determining a query condition operator corresponding to the query condition slot information according to all the keywords corresponding to the natural language question, and putting the query condition slot information and the query condition operator into a query condition set to generate a query limit condition.
In a second aspect, the present invention provides a natural language processing apparatus, comprising:
the identification module is used for receiving a natural language question to be processed and identifying the intention of the natural language question to obtain a database query intention and a database table to be queried;
the determining module is used for determining slot position information to be processed from all slot position information of a pre-configured intention and slot position associated information table according to the database table to be queried and the natural language question; the pre-configured slot position information at least comprises returned result slot position information and inquiry condition slot position information; the returned result slot position information is each column name entity in the database table to be queried; the query condition slot position information is each column name entity for determining the returned result slot position information in the database table to be queried; each inquiry condition slot position information corresponds to a dictionary, and a data entity of a column name corresponding to the inquiry condition slot position information is stored in the dictionary;
and the generating module is used for generating a corresponding SQL statement according to the database query intention, the database table to be queried and the slot position information to be processed, and querying in a database according to the SQL statement to obtain a result corresponding to the natural language question.
In a third aspect, the present invention provides an electronic device comprising: at least one processor and memory;
the memory stores computer-executable instructions;
the at least one processor executing the computer-executable instructions stored by the memory causes the at least one processor to perform the method of any one of the first aspects.
In a fourth aspect, the invention provides a computer-readable storage medium storing a computer program which, when executed by a processor, implements the method of any of the first aspects.
In a fifth aspect, the invention provides a computer program product comprising a computer program that, when executed by a processor, performs the method according to any one of the first aspect.
The invention provides a natural language processing method, a device, equipment and a storage medium, wherein the method comprises the following steps: receiving a natural language question to be processed, and performing intention identification on the natural language question to obtain a database query intention and a database table to be queried; according to the database table to be queried and the natural language question, determining slot position information to be processed from all slot position information of a pre-configured intention and slot position association information table; generating a corresponding SQL sentence according to the database query intention, the database table to be queried and the slot position information to be processed, querying in the database according to the SQL sentence to obtain a result corresponding to the natural language question, obtaining the slot position information to be processed corresponding to the natural language question based on a preset intention and a slot position association information table, and further generating the SQL sentence according to different slot position information without model training, wherein the interpretability of the SQL sentence determined based on the method is strong.
Drawings
In order to more clearly illustrate the technical solutions of the present invention or the prior art, the drawings needed to be used in the description of the embodiments or the prior art will be briefly described below, and it is obvious that the drawings in the following description are only some embodiments of the present invention, and it is obvious for those skilled in the art to obtain other drawings based on these drawings without inventive labor.
Fig. 1 is a schematic view of an application scenario provided by the present invention;
FIG. 2 is a flow chart illustrating a natural language processing method according to the present invention;
FIG. 3 is a schematic diagram illustrating categories of query intents of a database according to the present invention;
FIG. 4 is a schematic diagram of a natural language processing method according to the present invention;
FIG. 5 is a schematic structural diagram of a natural language processing apparatus according to the present invention;
fig. 6 is a schematic diagram of a hardware structure of an electronic device according to the present invention.
Detailed Description
The technical solutions in the present invention will be described clearly and completely with reference to the accompanying drawings, and it is obvious that the described embodiments are only some embodiments of the present invention, not all embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
The terms "first," "second," "third," "fourth," and the like in the description and in the claims, as well as in the drawings, if any, are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used is interchangeable under appropriate circumstances such that the embodiments of the invention described herein are capable of operation in sequences other than those illustrated or described herein. Furthermore, the terms "comprises," "comprising," and "having," and any variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, system, article, or apparatus that comprises a list of steps or elements is not necessarily limited to those steps or elements expressly listed, but may include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus.
Fig. 1 is a schematic view of an application scenario provided by the present invention, and as shown in fig. 1, when a user sends a natural language question to an intelligent question-answering robot, the intelligent question-answering robot may output a corresponding answer according to the natural language question. For example, when the user's natural language question is "who is the author of the ascending height? When the user wants to answer the question, the intelligent question-answering robot can obtain an answer of 'dupu' by inquiring a database stored in the intelligent question-answering robot and output the answer to the user.
In the prior art, the intelligent question-answering robot can answer questions of users, and sufficient question-answer knowledge base corpora are arranged in advance based on the users. When data or knowledge is stored in a relational database, an NL2SQL technology can be introduced into the intelligent question-answering robot, but when an NL2SQL technology is adopted to obtain SQL sentences, the method is usually realized based on a deep learning mode, namely, the natural language question sentences and corresponding SQL sentences are input into the intelligent question-answering robot to be trained, so that the natural language question sentences input by users are converted into SQL sentences.
Based on the problems, the natural language processing method provided by the invention has the advantages that the natural language question to be processed is received, the purpose identification is carried out on the natural language question to obtain the database query purpose and the database table to be queried, the slot position information to be processed is determined from the pre-configured purpose and the slot position associated information table according to the natural language question, and finally the corresponding SQL sentence is generated according to the slot position information to be processed, so that the natural language question of a user is quickly and accurately converted into the SQL sentence, the prior knowledge does not need to be arranged, the model training does not need to be carried out, the data query efficiency and the data query accuracy are improved, and the defect of poor interpretability does not exist.
The technical solution of the present invention will be described in detail below with specific examples. The following several specific embodiments may be combined with each other, and details of the same or similar concepts or processes may not be repeated in some embodiments.
Fig. 2 is a schematic flow chart of a natural language processing method provided by the present invention, and as shown in fig. 2, the method includes:
step S201, receiving a natural language question to be processed, and performing intention identification on the natural language question to obtain a database query intention and a database table to be queried.
In this step, after receiving the natural language question to be processed, the intention recognition may be performed on the natural language question. The natural language question to be processed may be a natural language question input by a user. Wherein the intent recognition of the natural language question includes: identifying the general purpose to obtain a database query purpose; and identifying the table name intention of the query to obtain the database table to be queried. The determined database query intention can be a single-column query, an aggregation query and a sorting query. The single-column query refers to a query mode for querying each row of data in a database table; the aggregation query is a query mode for aggregating multiple lines of data through an aggregation function; the sorting query refers to a query mode of sorting according to a specified data column. The obtained database table to be queried can be a single database table or a plurality of database tables with connecting fields.
Specifically, the database query intention and the database table to be queried can be determined according to the keywords corresponding to the natural language question.
Step S202, according to the database table to be queried and the natural language question, determining slot position information to be processed from all slot position information of a pre-configured intention and slot position association information table.
In this step, since the database table to be queried has already been determined, the intention and slot position associated information table corresponding to the database table to be queried can be obtained. And pre-configuring returned result slot position information and query condition slot position information aiming at each database table to obtain an intention and slot position association information table. And aiming at the same database table, when the query intents of the databases are different, the intents are the same as the slot position associated information table.
The contents of the pre-configured intention and slot association information table are explained below by specific examples. As shown in tables 1 and 2, a work information table and a character information table are stored in the intelligent question-answering robot, and when the work information table is used as a database table to be inquired, the character information table and the work information table are analyzed to find that a connection field author ID exists between the character information table and the work information table, so that a pre-configured intention and slot position associated information table can be obtained according to the work information table and the character information table. Wherein, an intention and slot associated information table can be configured for the work information table and the character information table.
Specifically, the returned result slot information may be a list name entity of the work information table or the character information table, that is, a list name of the work name, the work content, the literary genre, the creation year, the author ID, the author name, the birth date, the alias, the main achievement, and the like. The query condition slot information may be column name entities that determine the returned result slot information, and for example, when the returned result slot information is an author name, the query condition slot information may be a work name or an author alias, and the like. Each inquiry condition slot position information corresponds to a dictionary, and the slot position information such as a work name corresponds to data entities such as climbing, thinking at night and the like; the slot information of the alternative name of the author corresponds to data entities such as Duolin and poetry.
The slot position information of the return result and the slot position information of the query condition have a corresponding relation, namely the slot position information of the return result can be uniquely determined according to the slot position information of the query condition. For example, the returned result slot information may be the content of the work, and the query condition slot information may be the author name and the work name.
After the database table to be queried is determined, the corresponding intention and slot position associated information table can be obtained, and slot position information in the intention and slot position associated information table can be identified according to the natural language question. For example, when the natural language question is "who the author of the ascending is", the keywords "ascending", "author", and "yes" can be obtained, and the result of the attention is the author. Therefore, whether the author name exists is inquired in the return result slot information in the intention and slot association information table, and if the author name exists, the return result slot is determined to be the author name; meanwhile, whether the ascending height exists in a dictionary of the inquiry condition slot position information is inquired, if yes, the inquiry condition slot position information is determined to be the inquiry condition slot position information corresponding to the dictionary, namely the inquiry condition slot position information is the name of the work; thus, the slot position information to be processed is determined as follows: returning result slot position information-author name, inquiring condition slot position information-work name: ascending a height.
Table 1 information table of works
Figure BDA0003410307640000081
Table 2 personal information table
Figure BDA0003410307640000082
Step S203, generating a corresponding SQL sentence according to the database query intention, the database table to be queried and the slot position information to be processed, and querying in a database according to the SQL sentence to obtain a result corresponding to the natural language question sentence.
After the slot position information to be processed is determined, the operator information can be determined according to the user question sentence fragment where the query condition slot position information is located. The operation character slot position information is an operation character which represents the connection condition or the comparison condition, AND if the connection condition is the parallel condition, the operation character slot position is AND; when the connection condition is OR, the operator is OR; when the comparison condition is equal, the operation character slot position is equal; when the comparison condition is greater than the preset value, the operation character slot position is greater than the preset value; when the comparison condition is less, the operator slot is less.
For example, when the natural language question is: "who the author of the ascending is? "after the query condition slot information is determined to be the work name-ascending, no information keywords such as and/or greater than/less than are detected in the natural language question, and therefore, the operator information is equal to. When the natural language question is "what are students older than 10 years? When the query condition slot information is determined to be age: after 10 years of age, the operator information may be determined to be greater when a keyword of "greater than" after age is detected.
After the slot information and the operator to be processed are determined, corresponding SQL statements can be generated according to the slot information to be processed, the database query intention, the database table to be queried and the operator, corresponding database query conditions exist for the database table to be queried, the returned result slot information and the query condition slot information, and the database table name query condition can be obtained according to the name information of the database table to be queried; obtaining a returned result condition according to the returned result slot position information and the database query intention; and obtaining the query limiting condition according to the operator and the query condition slot information. In addition, when the database query intention is a sort query, such as an ascending query and a descending query, a query condition operator can be determined according to the query intention, and then a sort condition can be obtained according to the query condition operator and the returned result slot information.
And finally, obtaining SQL sentences according to the query conditions of each database, executing the SQL sentences and obtaining results corresponding to the natural language question sentences.
According to the method and the system, the query intention of the database and the database table to be queried are obtained by receiving the natural language question and performing intention identification on the natural language question, the slot information to be processed can be determined from all the slot information of the preset intention and slot association information table according to the database table to be queried and the natural language question, the operator information can be further determined, the SQL sentence is generated according to the slot information to be processed and the operator information, the query is performed in the database according to the generated SQL sentence, the slot information to be processed corresponding to the natural language question is obtained based on the preset intention and the slot association information table, the SQL sentence can be accurately generated, model training is not needed, and the method has the advantage of strong interpretability.
The following describes in detail a process of determining slot position information to be processed.
Optionally, determining slot position information to be processed from all slot position information of a preconfigured intention and slot position associated information table according to the database query intention, the database table to be queried and the natural language question, including:
acquiring all slot position information of a pre-configured intention and slot position association information table according to the database table to be queried; and determining slot position information to be processed from all the slot position information according to the natural language question sentence.
After the database table to be queried is determined, the intention and slot position associated information table corresponding to the database table to be queried can be determined. Namely, the intention and slot position associated information table can be configured in advance in the intelligent question-answering robot according to the database table to be queried. After the database table to be queried is determined, all slot position information of the intention and slot position associated information table corresponding to the database table with query can be obtained according to the database table to be queried. And further can confirm the slot position information to be processed according to the key word of the natural language question.
The intentions to be inquired and the slot position association information table can be conveniently determined according to the database table to be inquired, so that the slot position information to be processed can be rapidly determined.
Optionally, the slot position information of the returned result and the slot position information of the query condition have a corresponding relationship; determining slot position information to be processed from all the slot position information according to the natural language question sentence, wherein the slot position information comprises the following steps:
determining at least one keyword corresponding to the natural language question; matching the at least one keyword with dictionaries corresponding to the returned result slot position information and/or the query condition slot position information to obtain returned result slot position information to be processed and at least one query condition slot position information; and if the unidentified inquiry condition slot position information is determined to exist according to the corresponding relation between the returned result slot position information and the inquiry condition slot position information, determining the unidentified inquiry condition slot position information in a multi-round clarification mode.
When the slot position information to be processed is determined, the slot position information of the return result can be determined according to the acquired keywords. Wherein, the slot position information of the return result is firstly determined. For the natural language question of 'who the ascending author is', the returned result slot information can be determined to be 'author name' according to the key word of 'author'. For the query condition slot information, the key word of "ascending" can be queried in the dictionary corresponding to each query condition slot information, and when the dictionary corresponding to the query condition slot information, which is the name of the work, contains the information of "ascending", the query condition slot information can be determined to be the name of the work, namely ascending.
The slot position information of the return result and the slot position information of the query condition have a corresponding relation, and the slot position information of the return result can be uniquely determined only by needing a plurality of pieces of slot position information of the query condition. For example, when two poems with the product name of "ascending," exist, when determining the author, who the author is, cannot be determined according to the product name only, and other query condition slot information, such as the content of the work, may also be set in advance. At this time, when the keyword corresponding to the natural language question input by the user only includes the work name ascending, it is determined that the unidentified query condition slot information exists. The unidentified query condition slot information can be determined in a multi-round clarification mode.
Through a multi-round clarification mode, unidentified query condition slot position information can be conveniently determined, and then the query condition slot position information is accurately determined.
Optionally, the determining the unidentified query condition slot information by means of multi-round clarification includes:
outputting default replies configured for the unidentified query condition slots so that a user can input corresponding natural languages according to the default replies; and determining the received keywords corresponding to the natural language as the unidentified query condition slot information.
When the unidentified query condition slot information is determined in a multi-round clarification mode, a default reply corresponding to each query condition slot information can be preset, when the unidentified query condition slot information is determined to be the content of a work, a default reply corresponding to the slot information of the content of the work, namely 'please say a poem of the poem', can be output, and at the moment, a user can input a corresponding natural language according to the default reply, such as 'rolling across the greatest Yangtze river'. At this time, the intelligent question-answering robot may receive the natural language, extract a keyword in the natural language, and determine the keyword as the query condition slot information.
Through setting a default reply mode, the unidentified slot position information can be determined in a multi-round interaction mode with a user.
Optionally, the database query intent includes: single-column queries, aggregate queries, and sort queries; identifying the intention of the natural language question to obtain a database query intention, wherein the method comprises the following steps:
judging whether all the keywords corresponding to the natural language question sentence are any one of a plurality of first keywords corresponding to the aggregation query and a plurality of second keywords corresponding to the sequencing query;
if the query is any one of the first keywords, determining the type of the aggregated query according to the first keywords; if the second keyword is any one of the second keywords, determining the type of the sequencing query according to the second keyword;
and if the query is not any one of the first keyword and the second keyword, determining that the query intention of the database is a single-column query.
When determining the database query intention, the database query intention can be divided into a single-column query, an aggregation query and a sorting query in advance. Wherein corresponding keywords would exist for both the aggregated query and the ranked query. FIG. 3 is a schematic diagram illustrating categories of query intents of a database according to the present invention; as shown in FIG. 3, the aggregated query contains first keywords, such as maximum, minimum, size, total, average, etc., associated with maximum, minimum, quantitative statistics, summed statistics, and averaged, etc. If the natural language question contains the first keyword, the database query intention can be determined to be the aggregated query. The sorting query comprises ascending sorting and descending sorting, and the sorting query comprises second keywords such as front X or rear X. If the natural language question contains the second keyword, the database query intention can be determined to be a sequencing query. The type of the specific aggregated query and the type of the sorted query can also be determined according to the keywords.
In addition, if the database query intent is not the two query intents, the query intent may be determined to be a single-column query.
By comparing the keywords in the natural language question with the keywords of each query intent, the database query intent can be accurately determined.
Optionally, performing intent recognition on the natural language question to obtain a database table to be queried, including:
aiming at each database table, judging the matching degree between all keywords corresponding to the natural language question and the name of the database table, and if the matching degree is greater than a preset value, determining the database table as the database table to be queried; judging whether connection fields exist between the determined database table to be queried and the rest database tables; and if the connection field exists, determining the database table with the connection field as the database table to be queried.
In this step, when the database table to be queried is determined, the keyword in the natural language question may be matched with the name of the database table, and if the matching degree is greater than a certain value, the database table may be determined as the database table to be queried. For example, a keyword appearing in a natural language question includes an author, and can be matched with the name of the database table, and when the keyword is matched with the author information table, the matching degree is high because the keyword of the author exists. The preset value can be set according to actual conditions.
After the database table to be queried is determined, whether connection fields exist between each field of the database table to be queried and all the rest database tables can be judged. Wherein, the connection field means that the field appears in the determined database table to be queried and another database table at the same time. If the author information table is determined to be the database table to be queried, the ID field exists in the author information table, and the ID field (author ID) also exists in the work information table, the work information table can be determined to be the database table to be queried.
All the database tables to be queried can be determined by judging the connection fields, so that query information can be determined accurately in the follow-up process.
Optionally, generating a corresponding SQL statement according to the database query intention, the database table to be queried, and the slot information to be processed includes:
generating a corresponding database query condition according to the database query intention, the database table to be queried and the slot position information to be processed; the database query conditions include: database table name query conditions, return result conditions, query limit conditions and sequencing conditions; and generating SQL sentences according to preset templates according to the database table name query conditions, the return result conditions, the query limit conditions and the sequencing conditions.
When the SQL statement is generated according to the database query intention, the database table to be queried and the slot information to be processed, a database table name query condition (fromCondition), a return result condition (selectCondition), a query constraint condition (whereconondition), and a sorting condition (orderconstition) may be generated first.
Optionally, generating a corresponding database query condition according to the database query intention, the database table to be queried, and the slot position information to be processed includes:
when the number of the database tables to be queried is at least two, generating a database table name query condition according to the database tables to be queried and the connection field;
when the database query intention is single-column query, putting the returned result slot position information into a returned condition set to generate returned result conditions; or if the database query is an aggregation query, determining an aggregation operator according to the type of the aggregation query, and putting the aggregation operator and the returned result slot information into a returned condition set to generate a returned result condition; when the database query intention is a sequencing query, putting the sequencing query operator and the returned result slot position information into a sequencing condition set to generate a sequencing condition;
and determining a query condition operator corresponding to the query condition slot information according to all the keywords corresponding to the natural language question, and putting the query condition slot information and the query condition operator into a query condition set to generate a query limit condition.
In the following, "who the author of the ascending is? "for example, each database query condition is described. When the database table name query condition is generated, the database tables to be queried are the author information table and the work information table, and the number is two, so that a condition Group ID (Group 1, for example) can be determined according to the two database tables to be queried, and the database table name query condition is obtained based on the connection field.
For example, the query condition fromCondition of the name of the database table obtained by the above method is: fromCondition { "group1" [ { "table": "work information", "col": "author ID" } { table: "author information", "col": ID "}.
When the return result condition is generated, the condition needs to be determined according to the database query intention and the return result slot position information. And when the database query intention is single-column query, putting the returned result slot information into a returned condition set to generate returned result conditions.
For example, when a single-column query, the return result slot information is "author name". Since there is no aggregation operator for a single-column query, the contents of the "func" field are null, and the "cols" field is the "author name". Therefore, the return result condition selectCondition obtained by the above method is: seletcCondition { "func": null, "cols": [ "Author name" ] }.
When the database query is intended to be an aggregation query, the corresponding aggregation operator can be obtained because the type of the specific aggregation query is determined. If the aggregation query is the maximum query, the aggregation operator is MAX; when the aggregation query is the minimum query, the aggregation operator is MIN; when the aggregation query is a quantitative statistical query, the aggregation operator is COUNT; when the aggregation query is a summation statistic, the aggregation operator is a SUM; and when the aggregation query is an averaging, the aggregation operator is AVG. And putting the aggregation operator and the returned result slot information into a returned condition set to obtain a returned result condition. For example, when the natural language question is "how many products of love", the returned result slot information is "product name", and the aggregation operator is COUNT; therefore, the return result condition selectCondition obtained by the above method is: selectCondition { "func": COUNT, "cols": [ "work name" ] }.
When the database query intention is a sorting query, a sorting query operator can be determined according to ascending sorting and descending sorting, and then the sorting operator and the returned result slot position information are put into the sorting condition set. For example, when the natural language question is "what are stocks before 10 rises? ", the returned result slot information is" stock ", and the sorted query operator is" DESC ". Therefore, the order condition orderCondition obtained by the above method is: orderCondition [ { "col": stock, "sort": "DESC" }.
When the query limiting condition is determined, a query condition operator corresponding to the query condition slot information is determined, and if the keyword after the query condition slot information is greater than or less than the same word, the query condition operator is greater than or less than the same word. When a plurality of pieces of query condition slot position information exist, a query condition operator among a plurality of query conditions is obtained by identifying the connection relation before the plurality of pieces of query condition slot position information. For example, when the natural language question is "what are people with an age less than 35 years old and a height greater than 160 centimeters? When the query condition slot information is obtained, the query condition slot information comprises the age of 35 years, and the corresponding query condition operator is smaller than the original query condition slot information by analyzing the key words in the natural language question; the inquiring condition slot position information further comprises: height is-160 cm, and the corresponding query condition operator is larger than; AND the relation between the two pieces of inquiry condition slot position information is a parallel condition, AND the corresponding inquiry condition operator is AND.
When generating the query restriction condition, the query condition slot information and the query condition operator can be put into the query condition set. For example, when the natural language question is "what is a work of love", the query condition slot information is author name-love, and the query condition operator is equal, so the query constraint condition whereCondition obtained by the above method is: whereCondition [ { "col": author name "," value ": Dufu", "oper": "}.
After the query condition of the database is determined, the query condition can be generated into an SQL statement according to a preset template. For example, the SQL statement is obtained according to a template "Select ' $ COL1 '," $ COL2 ' From ' T ' Where ' COL1 ═ VAL1 ' and ' COL2 ═ VAL2 ' order $ COL1 desc ". And a result corresponding to the natural language question sentence can be obtained after the SQL sentence is executed.
FIG. 4 is a schematic diagram of a natural language processing method according to the present invention. As shown in fig. 4, the intelligent question-answering robot includes a general purpose intention engine, a table name intention recognition engine, a slot position engine, an inquiry condition recognition engine and an answer generation engine inside, after a natural language question is input to the general purpose intention engine, a database inquiry intention can be recognized, and simultaneously after the natural language question is input to the table name intention recognition engine, a database table to be queried can be recognized, and then slot position recognition is performed by the slot position engine, so that slot position information of a returned result and slot position information of an inquiry condition are obtained; if unidentified query condition slot information exists, determining through a multi-round clarification mode, further determining a returned result condition, a query limit condition and/or a sequencing condition in a query condition identification engine according to the database query intention and the identified returned result slot information and query condition slot information, finally obtaining an SQL statement in an answer generation engine according to the generated returned result condition, query limit condition and/or sequencing condition, executing the statement, and finally outputting an answer corresponding to the natural language question.
The invention can quickly identify the returned result slot position information and the query condition slot position information according to the key words of the natural language question after the natural language question is obtained by configuring all slot position information of the intention and slot position associated information table, and can be determined by a multi-round clarification mode when the unidentified query condition slot position information exists.
Fig. 5 is a schematic structural diagram of a natural language processing apparatus according to the present invention. As shown in fig. 5, the natural language processing device 50 may include:
the identification module 501 is configured to receive a natural language question to be processed, perform intent identification on the natural language question, and obtain a database query intent and a database table to be queried;
a determining module 502, configured to determine slot position information to be processed from all slot position information of a pre-configured intent and slot position association information table according to the database table to be queried and the natural language question; the pre-configured slot position information at least comprises returned result slot position information and inquiry condition slot position information; the returned result slot position information is each column name entity in the database table to be queried; the query condition slot position information is each column name entity for determining the returned result slot position information in the database table to be queried; each inquiry condition slot position information corresponds to a dictionary, and a data entity of a column name corresponding to the inquiry condition slot position information is stored in the dictionary;
the generating module 503 is configured to generate a corresponding SQL statement according to the database query intention, the database table to be queried, and the slot information to be processed, and perform a query in the database according to the SQL statement to obtain a result corresponding to the natural language question.
Optionally, the determining module 502 is specifically configured to:
acquiring all slot position information of a pre-configured intention and slot position association information table according to the database table to be queried;
and determining slot position information to be processed from all the slot position information according to the natural language question sentence.
Optionally, the slot position information of the returned result and the slot position information of the query condition have a corresponding relationship; when determining the slot information to be processed from all the slot information according to the natural language question, the determining module 502 is specifically configured to:
determining at least one keyword corresponding to the natural language question;
matching the at least one keyword with dictionaries corresponding to the returned result slot position information and/or the query condition slot position information to obtain returned result slot position information to be processed and at least one query condition slot position information;
and if the unidentified inquiry condition slot position information is determined to exist according to the corresponding relation between the returned result slot position information and the inquiry condition slot position information, determining the unidentified inquiry condition slot position information in a multi-round clarification mode.
Optionally, when the determining module 502 determines the unidentified query condition slot information in a multi-round clarification manner, it is specifically configured to:
outputting default replies configured for the unidentified query condition slots so that a user can input corresponding natural languages according to the default replies;
and determining the received keywords corresponding to the natural language as the unidentified query condition slot information.
Optionally, the database query intent includes: single-column queries, aggregate queries, and sort queries; the identifying module 501, when performing intent identification on the natural language question to obtain a database query intent, is specifically configured to:
judging whether all the keywords corresponding to the natural language question sentence are any one of a plurality of first keywords corresponding to the aggregation query and a plurality of second keywords corresponding to the sequencing query;
if the query is any one of the first keywords, determining the type of the aggregated query according to the first keywords; if the second keyword is any one of the second keywords, determining the type of the sequencing query according to the second keyword;
and if the query is not any one of the first keyword and the second keyword, determining that the query intention of the database is a single-column query.
Optionally, the identifying module 501 is specifically configured to, when performing intent identification on the natural language question to obtain a database table to be queried:
aiming at each database table, judging the matching degree between all keywords corresponding to the natural language question and the name of the database table, and if the matching degree is greater than a preset value, determining the database table as the database table to be queried;
judging whether connection fields exist between the determined database table to be queried and the rest database tables;
and if the connection field exists, determining the database table with the connection field as the database table to be queried.
Optionally, when the generating module 503 generates a corresponding SQL statement according to the database query intention, the database table to be queried, and the slot information to be processed, the generating module is specifically configured to:
generating a corresponding database query condition according to the database query intention, the database table to be queried and the slot position information to be processed; the database query conditions include: database table name query conditions, return result conditions, query limit conditions and sequencing conditions;
and generating SQL sentences according to preset templates according to the database table name query conditions, the return result conditions, the query limit conditions and the sequencing conditions.
Optionally, when the generating module 503 generates the corresponding database query condition according to the database query intention, the database table to be queried, and the slot information to be processed, the generating module is specifically configured to:
when the number of the database tables to be queried is at least two, generating a database table name query condition according to the database tables to be queried and the connection field;
when the database query intention is single-column query, putting the returned result slot position information into a returned condition set to generate returned result conditions; or if the database query is an aggregation query, determining an aggregation operator according to the type of the aggregation query, and putting the aggregation operator and the returned result slot information into a returned condition set to generate a returned result condition; when the database query intention is a sequencing query, putting the sequencing query operator and the returned result slot position information into a sequencing condition set to generate a sequencing condition;
and determining a query condition operator corresponding to the query condition slot information according to all the keywords corresponding to the natural language question, and putting the query condition slot information and the query condition operator into a query condition set to generate a query limit condition.
The natural language processing apparatus provided by the present invention can implement the natural language processing method shown in fig. 2 to fig. 4, and the implementation principle and technical effect are similar, which are not described herein again.
Fig. 6 is a schematic diagram of a hardware structure of the electronic device provided by the present invention. As shown in fig. 6, the electronic device 60 includes: at least one processor 601 and memory 602. The processor 601 and the memory 602 are connected by a bus 603.
In a specific implementation, the at least one processor 601 executes the computer-executable instructions stored in the memory 602, so that the at least one processor 601 executes the natural language processing method in the above method embodiment.
For a specific implementation process of the processor 601, reference may be made to the above method embodiments, which implement the principle and the technical effect similarly, and details of this embodiment are not described herein again.
In the embodiment shown in fig. 6, it should be understood that the Processor may be a Central Processing Unit (CPU), other general purpose processors, a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), etc. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like. The steps of a method disclosed in connection with the present invention may be embodied directly in a hardware processor, or in a combination of the hardware and software modules within the processor.
The memory may comprise high speed RAM memory and may also include non-volatile storage NVM, such as at least one disk memory.
The bus may be an Industry Standard Architecture (ISA) bus, a Peripheral Component Interconnect (PCI) bus, an Extended ISA (EISA) bus, or the like. The bus may be divided into an address bus, a data bus, a control bus, etc. For ease of illustration, the buses in the figures of the present application are not limited to only one bus or one type of bus.
The invention also provides a computer-readable storage medium, wherein the computer-readable storage medium stores computer-executable instructions, and when a processor executes the computer-executable instructions, the natural language processing method of the above method embodiment is realized.
The computer-readable storage medium may be implemented by any type of volatile or non-volatile memory device or combination thereof, 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 disk. Readable storage media can be any available media that can be accessed by a general purpose or special purpose computer.
An exemplary readable storage medium is coupled to the processor such the processor can read information from, and write information to, the readable storage medium. Of course, the readable storage medium may also be an integral part of the processor. The processor and the readable storage medium may reside in an Application Specific Integrated Circuits (ASIC). Of course, the processor and the readable storage medium may also reside as discrete components in the apparatus.
An embodiment of the present application provides a computer program product, which includes a computer program, and when the computer program is executed by a processor, the computer program implements the natural language processing method provided in any embodiment of the present application corresponding to fig. 2 to 4.
Those of ordinary skill in the art will understand that: all or a portion of the steps of implementing the above-described method embodiments may be performed by hardware associated with program instructions. The program may be stored in a computer-readable storage medium. When executed, the program performs steps comprising the method embodiments described above; and the aforementioned storage medium includes: various media that can store program codes, such as ROM, RAM, magnetic or optical disks.
Finally, it should be noted that: the above embodiments are only used for illustrating the technical solutions of the present application, and not for limiting the same; although the present application has been described in detail with reference to the foregoing embodiments, it should be understood by those of ordinary skill in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some or all of the technical features may be equivalently replaced; and the modifications or the substitutions do not make the essence of the corresponding technical solutions depart from the scope of the technical solutions of the embodiments of the present application.

Claims (12)

1. A method of natural language processing, the method comprising:
receiving a natural language question to be processed, and performing intention identification on the natural language question to obtain a database query intention and a database table to be queried;
according to the database table to be queried and the natural language question, determining slot position information to be processed from all slot position information of a pre-configured intention and slot position association information table; the pre-configured slot position information at least comprises returned result slot position information and inquiry condition slot position information; the returned result slot position information is each column name entity in the database table to be queried; the query condition slot position information is each column name entity for determining the returned result slot position information in the database table to be queried; each inquiry condition slot position information corresponds to a dictionary, and a data entity of a column name corresponding to the inquiry condition slot position information is stored in the dictionary;
and generating a corresponding SQL statement according to the database query intention, the database table to be queried and the slot position information to be processed, and querying in a database according to the SQL statement to obtain a result corresponding to the natural language question sentence.
2. The method of claim 1, wherein determining slot information to be processed from all slot information of a preconfigured intent and slot association information table according to the database table to be queried and the natural language question, comprises:
acquiring all slot position information of a pre-configured intention and slot position association information table according to the database table to be queried;
and determining slot position information to be processed from all the slot position information according to the natural language question sentence.
3. The method of claim 2, wherein the slot information of the returned result and the slot information of the query condition have a corresponding relationship; determining slot position information to be processed from all the slot position information according to the natural language question sentence, wherein the slot position information comprises the following steps:
determining at least one keyword corresponding to the natural language question;
matching the at least one keyword with dictionaries corresponding to the returned result slot position information and/or the query condition slot position information to obtain returned result slot position information to be processed and at least one query condition slot position information;
and if the unidentified inquiry condition slot position information is determined to exist according to the corresponding relation between the returned result slot position information and the inquiry condition slot position information, determining the unidentified inquiry condition slot position information in a multi-round clarification mode.
4. The method of claim 3, wherein determining the unidentified query condition slot information by means of multiple rounds of clarification comprises:
outputting default replies configured for the unidentified query condition slots so that a user can input corresponding natural languages according to the default replies;
and determining the received keywords corresponding to the natural language as the unidentified query condition slot information.
5. The method of claim 1, wherein the database query intent comprises: single-column queries, aggregate queries, and sort queries; identifying the intention of the natural language question to obtain a database query intention, wherein the method comprises the following steps:
judging whether all the keywords corresponding to the natural language question sentence are any one of a plurality of first keywords corresponding to the aggregation query and a plurality of second keywords corresponding to the sequencing query;
if the query is any one of the first keywords, determining the type of the aggregated query according to the first keywords; if the second keyword is any one of the second keywords, determining the type of the sequencing query according to the second keyword;
and if the query is not any one of the first keyword and the second keyword, determining that the query intention of the database is a single-column query.
6. The method of claim 5, wherein identifying the natural language question to obtain a database table to be queried comprises:
aiming at each database table, judging the matching degree between all keywords corresponding to the natural language question and the name of the database table, and if the matching degree is greater than a preset value, determining the database table as the database table to be queried;
judging whether connection fields exist between the determined database table to be queried and the rest database tables;
and if the connection field exists, determining the database table with the connection field as the database table to be queried.
7. The method according to any one of claims 1 to 6, wherein the generating of the corresponding SQL statement according to the database query intention, the database table to be queried and the slot information to be processed comprises:
generating a corresponding database query condition according to the database query intention, the database table to be queried and the slot position information to be processed; the database query conditions include: database table name query conditions, return result conditions, query limit conditions and sequencing conditions;
and generating SQL sentences according to preset templates according to the database table name query conditions, the return result conditions, the query limit conditions and the sequencing conditions.
8. The method of claim 7, wherein generating corresponding database query conditions according to the database query intent, the database table to be queried, and the slot information to be processed comprises:
when the number of the database tables to be queried is at least two, generating a database table name query condition according to the database tables to be queried and the connection field;
when the database query intention is single-column query, putting the returned result slot position information into a returned condition set to generate returned result conditions; or if the database query is an aggregation query, determining an aggregation operator according to the type of the aggregation query, and putting the aggregation operator and the returned result slot information into a returned condition set to generate a returned result condition; when the database query intention is a sequencing query, putting the sequencing query operator and the returned result slot position information into a sequencing condition set to generate a sequencing condition;
and determining a query condition operator corresponding to the query condition slot information according to all the keywords corresponding to the natural language question, and putting the query condition slot information and the query condition operator into a query condition set to generate a query limit condition.
9. A natural language processing apparatus, characterized in that the apparatus comprises:
the identification module is used for receiving a natural language question to be processed and identifying the intention of the natural language question to obtain a database query intention and a database table to be queried;
the determining module is used for determining slot position information to be processed from all slot position information of a pre-configured intention and slot position associated information table according to the database table to be queried and the natural language question; the pre-configured slot position information at least comprises returned result slot position information and inquiry condition slot position information; the returned result slot position information is each column name entity in the database table to be queried; the query condition slot position information is each column name entity for determining the returned result slot position information in the database table to be queried; each inquiry condition slot position information corresponds to a dictionary, and a data entity of a column name corresponding to the inquiry condition slot position information is stored in the dictionary;
and the generating module is used for generating a corresponding SQL statement according to the database query intention, the database table to be queried and the slot position information to be processed, and querying in a database according to the SQL statement to obtain a result corresponding to the natural language question.
10. An electronic device, comprising: at least one processor and memory;
the memory stores computer-executable instructions;
the at least one processor executing the computer-executable instructions stored by the memory causes the at least one processor to perform the method of any one of claims 1-8.
11. A computer-readable storage medium, characterized in that the storage medium stores a computer program which, when executed by a processor, implements the method according to any one of claims 1-8.
12. A computer program product comprising a computer program, characterized in that the computer program realizes the method according to any of claims 1-8 when executed by a processor.
CN202111525733.3A 2021-12-14 2021-12-14 Natural language processing method, device, equipment and storage medium Pending CN114186026A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111525733.3A CN114186026A (en) 2021-12-14 2021-12-14 Natural language processing method, device, equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111525733.3A CN114186026A (en) 2021-12-14 2021-12-14 Natural language processing method, device, equipment and storage medium

Publications (1)

Publication Number Publication Date
CN114186026A true CN114186026A (en) 2022-03-15

Family

ID=80543710

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111525733.3A Pending CN114186026A (en) 2021-12-14 2021-12-14 Natural language processing method, device, equipment and storage medium

Country Status (1)

Country Link
CN (1) CN114186026A (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116244344A (en) * 2022-11-25 2023-06-09 中国农业科学院农业信息研究所 Retrieval method and device based on user requirements and electronic equipment
CN117132392A (en) * 2023-10-23 2023-11-28 蓝色火焰科技成都有限公司 Vehicle loan fraud risk early warning method and system
CN117609274A (en) * 2023-11-21 2024-02-27 上海金仕达卫宁软件科技有限公司 Intelligent database language generation system and method

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116244344A (en) * 2022-11-25 2023-06-09 中国农业科学院农业信息研究所 Retrieval method and device based on user requirements and electronic equipment
CN116244344B (en) * 2022-11-25 2023-09-05 中国农业科学院农业信息研究所 Retrieval method and device based on user requirements and electronic equipment
CN117132392A (en) * 2023-10-23 2023-11-28 蓝色火焰科技成都有限公司 Vehicle loan fraud risk early warning method and system
CN117132392B (en) * 2023-10-23 2024-01-30 蓝色火焰科技成都有限公司 Vehicle loan fraud risk early warning method and system
CN117609274A (en) * 2023-11-21 2024-02-27 上海金仕达卫宁软件科技有限公司 Intelligent database language generation system and method

Similar Documents

Publication Publication Date Title
CN114186026A (en) Natural language processing method, device, equipment and storage medium
US10459971B2 (en) Method and apparatus of generating image characteristic representation of query, and image search method and apparatus
CN111125334B (en) Search question-answering system based on pre-training
US10496928B2 (en) Non-factoid question-answering system and method
US20150227505A1 (en) Word meaning relationship extraction device
US20060224565A1 (en) System and method for disambiguating entities in a web page search
CN109726298B (en) Knowledge graph construction method, system, terminal and medium suitable for scientific and technical literature
US20070282827A1 (en) Data Mastering System
CN104199965A (en) Semantic information retrieval method
CN112632228A (en) Text mining-based auxiliary bid evaluation method and system
CN110134777B (en) Question duplication eliminating method and device, electronic equipment and computer readable storage medium
WO2014028860A2 (en) System and method for matching data using probabilistic modeling techniques
CN111460148A (en) Text classification method and device, terminal equipment and storage medium
CN108427702B (en) Target document acquisition method and application server
CN111611356A (en) Information searching method and device, electronic equipment and readable storage medium
CN104834651A (en) Method and apparatus for providing answers to frequently asked questions
CN109522396B (en) Knowledge processing method and system for national defense science and technology field
CN111506595B (en) Data query method, system and related equipment
CN112256684A (en) Report generation method, terminal equipment and storage medium
CN112783825A (en) Data archiving method, data archiving device, computer device and storage medium
US11615080B1 (en) System, method, and computer program for converting a natural language query to a nested database query
US11361565B2 (en) Natural language processing (NLP) pipeline for automated attribute extraction
CN111104422B (en) Training method, device, equipment and storage medium of data recommendation model
CN116340352A (en) Data query method and device, storage medium and electronic equipment
JPH06282587A (en) Automatic classifying method and device for document and dictionary preparing method and device for classification

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