CN110674270B - Humorous generation and emotion interaction method based on artificial intelligence and robot system - Google Patents
Humorous generation and emotion interaction method based on artificial intelligence and robot system Download PDFInfo
- Publication number
- CN110674270B CN110674270B CN201910793954.5A CN201910793954A CN110674270B CN 110674270 B CN110674270 B CN 110674270B CN 201910793954 A CN201910793954 A CN 201910793954A CN 110674270 B CN110674270 B CN 110674270B
- Authority
- CN
- China
- Prior art keywords
- data
- humorous
- emotion
- user
- degree
- 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
Links
Images
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/30—Information retrieval; Database structures therefor; File system structures therefor of unstructured textual data
- G06F16/33—Querying
- G06F16/332—Query formulation
- G06F16/3329—Natural language query formulation or dialogue systems
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/30—Information retrieval; Database structures therefor; File system structures therefor of unstructured textual data
- G06F16/36—Creation of semantic tools, e.g. ontology or thesauri
Landscapes
- Engineering & Computer Science (AREA)
- Physics & Mathematics (AREA)
- Theoretical Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Databases & Information Systems (AREA)
- General Engineering & Computer Science (AREA)
- Data Mining & Analysis (AREA)
- Computational Linguistics (AREA)
- Mathematical Physics (AREA)
- Artificial Intelligence (AREA)
- Human Computer Interaction (AREA)
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
- Manipulator (AREA)
- User Interface Of Digital Computer (AREA)
Abstract
The invention discloses an artificial intelligence based humorous generation and emotion interaction method and a robot system, wherein the method is applied to a robot and comprises the following steps: acquiring data of a user; generating humorous speech segment output according to the data of the user; monitoring the emotion fed back by the user to the output humorous speech segment; when the emotion recognition result fed back by the user is a preset emotion, judging that the output humorous section has humorous characteristics, and judging that the humorous degree of the output humorous section is larger if the preset emotion degree in the emotion recognition result fed back by the user is larger; when the emotion recognition result fed back by the user is emotion outside the preset emotion, judging that the output humorous section does not have humorous characteristics; and storing the humorous section with the humorous characteristics, the environmental information corresponding to the humorous section and the humorous degree of the humorous section into a humorous big data knowledge base. The invention can trigger and change the emotion of the user through humor generation, and can check the effect of the humor through emotion recognition.
Description
The application aims at the following application numbers: 201710749276.3 (title of invention: Emotion interaction method based on humor generation and robot system, application date: 2017, 08.28).
Technical Field
The invention relates to an artificial intelligence based humorous generation and emotion interaction method and a robot system, and belongs to the technical field of artificial intelligence.
Background
With the rapid development of the robot technology, the requirements of users on the functions of the robot are higher and higher, and emotion and humor are one of the most important contents of the intelligent robot.
The main function of the existing emotion calculation is to identify and express emotion; the main functions of the existing humor computing are cognition and humor generation, but the existing emotion computing technology and the existing humor computing technology are carried out respectively and are not combined.
In addition, the existing robot has the following problems:
1) the existing robots acquire the humorous segment or the humorous component by inquiring the humorous knowledge base, and the humorous segment or the humorous component in the humorous knowledge base is limited in quantity, so that the humorous degree and the humorous level are low.
2) The existing robot can sense, recognize, understand and express emotion, but cannot predict human emotion, and since the human emotion cannot be predicted, how to change the human emotion is unknown, namely, the user cannot be pleased; the robot cannot predict what emotions the user will produce from different responses to the same utterance of the user, for example, which responses will cause the user to preset emotions and which responses will cause the user to be angry, so the robot cannot select a response that will cause the user to produce a particular emotion.
Disclosure of Invention
The invention aims to solve the defects of the prior art and provides a humorous generation and emotion interaction method, which can trigger and change the emotion of a user through humorous generation, check the humorous effect through emotion recognition and further select reply to enable the user to generate a specific emotion.
Another object of the present invention is to provide a humorous generating and emotional interactive robotic system.
The purpose of the invention can be achieved by adopting the following technical scheme:
humorous generation and emotion interaction method, the method is applied to the robot, and comprises the following steps:
acquiring data of a user;
generating humorous speech segment output according to the data of the user;
monitoring the emotion fed back by the user to the output humorous speech segment;
when the emotion recognition result fed back by the user is a preset emotion, judging that the output humorous section has humorous characteristics, and judging that the humorous degree of the output humorous section is larger if the preset emotion degree in the emotion recognition result fed back by the user is larger;
when the emotion recognition result fed back by the user is emotion outside the preset emotion, judging that the output humorous section does not have humorous characteristics;
storing a humorous section with humorous characteristics, environmental information corresponding to the humorous section, humorous degree of the humorous section and emotional feedback of a user to the humorous section into a humorous big data knowledge base;
the generating of humor speech segment output according to the data of the user specifically comprises:
extracting partial data from the data of the user as first small data, and extracting partial data as second small data;
acquiring big data;
acquiring data related to the first small data from the big data, and cleaning the data to be used as a first related data set;
mining the language segments with the negative correlation degree with the second small data larger than a preset negative correlation degree threshold value from the first relevant data set, and storing the mined language segments and the negative correlation degree thereof into a negative correlation language segment set;
mining the language segments with positive correlation degree with the first small data larger than a preset positive correlation threshold value from the negative correlation language segment set, and storing the mined language segments and the corresponding negative correlation degree and positive correlation degree thereof into the negative positive correlation language segment set;
calculating the humorous degree of each speech segment in the negative-positive correlation speech segment set according to the negative correlation degree and the positive correlation degree corresponding to each speech segment, and storing the speech segments with the humorous degree larger than a preset humorous threshold value into the humorous speech segment set;
and selecting the humorous section with the maximum humorous degree from the humorous section set, and outputting the humorous section.
Further, the mining of the language segments from the first relevant data set, the negative correlation of which with the second small data is greater than a preset negative correlation threshold, and storing the mined language segments and the negative correlation thereof into a negative correlation language segment set specifically include:
acquiring the number of similar language segments of the second small data in the big data as a first number;
counting the number of similar data in the big data of each data in the first relevant data set as a second number of the data;
counting the number of similar data in the big data, which is obtained after the data is combined with the second small data, as a third number of the data;
calculating the negative correlation degree of the data according to the first quantity, the second quantity and the third quantity of the data;
judging whether the negative correlation degrees of all the language sections in the first relevant data set and the second small data are larger than a preset negative correlation degree threshold value or not;
and storing the language segments with the negative correlation degree with the second small data larger than a preset negative correlation degree threshold value and the negative correlation degree thereof into a negative correlation language segment set.
Further, the language segments with positive correlation degree greater than the preset positive correlation threshold value with the first small data are mined from the negative correlation language segment set, and the mined language segments and the corresponding negative correlation degree and positive correlation degree are stored in the negative positive correlation language segment set, which specifically includes:
acquiring the number of similar language segments of the first small data in the big data as a fourth number;
counting the number of similar data in the big data of each data in the negative correlation corpus set as a fifth number of the data;
counting the number of similar data in the big data, which is obtained after the data is combined with the first small data, and taking the number as the sixth number of the data;
calculating the positive correlation degree of the data according to the fourth quantity, the fifth quantity and the sixth quantity of the data;
judging whether the positive correlation degree of all the language segments in the negative correlation language segment set and the first small data is larger than a preset positive correlation degree threshold value or not;
and storing the language segments with positive correlation degree with the first small data larger than a preset positive correlation threshold value and the corresponding negative correlation degree and positive correlation degree into a negative-positive correlation language segment set.
Further, the method further comprises:
obtaining emotion feedback related information of different types of users responding to different responses in the past according to data in the humorous big data knowledge base and emotion feedback of different types of users responding to different responses in the past; the emotion feedback related information comprises user information, response content, emotion feedback content and emotion feedback type;
storing emotion feedback related information of different types of users for different responses in the past into emotion feedback big data;
acquiring user information to be replied and acquiring an alternative reply set of a user to be replied;
obtaining expected user emotion feedback;
retrieving all emotion feedback records which are most matched with the information of the user to be replied and the reply content in the alternative reply set of the user to be replied from the emotion feedback big data;
extracting emotion feedback from the emotion feedback records, and calculating the matching degree of the emotion feedback and the emotion feedback of the expected user;
and acquiring response content corresponding to the emotion feedback record according to the emotion feedback record corresponding to the maximum matching degree of the emotion feedback and the emotion feedback of the expected user, and taking the response content as the response of the user to be responded.
Further, the step of retrieving all emotion feedback records that are most matched with the user information and the reply content in the alternative reply set from the emotion feedback big data specifically includes:
matching the user information, the reply content and the user information to be replied in each emotion feedback record in the emotion feedback big data, and the reply content in the alternative reply set of the user to be replied to obtain the matching degree of each emotion feedback record, the user information to be replied and the alternative reply set of the user to be replied, and selecting the emotion feedback record corresponding to the maximum matching degree from the matching degrees as the emotion feedback record which is most matched with the user information to be replied and the alternative reply set of the user to be replied.
The other purpose of the invention can be achieved by adopting the following technical scheme:
humorous generation and emotion interactive robotic system, the system includes:
the user data acquisition module is used for acquiring data of a user;
the humorous section generation output module is used for generating humorous section output according to the data of the user;
the emotion feedback monitoring module is used for monitoring the emotion fed back by the user to the output humorous speech segment;
the first judgment module is used for judging that the output humorous section has humorous characteristics when the emotion recognition result fed back by the user is a preset emotion, and the humorous degree of the output humorous section is judged to be larger when the preset emotion degree in the emotion recognition result fed back by the user is larger;
the second judging module is used for judging that the output humorous section does not have humorous characteristics when the emotion recognition result fed back by the user is an emotion other than the preset emotion;
the humor data knowledge base acquisition module is used for storing a humor section with humor characteristics, environment information corresponding to the humor section, the humor degree of the humor section and emotion feedback of a user on the humor section into the humor data knowledge base;
the humor speech segment generating and outputting module specifically comprises:
a small data extraction unit for extracting partial data from the user data as first small data and then extracting partial data as second small data;
a big data acquisition unit for acquiring big data;
a first related data set acquisition unit, configured to acquire data related to the first small data from the large data, and after the data is cleaned, the data is used as a first related data set;
the negative correlation phrase set acquisition unit is used for mining the phrase with the negative correlation degree of the second small data being greater than a preset negative correlation degree threshold value from the first correlation data set and storing the mined phrase and the negative correlation degree thereof into the negative correlation phrase set;
the negative and positive correlation term set acquisition unit is used for mining a term with positive correlation degree with the first small data larger than a preset positive correlation threshold value from the negative correlation term set, and storing the mined term and the corresponding negative correlation degree and positive correlation degree thereof into the negative and positive correlation term set;
the humorous segment set acquisition unit is used for calculating the humorous degree of each segment according to the negative correlation and the positive correlation corresponding to each segment in the negative-positive correlation segment set, and storing the segment with the humorous degree larger than a preset humorous threshold value into the humorous segment set;
and a humorous segment output unit which selects the humorous segment with the maximum humorous degree from the humorous segment set and outputs the humorous segment.
Further, in the negative relevance corpus acquiring unit, a corpus with a negative relevance to the second small data greater than a preset negative relevance threshold is mined from the first relevant dataset, and the mined corpus and the negative relevance thereof are stored in the negative relevance corpus, which specifically includes:
acquiring the number of similar language segments of the second small data in the big data as a first number;
counting the number of similar data in the big data of each data in the first relevant data set as a second number of the data;
counting the number of similar data in the big data, which is obtained after the data is combined with the second small data, as a third number of the data;
calculating the negative correlation degree of the data according to the first quantity, the second quantity and the third quantity of the data;
judging whether the negative correlation degrees of all the language sections in the first relevant data set and the second small data are larger than a preset negative correlation degree threshold value or not;
and storing the language segments with the negative correlation degree with the second small data larger than a preset negative correlation degree threshold value and the negative correlation degree thereof into a negative correlation language segment set.
Further, in the negative positive correlation corpus set obtaining unit, the corpus with positive correlation with the first small data larger than a preset positive correlation threshold is mined from the negative correlation corpus set, and the mined corpus and the corresponding negative correlation and positive correlation thereof are stored in the negative positive correlation corpus set, which specifically includes:
acquiring the number of similar language segments of the first small data in the big data as a fourth number;
counting the number of similar data in the big data of each data in the negative correlation corpus set as a fifth number of the data;
counting the number of similar data in the big data, which is obtained after the data is combined with the first small data, and taking the number as the sixth number of the data;
calculating the positive correlation degree of the data according to the fourth quantity, the fifth quantity and the sixth quantity of the data;
judging whether the positive correlation degree of all the language segments in the negative correlation language segment set and the first small data is larger than a preset positive correlation degree threshold value or not;
and storing the language segments with positive correlation degree with the first small data larger than a preset positive correlation threshold value and the corresponding negative correlation degree and positive correlation degree into a negative-positive correlation language segment set.
Further, the system further comprises:
the emotion feedback related information acquisition module is used for acquiring emotion feedback related information of different types of users responding to different responses in the past according to data in the humorous big data knowledge base and emotion feedback of different types of users responding to different preset emotions in the past; the emotion feedback related information comprises user information, response content, emotion feedback content and emotion feedback type;
the emotion feedback big data acquisition module is used for storing emotion feedback related information of different types of users responding to different responses in the past into emotion feedback big data;
the alternative reply set acquisition module is used for acquiring the information of the user to be replied and acquiring an alternative reply set of the user to be replied;
the expected user emotion feedback acquisition module is used for acquiring expected user emotion feedback;
the emotion feedback record retrieval module is used for retrieving all emotion feedback records which are most matched with the information of the user to be replied and the reply content in the alternative reply set of the user to be replied from the emotion feedback big data;
the matching degree calculation module is used for extracting emotion feedback from the emotion feedback records and calculating the matching degree of the emotion feedback and the emotion feedback of the expected user;
and the reply content acquisition module is used for acquiring reply content corresponding to the emotion feedback record according to the emotion feedback record corresponding to the maximum matching degree of the emotion feedback and the emotion feedback of the expected user, and taking the reply content as the reply of the user to be replied.
Further, the emotion feedback record retrieval module specifically includes:
the emotion feedback record selecting method is used for matching user information, reply content and user information to be replied in each emotion feedback record in the emotion feedback big data, reply content in an alternative reply set of a user to be replied to obtain matching degree of each emotion feedback record and user information to be replied and the alternative reply set of the user to be replied, and selecting the emotion feedback record corresponding to the maximum matching degree from the matching degree as the emotion feedback record which is most matched with the user information to be replied and the alternative reply set of the user to be replied.
Compared with the prior art, the invention has the following beneficial effects:
1. according to the method, the humorous section is generated and output, the emotion of the user is triggered and changed, the emotion fed back by the user to the output humorous section is monitored, namely, the humorous effect is verified through emotion recognition, the emotion recognition result fed back by the user is the humorous section corresponding to the preset emotion and judged to have the humorous characteristic, the humorous section with the humorous characteristic and related information are stored in the humorous data knowledge base, and the humorous section can be selected through the humorous data knowledge base in the future, so that the humorous generation capacity of the robot is improved.
2. According to the method, firstly, the big data and the second small data are subjected to negative correlation analysis to obtain a negative correlation speech segment set, speech segments positively correlated with the second small data are mined from the negative correlation speech segment set, the mined speech segments and the corresponding negative correlation degree and positive correlation degree are stored in the negative correlation speech segment set, a humorous speech segment set is obtained according to the negative positive correlation speech segment set, a humorous speech segment with the maximum humorous degree can be selected from the humorous speech segment set to improve the humorous degree and humorous level of the robot, and the speech segments subjected to negative correlation and the positively correlated speech segments are the same speech segment, so that the speech segments are reasonable and laughter, and a humorous effect is formed; and screening the output humorous speech segment through the emotion recognition of the user in the subsequent step, providing a better choice for a humorous big data knowledge base, and further improving the humorous generation capacity of the robot.
3. The invention can obtain the emotion feedback big data through the data in the humorous big data knowledge base and the emotion feedback of the user except the preset emotion of different responses in the past, can retrieve all emotion feedback records which are most matched with the information of the user to be responded and the response content in the alternative response of the user to be responded from the emotion feedback big data so as to predict what emotion the user generates due to different responses to the same sentence of the user, and further select the response which can enable the user to generate specific emotion according to the predicted result.
Drawings
Fig. 1 is a flowchart of a humor generation and emotion interaction method in embodiment 1 of the present invention.
Fig. 2 is a flowchart of generating humorous speech segment output according to embodiment 2 of the present invention.
Fig. 3 is a flowchart of mining positive-phase related words according to embodiment 2 of the present invention.
FIG. 4 is a flowchart illustrating mining of negative-relative segments according to embodiment 2 of the present invention.
Fig. 5 is a simplified schematic diagram of humorous segment set acquisition in embodiment 2 of the present invention.
Fig. 6 is a simple schematic diagram of generating a humor segment based on big data positive-negative correlation analysis in embodiment 2 of the present invention.
Fig. 7 is a flowchart of generating humorous speech segment output according to embodiment 3 of the present invention.
FIG. 8 is a flowchart illustrating mining of negative-relative segments according to embodiment 3 of the present invention.
Fig. 9 is a flowchart of mining positive-phase related words according to embodiment 3 of the present invention.
Fig. 10 is a simplified diagram of humorous segment set acquisition according to embodiment 3 of the present invention.
Fig. 11 is a simplified schematic diagram of generation of a humorous section based on big-data negative-positive correlation analysis in embodiment 3 of the present invention.
Fig. 12 is a flowchart of a humor generation and emotion interaction method in embodiment 4 of the present invention.
Fig. 13 is a block diagram of a humor generation and emotion interaction robot system according to embodiment 5 of the present invention.
Fig. 14 is a block diagram of a humor segment generation output module according to embodiment 6 of the present invention.
Fig. 15 is a block diagram of a humor segment generation output module according to embodiment 7 of the present invention.
Fig. 16 is a block diagram of a humor generation and emotion interaction robot system according to embodiment 8 of the present invention.
Detailed Description
The present invention will be described in further detail with reference to examples and drawings, but the present invention is not limited thereto.
Example 1:
the humorous section output by the robot can be generated through humorous calculation, and the emotion of the preset emotion, which is laugh by a user watching or listening to the humorous section, can be identified through emotion calculation; at this time, the user who recognizes and listens to the humorous speech segment is smiling, which indicates that the humorous speech segment outputted by the robot is successful, and the successful experience can be used in future humorous generation of the robot.
As shown in fig. 1, the present embodiment provides a humor generation and emotion interaction method, which can be applied to a robot, and includes the following steps:
s101, acquiring data of a user.
In this embodiment, the robot is an intelligent robot, and a machine capable of simulating human behavior or thought includes some computer programs, such as a chat program; in the process of the conversation between the robot and the user, the sense of the robot can obtain a plurality of small data, for example, the eyes of the robot are provided with a camera and can obtain video image data of the user, the ears of the robot are provided with a sound pick-up and can obtain audio data of the user, other various sensors obtain sensing data (such as the body temperature, the heart rate and the like of the user), and various terminals obtain text data (such as user attributes, words and the like) input by the user.
And S102, generating a humorous section for output according to the data of the user.
In this embodiment, the input speech segment of the user may be obtained, and the humorous speech segment output is generated by using the existing humorous generating method, where the output mode is text and/or voice.
S103, monitoring the emotion fed back by the user to the output humorous speech segment.
Monitoring the emotion fed back by the user to the output humorous section, wherein the robot can detect the facial expression of the user by using a camera, or detect the voice sent by the user by using a microphone, or detect the text input by the user by using character input, for example, monitoring whether the emotion fed back by the user to the output humorous section is a preset emotion, detecting whether the facial expression of the user has smile by using the camera, or detecting whether the voice sent by the user has smile by using the microphone, or detecting whether the text input by the user has humor haa character pattern by using the character input; those skilled in the art will appreciate that there are other emotions than the preset emotion that can be determined by the corresponding method.
S104, if the emotion recognition result fed back by the user is a preset emotion, judging that the output humorous section has humorous characteristics, and judging that the humorous degree of the output humorous section is larger if the preset emotion degree in the emotion recognition result fed back by the user is larger; and if the emotion recognition result fed back by the user is emotion other than the preset emotion, judging that the output humorous speech segment does not have humorous characteristics.
The setting method of the preset emotion comprises the following steps: and detecting emotion feedback of the human to the real humorous speech segment as the preset emotion. For example, 1 ten thousand persons are detected to have emotional feedback to 100 real humorous speech segments, and the most emotional feedback is used as a preset emotion, and of course, other methods can be adopted to obtain the preset emotion; even further, the preset emotion may be a proportional combination of a plurality of emotions. The term "real humorous speech segment" refers to a speech segment of a large humorous degree. In the case where the preset emotion is not set, the preset emotion is automatically set to "happy" emotion because people hear humorous speech, and the most common emotion feedback is laughing, which is a happy emotion.
In this embodiment, the preset emotion is set as "happy", the preset emotion degree, that is, the happy degree, may be determined according to one of the amplitude of smile, the decibel of laughter, and the number of characters about "smile" in the text, or may be determined by combining two or three of them, and according to the happy degree, the corresponding humorous degree may be divided into high, medium, and low, or the humorous degree may be divided into one level, two levels, three levels, four levels, etc., or the humorous degree may be divided into a level, B level, C level, D level, etc., or the humorous degree may be divided by using a scoring method. The emotion other than emotion is preset, and the emotion can be silent, angry, painful and the like.
S105, generating non-humorous speech segment output by using a common reply speech segment generation method according to the input speech segment of the user again, and informing the user that the speech segment is just humorous, and the user does not need to be truthful. This non-humorous speech segment is now available for your reference ".
This step can be omitted during the experimental process, but is important in practical applications, and if it is missing, it can mislead the user, because humorous utterances generally contain deliberate smiling mistakes, by which the user can get fun and true between the identification of correct mistakes, especially in teaching assistance robots, which is more indispensable.
S106, storing the humorous section with the humorous characteristics, the environment information corresponding to the humorous section, the humorous degree of the humorous section and the emotion feedback of the user to the humorous section into a humorous big data knowledge base.
The environmental information in this step refers to the time, place, scene, both sides attribute, etc. of the conversation between the user and the robot, when the robot generates humor in the future, the selection of the humor segment can be performed in the future through each humor segment in the humor data knowledge base, the environmental information corresponding to each humor segment, the humor degree of each humor segment and the emotional feedback of the user to each humor segment, thereby improving the capacity of generating the humor of the robot.
Example 2:
the other steps of this embodiment are different from embodiment 1 in that step S102 is implemented by using a method based on positive-negative correlation analysis of big data, as shown in fig. 2, the method specifically includes the following steps:
and S1021, extracting partial data from the data of the user as first small data, and extracting partial data as second small data.
The obtained small data (stones) are thrown into the big data (pond) to generate humor, and the process of identifying or generating the humor is to mine the associated data between the small data and the big data to generate the humor which cannot be identified or generated only by the small data or only by the big data, and the humor is the result of the identification and generation of the robot humor based on the big data and the small data.
The small data is personalized data peculiar to a user in a conversation process, and a plurality of small data can be obtained in different ways in one conversation process, such as user words, user attributes, conversation scenes, conversation time, conversation places, robot attributes and the like.
In the small data, the user utterance is core small data, and if the answer of the robot completely negates the utterance of the user (namely, the answer is completely negatively correlated with the utterance of the user, namely, the ox head is not in a position of the horse mouth), not only the humorous effect is not generated, but also the user feels that the robot has a whistling word and answers a strange question, so that all or part of the user utterance (namely, the answer positively correlated with all or part of the utterance of the user) needs to be confirmed, so that the user can generate resonance and becomes the basis of humorous.
The present embodiment extracts all or part of the user utterance as the first small data in the user data acquired in step S101. Although the small data is the humorous basis, all the sensed small data cannot be affirmed (namely, the answer which is completely and positively correlated with all the sensed small data) because if all the small data are affirmed, the answer is a common answer utterance which is not humorous, so that part of the small data needs to be negated, and the negation part needs to be unified and fused with the positive part, so that the unified humorous is realized.
And S1022, acquiring the big data.
The big data is data accumulated by a large number of users for a long time, for example, the internet big data is data accumulated by countless internet users for a long time, so the big data belongs to external data for the robot and the conversation process, and the robot of the embodiment can obtain the big data through the server.
S1023, data related to the first small data is acquired from the big data, and the data is cleaned to be used as a first related data set.
Acquiring data related to first small data from big data: searching out a language segment with the matching degree with the first small data being greater than a preset matching degree threshold from the big data; the matching degree of a certain language segment of the big data and the small data refers to the number of the words of the small data appearing in the language segment divided by the number of the words in the small data.
And (3) cleaning data: if the data is possibly a segment and consists of a plurality of sentences, the sentences in which the keywords in the small data appear are marked, and if a certain sentence and the upper sentence or the lower sentence of the sentence are not marked, the sentence is deleted; or marking out the statement in which the key words in the small data appear, and deleting the statement if the statement is not marked; where a sentence refers to a sentence that ends with a period or exclamation point or question mark or other sentence-ending identifier.
And S1024, mining the language segments with positive correlation degree with the first small data larger than a preset positive correlation threshold value from the first correlation data set, and storing the mined language segments and the positive correlation degrees thereof into the positive correlation language segment set.
The term with positive correlation greater than the preset positive correlation threshold is called a positive correlation term, and mining of the positive correlation term can be realized by adopting the existing technology for performing correlation analysis on big data, and can also be realized by the mode of fig. 3, and specifically includes the following steps:
s10241, acquiring the number of similar language segments of the first small data in the big data as a first number, and recording the first number as m;
s10242, counting the number of similar data in the big data of each data in the first relevant data set, taking the number as a second number of the data, and recording the second number as n;
s10243, counting the number of similar data in the big data, which is obtained after the data is combined with the first small data, and taking the number as a third number of the data, and marking as o;
s10244, calculating the positive correlation of the data according to the first number m, the second number n and the third number o of the data, and marking as pc;
specifically, the positive correlation pc of the data is calculated as follows:
pc=o/((m×n)1/2) (1)
s10245, judging whether positive correlation degrees of all the language sections in the first relevant data set and the first small data are larger than a preset positive correlation degree threshold value or not;
s10246, storing the language segment with positive correlation degree larger than a preset positive correlation degree threshold value with the first small data and the positive correlation degree thereof into a positive correlation language segment set, and recording as Z1.
The positive correlation is large enough (i.e. greater than the preset positive correlation threshold), indicating that the speech segment and the first small data combination belong to the consensus of most people, so that the humorous speech segment has rationality.
And S1025, mining the language segments with the negative correlation degree with the second small data larger than a preset negative correlation degree threshold value from the positive correlation language segment set, and storing the mined language segments and the corresponding positive correlation degree and negative correlation degree thereof into the positive and negative correlation language segment set.
The language segments with the negative relevance greater than the preset negative relevance threshold are called negative relevance language segments, mining of the negative relevance language segments can be achieved by adopting the existing technology for carrying out relevance analysis on big data, and can also be achieved in a mode of FIG. 4, and the method specifically comprises the following steps:
s10251, acquiring the number of similar language segments of the second small data in the big data as a fourth number, and recording as p;
s10252, counting the number of similar data in the big data of each data in the positive correlation term set Z1, and taking the number as the fifth number of the data and marking as q;
s10253, counting the number of similar data in the big data, which is obtained after the data is combined with the second small data, and taking the number as the sixth number of the data and recording as r;
s10254, calculating the negative correlation degree of the data according to the fourth quantity p, the fifth quantity q and the sixth quantity r of the data, and marking as nc;
specifically, the negative correlation nc of the data is calculated as follows:
nc=1-r/((p×q)1/2) (2)
s10255, judging whether the negative correlation degree of all the language segments in the positive correlation language segment set Z1 and the second small data is larger than a preset negative correlation degree threshold value;
s10256, storing the language segment with the negative correlation degree larger than the preset negative correlation degree threshold value with the second small data and the positive correlation degree and the negative correlation degree corresponding to the language segment into the positive and negative correlation language segment set, and recording as Z2.
The negative correlation is large enough (i.e. whether the negative correlation is greater than a preset negative correlation threshold), which indicates that the speech segment is not commonly known by most people after being combined with the second small data, so that the humorous speech segment has smilability.
S1026, calculating the humour of each language segment according to the positive correlation and the negative correlation corresponding to each language segment in the positive and negative correlation language segment set, and storing the language segment with the humour greater than a preset humour threshold value into the humour language segment set.
In this embodiment, a speech segment and its positive correlation and negative correlation are obtained from the positive and negative correlation speech segment set Z2, where the positive correlation is 80% and the negative correlation is 90%, the humorous degree of the speech segment is calculated according to the positive correlation and the negative correlation, and the speech segment whose humorous degree is greater than a preset humorous threshold and the humorous degree thereof are stored in the humorous segment set and recorded as Z.
Specifically, the humorous degree h of the speech segment is calculated by the following formula:
h=(pc×nc)1/2 (3)
the quantity statistics in steps S1024 and S1025 may use an existing mapreduce model to perform fast statistics for big data by using hadoop or spark.
Fig. 5 shows a simple schematic diagram of humorous segment set acquisition, a segment set Z1 consistent (positively correlated) with the first small data y1 is mined from the large data X, and the adopted large data analysis process is recorded as Z1 ═ f (X, y1), which corresponds to a positive correlation stage. And (3) excavating a corpus set Z which is consistent (positively correlated) with the first small data y1 but inconsistent (negatively correlated) with the second small data y2 from the large data X, and recording an adopted large data analysis process as g (X, y2 £ f (X, y1)), which corresponds to an opposite unified stage for opposite unified humor, namely, a stage for spirally ascending to humor identification and generation. The two phases are not split, but rather are mutually influenced and organically built.
Fig. 6 is a simplified schematic diagram of the steps S1021 to S1026, where Z1 is obtained by mining the big data X and the first small data y1 in positive correlation analysis, and Z is obtained by mining the big data X and the second small data y2 in Z1 in negative correlation analysis.
S1027, selecting the humor segment with the maximum humor degree from the humor segment set, and outputting the humor segment.
In the embodiment, the language segment capable of generating humorous sense is obtained based on positive and negative correlation analysis of big data, so that the humorous degree and the humorous level of the robot are improved, and the language segment positively correlated and the language segment negatively correlated are the same, so that the language segment is reasonable and smilable, and the humorous effect is formed; and then, the humorous sections generated based on the positive and negative correlation analysis of the big data are screened through the emotion recognition of the user in the subsequent steps of the embodiment 1, so that a better choice is provided for a humorous big data knowledge base, and the humorous generation capacity of the robot is further improved.
Example 3:
the other steps of this embodiment are different from embodiment 1 in that step S102 is implemented by a method based on big data negative-positive correlation analysis, and as shown in fig. 7, the method specifically includes the following steps:
s1021, for specific contents of the step, refer to embodiment 2 above, extracting part of the data from the user data as the first small data, and then extracting part of the data as the second small data.
S1022, the detailed content of the step of acquiring big data may be referred to the above embodiment 2.
S1023, data related to the first small data is obtained from the big data, and after the data is cleaned, the data is used as a first related data set, and the specific content of the step can be referred to the above embodiment 2.
And S1024, mining the language segments with the negative correlation degree with the second small data larger than a preset negative correlation degree threshold value from the first relevant data set, and storing the mined language segments and the negative correlation degree thereof into a negative correlation language segment set.
The language segments with the negative relevance greater than the preset negative relevance threshold are called negative relevance language segments, mining of the negative relevance language segments can be achieved by adopting the existing technology for carrying out relevance analysis on big data, and can also be achieved in a mode of fig. 8, and the method specifically comprises the following steps:
s10241, acquiring the number of similar language segments of the second small data in the big data as a first number, and recording the first number as m;
s10242, counting the number of similar data in the big data of each data in the first relevant data set, taking the number as a second number of the data, and recording the second number as n;
s10243, counting the number of similar data in the big data, which is obtained after the data is combined with the second small data, and taking the number as a third number of the data, and marking as o;
s10244, calculating the negative correlation degree of the data according to the first quantity m, the second quantity n and the third quantity o of the data, and marking as nc;
specifically, the negative correlation nc of the data is calculated as follows:
nc=1-o/((m×n)1/2) (4)
s10245, judging whether the negative correlation degree of all the language sections in the first relevant data set and the second small data is greater than a preset negative correlation degree threshold value;
s10246, storing the language segments with the negative correlation degree greater than the preset negative correlation degree threshold value with the second small data and the negative correlation degree thereof into a negative correlation language segment set, and recording as Z1.
And S1025, mining the language segments with positive correlation degree with the first small data larger than a preset positive correlation threshold value from the negative correlation language segment set, and storing the mined language segments and the corresponding negative correlation degree and positive correlation degree thereof into the negative positive correlation language segment set.
The term with positive correlation greater than the preset positive correlation threshold is called a positive correlation term, and mining of the positive correlation term can be realized by adopting the existing technology for performing correlation analysis on big data, and can also be realized by the mode of fig. 9, and specifically includes the following steps:
s10251, acquiring the number of similar language segments of the first small data in the big data as a fourth number, and recording as p;
s10252, counting the number of similar data in the big data of each data in the negative correlation corpus set Z1, and taking the number as the fifth number of the data and marking as q;
s10253, counting the number of similar data in the big data, which is obtained after the data is combined with the first small data, and taking the number as the sixth number of the data and recording as r;
s10254, calculating the positive correlation of the data according to the fourth quantity p, the fifth quantity q and the sixth quantity r of the data, and marking as pc;
specifically, the positive correlation pc of the data is calculated as follows:
pc=r/((p×q)1/2) (5)
s10255, judging whether the positive correlation degree of all the language segments in the negative correlation language segment set Z1 and the first small data is larger than a preset positive correlation degree threshold value;
s10256, storing the language segment with positive correlation degree larger than the preset positive correlation degree threshold value with the first small data and the corresponding negative correlation degree and positive correlation degree into a negative-positive correlation language segment set, and recording as Z2.
S1026, calculating the humorous degree of each language segment in the negative-positive correlation language segment set according to the negative correlation degree and the positive correlation degree corresponding to each language segment, and storing the language segments with the humorous degree larger than a preset humorous threshold value into the humorous language segment set.
In this embodiment, a speech segment and its corresponding negative correlation and positive correlation are obtained from the negative-positive correlation speech segment set Z2, where the negative correlation is 90% and the positive correlation is 80%, the humorous degree of the speech segment is calculated according to the negative correlation and the positive correlation, and the speech segment whose humorous degree is greater than a preset humorous threshold and the humorous degree thereof are stored in the humorous segment set and recorded as Z.
Specifically, the humorous degree h of the speech segment is calculated by the following formula:
h=(pc×nc)1/2 (6)
the quantity statistics in steps S1024 and S1025 may use an existing mapreduce model to perform fast statistics for big data by using hadoop or spark.
Fig. 10 shows a simplified schematic diagram of humorous segment set acquisition, a segment set Z1 inconsistent (negative correlation) with the second small data y2 is mined from the large data X, and the large data analysis process is recorded as Z1 ═ g (X, y2), which corresponds to the negative correlation stage. And (3) excavating a corpus set Z which is consistent (positively correlated) with the first small data y1 but inconsistent (negatively correlated) with the second small data y2 from the large data X, and recording an adopted large data analysis process as f (X, y 1U g (X, y2)), which corresponds to an opposite unified stage for opposite unified humor, namely a stage for spirally ascending to humor identification and generation. The two phases are not split, but rather are mutually influenced and organically built.
Fig. 11 shows a simplified schematic diagram of the above steps S1021 to S1026, where the big data X and the second small data y2 are subjected to negative correlation analysis to obtain Z1 mined from the big data, and then the big data X and the first small data y1 in Z1 are subjected to positive correlation analysis to obtain the humorous segment set Z mined from the big data.
S1027, selecting the humor segment with the maximum humor degree from the humor segment set, and outputting the humor segment.
In the embodiment, the language segment capable of generating humorous sense is obtained based on big data negative-positive correlation analysis, so that the humorous degree and the humorous level of the robot are improved, and the language segment subjected to negative correlation and the language segment subjected to positive correlation are the same language segment, so that the language segment is reasonable and smilable, and the humorous effect is formed; and then, the humorous sections generated based on big data negative and positive correlation analysis are screened through the user emotion recognition in the subsequent steps of the embodiment 1, so that a better choice is provided for a humorous big data knowledge base, and the humorous generation capacity of the robot is further improved.
Example 4:
as shown in fig. 12, steps S101 to S106 of this embodiment are the same as those of embodiments 1, 2, or 3, but the humorous generation and emotion interaction method of this embodiment further includes:
s107, obtaining emotion feedback related information of different types of users responding to different responses in the past according to data in the humor big data knowledge base and emotion feedback of different types of users responding to different responses in the past.
The emotion feedback related information comprises user information (including user types), response content, emotion feedback content and emotion feedback types.
As can be known from the foregoing embodiment 1, the data in the humor data knowledge base includes a humor segment, environment information corresponding to the humor segment, a humor level of the humor segment, and emotion feedback of the user to the humor segment, the humor segment is response content of the robot, the environment information includes user information, the emotion feedback of the user to the humor segment includes emotion feedback content and emotion feedback type, the emotion feedback content includes an expression of the user's face, a voice uttered by the user, and/or a text input by the user, the emotion feedback type is a preset emotion (happiness), and it can be considered that the data in the answer humor data knowledge base includes preset emotion feedback of different types of users to different humor segments in the past each time.
Although the data in the humor big data knowledge base contains the preset emotion feedback of the user for the response of the humor, the emotion feedback of the user except for preset emotions such as silence, anger, pain and the like of other responses is still irrelevant, so that the data in the humor big data knowledge base is needed, and the emotion feedback of different types of users except for the preset emotion feedback of different responses in the past is needed to be combined, so that more comprehensive emotion feedback related information can be obtained.
And S108, storing the emotion feedback related information of different types of users to different responses in the past into emotion feedback big data.
S109, obtaining the information of the user to be replied, and obtaining an alternative reply set of the user to be replied.
Marking the user information to be replied as U, and marking an alternative reply set of the user to be replied as P, wherein the alternative reply set P comprises reply content Pi; where i ranges from 1 to n, n being the number of alternative replies.
And S110, obtaining expected user emotion feedback.
And obtaining the expected user emotion feedback, wherein the expected user emotion feedback is denoted as F, and comprises the following steps: the expected user emotional feedback F is happy when the user is expected to become more happy after listening to the response; or the user is expected to become more painful after listening to the response, the expected emotional feedback F of the user is painful.
And S111, retrieving all emotion feedback records which are most matched with the information of the user to be replied and the reply content in the alternative reply of the user to be replied from the emotion feedback big data.
The specific retrieval process comprises the following steps: matching the user information, the reply content and the user information U to be replied in each emotion feedback record in the emotion feedback big data and the reply content Pi in the alternative reply P of the user to be replied to obtain the matching degree of each emotion feedback record and the user information U to be replied and the reply content Pi in the alternative reply P of the user to be replied, and selecting the emotion feedback record corresponding to the maximum matching degree from the matching degrees as the emotion feedback record which is most matched with the user information U to be replied and the reply content Pi in the alternative reply P of the user to be replied and is marked as Ri.
And S112, extracting emotion feedback from the emotion feedback records, calculating the matching degree of the emotion feedback and the emotion feedback of the expected user, and recording the matching degree as Di.
S113, obtaining the response content corresponding to the emotion feedback record according to the emotion feedback record corresponding to the maximum matching degree of the emotion feedback and the emotion feedback of the expected user, and taking the response content as the response of the user to be responded.
It can be understood that the emotion feedback Fi in the emotion feedback record Ri corresponding to the maximum matching degree Di is closest to the expected user emotion feedback F, so that the emotion feedback record Ri corresponding to the maximum matching degree Di acquires the response content Pi corresponding to the emotion feedback record Ri, and the response content Pi can generate the most expected user emotion feedback F in all the alternative responses.
According to the embodiment, through data in the humorous big data knowledge base and emotion feedback of the user except for preset emotions of different responses in the past, what emotions the user generates due to different responses of the same sentence of the user are predicted, and then the response which can enable the user to generate a specific emotion is selected according to a predicted result.
It will be understood by those skilled in the art that all or part of the steps in the method for implementing the embodiments described above may be implemented by using a program to instruct relevant hardware, and the corresponding program may be stored in a computer-readable storage medium, such as ROM/RAM, magnetic disk or optical disk.
Example 5:
as shown in fig. 13, this embodiment provides a humor generation and emotion interaction robot system, which includes a user data obtaining module 1301, a humor segment generation output module 1302, an emotion feedback monitoring module 1303, a first judging module 1304, a second judging module 1305, and a humor big data knowledge base obtaining module 1306, where the specific functions of the modules are as follows:
the user data obtaining module 1301 is configured to obtain data of a user;
the humorous segment generation output module 1302 is configured to generate a humorous segment output according to the data of the user, where the humorous segment may be generated by an existing humorous generation method;
the emotion feedback monitoring module 1303 is used for monitoring the emotion fed back by the user to the output humorous speech segment;
the first judging module 1304 is configured to judge that the output humorous segment has humorous characteristics when the emotion recognition result fed back by the user is a preset emotion, and judge that the humorous degree of the output humorous segment is larger when the preset emotion degree in the emotion recognition result fed back by the user is larger;
the second judging module 1305 is configured to judge that the output humorous segment does not have humorous characteristics when the emotion recognition result fed back by the user is an emotion other than the preset emotion;
the humor big data knowledge base obtaining module 1306 is used for storing the humor section with humor characteristics, the environment information corresponding to the humor section, the humor degree of the humor section and emotion feedback of a user to the humor section into the humor big data knowledge base.
Example 6:
the other modules of this embodiment are different from embodiment 1 in the implementation of the humorous segment generation output module 1302, as shown in fig. 14, the humorous segment generation output module 1302 includes a small data extraction unit 13021, a large data acquisition unit 13022, a first related data set acquisition unit 13023, a positive related segment set acquisition unit 13024, a positive and negative related segment set acquisition unit 13025, a humorous segment set acquisition unit 13026, and a humorous segment output unit 13027, and the specific functions of each unit are as follows:
the small data extraction unit 13021 is configured to extract partial data from the user data as first small data, and then extract partial data as second small data.
The big data obtaining unit 13022 is configured to obtain big data.
The first relevant data set obtaining unit 13023 is configured to obtain data related to the first small data from the large data, and after the data is cleaned, the data is used as the first relevant data set.
The positive correlation term set obtaining unit 13024 is configured to mine a term, of which the positive correlation degree with the first small data is greater than a preset positive correlation degree threshold, from the first correlation data set, and store the mined term and the positive correlation degree thereof in the positive correlation term set, where a specific process is as described in embodiment 2.
The positive and negative related phrase set obtaining unit 13025 mines the phrase with the negative correlation degree with the second small data larger than the preset negative correlation degree threshold from the positive related phrase set, and stores the mined phrase and the corresponding positive correlation degree and negative correlation degree into the positive and negative related phrase set, which can be seen in embodiment 2.
The humorous segment set obtaining unit 13026 calculates the humorous degree of each segment according to the positive correlation and the negative correlation corresponding to each segment in the positive and negative correlation segment sets, and stores the segment with the humorous degree greater than the preset humorous threshold value into the humorous segment set, where the specific process can be seen in embodiment 2.
The humorous segment output unit 13027 selects the humorous segment with the largest humorous degree from the set of humorous segments, and outputs the humorous segment.
Example 7:
the other modules of this embodiment are different from embodiment 1 in the implementation of the humorous segment generating and outputting module 1302, as shown in fig. 15, the humorous segment generating and outputting module 1302 includes a small data extracting unit 13021, a large data acquiring unit 13022, a first related data set acquiring unit 13023, a negative related segment set acquiring unit 13024, a negative positive related segment set acquiring unit 13025, a humorous segment set acquiring unit 13026, and a humorous segment outputting unit 13027, and specific functions of each unit are as follows:
the small data extraction unit 13021 is configured to extract partial data from the user data as first small data, and then extract partial data as second small data.
The big data obtaining unit 13022 is configured to obtain big data.
The first relevant data set obtaining unit 13023 is configured to obtain data related to the first small data from the large data, and after the data is cleaned, the data is used as the first relevant data set.
The negative relevance phrase set obtaining unit 13024 is configured to mine a phrase, of which the negative relevance with the second small data is greater than a preset negative relevance threshold, from the first relevant data set, and store the mined phrase and the negative relevance thereof in the negative relevance phrase set, where a specific process may be as in embodiment 3.
The negative-positive correlation term set obtaining unit 13025 is configured to mine a term set from the negative correlation term set, where a positive correlation degree with the first small data is greater than a preset positive correlation threshold, and store the mined term set and a corresponding negative correlation degree and positive correlation degree thereof in the negative-positive correlation term set, where a specific process is as in embodiment 3.
The humorous segment set obtaining unit 13026 is configured to calculate, according to the negative correlation and the positive correlation corresponding to each segment in the negative-positive correlation segment set, the humorous degree of the segment, and store, in the humorous segment set, the segment whose humorous degree is greater than a preset humorous threshold, where a specific process may be referred to in embodiment 3.
The humorous segment output unit 13027 selects the humorous segment with the largest humorous degree from the set of humorous segments, and outputs the humorous segment.
Example 8:
as shown in fig. 16, the user data obtaining module 1301, the humorous section generation output module 1302, the emotion feedback monitoring module 1303, the first judging module 1304, the second judging module 1305 and the humorous big data knowledge base obtaining module 1306 in this embodiment are the same as those in embodiments 5, 6 or 7, but the humorous generation and emotion interaction robot system in this embodiment further includes an emotion feedback related information obtaining module 1307, an emotion feedback big data obtaining module 1308, an alternative reply set obtaining module 1309, an expected user emotion feedback obtaining module 1310, an emotion feedback record retrieving module 1311, a matching degree calculating module 1312 and a reply content obtaining module 1313, and the specific functions of these modules are as follows:
the emotion feedback related information acquisition module 1307 is configured to obtain emotion feedback related information of different types of users responding to different responses in the past according to data in the humor data knowledge base and emotion feedback of different types of users responding to different responses in the past except for preset emotions; the emotion feedback related information comprises user information, response content, emotion feedback content and emotion feedback type;
the emotion feedback big data acquisition module 1308 is configured to store emotion feedback related information of different types of users responding to different responses in the past into emotion feedback big data;
the alternative reply set obtaining module 1309 is configured to obtain information of a user to be replied, and obtain an alternative reply set of the user to be replied;
the expected user emotion feedback acquisition module 1310 is used for acquiring expected user emotion feedback;
the emotion feedback record retrieving module 1311 is configured to retrieve, from the emotion feedback big data, all emotion feedback records that are most matched with the information of the user to be replied and the reply content in the alternative reply set of the user to be replied, where the details are as follows:
the emotion feedback record selecting method is used for matching user information, reply content and user information to be replied in each emotion feedback record in the emotion feedback big data, reply content in an alternative reply set of a user to be replied to obtain matching degree of each emotion feedback record and user information to be replied and the alternative reply set of the user to be replied, and selecting the emotion feedback record corresponding to the maximum matching degree from the matching degree as the emotion feedback record which is most matched with the user information to be replied and the alternative reply set of the user to be replied.
The matching degree calculating module 1312 is configured to extract emotion feedback from the emotion feedback records, and calculate a matching degree between the emotion feedback and emotion feedback of an expected user.
The reply content obtaining module 1313 is configured to obtain, according to the emotion feedback record corresponding to the maximum matching degree between the emotion feedback and the emotion feedback of the expected user, reply content corresponding to the emotion feedback record, and use the reply content as a reply of the user to be replied.
It should be noted that the robot system provided in the above embodiments is only illustrated by dividing the above functional modules, and in practical applications, the above functions may be distributed by different functional modules according to needs, that is, the internal structure may be divided into different functional modules to complete all or part of the above described functions.
It will be understood that the terms "first", "second", etc. used in the robotic systems of the various embodiments described above may be used to describe various modules, but the modules are not limited by these terms. These terms are only used to distinguish one module from another. For example, the first determining module may be referred to as a second determining module, and similarly, the second determining module may be referred to as a first determining module, and the first determining module and the second determining module are both determining modules, but not the same determining module, without departing from the scope of the present invention.
The above description is only for the preferred embodiments of the present invention, but the protection scope of the present invention is not limited thereto, and any person skilled in the art can substitute or change the technical solution and the inventive concept of the present invention within the scope of the present invention.
Claims (10)
1. A humorous generation and emotion interaction method is applied to a robot and comprises the following steps:
acquiring data of a user;
generating humorous speech segment output according to the data of the user;
monitoring the emotion fed back by the user to the output humorous speech segment;
when the emotion recognition result fed back by the user is a preset emotion, judging that the output humorous section has humorous characteristics, and judging that the humorous degree of the output humorous section is larger if the preset emotion degree in the emotion recognition result fed back by the user is larger;
when the emotion recognition result fed back by the user is emotion outside the preset emotion, judging that the output humorous section does not have humorous characteristics;
storing a humorous section with humorous characteristics, environmental information corresponding to the humorous section, humorous degree of the humorous section and emotional feedback of a user to the humorous section into a humorous big data knowledge base;
the generating of humor speech segment output according to the data of the user specifically comprises:
extracting partial data from the data of the user as first small data, and extracting partial data as second small data;
acquiring big data;
acquiring data related to the first small data from the big data, and cleaning the data to be used as a first related data set;
mining the language segments with the negative correlation degree with the second small data larger than a preset negative correlation degree threshold value from the first relevant data set, and storing the mined language segments and the negative correlation degree thereof into a negative correlation language segment set;
mining the language segments with positive correlation degree with the first small data larger than a preset positive correlation threshold value from the negative correlation language segment set, and storing the mined language segments and the corresponding negative correlation degree and positive correlation degree thereof into the negative positive correlation language segment set;
calculating the humorous degree of each speech segment in the negative-positive correlation speech segment set according to the negative correlation degree and the positive correlation degree corresponding to each speech segment, and storing the speech segments with the humorous degree larger than a preset humorous threshold value into the humorous speech segment set;
and selecting the humorous section with the maximum humorous degree from the humorous section set, and outputting the humorous section.
2. The method for humor generation and emotion interaction according to claim 1, wherein the mining of the corpus from the first related dataset, the negative correlation degree of which with the second small data is greater than a preset negative correlation degree threshold, and the storing of the mined corpus and the negative correlation degree thereof into the negative correlation corpus, specifically comprises:
acquiring the number of similar language segments of the second small data in the big data as a first number;
counting the number of similar data in the big data of each data in the first relevant data set as a second number of the data;
counting the number of similar data in the big data, which is obtained after the data is combined with the second small data, as a third number of the data;
calculating the negative correlation degree of the data according to the first quantity, the second quantity and the third quantity of the data;
judging whether the negative correlation degrees of all the language sections in the first relevant data set and the second small data are larger than a preset negative correlation degree threshold value or not;
and storing the language segments with the negative correlation degree with the second small data larger than a preset negative correlation degree threshold value and the negative correlation degree thereof into a negative correlation language segment set.
3. The method of claim 1, wherein the language segments with positive correlation with the first small data greater than a preset positive correlation threshold are mined from the negative correlation language segment set, and the mined language segments and the corresponding negative and positive correlations are stored in the negative and positive correlation language segment set, and the method specifically comprises:
acquiring the number of similar language segments of the first small data in the big data as a fourth number;
counting the number of similar data in the big data of each data in the negative correlation corpus set as a fifth number of the data;
counting the number of similar data in the big data, which is obtained after the data is combined with the first small data, and taking the number as the sixth number of the data;
calculating the positive correlation degree of the data according to the fourth quantity, the fifth quantity and the sixth quantity of the data;
judging whether the positive correlation degree of all the language segments in the negative correlation language segment set and the first small data is larger than a preset positive correlation degree threshold value or not;
and storing the language segments with positive correlation degree with the first small data larger than a preset positive correlation threshold value and the corresponding negative correlation degree and positive correlation degree into a negative-positive correlation language segment set.
4. A humor generation and emotion interaction method according to any of claims 1-3, further comprising:
obtaining emotion feedback related information of different types of users responding to different responses in the past according to data in the humorous big data knowledge base and emotion feedback of different types of users responding to different responses in the past; the emotion feedback related information comprises user information, response content, emotion feedback content and emotion feedback type;
storing emotion feedback related information of different types of users for different responses in the past into emotion feedback big data;
acquiring user information to be replied and acquiring an alternative reply set of a user to be replied;
obtaining expected user emotion feedback;
retrieving all emotion feedback records which are most matched with the information of the user to be replied and the reply content in the alternative reply set of the user to be replied from the emotion feedback big data;
extracting emotion feedback from the emotion feedback records, and calculating the matching degree of the emotion feedback and the emotion feedback of the expected user;
and acquiring response content corresponding to the emotion feedback record according to the emotion feedback record corresponding to the maximum matching degree of the emotion feedback and the emotion feedback of the expected user, and taking the response content as the response of the user to be responded.
5. The humor generation and emotion interaction method of claim 4, wherein all emotion feedback records that best match the user information and the response content in the alternative response set are retrieved from the emotion feedback big data, specifically:
matching the user information, the reply content and the user information to be replied in each emotion feedback record in the emotion feedback big data, and the reply content in the alternative reply set of the user to be replied to obtain the matching degree of each emotion feedback record, the user information to be replied and the alternative reply set of the user to be replied, and selecting the emotion feedback record corresponding to the maximum matching degree from the matching degrees as the emotion feedback record which is most matched with the user information to be replied and the alternative reply set of the user to be replied.
6. A humorous generating and emotional interaction robotic system, the system comprising:
the user data acquisition module is used for acquiring data of a user;
the humorous section generation output module is used for generating humorous section output according to the data of the user;
the emotion feedback monitoring module is used for monitoring the emotion fed back by the user to the output humorous speech segment;
the first judgment module is used for judging that the output humorous section has humorous characteristics when the emotion recognition result fed back by the user is a preset emotion, and the humorous degree of the output humorous section is judged to be larger when the preset emotion degree in the emotion recognition result fed back by the user is larger;
the second judging module is used for judging that the output humorous section does not have humorous characteristics when the emotion recognition result fed back by the user is an emotion other than the preset emotion;
the humor data knowledge base acquisition module is used for storing a humor section with humor characteristics, environment information corresponding to the humor section, the humor degree of the humor section and emotion feedback of a user on the humor section into the humor data knowledge base;
the humor speech segment generating and outputting module specifically comprises:
a small data extraction unit for extracting partial data from the user data as first small data and then extracting partial data as second small data;
a big data acquisition unit for acquiring big data;
a first related data set acquisition unit, configured to acquire data related to the first small data from the large data, and after the data is cleaned, the data is used as a first related data set;
the negative correlation phrase set acquisition unit is used for mining the phrase with the negative correlation degree of the second small data being greater than a preset negative correlation degree threshold value from the first correlation data set and storing the mined phrase and the negative correlation degree thereof into the negative correlation phrase set;
the negative and positive correlation term set acquisition unit is used for mining a term with positive correlation degree with the first small data larger than a preset positive correlation threshold value from the negative correlation term set, and storing the mined term and the corresponding negative correlation degree and positive correlation degree thereof into the negative and positive correlation term set;
the humorous segment set acquisition unit is used for calculating the humorous degree of each segment according to the negative correlation and the positive correlation corresponding to each segment in the negative-positive correlation segment set, and storing the segment with the humorous degree larger than a preset humorous threshold value into the humorous segment set;
and a humorous segment output unit which selects the humorous segment with the maximum humorous degree from the humorous segment set and outputs the humorous segment.
7. The humorous generation and emotion interactive robot system of claim 6, wherein, in the negatively correlated corpus collection obtaining unit, the corpus of which the negative correlation degree with the second small data is greater than a preset negative correlation degree threshold is mined from the first correlated dataset, and the mined corpus and the negative correlation degree thereof are stored in the negatively correlated corpus, which specifically includes:
acquiring the number of similar language segments of the second small data in the big data as a first number;
counting the number of similar data in the big data of each data in the first relevant data set as a second number of the data;
counting the number of similar data in the big data, which is obtained after the data is combined with the second small data, as a third number of the data;
calculating the negative correlation degree of the data according to the first quantity, the second quantity and the third quantity of the data;
judging whether the negative correlation degrees of all the language sections in the first relevant data set and the second small data are larger than a preset negative correlation degree threshold value or not;
and storing the language segments with the negative correlation degree with the second small data larger than a preset negative correlation degree threshold value and the negative correlation degree thereof into a negative correlation language segment set.
8. The humorous generation and emotion interactive robot system of claim 6, wherein, in the negative positive correlation corpus acquisition unit, the corpus of which positive correlation with the first small data is greater than a preset positive correlation threshold is mined from the negative correlation corpus, and the mined corpus and the corresponding negative correlation and positive correlation thereof are stored in the negative positive correlation corpus, and specifically includes:
acquiring the number of similar language segments of the first small data in the big data as a fourth number;
counting the number of similar data in the big data of each data in the negative correlation corpus set as a fifth number of the data;
counting the number of similar data in the big data, which is obtained after the data is combined with the first small data, and taking the number as the sixth number of the data;
calculating the positive correlation degree of the data according to the fourth quantity, the fifth quantity and the sixth quantity of the data;
judging whether the positive correlation degree of all the language segments in the negative correlation language segment set and the first small data is larger than a preset positive correlation degree threshold value or not;
and storing the language segments with positive correlation degree with the first small data larger than a preset positive correlation threshold value and the corresponding negative correlation degree and positive correlation degree into a negative-positive correlation language segment set.
9. A humor generation and emotion interaction robot system according to any of claims 6-8, further comprising:
the emotion feedback related information acquisition module is used for acquiring emotion feedback related information of different types of users responding to different responses in the past according to data in the humorous big data knowledge base and emotion feedback of different types of users responding to different preset emotions in the past; the emotion feedback related information comprises user information, response content, emotion feedback content and emotion feedback type;
the emotion feedback big data acquisition module is used for storing emotion feedback related information of different types of users responding to different responses in the past into emotion feedback big data;
the alternative reply set acquisition module is used for acquiring the information of the user to be replied and acquiring an alternative reply set of the user to be replied;
the expected user emotion feedback acquisition module is used for acquiring expected user emotion feedback;
the emotion feedback record retrieval module is used for retrieving all emotion feedback records which are most matched with the information of the user to be replied and the reply content in the alternative reply set of the user to be replied from the emotion feedback big data;
the matching degree calculation module is used for extracting emotion feedback from the emotion feedback records and calculating the matching degree of the emotion feedback and the emotion feedback of the expected user;
and the reply content acquisition module is used for acquiring reply content corresponding to the emotion feedback record according to the emotion feedback record corresponding to the maximum matching degree of the emotion feedback and the emotion feedback of the expected user, and taking the reply content as the reply of the user to be replied.
10. The humorous generation and emotion interactive robot system of claim 9, wherein, the emotion feedback record retrieval module is specifically:
the emotion feedback record selecting method is used for matching user information, reply content and user information to be replied in each emotion feedback record in the emotion feedback big data, reply content in an alternative reply set of a user to be replied to obtain matching degree of each emotion feedback record and user information to be replied and the alternative reply set of the user to be replied, and selecting the emotion feedback record corresponding to the maximum matching degree from the matching degree as the emotion feedback record which is most matched with the user information to be replied and the alternative reply set of the user to be replied.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201910793954.5A CN110674270B (en) | 2017-08-28 | 2017-08-28 | Humorous generation and emotion interaction method based on artificial intelligence and robot system |
Applications Claiming Priority (2)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201910793954.5A CN110674270B (en) | 2017-08-28 | 2017-08-28 | Humorous generation and emotion interaction method based on artificial intelligence and robot system |
CN201710749276.3A CN107480291B (en) | 2017-08-28 | 2017-08-28 | emotion interaction method based on humor generation and robot system |
Related Parent Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201710749276.3A Division CN107480291B (en) | 2017-08-28 | 2017-08-28 | emotion interaction method based on humor generation and robot system |
Publications (2)
Publication Number | Publication Date |
---|---|
CN110674270A CN110674270A (en) | 2020-01-10 |
CN110674270B true CN110674270B (en) | 2022-01-28 |
Family
ID=60602911
Family Applications (2)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201710749276.3A Active CN107480291B (en) | 2017-08-28 | 2017-08-28 | emotion interaction method based on humor generation and robot system |
CN201910793954.5A Active CN110674270B (en) | 2017-08-28 | 2017-08-28 | Humorous generation and emotion interaction method based on artificial intelligence and robot system |
Family Applications Before (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201710749276.3A Active CN107480291B (en) | 2017-08-28 | 2017-08-28 | emotion interaction method based on humor generation and robot system |
Country Status (2)
Country | Link |
---|---|
JP (1) | JP2019040605A (en) |
CN (2) | CN107480291B (en) |
Families Citing this family (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN109977201B (en) * | 2019-01-28 | 2023-09-22 | 平安科技(深圳)有限公司 | Machine chat method and device with emotion, computer equipment and storage medium |
CN111210818B (en) * | 2019-12-31 | 2021-10-01 | 北京三快在线科技有限公司 | Word acquisition method and device matched with emotion polarity and electronic equipment |
CN115440232B (en) * | 2022-11-08 | 2023-03-24 | 深圳市人马互动科技有限公司 | Joke segment processing method and device, electronic equipment and computer storage medium |
Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2009022819A2 (en) * | 2007-08-10 | 2009-02-19 | Quaterview Co., Ltd. | System and method for supporting emotional expression of intelligent robot and intelligent robot system using the same |
CN105930374A (en) * | 2016-04-12 | 2016-09-07 | 华南师范大学 | Emotion robot conversation method and system based on recent feedback, and robot |
Family Cites Families (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2003044088A (en) * | 2001-07-27 | 2003-02-14 | Sony Corp | Program, recording medium, device and method for voice interaction |
KR100825719B1 (en) * | 2005-12-09 | 2008-04-29 | 한국전자통신연구원 | Method for generating emotions and emotions generating robot |
KR101410601B1 (en) * | 2013-01-25 | 2014-06-20 | 포항공과대학교 산학협력단 | Spoken dialogue system using humor utterance and method thereof |
CN103971131A (en) * | 2014-05-13 | 2014-08-06 | 华为技术有限公司 | Preset facial expression recognition method and device |
CN104299225A (en) * | 2014-09-12 | 2015-01-21 | 姜羚 | Method and system for applying facial expression recognition in big data analysis |
CN105930372B (en) * | 2016-04-12 | 2019-05-31 | 华南师范大学 | Based on emotional robot dialogue method, system and the robot repeatedly fed back |
CN105955949B (en) * | 2016-04-29 | 2018-05-29 | 华南师范大学 | Humorous humanoid robot dialog control method and system based on big data search |
-
2017
- 2017-08-28 CN CN201710749276.3A patent/CN107480291B/en active Active
- 2017-08-28 CN CN201910793954.5A patent/CN110674270B/en active Active
-
2018
- 2018-08-28 JP JP2018158916A patent/JP2019040605A/en active Pending
Patent Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2009022819A2 (en) * | 2007-08-10 | 2009-02-19 | Quaterview Co., Ltd. | System and method for supporting emotional expression of intelligent robot and intelligent robot system using the same |
CN105930374A (en) * | 2016-04-12 | 2016-09-07 | 华南师范大学 | Emotion robot conversation method and system based on recent feedback, and robot |
Also Published As
Publication number | Publication date |
---|---|
JP2019040605A (en) | 2019-03-14 |
CN110674270A (en) | 2020-01-10 |
CN107480291B (en) | 2019-12-10 |
CN107480291A (en) | 2017-12-15 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN107818798B (en) | Customer service quality evaluation method, device, equipment and storage medium | |
CN106658129B (en) | Terminal control method and device based on emotion and terminal | |
CN104598644B (en) | Favorite label mining method and device | |
JP6857581B2 (en) | Growth interactive device | |
EP3617946B1 (en) | Context acquisition method and device based on voice interaction | |
CN105446146B (en) | Intelligent terminal control method, system and intelligent terminal based on semantic analysis | |
Mariooryad et al. | Building a naturalistic emotional speech corpus by retrieving expressive behaviors from existing speech corpora | |
US20200135158A1 (en) | System and Method of Reading Environment Sound Enhancement Based on Image Processing and Semantic Analysis | |
CN103456314B (en) | A kind of emotion identification method and device | |
WO2019100319A1 (en) | Providing a response in a session | |
CN110674270B (en) | Humorous generation and emotion interaction method based on artificial intelligence and robot system | |
CN110473543B (en) | Voice recognition method and device | |
CN110442867B (en) | Image processing method, device, terminal and computer storage medium | |
JP6915637B2 (en) | Information processing equipment, information processing methods, and programs | |
JP6913848B2 (en) | Emotional dialogue methods and robot systems based on humor identification | |
CN109325124A (en) | A kind of sensibility classification method, device, server and storage medium | |
CN114155860A (en) | Abstract recording method and device, computer equipment and storage medium | |
US20120185417A1 (en) | Apparatus and method for generating activity history | |
CN115906810A (en) | Abnormal speech analysis method and equipment based on time series and viewpoint mining | |
CN108810625A (en) | A kind of control method for playing back of multi-medium data, device and terminal | |
CN110910898B (en) | Voice information processing method and device | |
CN112233648B (en) | Data processing method, device, equipment and storage medium combining RPA and AI | |
CN114492579A (en) | Emotion recognition method, camera device, emotion recognition device and storage device | |
CN112860213A (en) | Audio processing method, storage medium and electronic equipment | |
Wang et al. | A database for emotional interactions of the elderly |
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 |