CN105930367B - Intelligent chat robot control method and control device - Google Patents

Intelligent chat robot control method and control device Download PDF

Info

Publication number
CN105930367B
CN105930367B CN201610226768.XA CN201610226768A CN105930367B CN 105930367 B CN105930367 B CN 105930367B CN 201610226768 A CN201610226768 A CN 201610226768A CN 105930367 B CN105930367 B CN 105930367B
Authority
CN
China
Prior art keywords
chat
sentence
user
users
reply
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
CN201610226768.XA
Other languages
Chinese (zh)
Other versions
CN105930367A (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.)
South China Normal University
Original Assignee
South China Normal University
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 South China Normal University filed Critical South China Normal University
Priority to CN201610226768.XA priority Critical patent/CN105930367B/en
Publication of CN105930367A publication Critical patent/CN105930367A/en
Application granted granted Critical
Publication of CN105930367B publication Critical patent/CN105930367B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/903Querying
    • G06F16/9032Query formulation
    • G06F16/90332Natural 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 Transfer Between Computers (AREA)

Abstract

A control method and a control device based on an intelligent chat robot are disclosed, the method comprises the following steps: acquiring a user input sentence of a first user, matching the user input sentence with a sentence in a chat database, and acquiring a first chat sentence with the maximum matching degree in the chat database, wherein the maximum matching degree is greater than a preset value; if the first chat sentence has a next chat sentence, feeding the next chat sentence as a robot output sentence back to the first user; and if the first chat sentence does not have the next chat sentence, the user input sentence of the first user is used as the robot output sentence of the new topic and is sent to the N second users, the reply sentences returned by the N second users are received, and the reply sentences are used as the robot output sentence for the first user and are fed back to the first user. The invention also provides a corresponding intelligent chat robot control device. The invention enables the chat robot to have artificial intelligence and improves the Turing test passing rate.

Description

