CN106326452A - Method for human-machine dialogue based on contexts - Google Patents
Method for human-machine dialogue based on contexts Download PDFInfo
- Publication number
- CN106326452A CN106326452A CN201610742179.7A CN201610742179A CN106326452A CN 106326452 A CN106326452 A CN 106326452A CN 201610742179 A CN201610742179 A CN 201610742179A CN 106326452 A CN106326452 A CN 106326452A
- Authority
- CN
- China
- Prior art keywords
- context
- theme
- data
- participle
- key item
- 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
Links
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/90—Details of database functions independent of the retrieved data types
- G06F16/903—Querying
- G06F16/9032—Query formulation
- G06F16/90332—Natural language query formulation or dialogue systems
Landscapes
- Engineering & Computer Science (AREA)
- Physics & Mathematics (AREA)
- Mathematical Physics (AREA)
- Databases & Information Systems (AREA)
- Theoretical Computer Science (AREA)
- Artificial Intelligence (AREA)
- Computational Linguistics (AREA)
- Data Mining & Analysis (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
Abstract
The invention relates to the technical field of human-machine dialogue, and in particular to a method for human-machine dialogue based on contexts. The method comprises the following steps of receiving a user problem sent by a client, and segmenting words of the user problem, so as to obtain a plurality of word segment data; matching the word segment data and a priority query template or a problem query template prestored in a server corresponding to a context topic, so as to determine the context topic corresponding to the user problem; extracting a keyword set of the user problem from the word segment data, or extracting a key item corresponding to the missed keyword from a determined key item set of the context topic; according to the keyword set and the key item, obtaining a corresponding answer from a database of the server, and replying to the client. The method has the advantage the by combining with a method of understanding the user problem according to the context information, the understanding accuracy on the semantics of the user problem is effectively improved, and the accuracy of the answer is improved.
Description
Technical field
The present invention relates to interactive field, particularly relate to a kind of interactive method based on context.
Background technology
Interactive method is the problem that machine obtains user's input at present, then by natural language understanding module to asking
Topic carries out semantic understanding, provides corresponding answer according to semanteme.The drawback that this method exists is, if asking of being given of user
Topic information is not complete, but to when problem is relevant before, only can not meet according to the semantic answer effect obtained of current problem
Expected Results, namely such answer do not meet the dialog procedure of actual persons and people.
Summary of the invention
In view of above-mentioned technical problem, the present invention provides a kind of interactive method based on context, is understanding that user asks
During topic, understand problem in conjunction with context, so can promote the accuracy to customer problem semantic understanding.
The present invention solves the main technical schemes of above-mentioned technical problem:
A kind of interactive method based on context, it is characterised in that including:
Receive the customer problem that client sends, described customer problem is carried out participle to obtain some participle data;
Described participle data are matched with being pre-stored in server the preferential query template corresponding with context theme, to determine
The context theme corresponding with described customer problem, and the described context theme determined comprise the key item required for inquiry
Set;
According to the described context theme determined from described participle extracting data inquire about required for keyword set;If it is described
Participle data not exclusively comprise all key words in described keyword set, then from the pass of the described context theme determined
The key item corresponding with the key word lacked is extracted in key item set;
According to described context theme, described keyword set and the described key item corresponding with the key word of disappearance determined,
From the data base of server, obtain corresponding answer return back to client.
Preferably, above-mentioned interactive method based on context, wherein, if described participle data are preferentially looked into described
When inquiry template cannot be mated:
Described participle data are matched with being pre-stored in server the problem query template corresponding with context theme, to determine
The context theme corresponding with described customer problem;And
Continue to extract described keyword set.
Preferably, above-mentioned interactive method based on context, wherein, described keyword set is replaced described pass
Key item corresponding in key item set.
Preferably, above-mentioned interactive method based on context, wherein, if described participle data are looked into described problem
When inquiry template cannot be mated:
Described participle data are matched with all of theme template, to determine the theme of described customer problem;And
From the key word of customer problem described in described participle extracting data, and according to described key word and described theme, from institute
State and data base obtains corresponding answer return back to client.
Preferably, above-mentioned interactive method based on context, wherein, described theme is replaced as a new theme
The context theme the earliest of storage in described server, and using the key word of described customer problem as the pass of described new theme
Key item.
Preferably, above-mentioned interactive method based on context, wherein, if described participle data are described with all of
When theme template all cannot be mated:
Described participle data are matched with the problem of prestoring in server, and chooses the answer of the highest problem that prestores of matching degree
Return back to client.
Preferably, above-mentioned interactive method based on context, wherein, if in described participle data and server
When the described problem that prestores all cannot be mated, choose other the unrelated answers prestored in described data base and return back to as answer
Client.
Technique scheme has the advantage that or beneficial effect:
The customer problem received from client is carried out participle by the present invention, obtains forming each lexical data of customer problem,
Then by these lexical datas and the preferential query template corresponding with context theme being pre-stored in server, problem inquiry mould
Plate or all of theme template match;And from these lexical datas, extract the keyword set of customer problem, and comprise
Corresponding in the key item sets match of the context theme determined, according to key word and key item, obtain corresponding from data base
Answer return back to client as answer.The method understanding customer problem by this combination contextual information, Ke Yiyou
Effect promotes the semantic understanding accuracy for customer problem, thus promotes the accuracy of answer.
Accompanying drawing explanation
With reference to appended accompanying drawing, to be described more fully embodiments of the invention.But, appended accompanying drawing be merely to illustrate and
Illustrate, be not intended that limitation of the scope of the invention.
Fig. 1 is based on context the interactive flow chart of the present invention.
Detailed description of the invention
In the following description, a large amount of concrete details is given to provide more thorough understanding of the invention.Certainly remove
Outside these describe in detail, the present invention can also have other embodiments.
Reference Fig. 1, the interactive method based on context of the present invention, including:
The first step, receives the customer problem that client sends, customer problem carries out participle to obtain some participle data (participles
Data include the sentence pattern data for representing sentence pattern belonging to customer problem and for representing the key word of customer problem key message
Data);
Second step, by participle data (such as extracting sentence pattern data therein) be pre-stored in server corresponding with context theme
Preferential query template match, to determine the context theme corresponding with customer problem, and in this context theme determined
Comprise the key item set required for inquiry;
3rd step, according to the context theme determined from keyword set (namely the generation required for participle extracting data is inquired about
The keyword data of table customer problem key message), if participle data not exclusively comprise the keyword set required for inquiry
In all key words, then the key item set of the context theme determined from previous step is extracted corresponding with the key word lacked
Key item;
4th step, the context theme determined according to above-mentioned, keyword set and the key item corresponding with the key word of disappearance, from
The data base of server obtains corresponding answer and returns back to client.
Further, in second step, if participle data cannot be mated with preferential query template, then by participle data with
It is pre-stored in server the problem query template corresponding with context theme to match, corresponding with customer problem upper and lower to determine
Literary composition theme;And continue the steps such as extraction keyword set below.
Accordingly, after determining the context theme mated with customer problem, the keyword set of customer problem being replaced should
Key item corresponding in the key item set of the context theme determined.
Further, in second step, if participle data be pre-stored in server corresponding the asking with context theme
When topic query template also cannot mate, participle data are matched with all of theme template, to determine the theme of customer problem;
And from the key word of participle extracting data customer problem, then according to key word and theme, obtain corresponding from data base
Answer returns back to client.
Accordingly, the theme of this coupling is replaced the context theme the earliest of storage in server as a new theme,
And using the key word of customer problem as the key item of this new theme.
Continue, if participle data all cannot be mated with above-mentioned all of theme template, then by participle data and server
In the problem of prestoring match, and the answer choosing the highest problem that prestores of matching degree returns back to client.
Finally, if participle data all cannot be mated with all of problem that prestores in server, then choose in data base
Other the unrelated answers (answer of the most humorous humour, to divert the conversation to another topic) prestored return back to client as answer.
It should be noted that the above-mentioned keyword set mentioned refers to inquire about the collection of the value of required different field
Close, such as inquiring about field in " weather " theme is " city ", " date ", and the key item stored in the context theme of correspondence
For " Beijing ", " today ", customer problem be the key word in " that Shanghai " be " Shanghai ", disappearance is the value on " date ", then
Take from key item " today ", composition keyword set " Shanghai ", " today ".
The interactive method based on context of the present invention is elaborated below in conjunction with three specific embodiments.
Embodiment one:
The situation that the preferential query template corresponding with the context theme of storage matches:
Having " family information " in the theme stored, key item is: father, phone.
User sends problem: " that mother ".
Server receives customer problem " that mother ", is obtained by customer problem participle: " that ", " mother ", " " three
Individual participle data;
By " that ", " mother ", preferential query template corresponding to context theme " that the ... " coupling of " " and storage;
From customer problem, extract key word " mother " needed for template query, from the context theme of storage, obtain key item
" phone ";
The semanteme set according to this context theme is intended to obtain the phone of mother, then obtain corresponding answer from data base and return
Multiple to client;
And key word " mother " is replaced the key item " father " stored.
Embodiment two:
The situation of the problem query template coupling corresponding with the context theme of storage:
Having " family information " in the theme stored, key item is: father, phone.
User sends problem: " you be able to tell that me mother ".
Server receives customer problem " you be able to tell that me mother ", is obtained by this customer problem participle: " you ",
" energy ", " telling ", " I ", " mother ", " ", " " these participle data;
By " you ", " energy ", " telling ", " I ", " mother ", " ", " " preferential inquiry corresponding with the context theme of storage
Template could not be mated;
Again by " you ", " energy ", " telling ", " I ", " mother ", " ", " " look into the problem corresponding to context theme of storage
Inquiry template " tell me ... ... " coupling;
From customer problem, extract key word " mother " needed for template query, and from the context theme of storage, obtain key item
" phone ";
The semanteme set according to theme is intended to obtain the phone of mother, then obtain corresponding answer from data base and return back to client
End;
And key word " mother " is replaced the key item " father " stored.
Embodiment three
The situation mated is carried out with all theme templates:
Having " family information " in the theme stored, keyword is: father, phone.
If user asks " hows your day for Beijing weather ".
Server receives customer problem " hows your day for Beijing weather ", is obtained by problem participle: " Beijing ", " weather ",
" today ", " how " several participle data;
By how preferential query template corresponding with the context theme of storage to " Beijing ", " weather ", " today ", " " could not
Join;
How again the problem query template that " Beijing ", " weather ", " today ", " " are corresponding with the context theme of storage is not had yet
Can coupling;
How continue to mate " Beijing ", " weather ", " today ", " " with all theme templates, find and " weather " is led
In topic " ... weather is how " can mate;
From customer problem, then obtain key word " Beijing " needed for template query;
The semanteme set according to theme is intended to " obtaining the weather forecast of Beijing today ", then obtain weather lookup chain from data base
Connect, thus inquiry obtains answer;
Finally " family information " theme is deleted, stores " weather " theme, and the key item of this theme is stored as " Beijing ",
" today ".
In sum, a kind of interactive method based on context disclosed by the invention, by receive from client
Customer problem carries out participle, obtain form customer problem each lexical data, then by these lexical datas be pre-stored in clothes
The preferential query template corresponding with context theme, problem query template or all of theme template in business device match;
And from these lexical datas, extract the keyword set of customer problem, with the key item collection being contained in the context theme determined
Close coupling correspondence, according to key word and key item, from data base, obtain corresponding answer return back to client as answer.Logical
Cross this combination contextual information to the method understanding customer problem, can effectively promote the semantic understanding for customer problem
Accuracy, thus promote the accuracy of answer.
For a person skilled in the art, after reading described above, various changes and modifications will be apparent to undoubtedly.
Therefore, appending claims should regard whole variations and modifications of true intention and the scope containing the present invention as.In power
The scope of any and all equivalence and content in the range of profit claim, be all considered as still belonging to the intent and scope of the invention.
Claims (7)
1. an interactive method based on context, it is characterised in that including:
Receive the customer problem that client sends, described customer problem is carried out participle to obtain some participle data;
Described participle data are matched with being pre-stored in server the preferential query template corresponding with context theme, to determine
The context theme corresponding with described customer problem, and the described context theme determined comprise the key item required for inquiry
Set;
According to the described context theme determined from described participle extracting data inquire about required for keyword set;If it is described
Participle data not exclusively comprise all key words in described keyword set, then from the pass of the described context theme determined
The key item corresponding with the key word lacked is extracted in key item set;
According to described context theme, described keyword set and the described key item corresponding with the key word of disappearance determined,
From the data base of server, obtain corresponding answer return back to client.
2. interactive method based on context as claimed in claim 1, it is characterised in that if described participle data and institute
State preferential query template when cannot mate:
Described participle data are matched with being pre-stored in server the problem query template corresponding with context theme, to determine
The context theme corresponding with described customer problem;And
Continue to extract described keyword set.
3. interactive method based on context as claimed in claim 1 or 2, it is characterised in that by described keyword set
Close and replace key item corresponding in described key item set.
4. interactive method based on context as claimed in claim 2, it is characterised in that if described participle data and institute
When the problem query template of stating cannot mate:
Described participle data are matched with all of theme template, to determine the theme of described customer problem;And
From the key word of customer problem described in described participle extracting data, and according to described key word and described theme, from institute
State and data base obtains corresponding answer return back to client.
5. interactive method based on context as claimed in claim 4, it is characterised in that described theme is new as
The context theme the earliest of storage in described server replaced in theme, and using the key word of described customer problem as described newly
The key item of theme.
6. interactive method based on context as claimed in claim 4, it is characterised in that if described participle data and institute
When the described theme template having all cannot be mated:
Described participle data are matched with the problem of prestoring in server, and chooses the answer of the highest problem that prestores of matching degree
Return back to client.
7. interactive method based on context as claimed in claim 6, it is characterised in that if described participle data and clothes
When the problem that prestores described in business device all cannot be mated, choose other the unrelated answers prestored in described data base as answering
Case returns back to client.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201610742179.7A CN106326452A (en) | 2016-08-26 | 2016-08-26 | Method for human-machine dialogue based on contexts |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201610742179.7A CN106326452A (en) | 2016-08-26 | 2016-08-26 | Method for human-machine dialogue based on contexts |
Publications (1)
Publication Number | Publication Date |
---|---|
CN106326452A true CN106326452A (en) | 2017-01-11 |
Family
ID=57791924
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201610742179.7A Pending CN106326452A (en) | 2016-08-26 | 2016-08-26 | Method for human-machine dialogue based on contexts |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN106326452A (en) |
Cited By (11)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN106844735A (en) * | 2017-02-13 | 2017-06-13 | 长沙军鸽软件有限公司 | A kind of method of the personal exclusive corpus of automatic foundation |
CN108062388A (en) * | 2017-12-15 | 2018-05-22 | 北京百度网讯科技有限公司 | Interactive reply generation method and device |
CN108804603A (en) * | 2018-05-29 | 2018-11-13 | 北京灵智优诺科技有限公司 | Man-machine written dialogue method and system, server, medium |
CN108897771A (en) * | 2018-05-30 | 2018-11-27 | 东软集团股份有限公司 | Automatic question-answering method, device, computer readable storage medium and electronic equipment |
CN109947907A (en) * | 2017-10-31 | 2019-06-28 | 上海挖数互联网科技有限公司 | Construction, response method and device, storage medium, the server of chat robots |
CN110019691A (en) * | 2017-07-19 | 2019-07-16 | 北京嘀嘀无限科技发展有限公司 | Conversation message treating method and apparatus |
CN110970021A (en) * | 2018-09-30 | 2020-04-07 | 航天信息股份有限公司 | Question-answering control method, device and system |
CN111462741A (en) * | 2020-03-02 | 2020-07-28 | 北京声智科技有限公司 | Voice data processing method, device and storage medium |
CN112182404A (en) * | 2020-10-23 | 2021-01-05 | 网易(杭州)网络有限公司 | Question query method, device, equipment and storage medium |
CN113572854A (en) * | 2021-08-10 | 2021-10-29 | 北京无线电测量研究所 | Kafka component-based data transmission method and system |
CN116842169A (en) * | 2023-09-01 | 2023-10-03 | 国网山东省电力公司聊城供电公司 | Power grid session management method, system, terminal and storage medium |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN104598445A (en) * | 2013-11-01 | 2015-05-06 | 腾讯科技(深圳)有限公司 | Automatic question-answering system and method |
CN104731895A (en) * | 2015-03-18 | 2015-06-24 | 北京京东尚科信息技术有限公司 | Auto-answer method and device |
US20160034568A1 (en) * | 2012-12-28 | 2016-02-04 | Alla Pavlovna TUZOVA | Computer-Based Method of Processing of Machine-Readable Information |
CN105653619A (en) * | 2015-12-25 | 2016-06-08 | 上海智臻智能网络科技股份有限公司 | Update method and device of correct log library in intelligent question-answering system |
-
2016
- 2016-08-26 CN CN201610742179.7A patent/CN106326452A/en active Pending
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20160034568A1 (en) * | 2012-12-28 | 2016-02-04 | Alla Pavlovna TUZOVA | Computer-Based Method of Processing of Machine-Readable Information |
CN104598445A (en) * | 2013-11-01 | 2015-05-06 | 腾讯科技(深圳)有限公司 | Automatic question-answering system and method |
CN104731895A (en) * | 2015-03-18 | 2015-06-24 | 北京京东尚科信息技术有限公司 | Auto-answer method and device |
CN105653619A (en) * | 2015-12-25 | 2016-06-08 | 上海智臻智能网络科技股份有限公司 | Update method and device of correct log library in intelligent question-answering system |
Cited By (18)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN106844735A (en) * | 2017-02-13 | 2017-06-13 | 长沙军鸽软件有限公司 | A kind of method of the personal exclusive corpus of automatic foundation |
CN110019691A (en) * | 2017-07-19 | 2019-07-16 | 北京嘀嘀无限科技发展有限公司 | Conversation message treating method and apparatus |
CN109947907A (en) * | 2017-10-31 | 2019-06-28 | 上海挖数互联网科技有限公司 | Construction, response method and device, storage medium, the server of chat robots |
CN108062388A (en) * | 2017-12-15 | 2018-05-22 | 北京百度网讯科技有限公司 | Interactive reply generation method and device |
CN108062388B (en) * | 2017-12-15 | 2021-09-17 | 北京百度网讯科技有限公司 | Reply generation method and device for man-machine conversation |
CN108804603B (en) * | 2018-05-29 | 2021-07-23 | 北京灵智优诺科技有限公司 | Man-machine written dialogue method and system, server and medium |
CN108804603A (en) * | 2018-05-29 | 2018-11-13 | 北京灵智优诺科技有限公司 | Man-machine written dialogue method and system, server, medium |
CN108897771A (en) * | 2018-05-30 | 2018-11-27 | 东软集团股份有限公司 | Automatic question-answering method, device, computer readable storage medium and electronic equipment |
CN110970021B (en) * | 2018-09-30 | 2022-03-08 | 航天信息股份有限公司 | Question-answering control method, device and system |
CN110970021A (en) * | 2018-09-30 | 2020-04-07 | 航天信息股份有限公司 | Question-answering control method, device and system |
CN111462741A (en) * | 2020-03-02 | 2020-07-28 | 北京声智科技有限公司 | Voice data processing method, device and storage medium |
CN111462741B (en) * | 2020-03-02 | 2024-02-02 | 北京声智科技有限公司 | Voice data processing method, device and storage medium |
CN112182404A (en) * | 2020-10-23 | 2021-01-05 | 网易(杭州)网络有限公司 | Question query method, device, equipment and storage medium |
CN112182404B (en) * | 2020-10-23 | 2023-08-11 | 网易(杭州)网络有限公司 | Question query method, device, equipment and storage medium |
CN113572854A (en) * | 2021-08-10 | 2021-10-29 | 北京无线电测量研究所 | Kafka component-based data transmission method and system |
CN113572854B (en) * | 2021-08-10 | 2023-11-14 | 北京无线电测量研究所 | Data transmission method and system based on Kafka component |
CN116842169A (en) * | 2023-09-01 | 2023-10-03 | 国网山东省电力公司聊城供电公司 | Power grid session management method, system, terminal and storage medium |
CN116842169B (en) * | 2023-09-01 | 2024-01-12 | 国网山东省电力公司聊城供电公司 | Power grid session management method, system, terminal and storage medium |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN106326452A (en) | Method for human-machine dialogue based on contexts | |
KR102030078B1 (en) | Method of and system for inferring user intent in search input in a conversαtional interaction system | |
CN106407178B (en) | A kind of session abstraction generating method, device, server apparatus and terminal device | |
CN101986293B (en) | For presenting the method and apparatus of search answer information in search interface | |
CN108984650B (en) | Computer-readable recording medium and computer device | |
CN102567509B (en) | Method and system for instant messaging with visual messaging assistance | |
CN105095195A (en) | Method and system for human-machine questioning and answering based on knowledge graph | |
CN109033284A (en) | The power information operational system database construction method of knowledge based map | |
JP2011134334A (en) | System and method for identifying topics for short text communications | |
CN108304424B (en) | Text keyword extraction method and text keyword extraction device | |
CN102984050A (en) | Method, client and system for searching voices in instant messaging | |
CN108710647A (en) | A kind of data processing method and device for chat robots | |
CN109643314A (en) | Information processing unit, information processing method and program | |
CN112667909B (en) | Method and device for recommending scenes in smart home | |
CN105279159B (en) | The reminding method and device of contact person | |
CN104731874A (en) | Evaluation information generation method and device | |
CN103177039A (en) | Data processing method and data processing device | |
KR20150041592A (en) | Method for updating contact information in callee electronic device, and the electronic device | |
KR101677859B1 (en) | Method for generating system response using knowledgy base and apparatus for performing the method | |
CN109727592A (en) | O&M instruction executing method, medium and terminal based on natural language speech interaction | |
CN110727764A (en) | Phone operation generation method and device and phone operation generation equipment | |
CN105956023A (en) | Method and system for rarely-used character library network application | |
CN113850083A (en) | Method, device and equipment for determining broadcast style and computer storage medium | |
CN108153802A (en) | Session proxy, response sentence generation method and computer-readable non-volatile memory medium | |
CN113408736B (en) | Processing method and device of voice semantic model |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
C10 | Entry into substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
RJ01 | Rejection of invention patent application after publication |
Application publication date: 20170111 |
|
RJ01 | Rejection of invention patent application after publication |