CN108763355B - User-based intelligent robot interactive data processing system and method - Google Patents

User-based intelligent robot interactive data processing system and method Download PDF

Info

Publication number
CN108763355B
CN108763355B CN201810468016.3A CN201810468016A CN108763355B CN 108763355 B CN108763355 B CN 108763355B CN 201810468016 A CN201810468016 A CN 201810468016A CN 108763355 B CN108763355 B CN 108763355B
Authority
CN
China
Prior art keywords
theme
sentence
question
topic
keywords
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201810468016.3A
Other languages
Chinese (zh)
Other versions
CN108763355A (en
Inventor
庄永军
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shenzhen Sanbao Innovation Intelligence Co ltd
Original Assignee
Shenzhen Sanbao Innovation Intelligence 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 Shenzhen Sanbao Innovation Intelligence Co ltd filed Critical Shenzhen Sanbao Innovation Intelligence Co ltd
Priority to CN201810468016.3A priority Critical patent/CN108763355B/en
Publication of CN108763355A publication Critical patent/CN108763355A/en
Application granted granted Critical
Publication of CN108763355B publication Critical patent/CN108763355B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • 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/20Natural language analysis
    • G06F40/205Parsing
    • G06F40/211Syntactic parsing, e.g. based on context-free grammar [CFG] or unification grammars

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Health & Medical Sciences (AREA)
  • Artificial Intelligence (AREA)
  • Audiology, Speech & Language Pathology (AREA)
  • Computational Linguistics (AREA)
  • General Health & Medical Sciences (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
  • Machine Translation (AREA)

Abstract

The invention discloses an intelligent robot interactive data processing system based on a user, which comprises a question understanding unit, an information retrieval unit, an answer extraction unit and a question and answer knowledge base unit, wherein the question understanding unit is connected with the information retrieval unit, the information retrieval unit is also connected with the answer extraction unit, and the answer extraction unit is also connected with the question and answer knowledge base unit.

Description

User-based intelligent robot interactive data processing system and method
Technical Field
The invention relates to the technical field of artificial intelligence, in particular to an intelligent robot interactive data processing system and method based on users.
Background
Question-answering systems have been a very popular research direction in the field of natural language processing. One could submit questions in natural language to a question-and-answer system that would return answers that are both compact and accurate, rather than just a collection of web pages as in a search engine. The goal of the question-and-answer system is to find the exact answer to the question, rather than returning a full-text document or the best matching article as with an information retrieval system. Although computing resources and storage resources have advanced greatly in the 21 st century, human-computer interaction has not changed much, and especially the way in which users obtain information is not efficient. The method has important significance for promoting the development of a man-machine interaction mode by researching the intelligent robot correlation technique-dialogue understanding problem.
With the development of information technology, the current intelligent robot can not only answer a certain question of a user, but also can communicate with the user in a humanized manner to know the requirement of the user, like a good friend of the user, but the question-answer interaction system adopted by the current intelligent robot has poor question-sentence semantic understanding correlation of the user, so that the returned result is not required by the user.
Disclosure of Invention
The invention aims to provide an intelligent robot interactive data processing system and method based on users, so as to solve the problems in the background technology.
In order to achieve the purpose, the invention provides the following technical scheme:
the intelligent robot interactive data processing system based on the user comprises a question understanding unit, an information retrieval unit, an answer extraction unit and a question and answer knowledge base unit, wherein the question understanding unit is connected with the information retrieval unit, the information retrieval unit is also connected with the answer extraction unit, and the answer extraction unit is also connected with the question and answer knowledge base unit.
An intelligent robot interaction data processing method based on users comprises the following steps:
A. a user inputs a question;
B. the system obtains a word set and corresponding parts of speech through Chinese word segmentation, so that the user can correctly understand the question of the user to obtain the intention of asking the question, and meanwhile, key words are required to be extracted;
C. classifying the subjects of the question sentences according to the intention of asking questions, and carrying out different treatments on different subject types; if the subject is the smile subject, randomly returning a smile from the smile database as output; if the question is a chat topic, calculating the similarity between a user input sentence and a question sentence in an existing question-answer knowledge base, and outputting the answer of the question sentence by finding the question sentence with the highest similarity; if the topic is a weather topic, judging whether the topic is in an initial state, if the topic is in the initial state, setting the 'place' as a positioning place, setting the 'time' as today and setting other variables as null, if keywords such as 'reminding', 'weather', 'joke' and the like appear in a sentence input by a user, adding 1 score to the topic corresponding to the keywords, and if the score of a certain topic is the highest, entering the topic in the current turn of conversation, but if the keywords do not appear, entering a chatty topic; if the current sentence is in the non-initial time state, initializing the scores of all the topics to be 0, but not initializing the global variable, adding 0.5 to the weather topic, and simultaneously judging whether the current sentence contains the keywords: if a certain theme keyword appears in the input sentence, adding 1 score to the theme, and when the score exceeds the theme of the previous turn, the current turn of the dialogue enters the theme where the keyword is located, and the theme code block is adopted to complete the current dialogue; if the sentence input this time does not contain the keyword, further judgment needs to be carried out to determine that the keyword of "time", "place" or "weather" appears in the sentence input this time: if so, entering a weather theme; if not, entering a chatting subject; if the user inputs a topic, judging whether the topic is in an initial state, if the topic is in the initial state, setting the 'place' as a positioning place, setting the 'time' as today and setting other variables as null, if keywords such as 'reminding', 'weather', 'joke' and the like appear in a sentence input by the user, adding 1 score to the topic corresponding to the keywords, and if a certain topic has the highest score, entering the topic in the current turn of conversation, but if the keywords do not appear, entering a chatty topic; if the input sentence is in a non-initial time state, initializing the scores of all the topics to be 0, but not initializing the global variable, adding 0.5 point to the reminding topic, and simultaneously judging whether the input sentence contains the keywords: if a certain theme keyword appears in the input sentence, adding 1 score to the theme, and when the score exceeds the theme of the previous turn, the current turn of the dialogue enters the theme where the keyword is located, and the theme code block is adopted to complete the current dialogue; if the sentence input this time does not contain the keyword, further judgment needs to be carried out to determine that the keywords of "time", "verb phrase" and "reminding" appear in the sentence input this time: if yes, entering a reminding subject; and if not, entering the chatting subject.
Compared with the prior art, the invention has the beneficial effects that: the invention completes the question and answer interaction between the robot and the user by realizing four question and answer inquiry functions of weather, reminding intention, joke story, chatting and the like, improves the man-machine interaction, can quickly extract the information required by the machine, and saves a large amount of time.
Drawings
FIG. 1 is a block diagram of the present invention
FIG. 2 is a flow chart of the method of the present invention.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
Referring to fig. 1-2, in an embodiment of the present invention, an intelligent robot interactive data processing system based on a user includes a question understanding unit, an information retrieving unit, an answer extracting unit, and a question and answer knowledge base unit, where the question understanding unit is connected to the information retrieving unit, the information retrieving unit is further connected to the answer extracting unit, and the answer extracting unit is further connected to the question and answer knowledge base unit.
Problem understanding unit: the user question is correctly understood to obtain the intention of asking questions; the system carries out Chinese word segmentation on a question input by a user to obtain a word set and corresponding part of speech, and then carries out keyword extraction;
an information retrieval unit: the system classifies the subjects of the user question according to the obtained question intention, and the user question is divided into four types, namely reminding, weather, a joke story and chatting. Different theme types are processed differently, such as reminding and weather types, multi-turn dialogue processing is adopted, the system transmits the input of the dialogue to the corresponding theme module, multi-turn dialogue is carried out, and the final output of the corresponding module is obtained after all necessary information is obtained. The multi-round dialogue processing is that each input of the user is that a new round of dialogue is started to obtain a response, the current round of dialogue is completed, and the multi-round dialogue is completed by the user inputting and obtaining the response for multiple times.
The unit can be divided into an initial state module and a non-initial state module according to the theme classification logic, wherein the initial state module is that when a user uses the question-answering system for the first time, global variables in the question-answering system are all in the initial state, and any variable is not updated due to input of the user before. In an initial state, except that a 'place' is set as a positioning place, a 'time' is set as today, other variables are all null, if keywords such as 'reminding', 'weather', 'joke' and the like appear in a sentence input by a user, a score of 1 is added to a topic corresponding to the keywords, if a topic has the highest score, the current turn of conversation enters the topic, but if the keywords do not appear, the current turn of conversation enters a chatting topic.
The non-initial state module means that before the current round of conversation, the user inputs other sentences, and calls a subject module to complete the previous round of conversation, the global variable of the question-answering system is updated, and the subject of the global variable is not empty. At this time, the process can be divided into two cases: the sentence input this time contains the keyword or the sentence input this time does not contain the keyword. Meanwhile, each time a conversation starts, the score of each topic is initialized to 0, but the global variable is not initialized, and 0.5 is added to the topic entered by the previous round of the conversation, but if the topic of the previous round is a joke, 0.5 is not added to the topic score of the joke, because the joke does not relate to multiple rounds of conversations.
(1) The sentence input this time contains keywords.
If the key words appear in the input sentence, adding 1 point to the subjects, and the score exceeds the subjects of the previous turn, the current turn of the dialogue enters the subjects of the key words, and the subject code block is adopted to complete the current dialogue.
(2) The sentence inputted this time does not contain the keyword.
If no keyword appears in the input sentence, other topics will not be added, the obtained score is 0, the topic score entered in the previous dialog is the highest, and the current dialog still enters the same topic as the previous dialog. However, under the condition that the current and previous calls enter the same theme, if the entering is a reminder or a weather theme type, further judgment is carried out; if the chat topic is entered, the chat topic code block is directly called to complete the current round of conversation without judgment.
An answer extraction unit: according to the subject classification of the question of the user, the answer extraction unit is divided into four modules for processing, namely a reminding module, a weather module, a joke module and a chatting module.
A reminding module: after entering the reminding theme, further judgment is needed: if the keywords of 'time', 'verb phrase' or 'reminding' appear in the input sentence, the input sentence still remains in the reminding subject, and a corresponding reminding subject function code block is called to complete the conversation; if the keywords of 'time', 'verb phrase' and 'reminding' do not appear in the input sentence, the user enters the chatting subject instead, and a chatting subject code block is called to complete the conversation. The reminding theme needs to be processed in a multi-turn dialogue mode, each turn of the multi-turn dialogue needs to judge whether the reminding theme can be entered, and after the reminding theme is entered, whether the reminding theme needs to be changed into chatting needs to be judged.
A weather module: after entering the weather theme, further judgment is needed: if the keywords of time, place or weather appear in the input sentence, the input sentence still remains in the weather theme, and a corresponding weather theme function code block is called to complete the conversation; if the keywords of time, place and weather do not appear in the input sentence, the user enters the chatting subject instead, and a chatting subject code block is called to complete the conversation. And updating the global state variable dictionary status according to the occurrence of the keywords of time, place or weather in the input sentence, extracting time and place information from the global state variable dictionary status, acquiring weather information in the Chinese weather network, and outputting the weather information after processing.
A joke module: upon entering the joke topic module, a joke is randomly returned from the joke database as output.
A chatting module: and directly calling the chatting theme code block after entering the chatting theme module. In chatting topics, the similarity between a user input sentence and a question in an existing question-answer knowledge base needs to be calculated, and the answer of the question is output by finding the question with the highest similarity.
Question-answer knowledge base unit: and a plurality of question-answer pair sentences stored in the question-answer knowledge base, wherein each question sentence corresponds to one answer.
An intelligent robot interaction data processing method based on users comprises the following steps:
A. a user inputs a question;
B. the system obtains a word set and corresponding parts of speech through Chinese word segmentation, so that the user can correctly understand the question of the user to obtain the intention of asking the question, and meanwhile, key words are required to be extracted;
C. classifying the subjects of the question sentences according to the intention of asking questions, and carrying out different treatments on different subject types; if the subject is the smile subject, randomly returning a smile from the smile database as output; if the question is a chat topic, calculating the similarity between a user input sentence and a question sentence in an existing question-answer knowledge base, and outputting the answer of the question sentence by finding the question sentence with the highest similarity; if the topic is a weather topic, judging whether the topic is in an initial state, if the topic is in the initial state, setting the 'place' as a positioning place, setting the 'time' as today and setting other variables as null, if keywords such as 'reminding', 'weather', 'joke' and the like appear in a sentence input by a user, adding 1 score to the topic corresponding to the keywords, and if the score of a certain topic is the highest, entering the topic in the current turn of conversation, but if the keywords do not appear, entering a chatty topic; if the current sentence is in the non-initial time state, initializing the scores of all the topics to be 0, but not initializing the global variable, adding 0.5 to the weather topic, and simultaneously judging whether the current sentence contains the keywords: if a certain theme keyword appears in the input sentence, adding 1 score to the theme, and when the score exceeds the theme of the previous turn, the current turn of the dialogue enters the theme where the keyword is located, and the theme code block is adopted to complete the current dialogue; if the sentence input this time does not contain the keyword, further judgment needs to be carried out to determine that the keyword of "time", "place" or "weather" appears in the sentence input this time: if so, entering a weather theme; if not, entering a chatting subject; if the user inputs a topic, judging whether the topic is in an initial state, if the topic is in the initial state, setting the 'place' as a positioning place, setting the 'time' as today and setting other variables as null, if keywords such as 'reminding', 'weather', 'joke' and the like appear in a sentence input by the user, adding 1 score to the topic corresponding to the keywords, and if a certain topic has the highest score, entering the topic in the current turn of conversation, but if the keywords do not appear, entering a chatty topic; if the input sentence is in a non-initial time state, initializing the scores of all the topics to be 0, but not initializing the global variable, adding 0.5 point to the reminding topic, and simultaneously judging whether the input sentence contains the keywords: if a certain theme keyword appears in the input sentence, adding 1 score to the theme, and when the score exceeds the theme of the previous turn, the current turn of the dialogue enters the theme where the keyword is located, and the theme code block is adopted to complete the current dialogue; if the sentence input this time does not contain the keyword, further judgment needs to be carried out to determine that the keywords of "time", "verb phrase" and "reminding" appear in the sentence input this time: if yes, entering a reminding subject; and if not, entering the chatting subject.
The working principle of the invention is as follows: the invention obtains the word set and the corresponding part of speech after Chinese word segmentation, thereby correctly understanding the question of the user to obtain the intention of asking the question, correctly mastering the intention of asking the question, classifying the subjects of the question according to the intention of asking the question, and carrying out different treatments according to different subjects, such as reminding and weather by adopting a multi-turn conversation mode. Other questions and answers employ keyword-based search of knowledge bases to extract answers. And searching possible knowledge base question-answer pairs through the keywords, and then calculating and screening the most accurate answers from the question-answer pairs through sentences.
In light of the foregoing description of the preferred embodiment of the present invention, many modifications and variations will be apparent to those skilled in the art without departing from the spirit and scope of the invention. The technical scope of the present invention is not limited to the content of the specification, and must be determined according to the scope of the claims.

Claims (1)

1. An intelligent robot interaction data processing method based on users is characterized by comprising the following steps:
A. a user inputs a question;
B. the system obtains a word set and corresponding parts of speech through Chinese word segmentation, so that the user can correctly understand the question of the user to obtain the intention of asking the question, and meanwhile, key words are required to be extracted;
C. classifying the subjects of the question sentences according to the intention of asking questions, and carrying out different treatments on different subject types; if the subject is the smile subject, randomly returning a smile from the smile database as output; if the question is a chat topic, calculating the similarity between a user input sentence and a question sentence in an existing question-answer knowledge base, and outputting the answer of the question sentence by finding the question sentence with the highest similarity; if the topic is a weather topic, judging whether the topic is in an initial state, if the topic is in the initial state, setting the 'place' as a positioning place, setting the 'time' as today and setting other variables as null, if keywords such as 'reminding', 'weather', 'joke' appear in a sentence input by a user, adding 1 score to the topic corresponding to the keywords, and if the score of a certain topic is the highest, entering the topic in the current conversation, but if the keywords do not appear, entering a chatting topic; if the current sentence is in the non-initial time state, initializing the scores of all the topics to be 0, but not initializing the global variable, adding 0.5 to the weather topic, and simultaneously judging whether the current sentence contains the keywords: if a certain theme keyword appears in the input sentence, adding 1 score to the theme, and when the score exceeds the theme of the previous turn, the current turn of the dialogue enters the theme where the keyword is located, and the theme code block is adopted to complete the current dialogue; if the sentence input this time does not contain the keyword, further judgment needs to be carried out to determine that the keyword of "time", "place" or "weather" appears in the sentence input this time: if so, entering a weather theme; if not, entering a chatting subject; if the user inputs a theme, judging whether the theme is in an initial state, if the theme is in the initial state, setting the 'place' as a positioning place, setting the 'time' as today and setting other variables as null, if the keywords of 'reminding', 'weather' and 'joke' appear in a sentence input by the user, adding 1 score to the theme corresponding to the keywords, and if the score of a certain theme is the highest, entering the theme in the current turn of conversation, but if the keywords do not appear, entering a chatty theme; if the input sentence is in a non-initial time state, initializing the scores of all the topics to be 0, but not initializing the global variable, adding 0.5 point to the reminding topic, and simultaneously judging whether the input sentence contains the keywords: if a certain theme keyword appears in the input sentence, adding 1 score to the theme, and when the score exceeds the theme of the previous turn, the current turn of the dialogue enters the theme where the keyword is located, and the theme code block is adopted to complete the current dialogue; if the sentence input this time does not contain the keyword, further judgment needs to be carried out to determine that the keywords of "time", "verb phrase" and "reminding" appear in the sentence input this time: if yes, entering a reminding subject; and if not, entering the chatting subject.
CN201810468016.3A 2018-05-16 2018-05-16 User-based intelligent robot interactive data processing system and method Active CN108763355B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810468016.3A CN108763355B (en) 2018-05-16 2018-05-16 User-based intelligent robot interactive data processing system and method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810468016.3A CN108763355B (en) 2018-05-16 2018-05-16 User-based intelligent robot interactive data processing system and method

Publications (2)

Publication Number Publication Date
CN108763355A CN108763355A (en) 2018-11-06
CN108763355B true CN108763355B (en) 2021-12-17

Family

ID=64008218

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810468016.3A Active CN108763355B (en) 2018-05-16 2018-05-16 User-based intelligent robot interactive data processing system and method

Country Status (1)

Country Link
CN (1) CN108763355B (en)

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110222161B (en) * 2019-05-07 2022-10-14 北京来也网络科技有限公司 Intelligent response method and device for conversation robot
CN113779231B (en) * 2020-06-09 2024-04-26 中科云谷科技有限公司 Knowledge graph-based big data visual analysis method, device and equipment
CN112527965A (en) * 2020-12-18 2021-03-19 国家电网有限公司客户服务中心 Automatic question answering implementation method and device based on combination of professional library and chatting library
CN115440232B (en) * 2022-11-08 2023-03-24 深圳市人马互动科技有限公司 Joke segment processing method and device, electronic equipment and computer storage medium

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106847279A (en) * 2017-01-10 2017-06-13 西安电子科技大学 Man-machine interaction method based on robot operating system ROS

Family Cites Families (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101076184B (en) * 2006-07-31 2011-09-21 腾讯科技(深圳)有限公司 Method and system for realizing automatic reply
US20170262529A1 (en) * 2010-10-01 2017-09-14 Google Inc. Sponsor answers and user-approved, system-suggested links in a social search engine
CN105206284B (en) * 2015-09-11 2019-06-18 清华大学 Dredge the cyberchat method and system of adolescent psychology pressure
US10394829B2 (en) * 2015-12-08 2019-08-27 International Business Machines Corporation Content authoring
CN105824933B (en) * 2016-03-18 2019-02-26 苏州大学 Automatic question answering system based on main statement position and implementation method thereof
CN106570181B (en) * 2016-11-09 2020-07-28 武汉泰迪智慧科技有限公司 Intelligent interaction method and system based on context management

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106847279A (en) * 2017-01-10 2017-06-13 西安电子科技大学 Man-machine interaction method based on robot operating system ROS

Also Published As

Publication number Publication date
CN108763355A (en) 2018-11-06

Similar Documents

Publication Publication Date Title
RU2747425C2 (en) Real-time answer system to questions from different fields of knowledge
CN111353030B (en) Knowledge question and answer retrieval method and device based on knowledge graph in travel field
JP6309644B2 (en) Method, system, and storage medium for realizing smart question answer
CN108763355B (en) User-based intelligent robot interactive data processing system and method
CN106601237B (en) Interactive voice response system and voice recognition method thereof
CN108846138B (en) Question classification model construction method, device and medium fusing answer information
CN113505209A (en) Intelligent question-answering system for automobile field
CN108538294B (en) Voice interaction method and device
CN103886034A (en) Method and equipment for building indexes and matching inquiry input information of user
CN106446018B (en) Query information processing method and device based on artificial intelligence
CN109271524B (en) Entity linking method in knowledge base question-answering system
CN109829045A (en) A kind of answering method and device
CN113282711B (en) Internet of vehicles text matching method and device, electronic equipment and storage medium
CN110309504B (en) Text processing method, device, equipment and storage medium based on word segmentation
CN112328800A (en) System and method for automatically generating programming specification question answers
CN112632242A (en) Intelligent conversation method and device and electronic equipment
CN112527955A (en) Data processing method and device
CN113326702A (en) Semantic recognition method and device, electronic equipment and storage medium
CN113742446A (en) Knowledge graph question-answering method and system based on path sorting
CN112507089A (en) Intelligent question-answering engine based on knowledge graph and implementation method thereof
CN113918702B (en) Semantic matching-based online law automatic question-answering method and system
CN107562907B (en) Intelligent lawyer expert case response device
Ye et al. A sentiment based non-factoid question-answering framework
CN116956068A (en) Intention recognition method and device based on rule engine, electronic equipment and medium
CN116522905A (en) Text error correction method, apparatus, device, readable storage medium, and program product

Legal Events

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