Intelligent chat robot control method and control device
Technical Field
The invention relates to the technical field of chat robots, in particular to a control method and a control device of an intelligent chat robot.
Background
The chat bot is one of the most important contents for artificial intelligence. With the rapid development of the robot technology, the functional requirements of users on the chat robot are higher and higher. If the user does not know whether the chat object is a person or a chat robot when chatting with the chat robot, the chat robot can pass Turing test, and the chat robot is proved to have artificial intelligence.
As shown in fig. 1, the conventional chat robots are all constructed based on a chat database, and a data table in the chat database generally includes two basic fields, a first field is a characteristic character or a word, and a second field is contents automatically replied. The content in the chat database needs to be added or imported manually with the reply text which is manually made in advance. The cost of manually creating a chat database is very high and it is not possible to list all possible auto-replies, which results in that the existing chat robots can only perform effective auto-replies on some commonly used user input sentences of the user, and if other user input sentences of the user do not have corresponding characteristic characters or sentences in the chat database, the chat robots do not know how to reply but only perform invalid auto-replies, such as reply "or" etc., as shown in fig. 2. Moreover, because the chat database is constructed manually, and the next chat sentence is not generated in natural chat of people, sometimes, the next chat sentence constructed by the constructor is only different from the next chat sentence generated in real chat of people, and the next chat sentence constructed manually is difficult to pass Turing test.
In summary, the traditional chat robot has the technical problem of low passing rate of the turing test due to the limitation of the full chat database.
Disclosure of Invention
Therefore, it is necessary to provide a control method and a control device for an intelligent chat robot, aiming at the technical problem of low Turing test passing rate of the traditional chat robot.
According to an aspect of the present invention, there is provided an intelligent chat robot control method, including the steps of:
acquiring a user input sentence of a first user, matching the user input sentence with a sentence in a chat database, and acquiring a first chat sentence with the maximum matching degree in the chat database, wherein the maximum matching degree is greater than a preset value;
if the first chat sentence has a next chat sentence, feeding the next chat sentence as a robot output sentence back to the first user;
and if the first chat sentence does not have a next chat sentence, sending the user input sentence of the first user to N second users as a robot output sentence of a new topic, receiving reply sentences returned by the N second users, and feeding back the reply sentences to the first user as the robot output sentence of the first user.
In one embodiment, the step of sending the user input sentence of the first user as the robot output sentence of the new topic to N second users, receiving the reply sentences returned by the N second users, and feeding back the reply sentences as the robot output sentences to the first user includes:
and sending the user input sentence of the first user to N second users as a robot output sentence of a new topic, receiving a reply sentence returned firstly from the N second users, and feeding back the reply sentence returned firstly as the robot output sentence to the first user.
In one embodiment, after the step of sending the robot output sentence of the first user as a new topic to the N second users, receiving the reply sentence returned first from the N second users, and feeding back the returned first reply sentence as a robot output sentence to the first user, the method further comprises the following steps:
and storing the user input sentence of the first user and the first returned reply sentence into a chat database as two continuous chat sentences.
In one embodiment, the method further comprises:
and if the reply sentence of the second user is not received within the preset time, reselecting N third users, sending the user input sentence of the first user to the third users as the robot output sentence of the new topic, receiving the reply sentence returned by the third users, and feeding back the reply sentence to the first user as the robot output sentence.
In one embodiment, if the first chat statement does not have a next chat statement, the user input statement of the first user is sent to N second users as a robot output statement of a new topic, reply statements returned by the N second users are received, and the reply statements are fed back to the first user as the robot output statement of the first user, where the second user is a user who does not currently join in a chat, and a value of N is a ratio of the number of users who do not currently join in the chat to the number of users who are currently participating in the chat.
According to another aspect of the present invention, there is also provided an intelligent chat robot control apparatus, including:
the chat database is used for storing experience chat sentences, and the experience chat sentences comprise a first chat sentence and a next chat sentence of the first chat sentence;
the retrieval matching module is respectively connected with the chat database and the selection module and is used for acquiring a user input sentence of a first user, matching the user input sentence with a sentence in the chat database and acquiring a first chat sentence with the maximum matching degree and the matching degree larger than a preset value in the chat database; if the first chat sentence has a next chat sentence, feeding the next chat sentence as a robot output sentence back to the first user; if the first chat sentence does not have a next chat sentence, sending a selection instruction to a selection module;
the selecting module is connected with the retrieval matching module and used for receiving a selecting instruction and selecting N second users after receiving the selecting instruction;
the learning module is connected with the selection module and used for sending the first chat sentence to N second users as a robot output sentence of a new topic; and the number of the first and second groups,
and the exercise module is used for receiving the reply sentences returned by the N second users and feeding back the reply sentences to the first user as robot output sentences for the first user.
In one embodiment, the exercise module receives a reply sentence returned first from the N second users, and feeds back the reply sentence returned first as a robot output sentence to the first user.
In one embodiment, the intelligent chat robot control device further includes a time limit module, where the time limit module records a preset time in advance, and if the reply statement of the second user is not received within the preset time, the time limit module sends a reply timeout instruction to the selection module, and the selection module receives the timeout instruction and then reselects N third users.
In one embodiment, the intelligent chat robot control device further includes a storage module, and the storage module is configured to store the user input sentence of the first user and the first returned reply sentence as two continuous chat sentences in a chat database.
In one embodiment, the selecting module includes:
the chat counting module is used for acquiring the number of users who do not join in the chat at present;
the idle counting module is used for acquiring the number of users participating in chatting currently;
the ratio module is used for calculating the ratio of the number of users who do not join the chat currently to the number of users who participate in the chat currently to obtain a value N; and the number of the first and second groups,
and the random selection module is used for randomly selecting N second users from the users who do not join in the chat.
The intelligent chat robot control method and the intelligent chat robot control device realize the automatic chat learning of the chat robot, and for one user input sentence sent by the first user, when the chat sentence meeting the matching degree requirement is not searched in the chat database, the user input sentence of the first user is used as the robot output sentence of a new topic and sent to the N second users, and the user input sentence which is replied to the robot output sentence by the N second users firstly is used as the robot output sentence replied to the first user. Compared with the prior art, the invention greatly improves the humanity, rationality and authenticity of the reply of the chat robot, so that the chat robot has artificial intelligence and the Turing test passing rate is greatly improved.
Drawings
FIG. 1 is a schematic diagram of a chat database of a chat robot constructed based on the chat database;
FIG. 2 is a schematic diagram of a chat robot constructed based on a chat database and chatting with a user;
FIG. 3 is a flow diagram of a method for intelligent chat robot control in one embodiment;
FIG. 4 is a schematic diagram of chat with a user using the intelligent chat robot control method in one embodiment;
FIG. 5 is a schematic diagram of the configuration of an intelligent chat robot control in one embodiment;
FIG. 6 is a schematic diagram of the structure of a selection module in one embodiment;
fig. 7 is a schematic diagram of the structure of the intelligent chat robot system in one embodiment.
Detailed Description
Referring to fig. 3, a method for controlling an intelligent chat robot includes the following steps:
step 102: and acquiring a user input sentence of a first user, matching the user input sentence with the sentences in the chat database, and acquiring the first chat sentence with the maximum matching degree in the chat database, wherein the maximum matching degree is greater than a preset value.
Specifically, a user input sentence sent by a first user is obtained, and the first chat sentence with the next chat sentence, which has the maximum matching degree with the user input sentence and the maximum matching degree greater than K%, is retrieved from the chat database.
Wherein K is greater than 0. It is understood that if K is 0, it is meaningless to arbitrarily take out a chat sentence from the chat database; the larger the value of K is, the smaller the possibility of successful retrieval is; when K is too large, the retrieval fails too much, so that too many first chat sentences need to perform the step of autonomously learning chat, and too much pressure is brought to the system; the smaller K is, the smaller the matching degree of the obtained first chat sentence and the input sentence of the user is; however, if K is too small, it will result in the resulting robot output sentence often matching the user input sentence "ox head is not facing horse mouth"; therefore, K needs to take an appropriate value so that the user is satisfied with the output chat statement in reply, while the system is not so stressed in operation. In a preferred embodiment, the value of K is 50 to 100, and preferably, the default value of K is 70.
The user input sentence of the user can be characters, voice or even video. In a preferred embodiment, the search is accomplished by invoking a search engine of the chat database. The next chat sentence of the chat sentences of the chat database which matches with the user input sentence with the maximum degree is obviously the most reasonable reply of the user input sentence of the user, the sentences can be expressed as character strings, the calculation of the sentence matching degree can be converted into the calculation of the character string matching degree or similarity, the existing calculation methods of the character string matching degree or similarity can be adopted, such as Edit distance method (Edit distance, which is used for calculating the minimum number of insertions, deletions and replacements required for converting the original string(s) to the target string (t), obviously when one sentence is edited into another sentence, the minimum number of insertions, deletions and replacements is smaller, the matching degree is larger), the maximum common substring LCS method (obviously, the longer the maximum common substring of two sentences is larger), and the like, and will not be described in detail herein.
Step 104: and if the first chat sentence has a next chat sentence, feeding the next chat sentence back to the first user as a robot output sentence.
Specifically, the first chat sentence is a chat sentence in which the matching degree with the user input sentence of the user satisfies the matching degree requirement in step 102, which is retrieved from all chat sentences in the chat database, and after the first chat sentence is obtained, the next chat sentence corresponding to the first chat sentence is retrieved from the chat database. And if the first chat sentence has a next chat sentence, the next chat sentence is used as a robot output sentence for the first user and is sent to the first user. The output manner of the robot output sentence to the first user can be a text manner, a voice manner, a video manner, or other manners, such as an expression manner.
Step 106: and if the first chat sentence does not have the next chat sentence, the user input sentence of the first user is used as the robot output sentence of the new topic and is sent to the N second users, the reply sentences returned by the N second users are received, and the reply sentences are used as the robot output sentence for the first user and are fed back to the first user.
Specifically, if the first chat sentence does not have the next chat sentence, the autonomous learning chat is performed, the user input sentence is sent to the N second users as the robot output sentence of the new topic for seeking the reply, and the obtained reply user input sentence is sent to the first user as the robot output sentence of the first user. If the first chat sentence has the next chat sentence, the reply sentence meeting the matching degree requirement exists in the chat database, so that the independent learning chat is not needed. When the first chat sentence does not have the next chat sentence, the answer suitable for the user input sentence of the first user cannot be found in the chat database, so that the self-learning chat is needed.
According to the intelligent chat robot control method, when the chat sentences meeting the matching degree requirement cannot be searched in the chat database, the self-learning chat is carried out, and the user input sentences of the first user are used as robot output sentences of the new topics and are sent to the N second users to seek the response. The method greatly improves the humanity, rationality and authenticity of the reply of the chat robot, so that the chat robot has artificial intelligence, and the passing rate of Turing tests is greatly improved.
In one embodiment, step 106 includes: and sending the user input sentence of the first user as the robot output sentence of the new topic to the N second users, receiving the reply sentence returned firstly from the N second users, and feeding back the reply sentence returned firstly as the robot output sentence to the first user.
Specifically, the N second users may reply to the robot output sentences in different orders, and in order to minimize the time for the first user to wait for the reply, the user input sentence replied first is used as the robot output sentence replied to the first user. And if more than two users reply to the robot output sentences at the same time, selecting one chat reply sentence as the robot output sentence replied to the first user. Specifically, a selection principle may be set according to actual needs, for example, one of the chat reply sentences may be randomly selected as the robot output sentence replied by the first user, and the longest chat reply sentence may also be selected as the robot output sentence replied by the first user.
In one embodiment, step 106 is followed by the steps of: and storing the user input sentence of the first user and the first returned reply sentence as two continuous chat sentences in a chat database.
Specifically, the user input sentence of the first user and the reply sentence returned first are stored in the chat database as two continuous chat sentences, that is, the user input sentence of the first user and the user input sentence returned first are stored in the chat database as experience chat sentences, so as to enrich the content of the chat database.
In this embodiment, in order to improve the chance of directly retrieving a sentence matching with a user input sentence of a user from a chat database in the future, a chat sentence obtained by autonomous learning is stored as an empirical chat sentence in the database to enrich the content of the chat database. When the maximum matching degree of a certain user input sentence in the future of the user and the chat sentence added into the chat database through the self-learning chat is larger than K%, the next chat sentence of the chat sentence in the chat database can be directly used as the reply of the user input sentence of the user without the self-learning chat, the system pressure is reduced, and the speed of replying the user is improved.
In one embodiment, step 106 further comprises the steps of: and if the reply sentences of the second user are not received within the preset time, the N third users are reselected, the user input sentences of the first user are used as robot output sentences of the new topics, the robot output sentences are sent to the third users, the reply sentences returned by the third users are received, and the reply sentences are fed back to the first user as robot output sentences.
Specifically, the preset time is t seconds. And when the N second users do not reply within the preset time t seconds, reselecting N third users to perform autonomous learning and seek reply. When the N second users do not reply within the limited time t seconds, other users should be reselected to seek the reply again, otherwise, the first user cannot wait until the reply sentence is that the chat robot abandons the chat. Further, t is a natural number greater than 0, and the value of t can be set arbitrarily according to the actual application condition. In one embodiment, t is (1-60) s. The waiting time is longer if t is larger, and shorter if t is smaller. If t is too large, the first user will wait too long for the reply, and if t is too small, the first user will not have time to reply to the chat robot, so t should take a suitable length of time. In a preferred embodiment, since it generally takes 3 seconds for any one of the N second users to type a response, t is set to 3 seconds. However, in this embodiment, the value of t being 3 seconds is only one embodiment, and is not intended to limit the present invention.
In one embodiment, if a plurality of second users return reply sentences within a preset time t seconds, the reply sentences returned by all the second users are received, and the user input sentence of the first user and each received reply sentence are respectively added into the chat database as two continuous chat sentences. In this embodiment, all second user reply sentences obtained within a preset time in the autonomous learning chat process are stored as experience chat sentences in the chat database to enrich the content of the chat database. As described above, the user reply sentence obtained by the autonomous learning chat is stored in the chat database as the experience chat sentence, so that the content of the chat data can be enriched, the chance of matching with the user input sentence of the user in the chat database in the future is improved, the system pressure is reduced, and the speed of replying the user is improved.
In an embodiment, the second user is a user who is not currently participating in a chat, where the value of N is a ratio of the number of users who are not currently participating in the chat to the number of users who are currently participating in the chat. The selection of the N second users specifically comprises the following steps:
first, the number of users who are not currently participating in the chat is obtained N1.
Second, the number of users currently participating in the chat is obtained N2.
Then, calculating the ratio of the number N1 of users who do not join the chat currently to the number N2 of users who participate in the chat currently, rounding up the ratio result to obtain N,
Figure GDA0002417024630000081
and finally, randomly selecting N second users from the users who do not join in the chat.
Furthermore, the third user is a user who does not join in the chat currently and has not been selected as the second user, in the selection process of the N third users, the N third users are randomly selected from the users who do not join in the chat currently and have not been selected as the second user, and other steps are the same as the selection process of the N second users, which is not described herein again.
In this embodiment, in order to reduce the system pressure and improve the calculation efficiency, the value of N is set to be the ratio of the number N1 of users who do not join the chat currently to the number N2 of users who are participating in the chat currently. However, it should be noted that the present invention is not limited to this, for example, the number of N may also be randomly selected, and therefore, the above value of N as the ratio of the number of users currently not participating in the chat N1 to the number of users currently participating in the chat N2 is only an embodiment, and is not intended to limit the present invention.
The following describes in detail a process of chatting with a user by applying the above-described intelligent chat robot control method in conjunction with a specific embodiment. For convenience of description, in this embodiment, K is 70, and the preset time t is 3 seconds.
Fig. 4 is a schematic diagram of chat with a user by applying an intelligent chat robot control method in an embodiment.
When the first user says that the 'my belly is good and painful' with the intelligent chat robot, the intelligent chat robot searches the chat sentences with the maximum matching in the chat database to find that the 'my belly is painful', the matching degree is more than 70%, and therefore the 'my belly is painful' as the first chat sentences. Then, the chat sentence "how do i feel pain in the belly? What is the "corresponding next chat sentence", why is the belly sore? Is there a cold? "reply to user U.
When the first user says 'King finds you' with the chat robot, the intelligent chat robot does not search the chat sentences with the matching degree of 'King finds you' more than 70% in the chat database.At this time, the intelligent chat robot performs the autonomous learning chat, acquires the number N1 of users who are not currently participating in the chat as 3000, acquires the number N2 of users who are currently participating in the chat as 1000, and calculates
Figure GDA0002417024630000091
Randomly selecting 3 second users from the users who do not chat with the intelligent chat robot, and sending the user input sentences of the first users to the second users as robot output sentences of the new topics. Which is one of the users the first to reply to? ", the reply time is 2 seconds, within a defined 3 seconds, so the intelligent chat robot will" which queen? "reply to user U and find you with" the queen "," which queen? "as a continuous chat statement, and when the other two second users also reply within 3s, the corresponding chat statement is also added to the chat database.
The whole process is automatically completed by the intelligent chatting robot. The intelligent chat robot learns autonomously from multiple users, and the obtained sentences replied to the user are actually sentences replied to the robot by other users, so that the chat robot chats with the users, and basically chats among different users, but the users feel that the chat robot chats with the users, so that the replies of the chat robot are reasonable and real, and the Tulinger test can be passed; as the chat robot independently learns from multiple users, the chat database is more and more abundant, the matching degree of the first chat sentence and the user input sentence of the user is inevitably higher and higher, so that the reply of the chat robot is more and more reasonable and more real, and the passing rate of the Turing test is more and more improved.
Specifically, the intelligent chat robot of the present embodiment is a comprehensive robot, and includes all machines capable of simulating human behaviors or ideas and simulating other creatures, which can interact with a user, and also includes some computer programs, such as qq chat robot programs.
Referring to fig. 5, based on the above-mentioned intelligent chat robot control method, the present invention further provides an intelligent chat robot control apparatus, which includes a chat database 502, a search matching module 504, a selecting module 506, a learning module 508, an exercise module 510, a time limit module 512, and a storage module 514. Wherein:
the chat database 502 is used to store empirical chat statements including a first chat statement and a next chat statement of the first chat statement.
Specifically, the chat statements in the chat database 502 are ordered, most of the chat statements have the next chat statement, and only the last chat statement at the end of the chat has no next chat statement. The chat database 502 may store chat data in a form of text in rows, or in a form of data table in rows, where each chat statement is used as a row in a text file or data table, and the chat statements are stored in sequence according to the actual sequence of human chat. The previous chat sentence of a chat sentence is stored in the previous line of the line where the chat sentence is located, and the next chat sentence of a chat sentence is stored in the next line of the line where the chat sentence is located. The data collection range in the chat database 502 includes chat data, including chat data of a chat robot or human chat data, which may be in the form of text, voice, video, and other information, and these data may be imported into the chat database 502 in batch, or incrementally added into the chat database 502 in real time.
The retrieval matching module 504 is respectively connected to the chat database 502 and the selection module 506, and is configured to obtain a user input sentence of the first user, match the user input sentence with a sentence in the chat database, and obtain a first chat sentence in the chat database with a maximum matching degree and the matching degree being greater than a preset value; if the first chat sentence has a next chat sentence, feeding the next chat sentence as a robot output sentence back to the first user; and if the first chat sentence does not have the next chat sentence, sending a selection instruction to the selection module.
Specifically, the retrieval matching module 504 retrieves the first chat sentence from the chat database 502, which has the maximum matching degree with the user input sentence of the first user and the maximum matching degree is greater than K%. In one embodiment, the value of K is 50-100, and in a preferred embodiment, the default value of K is 70.
In this embodiment, the search matching module 504 is a search engine integrated in the chat database 502, the search engine can perform fuzzy matching of sentences, support text, voice and video search and fuzzy matching, and search out a chat sentence with the largest matching degree with a sentence input by a user from all chat sentences in the chat database 502 through the search engine. In one embodiment, the speed of chat database 502 and its retrieval engine may also be increased by cloud storage and cloud computing technologies.
The selecting module 506 is connected to the retrieving and matching module 504, and configured to receive a selecting instruction, and select N second users after receiving the selecting instruction.
The learning module 508 is connected to the selecting module 506, and is configured to send the first chat statement to the N second users as a robot output statement of a new topic.
The exercise module 510 is configured to receive reply sentences returned by the N second users, and feed back the reply sentences to the first user as robot output sentences for the first user.
Specifically, the exercise module 510 receives the reply sentence returned first from the N second users, and feeds back the reply sentence returned first as the robot output sentence to the first user.
The time limit module 512 is connected to the selecting module 506 and the practicing module 510, respectively, the time limit module 512 records a preset time in advance, if the practicing module 510 does not receive the reply sentence of the second user within the preset time, the time limit module 512 sends a reply timeout instruction to the selecting module 506, and the selecting module 506 re-selects N third users after receiving the timeout instruction.
The storage module 514 is connected to the chat data 502 and the exercise module 510, respectively, and the storage module 514 is configured to store the user input sentence of the first user and the first returned reply sentence as two consecutive chat sentences in the chat database 502.
Specifically, the storage module 514 stores the user input sentence of the first user and the user input sentence replied first as experience chat sentences in the chat database 502 to enrich the content of the chat database 502. Further, the storage module 514 stores all second user reply sentences obtained within a preset time as experience chat sentences into the chat database to enrich the content of the chat database. If a plurality of second users return reply sentences within the preset time t seconds, the contact module 510 receives reply sentences returned by all the second users, and the storage module 514 adds the user input sentence of the first user and each received reply sentence as two continuous chat sentences into the chat database.
As shown in fig. 6, in one embodiment, the selecting module 506 includes:
the chat statistic module 506a is configured to obtain the number of users who do not join the chat currently.
And an idle statistics module 506b for obtaining the number of users currently participating in the chat.
A ratio module 506c, configured to calculate a ratio between the number of users that do not join the chat currently and the number of users that are participating in the chat currently, so as to obtain a value N.
Specifically, to avoid the decimal influence on the selection of the ratio result, in one embodiment, the ratio result is rounded up to obtain the value N.
And a random selecting module 506d, configured to randomly select N second users from the users who do not join the chat.
Further, the random selection module 506 is further configured to select N third users, and when none of the N second users replies within t seconds of the preset time, the random selection module 506 reselects the N third users to perform autonomous learning and seek for a reply. The third user is a user who is not currently participating in the chat and has not been selected as the user of the second user. When selecting N third users, the random selection module 506d randomly selects N third users from the users that are not currently participating in the chat and have not been selected as the second users.
Referring to fig. 7, based on the above-mentioned intelligent chat robot control device, the present invention further provides an intelligent chat system, which includes a plurality of users and a plurality of the above-mentioned intelligent chat robots based on autonomous learning, wherein the intelligent chat robots are in communication connection with the users.
The intelligent chat system based on autonomous learning of this embodiment may include one intelligent chat robot or may include a plurality of intelligent chat robots, and the structure and the working principle of a specific intelligent chat robot have been described in detail and are not described herein again. Each intelligent chatting robot has a plurality of users to chat, and the chatting robots are in communication connection with the users through the internet, the mobile internet, the local area network, the cloud, the internet of things or the social network.
In the development of artificial intelligence, the autonomous learning ability is an important direction for the robot to turn to intelligence, and when the machine really has the autonomous learning ability, the machine is not a machine any more. To pass the turing test, the chat robot must make its own chat statements very similar or even identical to human chat statements, however, the conventional chat robot does not use the user's chat statements for autonomous learning. The intelligent chat robot control method, the intelligent chat robot control device and the intelligent chat system realize the autonomous learning chat of the chat robot, and for one user input sentence sent by the first user, when the chat sentence meeting the matching degree requirement is not searched in the chat database, the user input sentence of the first user is used as the robot output sentence of a new topic and sent to the N second users, and the user input sentence which is replied to the robot output sentence by the N second users firstly is used as the robot output sentence replied to the first user. Compared with the prior art, the invention greatly improves the humanity, rationality and authenticity of the reply of the chat robot, so that the chat robot has artificial intelligence and the Turing test passing rate is greatly improved.
The technical features of the embodiments described above may be arbitrarily combined, and for the sake of brevity, all possible combinations of the technical features in the embodiments described above are not described, but should be considered as being within the scope of the present specification as long as there is no contradiction between the combinations of the technical features.
The above-mentioned embodiments only express several embodiments of the present invention, and the description thereof is more specific and detailed, but not construed as limiting the scope of the invention. It should be noted that, for a person skilled in the art, several variations and modifications can be made without departing from the inventive concept, which falls within the scope of the present invention. Therefore, the protection scope of the present patent shall be subject to the appended claims.

