CN110019712A - More intent query method and apparatus, computer equipment and computer readable storage medium - Google Patents

More intent query method and apparatus, computer equipment and computer readable storage medium Download PDF

Info

Publication number
CN110019712A
CN110019712A CN201711285233.0A CN201711285233A CN110019712A CN 110019712 A CN110019712 A CN 110019712A CN 201711285233 A CN201711285233 A CN 201711285233A CN 110019712 A CN110019712 A CN 110019712A
Authority
CN
China
Prior art keywords
search
intention
word
knowledge point
name
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
CN201711285233.0A
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.)
Shanghai Xiaoi Robot Technology Co Ltd
Shanghai Zhizhen Intelligent Network Technology Co Ltd
Original Assignee
Shanghai Zhizhen Intelligent Network Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Shanghai Zhizhen Intelligent Network Technology Co Ltd filed Critical Shanghai Zhizhen Intelligent Network Technology Co Ltd
Priority to CN201711285233.0A priority Critical patent/CN110019712A/en
Publication of CN110019712A publication Critical patent/CN110019712A/en
Pending legal-status Critical Current

Links

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
    • G06F40/00Handling natural language data
    • G06F40/20Natural language analysis
    • G06F40/237Lexical tools
    • G06F40/242Dictionaries
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F40/00Handling natural language data
    • G06F40/20Natural language analysis
    • G06F40/279Recognition of textual entities
    • G06F40/284Lexical analysis, e.g. tokenisation or collocates
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F40/00Handling natural language data
    • G06F40/30Semantic analysis

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Computational Linguistics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Artificial Intelligence (AREA)
  • Audiology, Speech & Language Pathology (AREA)
  • General Health & Medical Sciences (AREA)
  • Health & Medical Sciences (AREA)
  • Mathematical Physics (AREA)
  • Human Computer Interaction (AREA)
  • Data Mining & Analysis (AREA)
  • Databases & Information Systems (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The present invention relates to a kind of more intent query method and apparatus, computer equipment and computer readable storage mediums.More intent query methods include: the search statement for receiving user;Semantic matches are carried out to search statement, obtain at least two intentions, wherein, at least two be intended in each intention include in knowledge base to the matched intention knowledge point of each intention and intent parameter relevant with matched intention knowledge point, knowledge base includes multiple intention knowledge points, and multiple intention knowledge points include corresponding multiple search Answer extracting instruction templates;According to the corresponding search Answer extracting instruction template of intent parameter relevant to matched intention knowledge point and matched intention knowledge point, search Answer extracting instruction is obtained;And corresponding data is extracted as search answer data from dynamic data base according to the instruction of search Answer extracting.The accuracy rate that the present invention can be improved the efficiency of data query and answer is replied.

Description

More intent query method and apparatus, computer equipment and computer readable storage medium
Technical field
The present invention relates to artificial intelligence field more particularly to a kind of more intent query method and apparatus, computer equipment and Computer readable storage medium.
Background technique
Artificial intelligence (Artificial Intelligence) is research, develops intelligence for simulating, extending and extending people Can theory, method, a new technological sciences of technology and application system.Artificial intelligence system can be such as intelligent customer service System, speech control system etc..
Intelligent Answer System is a kind of typical case of artificial intelligence.It is stored in the knowledge base of traditional intelligent Answer System Some knowledge points be frequently not static two dimensional table or dynamic data base table the problem of often asking, but from structuring, Therefore, once carrying out high-volume modification to the data in static two dimensional table or dynamic data base table it is necessary to corresponding to knowledge point Answer changes one by one, causes workload very big and is easy error, and the accuracy rate for thus causing answer to be replied is low.
Therefore, how fast and accurately to be inquired just from dynamic database by the search statement of natural language form True data are urgent problems.
Summary of the invention
In view of this, it is an object of the present invention to provide a kind of more intent query method and apparatus, computer equipment And computer readable storage medium, the accuracy rate that the efficiency and answer that can be improved data query are replied.
One aspect of the present invention provides a kind of more intent query methods, comprising: receives the search statement of user;
Word segmentation processing is carried out to described search sentence according to preset word segmentation regulation and preset dictionary for word segmentation, is obtained multiple Word;
The multiple word is subjected to semantic matches, obtains at least two intentions, wherein at least two intention It is each be intended to include in knowledge base with it is described it is each be intended to matched intention knowledge point and with the matched intention knowledge point phase The intent parameter of pass, the knowledge base include multiple intention knowledge points, part of speech and/or name in the preset dictionary for word segmentation Entity intent parameter relevant to the intention knowledge point is corresponding, and the multiple intention knowledge point includes that corresponding multiple search are answered Case extracts instruction template;
According to corresponding to the matched relevant intent parameter in intention knowledge point and the matched intention knowledge point Answer extracting instruction template is searched for, search Answer extracting instruction is obtained;
The search Answer extracting instruction being intended to according to described at least two is extracted corresponding data from the dynamic data base and is made For it is described it is each be intended to corresponding search data, to it is described it is each be intended to corresponding search data and do intersection, and by intersection data As described search answer data.
In one embodiment of the invention, described that the multiple word is subjected to semantic matches, obtain at least two meanings Figure, comprising:
By in the multiple word word generate at least two word combinations with it is the multiple in the knowledge base It is intended to knowledge point and carries out similarity calculation, obtains matched described at least two and be intended to knowledge point;
Obtain intent parameter name needed for the search Answer extracting instruction template that described at least two are intended to knowledge point;
It is obtained from the multiple word according to the preset dictionary for word segmentation and to belong to specific part of speech or name entity At least one word is as intent parameter, wherein the specific part of speech and/or name entity refer to described search Answer extracting Enable intent parameter name needed for template corresponding;And
It is obtained according at least two intention corresponding search Answer extracting instruction template in knowledge point and the intent parameter It is intended to described at least two.
In one embodiment of the invention, the part of speech in the preset dictionary for word segmentation and/or name entity include institute The list item name in dynamic data base is stated, the similar word of the similar word of part of speech and/or name entity in the preset dictionary for word segmentation Data including corresponding to the list item name in the dynamic data base.
In one embodiment of the invention, the multiple intention by the multiple word and the knowledge base Knowledge point carries out similarity calculation, obtains matched described at least two and is intended to knowledge point, comprising:
By in the multiple word word generate at least two word combinations with it is the multiple in the knowledge base The question sentence for being intended to knowledge point carries out Semantic Similarity Measurement respectively, wherein the multiple each intention knowledge being intended in knowledge point Point includes multiple question sentences;And
Preset threshold and highest intentions knowledge point will be higher than with the semantic similarity of the word combination as described in extremely Few two are intended to corresponding intention knowledge point;Or
Part of speech extraction and/or name Entity recognition are carried out to the multiple word according to the preset dictionary for word segmentation, obtained To at least one part of speech and/or at least one name entity;
At least one described part of speech and/or at least one name entity are known with the multiple intention in the knowledge base The question sentence for knowing point carries out Semantic Similarity Measurement respectively;And
It is higher than preset threshold and highest intention knowledge point as institute for the semantic similarity of the word combination respectively State the corresponding intention knowledge point of at least two intentions.
In one embodiment of the invention, the dynamic data base includes at least one table, at least one table Every kind of table in lattice identifies the corresponding field name of the table alias by table alias, wraps in described search Answer extracting instruction template Include the corresponding field name of the table alias;
The list item of every kind of table at least one table includes at least list item name and the corresponding word of the list item name Section name, wherein part of speech name and/or name physical name in the entitled preset dictionary for word segmentation of the list item, described search answer Extracting includes the corresponding field name of the list item name in instruction template, and described search Answer extracting instruction template is structuralized query Language codes template;
The instruction of described search Answer extracting is structured query language code.
In one embodiment of the invention, further includes:
The data in the dynamic data base and the default dictionary for word segmentation are updated according to the preset time interval, Part of speech and/or name entity in the preset dictionary for word segmentation include the list item name in the dynamic data base, described default Dictionary for word segmentation in part of speech similar word and/or name entity similar word include that the table is corresponded in the dynamic data base The data of key name.
In one embodiment of the invention, described search sentence includes text message, speech message, image information, figure As one of message and video messaging or a variety of, more intent query methods further include:
Described search sentence is converted into text message.
Another aspect of the present invention provides a kind of more intent query devices, comprising:
Receiving module, for receiving the search statement of user;
Matching module, for described search sentence carry out semantic matches, obtain at least two intentions, wherein it is described extremely Few two be intended in each intention include in knowledge base with it is described it is each be intended to matched intention knowledge point and with the matching The relevant intent parameter in intention knowledge point, the knowledge base includes multiple intention knowledge points, the multiple intention knowledge point packet Include corresponding multiple search Answer extracting instruction templates;
Module is obtained, for basis and the matched relevant intent parameter in intention knowledge point and the matched intention The corresponding search Answer extracting instruction template in knowledge point obtains search Answer extracting instruction;And
Data extraction module, for extracting corresponding data conduct from dynamic data base according to the instruction of described search Answer extracting Search for answer data.
Another aspect of the invention provides a kind of computer equipment, comprising: memory, processor and is stored in memory In and the executable instruction that can run in the processor, processor realize as described above any more when executing executable instruction Intent query method.
An additional aspect of the present invention provides a kind of computer readable storage medium, is stored thereon with the executable finger of computer It enables, any more intent query methods as described above is realized when executable instruction is executed by processor.
The technical solution provided according to embodiments of the present invention carries out search statement by receiving the search statement of user Semantic matches obtain at least two intentions, wherein at least two be intended in each intention include in knowledge base with each intention Matched intention knowledge point and intent parameter relevant to matched intention knowledge point, knowledge base include multiple intention knowledge points, Multiple intention knowledge points include corresponding multiple search Answer extracting instruction templates, according to relevant to matched intention knowledge point The corresponding search Answer extracting instruction template of intent parameter and matched intention knowledge point obtains search Answer extracting instruction, root Corresponding data is extracted as search answer data from dynamic data base according to the instruction of search Answer extracting, can be improved data query The accuracy rate that efficiency and answer are replied.
It should be understood that above general description and following detailed description be only it is exemplary and explanatory, not It can the limitation present invention.
Detailed description of the invention
The drawings herein are incorporated into the specification and forms part of this specification, and shows and meets implementation of the invention Example, and be used to explain the principle of the present invention together with specification.
Fig. 1 is a kind of flow chart of more intent query methods shown in an exemplary embodiment according to the present invention.
Fig. 2 is a kind of flow chart of more intent query methods shown in another exemplary embodiment according to the present invention.
Fig. 3 is a kind of block diagram of more intent query devices shown in an exemplary embodiment according to the present invention.
Fig. 4 is a kind of block diagram of more intent query devices shown in another exemplary embodiment according to the present invention.
Fig. 5 is the block diagram of the device 500 for data query shown in an exemplary embodiment according to the present invention.
Specific embodiment
Following will be combined with the drawings in the embodiments of the present invention, and technical solution in the embodiment of the present invention carries out clear, complete Site preparation description, it is clear that the described embodiment is only a part of the embodiment of the present invention, instead of all the embodiments.According to this Embodiment in invention, every other reality obtained by those of ordinary skill in the art without making creative efforts Example is applied, shall fall within the protection scope of the present invention.
Fig. 1 is a kind of flow chart of more intent query methods shown in an exemplary embodiment according to the present invention.Fig. 1's is more Intent query method can be executed by artificial intelligence device (for example, intelligent Answer System etc.), as shown in Figure 1, more intentions are looked into Inquiry method includes:
110: receiving the search statement of user.
In embodiments of the present invention, the search statement of user can be the forms such as natural language sentence, phrase.User's searches Rope sentence can also may include multiple intentions, the invention is not limited in this regard, wherein the tool of intention only comprising an intention Appearance, which is shown in step 120, in vivo explains, only explains here from the search statement angle of user.For example, the search statement of user is " people that U.S. Express was received in inquiry " is then only intended to " posting part country is the U.S. " comprising one in the search statement.For another example, user Search statement be " record that Baoan District is passed in excellent clothing library fastly ", then in the search statement comprising two be intended to " posting part unit is Excellent clothing library " and " posting address is Baoan District ".
Further, the search statement of user can be the text information that user passes through the inputs such as keyboard or touch screen, User be can be by the voice messaging of the inputs such as microphone, or can also be that user is disappeared by the text that interactive terminal inputs Breath, data link, speech message, image information, image message and video messaging etc., the invention is not limited in this regard.
Here, interactive terminal is the equipment that can carry out information exchange with intelligent Answer System, for example, smart phone, flat Plate computer, PC or other intelligent terminals etc..For example, user can pass through voice or video to intelligent answer on one side System is putd question to, and sends corresponding text message to intelligent Answer System by interactive terminal on one side.
It should be noted that when the search statement received is speech message, image information, image message or video messaging When, intelligent Answer System can by speech recognition module, picture recognition module or video identification module etc. by speech message, figure Piece message, image message or video messaging are converted to text message.
120: word segmentation processing being carried out to described search sentence according to preset word segmentation regulation and preset dictionary for word segmentation, is obtained Multiple words.
Intention analysis can be carried out according to search statement of the word segmentation processing result to user, for example, passing through semantic parsing, meaning Figure matching etc.;Permutation and combination can also be carried out to multiple words after participle according to the result of word segmentation processing, and be based on vocabulary group The result of conjunction carries out intention analysis to the search statement of user;Or can also be obtained for example, by other by corpus training Natural language analytic modell analytical model etc. carries out sentence processing to search statement, obtains the semantic content of search statement, and according in semanteme Appearance carries out intention analysis, the invention is not limited in this regard to search statement.
Specifically, word segmentation processing can use two-way maximum matching method, Viterbi (Viterbi) algorithm, hidden Markov Model (Hidden Markov Model, HMM) algorithm and condition random field (Conditional Random Field, CRF) are calculated One of method is a variety of alternatively, being split according to search statement of the fixed words to user.Word combination is will be multiple Together, and these words intention expressed after permutation and combination can be one to word permutation and combination, be also possible to more It is a.Semantic content can be the search statement by other natural language analytic modell analytical models obtained by corpus training etc. to user Carry out what whole semantic parsing obtained.
Specifically, the search statement of user is carried out at participle according to preset word segmentation regulation and preset dictionary for word segmentation Reason, obtains multiple words.Here, word segmentation regulation can include but is not limited to Forward Maximum Method method, reverse maximum matching method, by Word traversal or Word-frequency, minimum syncopation, two-phase matching method etc..For example, being with the search statement of the user received For " the express delivery record that excellent clothing library receives after on January 10th, 2014 ", intelligent Answer System can be by by word traversal pair The search statement " the express delivery record that excellent clothing library receives after on January 10th, 2014 " of user carries out word segmentation processing, obtains multiple words Language " on January 10th, 2014 ", " later ", " excellent clothing library ", " receiving ", " express delivery ", " record ".It should be noted that user's searches It may include punctuation mark in rope sentence, can not also include punctuation mark, the invention is not limited in this regard.
130: multiple words being subjected to semantic matches, obtain at least two intentions.
Wherein, at least two be intended in each intention include in knowledge base with it is each be intended to matched intention knowledge point and Intent parameter relevant to matched intention knowledge point, knowledge base include multiple intention knowledge points, in preset dictionary for word segmentation Part of speech and/or name entity intent parameter relevant to knowledge point is intended to are corresponding, and multiple intention knowledge points include corresponding multiple Search for Answer extracting instruction template.
In embodiments of the present invention, it is intended that for by the method for natural language processing with preset meaning in the database Figure knowledge point matches, and here, database is the knowledge base for storing intentional knowledge point, which may include more A intention knowledge point, multiple intention knowledge points may include corresponding multiple search Answer extracting instruction templates.At least two meanings Each intention in figure may include matched intention knowledge point and one or more meanings relevant to the intention knowledge point Graph parameter, for example, search statement be " publication date of the The Romance of the Three Kingdoms ", then be intended to knowledge point standard ask for " [title] go out The version date ", it is intended that parameter is " [title]=The Romance of the Three Kingdoms ".For another example, search statement be " after on January 10th, 2014, excellent clothing library The fast delivery data received ", then it is corresponding two intention knowledge point standards ask respectively " express delivery that [date of receipt] receives " and " express delivery that [excellent clothing library] receives ", it is intended that parameter is " [date of receipt] < 20140110 " and " [addressee unit]=excellent clothing library ".
140: according to the corresponding search of intent parameter relevant to matched intention knowledge point and matched intention knowledge point Answer extracting instruction template obtains search Answer extracting instruction.
In embodiments of the present invention, the instruction of search Answer extracting is added on the basis of searching for Answer extracting instruction template What intent parameter obtained.Here, search Answer extracting instruction template is structured query language (Structured Query Language, SQL) Code Template, search Answer extracting instruction is structured query language code.It should be noted that SQL generation Code mask is pre-set.
150: the search Answer extracting instruction being intended to according at least two extracts corresponding data as every from dynamic data base It is a to be intended to corresponding search data, intersection is done to the corresponding search data of each intention, and using intersection data as search answer Data.
For the search statement being intended to comprising two or more, each intention pair in two or more intentions is obtained The search Answer extracting instruction answered, and corresponding data conduct is extracted from dynamic data base according to search Answer extracting instruction and is searched Rope data.Then, intersection is done to extracted search data, and the data obtained after intersection will be done as search answer data.
As an example it is assumed that the search statement of user is " record that Baoan District is passed in excellent clothing library fastly ", then by searching to this Rope sentence carries out semantic matches, obtains two and is intended to be respectively " posting the express delivery that part unit is excellent clothing library to record " and " posting address It is recorded for the express delivery of Baoan District ";Then, according to the corresponding search Answer extracting instruction of each intention in above-mentioned two intention from The fast delivery data of " posting part unit is excellent clothing library " and the express delivery number of " posting address is Baoan District " are extracted in dynamic data base respectively According to;Further, intersection is done to above-mentioned two groups of fast delivery datas, and the fast delivery data obtained after intersection will be done as search answer number According to.
Wherein, dynamic data base may include at least one table, and every kind of table at least one table is by table alias The corresponding field name of table alias is identified, includes the corresponding field name of table alias in search Answer extracting instruction template.For example, figure Book table, the table that checks out, express delivery table etc..Every kind of table at least one table is identified by table alias, and the list item of every kind of table Including at least list item name and the corresponding field name of list item name.It should be noted that field name is SQL code, therefore, search is answered It also includes the corresponding field name of table alias (i.e. SQL code) in instruction template that case, which is extracted,.Specifically, by taking books table as an example, then scheme Book table is the table alias of table, and the list item of table can include but is not limited to list item name, field name, associated table, associated Column, relevant operation etc..Further, the list item name in table can include but is not limited to ID, type, price and title, table In field name it is corresponding with list item name, as ID, TYPE, PRICE and NAME.
Optionally, as another embodiment, dynamic data base can be external data base.It specifically, can be by solid Data in the database of stationary interface real-time calling third-party server (for example, server etc. that circle leads to).
It should be noted that can mutually be called for example, by ID etc. between each table.Specifically, with library For book lending system, it is assumed that be stored with books table in book lending system, check out table and user's table, wherein books table is used for The relevant information of books is managed, the table that checks out is used to manage the relevant information of book borrowing and reading, and user's table is for managing registered users Relevant information, then for search statement " book that Zhang San borrows ", it is intended that parameter be " [check out people]=Zhang San ", SQL instruction The answer for finally needing to obtain are as follows: corresponding title and (without being limited thereto, the target data of SQL instruction that checks out the time in the table that checks out It is preset), the information stored in books table can include but is not limited to ID, title, author, publication date, price etc., The information stored in the table that checks out can include but is not limited to ID, borrower, borrow the time etc., and stored in user's table Information can include but is not limited to user name, ID, Real Name, date of birth etc..When Li Si borrows this this book of the The Romance of the Three Kingdoms, Book lending system only updates the information in the table that checks out, and is not updated to books table and user's table, therefore, The relevant information in books table and user's table can be obtained by calling ID.
The technical solution provided according to embodiments of the present invention carries out search statement by receiving the search statement of user Semantic matches obtain at least two intentions, wherein at least two be intended in each intention include in knowledge base with each intention Matched intention knowledge point and intent parameter relevant to matched intention knowledge point, knowledge base include multiple intention knowledge points, Multiple intention knowledge points include corresponding multiple search Answer extracting instruction templates, according to relevant to matched intention knowledge point The corresponding search Answer extracting instruction template of intent parameter and matched intention knowledge point obtains search Answer extracting instruction, root Corresponding data is extracted as search answer data from dynamic data base according to the instruction of search Answer extracting, can be improved data query The accuracy rate that efficiency and answer are replied.
In another embodiment of the present invention, 120 include: 121: at least two that the word in multiple words is generated Multiple intention knowledge points in word combination and knowledge base carry out similarity calculation, obtain matched at least two and are intended to knowledge Point;122: obtaining intent parameter name needed for the search Answer extracting instruction template that at least two are intended to knowledge point;123: root It is obtained from multiple words according to preset dictionary for word segmentation and belongs to specific part of speech or name at least one word of entity as meaning Graph parameter, wherein specific part of speech and/or name entity and intent parameter name needed for search Answer extracting instruction template are right It answers;And 124: being obtained at least according to the corresponding search Answer extracting instruction template at least two intention knowledge points and intent parameter Two intentions.Wherein, it searches in the entitled search Answer extracting instruction template of intent parameter needed for Answer extracting instruction template The corresponding list item name of corresponding field name and/or table alias.The similar word and/or life of part of speech in the preset dictionary for word segmentation The similar word of name entity includes the data that the list item name is corresponded in the dynamic data base.
Further, before carrying out similarity calculation to multiple words, processing first can be filtered to multiple words, Obtain at least one keyword.The method that filtration treatment uses part of speech etc. can be filtered multiple words according to, removal Sew front and back;Or multiple words are filtered according to the frequency, remove stop words;Or sew before and after can also first removing, Stop words etc., the invention is not limited in this regard are removed again.Here, removal stop words refers to that identification meaning is not in removal search statement Big but high frequency of occurrences word, for example, " this ", " ", "and" etc., these words can introduce larger during calculating similarity Error, a kind of noise can be regarded as.It should be noted that filtration treatment can also remove part nonsense words, for example, " I ", " thinking ", " " etc..
Then, multiple intention knowledge points pre-stored at least one keyword and knowledge base are subjected to similarity meter Calculate, obtain it is matched at least two be intended to knowledge point, and based on it is matched at least two intention knowledge point obtain this at least two It is intended to intent parameter name needed for the corresponding search Answer extracting instruction template in knowledge point.
Further 123: being obtained from multiple words according to preset dictionary for word segmentation and belong to specific part of speech and/or name At least one word of entity is as intent parameter, wherein specific part of speech and/or name entity and search Answer extracting instruction Intent parameter name needed for template is corresponding.Specifically, the part of speech in preset dictionary for word segmentation and/or name entity include dynamic List item name in database, the similar word of part of speech and/or to name the similar word of entity include dynamic number in preset dictionary for word segmentation According to the data of corresponding table item name in library.Here, part of speech is divided according to the semanteme of word, and one group of relevant phrase is woven in It is formed together the part of speech library an of tree, any one n omicronn-leaf child node in this tree is referred to a word Class (broad sense part of speech), wherein directly the first order part of speech comprising word is known as narrow sense part of speech.Name entity be name, mechanism name, Name and other all entities with entitled mark, it is in the present embodiment, real also including number, date, currency, address etc. Body refers to name entity.
124: according at least two corresponding search Answer extracting instruction templates in intention knowledge points and intent parameter obtain to Few two intentions.
In another embodiment of the present invention, 121, it obtains matched at least two and is intended to knowledge point, comprising: 1211: The question sentence for multiple intention knowledge points at least two word combinations and knowledge base that word in multiple words is generated is distinguished Semantic Similarity Measurement is carried out, the plurality of each intention knowledge point being intended in knowledge point includes multiple question sentences;1212: and Semantic similarity is higher than preset threshold and highest intention knowledge point is as at least two intention knowledge points;Or according to default Dictionary for word segmentation to multiple words carry out part of speech extraction and/or name Entity recognition, obtain at least one part of speech and/or at least one A name entity;1213: respectively by at least one part of speech of the word combination and/or at least one name entity and knowledge The question sentence of multiple intention knowledge points in library carries out Semantic Similarity Measurement respectively;And 1214: semantic similarity being higher than pre- If threshold value and highest intention knowledge point are intended to corresponding intention knowledge point as at least two.
Specifically, pre-stored more in at least two word combinations and knowledge base word in multiple words generated A question sentence for being intended to knowledge point carries out Semantic Similarity Measurement respectively, and semantic similarity is higher than preset threshold and highest meaning Figure knowledge point is intended to knowledge point as at least two.Here, multiple question sentences for being intended to knowledge points may include that standard is asked and the mark At least one extension that standard is asked asks that standard is asked can be for by the combination of the part of speech name of expression formula form and name physical name.
Further, semantic similarity refers to the semantic letter at least two word combinations that the word in multiple words generates Cease in knowledge base it is multiple it is preset be intended between knowledge points and element knowledge point based on the matching degree on word and word, with And semantic high similarity.Semantic Similarity Measurement can using based on vector space model (Vector Space Model, VSM calculation method), the calculation method based on stealthy semantic indexing model (Latent Semantic Indexing, LSI), One of semantic similarity calculation method based on On The Attribute Theory and the semantic similarity calculation method based on Hamming distance are more The combination of kind method.It should be noted that semantic similarity calculation method can also be the calculating side of other semantic similarities Method.
Optionally, as another embodiment, according to preset dictionary for word segmentation to multiple words carry out part of speech extraction and/or Entity recognition is named, at least one part of speech and/or at least one name entity are obtained;Further, by least one part of speech and/ Or at least one name entity and the question sentence of multiple intention knowledge points in knowledge base carry out Semantic Similarity Measurement respectively;And It is intended to knowledge point for the highest intention knowledge point of semantic similarity as at least two.
In another embodiment of the present invention, the list item of every kind of table at least one table includes at least list item name Field name corresponding with list item name, wherein the part of speech name in the entitled preset dictionary for word segmentation of list item and/or name physical name, are searched for It include the corresponding field name of list item name in Answer extracting instruction template, search Answer extracting instruction template is structured query language Code Template.
Specifically, by taking express delivery table as an example, then the list item of the express delivery table may include list item name, word corresponding with the list item name Section name, associated table, associated column, relevant operation etc..Further, list item name can be sender's name, post part address, post Part people phone, addressee's name, posting address, addressee's phone, Item Title, Item Weight etc., field name can be and table The corresponding SQL code of key name, for example, NAME, ADDRESS, ITEM, WEIGHT etc..
It should be noted that the part of speech name and/or name physical name of preset dictionary for word segmentation are list item name.
In another embodiment of the present invention, at least two are intended in knowledge point further include answer template, more intentions Querying method further include: 160: final search answer is generated according to answer template and search answer data, wherein answer template In include answer talk about art.
Specifically, final search answer can be generated according to answer template and search answer data.Here, answer template Refer to state in answer one with if problem content, may include answer words art in answer template.Here, art is talked about in answer Add the form of search answer data for a natural language, or a word with part of speech name or name physical name Add the form of search answer data, part of speech name therein or name physical name need to be replaced by the corresponding word in search statement to be made For final search answer.For example, the search statement of user is " book that Zhang San borrows ".It is corresponding be intended to knowledge point standard ask for " [check out people] [title] ", corresponding answer words art can be " book that [check out people] borrows are as follows: (search answer data) ", wherein searching Rope answer data can by search for Answer extracting instruct to obtain the data for meeting following condition " (check out table, [check out people]= Three, target: [title]) ", " book that [check out people] borrows is " could alternatively be " book that Zhang San borrows is ", answer as final search Case.
It in another embodiment of the present invention, further include 170: according to the preset time interval to dynamic data base and in advance If the data in dictionary for word segmentation are updated, part of speech and/or name entity in preset dictionary for word segmentation include dynamic data base In list item name, the similar word of part of speech and/or to name the similar word of entity include dynamic data base in preset dictionary for word segmentation The data of middle corresponding table item name.
Specifically, can according to the preset time interval (for example, one hour, one day, three days etc.) in dynamic data base Data and default dictionary for word segmentation in data be updated.It should be noted that part of speech in preset dictionary for word segmentation and/or Name entity may include the list item name in dynamic data base, and the similar word of part of speech and/or name are real in preset dictionary for word segmentation The similar word of body may include the data of corresponding table item name in dynamic data base.
All the above alternatives can form alternative embodiment of the invention using any combination, herein no longer It repeats one by one.
Fig. 2 is a kind of flow chart of more intent query methods shown in another exemplary embodiment according to the present invention.Such as Fig. 2 Shown, which includes:
210: receiving the search statement of user.
Wherein, which contains at least two intention.
In embodiments of the present invention, the search statement of user can be the forms such as natural language sentence, phrase.User's searches Rope sentence can also may include multiple intentions, the invention is not limited in this regard, wherein the tool of intention only comprising an intention Appearance, which is shown in step 120, in vivo explains, only explains here from the search statement angle of user.For example, the search statement of user is " people that U.S. Express was received in inquiry " is then only intended to " posting part country is the U.S. " comprising one in the search statement.For another example, user Search statement be " record that Baoan District is passed in excellent clothing library fastly ", then in the search statement comprising two be intended to " posting part unit is Excellent clothing library " and " posting address is Baoan District ".
It should be noted that the search statement of user can be text message, speech message, image information, image message With one of video messaging or a variety of.It may include punctuate symbol in the search statement of user in addition it is also necessary to illustrate Number, it can not also include punctuation mark.
220: word segmentation processing being carried out to described search sentence according to preset word segmentation regulation and preset dictionary for word segmentation, is obtained Multiple words.
In embodiments of the present invention, according to preset word segmentation regulation and preset dictionary for word segmentation to the search statement of user into Row word segmentation processing obtains multiple words.Here, word segmentation regulation can include but is not limited to Forward Maximum Method method, reverse maximum Matching method, by word traversal or Word-frequency, minimum syncopation, two-phase matching method etc..Word segmentation processing can using it is two-way most One of big matching method, viterbi algorithm, hidden Markov model algorithm and condition random field algorithm are a variety of.
It should be noted that the mode that the present invention handles search statement is not limited to word segmentation processing, but can be Other suitable modes, for example, punctuate processing, word combination etc..
230: multiple intention knowledge points in multiple words and knowledge base are subjected to similarity calculation, obtain it is matched at least Two intention knowledge points.
In embodiments of the present invention, the question sentence of multiple intention knowledge points in multiple words and knowledge base is subjected to language respectively Adopted similarity calculation, and it is intended to knowledge point for the highest intention knowledge point of semantic similarity as at least two.Here, Duo Geyi Each intention knowledge point in figure knowledge point may include multiple question sentences, and each question sentence in multiple question sentences may include that standard is asked Ask that at least one relevant extension is asked with to the standard, standard is asked can be for by the part of speech name of expression formula form and name entity The combination of name.
Further, semantic similarity refers to that multiple preset intentions in the semantic information and knowledge base of multiple words are known Know between point and element knowledge point based on the matching degree on word and word, and semantic high similarity.Semantic similarity The calculation method based on vector space model, the calculation method based on stealthy semantic indexing model can be used, based on category by calculating One of the semantic similarity calculation method of property opinion and semantic similarity calculation method based on Hamming distance or a variety of methods Combination.It should be noted that semantic similarity calculation method can also be the calculation method of other semantic similarities.
Optionally, as another embodiment, according to preset dictionary for word segmentation to multiple words carry out part of speech extraction and/or Entity recognition is named, at least one part of speech and/or at least one name entity are obtained;Further, by least one part of speech and/ Or at least one name entity and the question sentence of multiple intention knowledge points in knowledge base carry out Semantic Similarity Measurement respectively, and will The highest intention knowledge point of semantic similarity is intended to knowledge point as at least two.
240: according to the corresponding search of intent parameter relevant to matched intention knowledge point and matched intention knowledge point Answer extracting instruction template obtains search Answer extracting instruction.
In embodiments of the present invention, the instruction of search Answer extracting is added on the basis of searching for Answer extracting instruction template What intent parameter obtained.Here, search Answer extracting instruction template is SQL code template, and search Answer extracting instruction is SQL generation Code.It should be noted that SQL code template is pre-set.
250: corresponding data is extracted as at least two intentions from dynamic data base according to the instruction of search Answer extracting It is each to be intended to corresponding search data.
In embodiments of the present invention, dynamic data base can be the bivariate table of such as Excel table, or pass through fixation The external data base that interface calls, the invention is not limited in this regard.
260: intersection being done to the corresponding search data of each intention, and using intersection data as search answer data.
In embodiments of the present invention, intersection is taken to the corresponding search data of each intention, and the number obtained after intersection will be taken According to as search answer data.
Specifically, it is assumed that the search statement of user is " record that Baoan District is passed in excellent clothing library fastly ", then by the search Sentence carries out semantic matches, and obtaining two to be intended to is respectively " posting the express delivery that part unit is excellent clothing library to record " and " posting address is The express delivery of Baoan District records ";Then, driven according to the corresponding search Answer extracting instruction of each intention in above-mentioned two intention The fast delivery data of " posting part unit is excellent clothing library " and the fast delivery data of " posting address is Baoan District " are extracted in state database respectively; Further, intersection is done to above-mentioned two groups of fast delivery datas, and the fast delivery data obtained after intersection will be done as search answer data.
270: based on the search answer that search answer data and answer template generation are final, and the search answer being presented to User.
In embodiments of the present invention, answer template refer to stated in answer one with if problem content, answer mould It may include answer words art in plate.It is possible to further be in by the corresponding search answer of search statement in a manner of text, voice etc. Now give user.
The technical solution provided according to embodiments of the present invention carries out semantic matches by the search statement to user and obtains list Intention or more intentions, and based on single intention or it is intended to corresponding search Answer extracting instruction from the corresponding number of dynamic data base extraction more According to as search answer data, the efficiency of data query and the accuracy rate of answer reply can be improved, and therefore promote user's body It tests.
Above-mentioned more intent query methods will be hereafter described in detail by taking the Library Inquiry System of bookstore as an example.
Specifically, the search statement " I wants the book that inquiry is greater than 10 yuan " of Library Inquiry System reception user, and according to Preset word segmentation regulation and preset dictionary for word segmentation sewed by removing front and back, the methods of stop words divides above-mentioned search statement Word processing obtains two words " being greater than 10 yuan " and " book ".Then, by after word segmentation processing word and knowledge base in prestore know Know point and carry out Semantic Similarity Measurement, obtaining the intention knowledge point in above-mentioned search statement is the " price of [book] > [people Coin] ", it is intended that parameter is " price > 10 yuan ".Further, driven based on being intended to and being intended to corresponding search Answer extracting instruction State database extracts corresponding data as search answer data, and searches based on search answer data and answer template generation are final The search answer is presented to the user by rope answer in a manner of text, voice etc..
Following is apparatus of the present invention embodiment, can be used for executing embodiment of the present invention method.For apparatus of the present invention reality Undisclosed details in example is applied, embodiment of the present invention method is please referred to.
Fig. 3 is a kind of block diagram of more intent query devices 300 shown in an exemplary embodiment according to the present invention.Such as Fig. 3 Shown, which includes:
Receiving module 310, for receiving the search statement of user;
Word segmentation module 320, for being segmented according to preset word segmentation regulation and preset dictionary for word segmentation to search statement Processing, obtains multiple words;
Matching module 330 obtains at least two intentions, wherein at least for the multiple word to be carried out semantic matches Two be intended in each intention include in knowledge base with it is each be intended to matched intention knowledge point and with matched intention knowledge The relevant intent parameter of point, knowledge base includes multiple intention knowledge points, part of speech and/or name in the preset dictionary for word segmentation Entity intent parameter relevant to the intention knowledge point is corresponding, and multiple intention knowledge points include that corresponding multiple search answers mention Instruction fetch template;
Module 340 is obtained, the search Answer extracting for being intended to according at least two is instructed from dynamic data base extraction pair It answers data to be intended to corresponding search data as each, is intended to corresponding search data to each and does intersection, and by intersection data As search answer data.
Data extraction module 350, for extracting corresponding data conduct from dynamic data base according to search Answer extracting instruction Search for answer data.
The technical solution provided according to embodiments of the present invention carries out search statement by receiving the search statement of user Semantic matches obtain at least two intentions, wherein at least two be intended in each intention include in knowledge base with each intention Matched intention knowledge point and intent parameter relevant to matched intention knowledge point, knowledge base include multiple intention knowledge points, Multiple intention knowledge points include corresponding multiple search Answer extracting instruction templates, according to relevant to matched intention knowledge point The corresponding search Answer extracting instruction template of intent parameter and matched intention knowledge point obtains search Answer extracting instruction, root Corresponding data is extracted as search answer data from dynamic data base according to the instruction of search Answer extracting, can be improved data query The accuracy rate that efficiency and answer are replied.
In another embodiment of the present invention, matching module 330 includes: knowledge point matching unit 3301, and being used for will be more Multiple intention knowledge points at least two word combinations and knowledge base that word in a word generates carry out similarity calculation, It obtains matched at least two and is intended to knowledge point;Intent parameter name acquiring unit 3302 is intended to knowledge for obtaining at least two Intent parameter name needed for the search Answer extracting instruction template of point;Intent parameter acquiring unit 3303, for according to default Dictionary for word segmentation obtained from multiple words and belong to specific part of speech or name at least one word of entity as intent parameter, Wherein specific part of speech and/or name entity are corresponding with intent parameter name needed for search Answer extracting instruction template;And It is intended to matching unit 3304, for being intended to the corresponding search Answer extracting instruction template in knowledge point according at least two and being intended to join Number obtains at least two intentions.Wherein, the entitled search Answer extracting of intent parameter needed for Answer extracting instruction template is searched for The corresponding list item name of corresponding field name and/or table alias in instruction template.Part of speech is same in the preset dictionary for word segmentation Class word and/or the similar word for naming entity include the data that the list item name is corresponded in the dynamic data base.
In another embodiment of the present invention, the part of speech in preset dictionary for word segmentation and/or name entity include dynamic List item name in database, the similar word of part of speech and/or to name the similar word of entity include dynamic number in preset dictionary for word segmentation According to the data of corresponding table item name in library.
In another embodiment of the present invention, knowledge point matching unit 3301 includes: the first similarity calculation subelement, It is plurality of for the question sentence of multiple intention knowledge points in multiple words and knowledge base to be carried out Semantic Similarity Measurement respectively The each intention knowledge point being intended in knowledge point includes multiple question sentences;And the first similarity-rough set subelement, for will be semantic The highest intention knowledge point of similarity is intended to knowledge point as at least two;Alternatively, knowledge point matching unit 3302 includes: pre- place Manage subelement, for according to preset dictionary for word segmentation to multiple words carry out part of speech extraction and/or name Entity recognition, obtain to A few part of speech and/or at least one name entity;Second similarity calculation subelement, for by least one part of speech and/or At least one name entity and the question sentence of multiple intention knowledge points in knowledge base carry out Semantic Similarity Measurement respectively;And the Two similarity comparing subunits, for being intended to knowledge point for the highest intention knowledge point of semantic similarity as at least two.
In another embodiment of the present invention, dynamic data base includes at least one table, at least one table For every kind of table by the corresponding field name of table alias mark table alias, searching in Answer extracting instruction template includes that table alias is corresponding Field name.
In another embodiment of the present invention, the list item of every kind of table at least one table includes at least list item name Field name corresponding with list item name, wherein the part of speech name in the entitled preset dictionary for word segmentation of list item and/or name physical name, are searched for It include the corresponding field name of list item name in Answer extracting instruction template, search Answer extracting instruction template is structured query language Code Template.
In another embodiment of the present invention, at least two are intended in knowledge point further include answer template, more meanings of Fig. 3 Figure inquiry unit 300 further include: answer generation module 360, for being generated finally according to answer template and search answer data Answer is searched for, wherein includes that art is talked about in answer in answer template.
In another embodiment of the present invention, the instruction of search Answer extracting is structured query language code.
In another embodiment of the present invention, more intent query devices 300 of Fig. 3 further include: update module 370 is used In being updated according to the preset time interval to the data in dynamic data base and default dictionary for word segmentation, preset dictionary for word segmentation In part of speech and/or name entity include list item name in dynamic data base, in preset dictionary for word segmentation the similar word of part of speech and/ Or the similar word of name entity includes the data of corresponding table item name in dynamic data base.
In another embodiment of the present invention, search statement includes text message, speech message, image information, image One of message and video messaging are a variety of, more intent query devices 300 of Fig. 3 further include: conversion module 380, being used for will Search statement is converted to text message.
The function of modules and the realization process of effect are specifically detailed in the above method and correspond to step in above-mentioned apparatus Realization process, details are not described herein.
Fig. 4 is a kind of block diagram of more intent query devices 400 shown in another exemplary embodiment according to the present invention.Such as figure Shown in 4, which includes:
Receiving module 410, for receiving the search statement of user, which contains at least two intention;
Processing module 420, for being carried out according to preset word segmentation regulation and preset dictionary for word segmentation to described search sentence Word segmentation processing obtains multiple words;
Computing module 430 is obtained for multiple intention knowledge points in multiple words and knowledge base to be carried out similarity calculation It is intended to knowledge point to matched at least two;
Module 440 is obtained, is used for: according to intent parameter relevant to the matched intention knowledge point and described matched It is intended to the corresponding search Answer extracting instruction template in knowledge point, obtains search Answer extracting instruction;
Extraction module 450, for extracting corresponding data as at least from dynamic data base according to the instruction of search Answer extracting The corresponding search data of each intention in two intentions;
Intersection module 460 for doing intersection to the corresponding search data of each intention, and is answered intersection data as search Case data;And
Answer generation module 470, for the search answer final based on search answer data and answer template generation, and will The search answer is presented to the user.
The technical solution provided according to embodiments of the present invention is obtained more by the search statement progress semantic matches to user It is intended to, and extracts corresponding data as search answer number from dynamic data base based on corresponding search Answer extracting instruction is intended to more According to, the accuracy rate that the efficiency and answer that can be improved data query are replied, and therefore promote user experience.
Fig. 5 is more intent query devices 500 for data query shown in an exemplary embodiment according to the present invention Block diagram.
Referring to Fig. 5, it further comprises one or more processors, and by depositing that device 500, which includes processing component 510, Memory resource representated by reservoir 520, can be by the instruction of the execution of processing component 510, such as application program for storing.It deposits The application program stored in reservoir 520 may include it is one or more each correspond to one group of instruction module.This Outside, processing component 510 is configured as executing instruction, to execute above-mentioned more intent query methods.
Device 500 can also include the power management that a power supply module 530 is configured as executive device 500, and one has Line or radio network interface 540 are configured as device 500 being connected to network and input and output (I/O) interface 550.Dress Setting 500 can operate based on the operating system for being stored in memory 520, such as Windows ServerTM, Mac OS XTM, UnixTM, LinuxTM, FreeBSDTMOr it is similar.
A kind of non-transitorycomputer readable storage medium, when the instruction in storage medium is by the processing of above-mentioned apparatus 500 When device executes, so that above-mentioned apparatus 500 is able to carry out a kind of more intent query methods, comprising: receive the search statement of user;It is right Search statement carries out semantic matches, obtains at least two intentions, wherein each intention at least two intentions includes knowledge base In to the matched intention knowledge point of each intention and intent parameter relevant with matched intention knowledge point, knowledge base includes multiple It is intended to knowledge point, multiple intention knowledge points include corresponding multiple search Answer extracting instruction templates;According to matched intention The corresponding search Answer extracting instruction template of the relevant intent parameter in knowledge point and matched intention knowledge point obtains search answer Extract instruction;And corresponding data is extracted as search answer data from dynamic data base according to the instruction of search Answer extracting.
Those of ordinary skill in the art may be aware that list described in conjunction with the examples disclosed in the embodiments of the present disclosure Member and algorithm steps can be realized with the combination of electronic hardware or computer software and electronic hardware.These functions are actually It is implemented in hardware or software, the specific application and design constraint depending on technical solution.Professional technician Each specific application can be used different methods to achieve the described function, but this realization is it is not considered that exceed The scope of the present invention.
It is apparent to those skilled in the art that for convenience and simplicity of description, the system of foregoing description, The specific work process of device and unit, can refer to corresponding processes in the foregoing method embodiment, and details are not described herein.
In several embodiments provided herein, it should be understood that disclosed systems, devices and methods, it can be with It realizes by another way.For example, the apparatus embodiments described above are merely exemplary, for example, the unit It divides, only a kind of logical function partition, there may be another division manner in actual implementation, such as multiple units or components It can be combined or can be integrated into another system, or some features can be ignored or not executed.Another point, it is shown or The mutual coupling, direct-coupling or communication connection discussed can be through some interfaces, the indirect coupling of device or unit It closes or communicates to connect, can be electrical property, mechanical or other forms.
The unit as illustrated by the separation member may or may not be physically separated, aobvious as unit The component shown may or may not be physical unit, it can and it is in one place, or may be distributed over multiple In network unit.It can select some or all of unit therein according to the actual needs to realize the mesh of this embodiment scheme 's.
It, can also be in addition, the functional units in various embodiments of the present invention may be integrated into one processing unit It is that each unit physically exists alone, can also be integrated in one unit with two or more units.
It, can be with if the function is realized in the form of SFU software functional unit and when sold or used as an independent product It is stored in a computer readable storage medium.Based on this understanding, technical solution of the present invention is substantially in other words The part of the part that contributes to existing technology or the technical solution can be embodied in the form of software products, the meter Calculation machine software product is stored in a storage medium, including some instructions are used so that a computer equipment (can be a People's computer, server or network equipment etc.) it performs all or part of the steps of the method described in the various embodiments of the present invention. And storage medium above-mentioned includes: that USB flash disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), arbitrary access are deposited The various media that can store program ver-ify code such as reservoir (RAM, Random AccessMemory), magnetic or disk.
The above description is merely a specific embodiment, but scope of protection of the present invention is not limited thereto, any Those familiar with the art in the technical scope disclosed by the present invention, can easily think of the change or the replacement, and should all contain Lid is within protection scope of the present invention.Therefore, the protection scope of the present invention shall be subject to the protection scope of the claims.

Claims (10)

1. a kind of more intent query methods characterized by comprising
Receive the search statement of user;
Word segmentation processing is carried out to described search sentence according to preset word segmentation regulation and preset dictionary for word segmentation, obtains multiple words Language;
The multiple word is subjected to semantic matches, obtains at least two intentions, wherein each of described at least two intention Be intended to include in knowledge base to each matched intention knowledge point and relevant with the matched intention knowledge point of being intended to Intent parameter, the knowledge base include multiple intention knowledge points, part of speech and/or name entity in the preset dictionary for word segmentation Intent parameter relevant to the intention knowledge point is corresponding, and the multiple intention knowledge point includes that corresponding multiple search answers mention Instruction fetch template;
According to the matched relevant intent parameter in intention knowledge point and the corresponding search in the matched intention knowledge point Answer extracting instruction template obtains search Answer extracting instruction;
The search Answer extracting instruction being intended to according to described at least two extracts corresponding data as institute from the dynamic data base State it is each be intended to corresponding search data, to it is described it is each be intended to corresponding search data and do intersection, and using intersection data as Described search answer data.
2. more intent query methods according to claim 1, which is characterized in that described that the multiple word is carried out semanteme Matching, obtains at least two intentions, comprising:
The multiple intention at least two word combinations that word in the multiple word is generated and the knowledge base Knowledge point carries out similarity calculation, obtains matched described at least two and is intended to knowledge point;
Obtain intent parameter name needed for the search Answer extracting instruction template that described at least two are intended to knowledge point;
It is obtained from the multiple word according to the preset dictionary for word segmentation and belongs to specific part of speech or name entity at least One word is as intent parameter, wherein the specific part of speech and/or name entity and described search Answer extracting instruct mould Intent parameter name needed for plate is corresponding;And
Institute is obtained according at least two intention corresponding search Answer extracting instruction template in knowledge point and the intent parameter State at least two intentions.
3. more intent query methods according to claim 2, which is characterized in that the part of speech in the preset dictionary for word segmentation And/or name entity includes list item name in the dynamic data base, in the preset dictionary for word segmentation the similar word of part of speech and/ Or the similar word of name entity includes the data that the list item name is corresponded in the dynamic data base.
4. more intent query methods according to claim 2, which is characterized in that described to know the multiple word with described The multiple intention knowledge point known in library carries out similarity calculation, obtains matched described at least two and is intended to knowledge point, packet It includes:
The multiple intention at least two word combinations that word in the multiple word is generated and the knowledge base The question sentence of knowledge point carries out Semantic Similarity Measurement respectively, wherein the multiple each intention knowledge point packet being intended in knowledge point Include multiple question sentences;And
Preset threshold will be higher than with the semantic similarity of the word combination and highest intention knowledge point is as described at least two It is a to be intended to corresponding intention knowledge point;Or
According to the preset dictionary for word segmentation to the multiple word carry out part of speech extraction and/or name Entity recognition, obtain to A few part of speech and/or at least one name entity;
By the multiple intention knowledge point at least one described part of speech and/or at least one name entity and the knowledge base Question sentence carry out Semantic Similarity Measurement respectively;And
Preset threshold and highest intentions knowledge point will be higher than with the semantic similarity of the word combination respectively as described in extremely Few two are intended to corresponding intention knowledge point.
5. more intent query methods according to any one of claim 1 to 4, which is characterized in that the dynamic data base Including at least one table, every kind of table at least one table identifies the corresponding field of the table alias by table alias , it include the corresponding field name of the table alias in described search Answer extracting instruction template;
The list item of every kind of table at least one table includes at least list item name and the corresponding field name of the list item name, Wherein the part of speech name in the entitled preset dictionary for word segmentation of the list item and/or name physical name, described search Answer extracting It include the corresponding field name of the list item name in instruction template, described search Answer extracting instruction template is structured query language Code Template;
The instruction of described search Answer extracting is structured query language code.
6. more intent query methods according to claim 5, which is characterized in that further include:
The data in the dynamic data base and the default dictionary for word segmentation are updated according to the preset time interval, it is described Part of speech in preset dictionary for word segmentation and/or name entity include the list item name in the dynamic data base, and described preset point The similar word of the similar word of part of speech and/or name entity includes that the list item name is corresponded in the dynamic data base in word dictionary Data.
7. more intent query methods according to any one of claim 1 to 6, which is characterized in that described search sentence packet Include one of text message, speech message, image information, image message and video messaging or a variety of, more intent queries Method further include:
Described search sentence is converted into text message.
8. a kind of more intent query devices characterized by comprising
Receiving module, for receiving the search statement of user;
Word segmentation module, for being carried out at participle according to preset word segmentation regulation and preset dictionary for word segmentation to described search sentence Reason, obtains multiple words;
Matching module obtains at least two intentions, wherein described at least two for carrying out semantic matches to described search sentence Each intention in a intention include in knowledge base with it is described it is each be intended to matched intention knowledge point and with the matched meaning The relevant intent parameter in figure knowledge point, the knowledge base include multiple intention knowledge points, the word in the preset dictionary for word segmentation Class and/or name entity intent parameter relevant to the intention knowledge point are corresponding, and the multiple intention knowledge point includes corresponding to Multiple search Answer extracting instruction templates;
Module is obtained, for basis and the matched relevant intent parameter in intention knowledge point and the matched intention knowledge The corresponding search Answer extracting instruction template of point obtains search Answer extracting instruction;And
Data extraction module, the search Answer extracting for being intended to according to described at least two, which is instructed from the dynamic data base, to be mentioned Take corresponding data as it is described it is each be intended to corresponding search data, to it is described it is each be intended to corresponding search data and do intersection, And using intersection data as described search answer data.
9. a kind of computer equipment, comprising: memory, processor and storage are in the memory and can be in the processor The executable instruction of operation, which is characterized in that the processor realizes such as claim 1 to 7 when executing the executable instruction Any one of described in more intent query methods.
10. a kind of computer readable storage medium, is stored thereon with computer executable instructions, which is characterized in that described to hold More intent query methods as described in any one of claims 1 to 7 are realized in row instruction when being executed by processor.
CN201711285233.0A 2017-12-07 2017-12-07 More intent query method and apparatus, computer equipment and computer readable storage medium Pending CN110019712A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201711285233.0A CN110019712A (en) 2017-12-07 2017-12-07 More intent query method and apparatus, computer equipment and computer readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201711285233.0A CN110019712A (en) 2017-12-07 2017-12-07 More intent query method and apparatus, computer equipment and computer readable storage medium

Publications (1)

Publication Number Publication Date
CN110019712A true CN110019712A (en) 2019-07-16

Family

ID=67186871

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201711285233.0A Pending CN110019712A (en) 2017-12-07 2017-12-07 More intent query method and apparatus, computer equipment and computer readable storage medium

Country Status (1)

Country Link
CN (1) CN110019712A (en)

Cited By (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110390006A (en) * 2019-07-23 2019-10-29 腾讯科技(深圳)有限公司 Question and answer corpus generation method, device and computer readable storage medium
CN110543592A (en) * 2019-08-27 2019-12-06 北京百度网讯科技有限公司 Information searching method and device and computer equipment
CN111125150A (en) * 2019-12-26 2020-05-08 成都航天科工大数据研究院有限公司 Industrial field question-answering system retrieval method
CN111984761A (en) * 2020-07-17 2020-11-24 联想(北京)有限公司 Information response processing method, equipment and storage medium
CN112328763A (en) * 2020-11-04 2021-02-05 北京京东尚科信息技术有限公司 Intention recognition method, device, dialogue method and system
CN112434141A (en) * 2020-11-11 2021-03-02 北京沃东天骏信息技术有限公司 Information processing method, information processing device, electronic equipment and storage medium
CN113157893A (en) * 2021-05-25 2021-07-23 网易(杭州)网络有限公司 Method, medium, apparatus, and computing device for intent recognition in multiple rounds of conversations
US20220114824A1 (en) * 2019-07-17 2022-04-14 Fujitsu Limited Computer-readable recording medium storing specifying program, specifying method, and specifying device

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20040243568A1 (en) * 2000-08-24 2004-12-02 Hai-Feng Wang Search engine with natural language-based robust parsing of user query and relevance feedback learning
CN104850539A (en) * 2015-05-28 2015-08-19 宁波薄言信息技术有限公司 Natural language understanding method and travel question-answering system based on same
CN107301227A (en) * 2017-06-21 2017-10-27 北京百度网讯科技有限公司 Search information analysis method and device based on artificial intelligence

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20040243568A1 (en) * 2000-08-24 2004-12-02 Hai-Feng Wang Search engine with natural language-based robust parsing of user query and relevance feedback learning
CN104850539A (en) * 2015-05-28 2015-08-19 宁波薄言信息技术有限公司 Natural language understanding method and travel question-answering system based on same
CN107301227A (en) * 2017-06-21 2017-10-27 北京百度网讯科技有限公司 Search information analysis method and device based on artificial intelligence

Cited By (13)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20220114824A1 (en) * 2019-07-17 2022-04-14 Fujitsu Limited Computer-readable recording medium storing specifying program, specifying method, and specifying device
CN110390006A (en) * 2019-07-23 2019-10-29 腾讯科技(深圳)有限公司 Question and answer corpus generation method, device and computer readable storage medium
CN110390006B (en) * 2019-07-23 2023-11-10 腾讯科技(深圳)有限公司 Question-answer corpus generation method, device and computer readable storage medium
CN110543592B (en) * 2019-08-27 2022-04-01 北京百度网讯科技有限公司 Information searching method and device and computer equipment
CN110543592A (en) * 2019-08-27 2019-12-06 北京百度网讯科技有限公司 Information searching method and device and computer equipment
CN111125150A (en) * 2019-12-26 2020-05-08 成都航天科工大数据研究院有限公司 Industrial field question-answering system retrieval method
CN111125150B (en) * 2019-12-26 2023-12-26 成都航天科工大数据研究院有限公司 Search method for industrial field question-answering system
CN111984761A (en) * 2020-07-17 2020-11-24 联想(北京)有限公司 Information response processing method, equipment and storage medium
CN112328763A (en) * 2020-11-04 2021-02-05 北京京东尚科信息技术有限公司 Intention recognition method, device, dialogue method and system
CN112434141A (en) * 2020-11-11 2021-03-02 北京沃东天骏信息技术有限公司 Information processing method, information processing device, electronic equipment and storage medium
CN112434141B (en) * 2020-11-11 2024-07-16 北京沃东天骏信息技术有限公司 Information processing method, information processing device, electronic equipment and storage medium
CN113157893A (en) * 2021-05-25 2021-07-23 网易(杭州)网络有限公司 Method, medium, apparatus, and computing device for intent recognition in multiple rounds of conversations
CN113157893B (en) * 2021-05-25 2023-12-15 网易(杭州)网络有限公司 Method, medium, apparatus and computing device for intent recognition in multiple rounds of conversations

Similar Documents

Publication Publication Date Title
CN107885874B (en) Data query method and device, computer equipment and computer readable storage medium
CN110019712A (en) More intent query method and apparatus, computer equipment and computer readable storage medium
CN109670163B (en) Information identification method, information recommendation method, template construction method and computing device
CN107436875B (en) Text classification method and device
WO2020082560A1 (en) Method, apparatus and device for extracting text keyword, as well as computer readable storage medium
CN110019713A (en) Based on the data retrieval method and device, equipment and storage medium for being intended to understand
CN110929125B (en) Search recall method, device, equipment and storage medium thereof
CN111831911A (en) Query information processing method and device, storage medium and electronic device
CN107341145A (en) A kind of user feeling analysis method based on deep learning
CN110457689A (en) Semantic processes method and relevant apparatus
CN112035599A (en) Query method and device based on vertical search, computer equipment and storage medium
CN111310440A (en) Text error correction method, device and system
CN111782763A (en) Information retrieval method based on voice semantics and related equipment thereof
CN112650858B (en) Emergency assistance information acquisition method and device, computer equipment and medium
CN112115232A (en) Data error correction method and device and server
CN111966781B (en) Interaction method and device for data query, electronic equipment and storage medium
CN111708805A (en) Data query method and device, electronic equipment and storage medium
CN110888970A (en) Text generation method, device, terminal and storage medium
CN107480137A (en) With semantic iterative extraction network accident and the method that identifies extension event relation
CN116303537A (en) Data query method and device, electronic equipment and storage medium
CN110019714A (en) More intent query method, apparatus, equipment and storage medium based on historical results
CN117149804A (en) Data processing method, device, electronic equipment and storage medium
CN117708157A (en) SQL sentence generation method and device
CN117932022A (en) Intelligent question-answering method and device, electronic equipment and storage medium
CN117609468A (en) Method and device for generating search statement

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
WD01 Invention patent application deemed withdrawn after publication

Application publication date: 20190716