Claims (6)

1. An intelligent chat robot control method is characterized by comprising the following steps:
acquiring a user input sentence of a first user, matching the user input sentence with a sentence in a chat database, and acquiring a first chat sentence with the maximum matching degree in the chat database, wherein the maximum matching degree is greater than a preset value; the user input sentence comprises characters, voice and video;
if the first chat sentence has a next chat sentence, feeding the next chat sentence as a robot output sentence back to the first user;
if the first chat sentence does not have a next chat sentence, performing autonomous learning chat, sending the user input sentence of the first user to N second users as a robot output sentence of a new topic, receiving reply sentences returned by the N second users, selecting one reply sentence from the reply sentences according to a set selection principle, and feeding back the selected reply sentence to the first user as the robot output sentence of the first user; the second user is a user who does not join in the chat at present, wherein the value of N is the ratio of the number of the users who do not join in the chat at present to the number of the users who participate in the chat at present, and the value comparison result is rounded up to obtain the value of N; storing the user input sentence of the first user and the first returned reply sentence into a chat database as two continuous chat sentences; when a certain user input statement matches the chat statements added to the chat database, the next chat statement of the chat statement in the chat database can be directly used as the reply of the user input statement of the user;
if the reply sentence of the second user is not received within the preset time, N third users are selected again, the user input sentence of the first user is sent to the third user as the robot output sentence of the new topic, the reply sentence returned by the third user is received, the reply sentence is fed back to the first user as the robot output sentence, wherein the second user is a user who does not join in the chat at present, and the third user is a user who does not join in the chat at present and has not been selected as the user of the second user.
2. The intelligent chat robot control method according to claim 1, wherein the step of sending the user input sentence of the first user as the robot output sentence of the new topic to N second users, receiving the reply sentences returned by the N second users, and feeding back the reply sentences as the robot output sentences to the first user includes:
and sending the user input sentence of the first user to N second users as a robot output sentence of a new topic, receiving a reply sentence returned firstly from the N second users, and feeding back the reply sentence returned firstly as the robot output sentence to the first user.
3. An intelligent chat robot control device, comprising:
the chat database is used for storing experience chat sentences, and the experience chat sentences comprise a first chat sentence and a next chat sentence of the first chat sentence;
the retrieval matching module is respectively connected with the chat database and the selection module and is used for acquiring a user input sentence of a first user, wherein the user input sentence comprises characters, voice and video, the user input sentence is matched with the sentence in the chat database, and the first chat sentence with the maximum matching degree and the matching degree larger than a preset value in the chat database is acquired; if the first chat sentence has a next chat sentence, feeding the next chat sentence as a robot output sentence back to the first user; if the first chat sentence does not have a next chat sentence, sending a selection instruction to a selection module;
the selecting module is connected with the retrieval matching module and used for receiving a selecting instruction and selecting N second users after receiving the selecting instruction;
the learning module is connected with the selection module and used for carrying out autonomous learning chat and sending the first chat sentence to N second users as a robot output sentence of a new topic; and the number of the first and second groups,
the exercise module is used for receiving the reply sentences returned by the N second users, selecting one reply sentence from the reply sentences according to a set selection principle, and feeding back the selected reply sentence to the first user as a robot output sentence for the first user;
the time limit module records preset time in advance, and if the reply statement of the second user is not received within the preset time, the time limit module sends a reply timeout instruction to the selection module, and the selection module receives the timeout instruction and then reselects N third users, wherein the second user is a user who does not currently join in chat, the third users are users who do not currently join in chat, and the third users are users who have not been selected as the second users;
the storage module is used for storing the user input statement of the first user and the returned reply statement as two continuous chat statements into a chat database; when a certain user input statement matches the chat statements added to the chat database, the next chat statement of the chat statement in the chat database can be directly used as the reply of the user input statement of the user;
the selecting module comprises:
the chat counting module is used for acquiring the number of users who do not join in the chat at present;
the idle counting module is used for acquiring the number of users participating in chatting currently;
the ratio module is used for calculating the ratio of the number of users who do not join in the chat to the number of users who are participating in the chat at present to obtain an N value, and rounding up the comparison result to obtain the N value;
and the random selection module is used for randomly selecting N second users from the users who do not join in the chat.
4. The intelligent chat robot control device according to claim 3, wherein the exercise module receives a reply sentence returned first from the N second users, and feeds back the reply sentence returned first as a robot output sentence to the first user.
5. A storage medium on which a computer program is stored, wherein the program, when executed by a processor, implements the intelligent chat robot control method according to any one of claims 1 to 2.
6. A terminal device comprising a storage medium, a processor and a computer program stored on the storage medium and executable on the processor, the processor implementing the intelligent chat robot control method according to any one of claims 1-2 when executing the program.
CN201610226768.XA 2016-04-12 2016-04-12 Intelligent chat robot control method and control device Active CN105930367B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201610226768.XA CN105930367B (en) 2016-04-12 2016-04-12 Intelligent chat robot control method and control device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201610226768.XA CN105930367B (en) 2016-04-12 2016-04-12 Intelligent chat robot control method and control device

Publications (2)

Publication Number Publication Date
CN105930367A CN105930367A (en) 2016-09-07
CN105930367B true CN105930367B (en) 2020-06-09

Family

ID=56838915

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201610226768.XA Active CN105930367B (en) 2016-04-12 2016-04-12 Intelligent chat robot control method and control device

Country Status (1)

Country Link
CN (1) CN105930367B (en)

Families Citing this family (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US10636418B2 (en) 2017-03-22 2020-04-28 Google Llc Proactive incorporation of unsolicited content into human-to-computer dialogs
CN107016070B (en) * 2017-03-22 2020-06-02 北京光年无限科技有限公司 Man-machine conversation method and device for intelligent robot
US9865260B1 (en) 2017-05-03 2018-01-09 Google Llc Proactive incorporation of unsolicited content into human-to-computer dialogs
US10742435B2 (en) * 2017-06-29 2020-08-11 Google Llc Proactive provision of new content to group chat participants
US10318927B2 (en) 2017-07-17 2019-06-11 ExpertHiring, LLC Method and system for managing, matching, and sourcing employment candidates in a recruitment campaign
CN110019700B (en) * 2017-09-13 2023-01-17 阿里巴巴集团控股有限公司 Data processing method and device
KR101854576B1 (en) * 2017-11-10 2018-05-03 베스핀글로벌 주식회사 Cloud management system based on chatbot and operating method thereof
CN109465823B (en) * 2018-11-06 2022-03-18 泰康保险集团股份有限公司 Intelligent robot control method and device, electronic equipment and storage medium
CN110059000A (en) * 2019-03-15 2019-07-26 深圳壹账通智能科技有限公司 Chat drama test control method, device, computer equipment and storage medium
CN111027976B (en) * 2019-11-13 2022-06-14 支付宝(杭州)信息技术有限公司 Method for obtaining transaction identity information of fraudulent party

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101076060A (en) * 2007-03-30 2007-11-21 腾讯科技(深圳)有限公司 Chatting robot system and automatic chatting method
CN101431573A (en) * 2007-11-08 2009-05-13 上海赢思软件技术有限公司 Method and equipment for implementing automatic customer service through human-machine interaction technology
CN103390047A (en) * 2013-07-18 2013-11-13 天格科技(杭州)有限公司 Chatting robot knowledge base and construction method thereof
CN105068661A (en) * 2015-09-07 2015-11-18 百度在线网络技术(北京)有限公司 Man-machine interaction method and system based on artificial intelligence

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2008191748A (en) * 2007-02-01 2008-08-21 Oki Electric Ind Co Ltd Inter-user communication method, inter-user communication program and inter-user communication device
US20140122407A1 (en) * 2012-10-26 2014-05-01 Xiaojiang Duan Chatbot system and method having auto-select input message with quality response

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101076060A (en) * 2007-03-30 2007-11-21 腾讯科技(深圳)有限公司 Chatting robot system and automatic chatting method
CN101431573A (en) * 2007-11-08 2009-05-13 上海赢思软件技术有限公司 Method and equipment for implementing automatic customer service through human-machine interaction technology
CN103390047A (en) * 2013-07-18 2013-11-13 天格科技(杭州)有限公司 Chatting robot knowledge base and construction method thereof
CN105068661A (en) * 2015-09-07 2015-11-18 百度在线网络技术(北京)有限公司 Man-machine interaction method and system based on artificial intelligence

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
基于自然语言理解的自动应答技术及应用研究;王智慧;《中国优秀硕士学位论文全文数据库信息科技辑》;20090715(第7期);第I138-1231页 *

Also Published As

Publication number Publication date
CN105930367A (en) 2016-09-07

Similar Documents

Publication Publication Date Title
CN105930367B (en) Intelligent chat robot control method and control device
CN110008322B (en) Method and device for recommending dialogues in multi-turn conversation scene
US11822605B2 (en) Multi domain real-time question answering system
US20200301954A1 (en) Reply information obtaining method and apparatus
CN107943998B (en) Man-machine conversation control system and method based on knowledge graph
CN105975530B (en) Robot conversation control method and system based on chat big data knowledge base
CN110046240B (en) Target field question-answer pushing method combining keyword retrieval and twin neural network
CN106295792B (en) Dialogue data interaction processing method and device based on multi-model output
WO2020006827A1 (en) Method and apparatus for intelligent response
WO2008119270A1 (en) A chatting robot system and a method, a device for chatting automatically
CN108846138B (en) Question classification model construction method, device and medium fusing answer information
US9087130B2 (en) Generating snippets for prominent users for information retrieval queries
CN103970791B (en) A kind of method, apparatus for recommending video from video library
CN111078856B (en) Group chat conversation processing method and device and electronic equipment
CN102073704B (en) Text classification processing method, system and equipment
CN108959531A (en) Information search method, device, equipment and storage medium
CN109032381A (en) A kind of input method based on context, device, storage medium and terminal
CN108306813B (en) Session message processing method, server and client
Wu et al. Automatic chatbot knowledge acquisition from online forum via rough set and ensemble learning
Santana et al. A Chatbot to Support Basic Students Questions.
Ye et al. A sentiment based non-factoid question-answering framework
WO2023245523A1 (en) Method and apparatus for generating training data
CN108509610A (en) A kind of search method and system of activity and companion
Ota et al. Proposal of open-ended dialog system based on topic maps
CN114969250A (en) Man-machine conversation generation method and device, electronic equipment and storage medium

Legal Events

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