Intelligent dialogue method and device

Through an intelligent dialogue system based on text classification models, combined with user behavior and emotion classification results, the existing technology problems of low naturalness of human-computer interaction and complex system design are solved, and efficient user intention matching and dialogue structure improvement are achieved.

CN113761111BActive Publication Date: 2024-10-18BEIJING HUIJUN TECH CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202010761309.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2020-07-31
Publication Date
2024-10-18
Estimated Expiration
2040-07-31

AI Technical Summary

Technical Problem

Existing intelligent dialogue systems suffer from low naturalness of human-computer interaction, lack of flexibility, and complex system design. It is difficult to accurately predict user emotions and intentions, and the dialogue structure and state transfer paths are limited.

Method used

The text classification model is used to classify user utterances emotionally, and user behavior and emotion classification results are combined to conduct intelligent dialogues. Error correction and text generation models are used to match candidate question and answer pairs to improve the flexibility and naturalness of dialogues.

Benefits of technology

It achieves simple system design, high naturalness of human-computer interaction, improved dialogue structure and smooth state transfer path, improves the flexibility and expressiveness of dialogue, and ensures clear user intentions.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN113761111B_ABST
    Figure CN113761111B_ABST
Patent Text Reader

Abstract

The present invention discloses an intelligent dialogue method and device, and relates to the field of computer technology. A specific implementation of the method includes: receiving the speech input by the user in the interactive interface uploaded by the terminal, performing emotion classification on the speech based on the text classification model to obtain the emotion type; if the emotion type is a normal question, matching a first candidate question-answer pair according to the speech, and sending the first candidate question-answer pair to the terminal; receiving the click result of the user on the first candidate question-answer pair uploaded by the terminal, if the click result is none, correcting the error of the speech, matching a second candidate question-answer pair according to the corrected speech, and sending the second candidate question-answer pair to the terminal. This implementation can solve the technical problems of low naturalness of human-computer interaction, lack of flexibility, or complex system design.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of computer technology, and in particular to an intelligent dialogue method and device. Background Art

[0002] With the continuous development of science and technology, the demand for intelligent dialogue systems is increasing. Intelligent dialogue systems need to accurately guess the user's emotions and intentions through indirect or direct speech behaviors, the initiation of new dialogue turns, dialogue clarification and correction, contextual history records and pragmatic information, and actively resolve the user's psychological doubts and uneasiness.

[0003] In the process of implementing the present invention, the inventors found that there are at least the following problems in the prior art:

[0004] 1) Slot filling method: The dialogue process is relatively mechanical, and the naturalness of human-computer interaction is low;

[0005] 2) Finite state automaton method: lack of flexibility, limited expressiveness, dialogue structure / state transition path;

[0006] 3) Statistical methods: It is difficult to obtain and label samples, the system design is complex, and the learning algorithm is not easy to converge. Summary of the invention

[0007] In view of this, an embodiment of the present invention provides an intelligent dialogue method and device to solve the technical problems of low naturalness of human-computer interaction, lack of flexibility or complex system design.

[0008] To achieve the above object, according to one aspect of an embodiment of the present invention, an intelligent dialogue method is provided, comprising:

[0009] Receiving the speech input by the user in the interactive interface uploaded by the terminal, and performing sentiment classification on the speech based on the text classification model to obtain the sentiment type;

[0010] If the emotion type is a normal question, matching a first candidate question-answer pair according to the utterance, and sending the first candidate question-answer pair to the terminal;

[0011] Receive the user's click result on the first candidate question and answer pair uploaded by the terminal. If the click result is none, correct the utterance, match the second candidate question and answer pair according to the corrected utterance, and send the second candidate question and answer pair to the terminal.

[0012] Optionally, performing error correction on the utterance and matching a second candidate question-answer pair according to the corrected utterance includes:

[0013] Using the N-Gram model to identify the words to be corrected with the lowest probability of occurrence in the utterance;

[0014] Combining Chinese Pinyin, using homophones to replace the wrong characters in the words to be corrected, so that the corrected words have the highest probability of appearing;

[0015] A second candidate question-answer pair is matched according to the corrected utterance, a text relevance calculation model is used to calculate the relevance between the corrected utterance and the second candidate question-answer pair, and at least one second candidate question-answer pair with a high relevance to the corrected utterance is screened out.

[0016] The receiving terminal uploads the speech input by the user in the interactive interface, including:

[0017] The receiving terminal uploads the words input by the user in the interactive interface of the item page;

[0018] The interactive interface is a floating window suspended on the item page; or, the interactive interface and the item page are displayed simultaneously in a top-bottom paging manner or a left-right paging manner.

[0019] Optionally, it also includes:

[0020] Receive a click result of a user on the second candidate question-answer pair uploaded by the terminal. If the click result is none, generate text based on a text generation model and the attributes of the object, and send the text to the terminal.

[0021] Optionally, it also includes:

[0022] Receive a response result of the user to the text uploaded by the terminal, and if the response result is none, search for at least one characteristic item of the same category as the item, and send the at least one characteristic item to the terminal.

[0023] Optionally, it also includes:

[0024] Receive a response result of the user to the at least one feature item uploaded by the terminal. If the response result is none, construct a user vector according to the user's historical click behavior, calculate the similarity between the user vector and each item vector using a local sensitive hashing method, screen out at least one item to be recommended with a high similarity, and send the at least one item to be recommended to the terminal.

[0025] Optionally, it also includes:

[0026] receiving a message uploaded by the terminal indicating that the user has exited the interactive interface;

[0027] Generate text based on the text generation model and the attributes of the object, and send the text to the terminal.

[0028] Optionally, it also includes:

[0029] If the emotion type is negative tone, then the soothing words are sent to the terminal;

[0030] Receive the user's response result to the soothing words uploaded by the terminal. If the response result is none, generate text based on a text generation model and the attributes of the object, and send the text to the terminal.

[0031] Optionally, it also includes:

[0032] If the emotion type is a questionable item, the evaluation data of the item is sent to the terminal;

[0033] Receive the response result of the user to the evaluation data uploaded by the terminal, if the response result is no, generate text based on the text generation model and the attributes of the item, and send the text to the terminal.

[0034] Optionally, it also includes:

[0035] If the emotion type is order intention, the order promotion speech of the item is sent to the terminal;

[0036] Receive the user's response result to the order promotion speech uploaded by the terminal. If the response result is none, generate text based on the text generation model and the attributes of the item, and send the text to the terminal.

[0037] In addition, according to another aspect of the embodiment of the present invention, there is provided an intelligent dialogue device, comprising:

[0038] A classification module is used to receive the speech input by the user in the interactive interface uploaded by the terminal, and perform sentiment classification on the speech based on the text classification model to obtain the sentiment type;

[0039] The dialogue module is used to match a first candidate question-answer pair according to the speech if the emotion type is a normal question, and send the first candidate question-answer pair to the terminal; receive the click result of the user on the first candidate question-answer pair uploaded by the terminal, and if the click result is none, correct the speech, match a second candidate question-answer pair according to the corrected speech, and send the second candidate question-answer pair to the terminal.

[0040] Optionally, the dialogue module is further used for:

[0041] Using the N-Gram model to identify the words to be corrected with the lowest probability of occurrence in the utterance;

[0042] Combining Chinese Pinyin, using homophones to replace the wrong characters in the words to be corrected, so that the corrected words have the highest probability of appearing;

[0043] A second candidate question-answer pair is matched according to the corrected utterance, a text relevance calculation model is used to calculate the relevance between the corrected utterance and the second candidate question-answer pair, and at least one second candidate question-answer pair with a high relevance to the corrected utterance is screened out.

[0044] Optionally, the dialogue module is further used for:

[0045] The receiving terminal uploads the words input by the user in the interactive interface of the item page;

[0046] The interactive interface is a floating window suspended on the item page; or, the interactive interface and the item page are displayed simultaneously in a top-bottom paging manner or a left-right paging manner.

[0047] Optionally, the dialogue module is further used for:

[0048] Receive a click result of a user on the second candidate question-answer pair uploaded by the terminal. If the click result is none, generate text based on a text generation model and the attributes of the object, and send the text to the terminal.

[0049] Optionally, the dialogue module is further used for:

[0050] Receive a response result of the user to the text uploaded by the terminal, and if the response result is none, search for at least one characteristic item of the same category as the item, and send the at least one characteristic item to the terminal.

[0051] Optionally, the dialogue module is further used for:

[0052] Receive a response result of the user to the at least one feature item uploaded by the terminal. If the response result is none, construct a user vector according to the user's historical click behavior, calculate the similarity between the user vector and each item vector using a local sensitive hashing method, screen out at least one item to be recommended with a high similarity, and send the at least one item to be recommended to the terminal.

[0053] Optionally, the dialogue module is further used for:

[0054] receiving a message uploaded by the terminal indicating that the user has exited the interactive interface;

[0055] Generate text based on the text generation model and the attributes of the object, and send the text to the terminal.

[0056] Optionally, the dialogue module is further used for:

[0057] If the emotion type is negative tone, then the soothing words are sent to the terminal;

[0058] Receive the user's response result to the soothing words uploaded by the terminal. If the response result is none, generate text based on a text generation model and the attributes of the object, and send the text to the terminal.

[0059] Optionally, the dialogue module is further used for:

[0060] If the emotion type is a questionable item, the evaluation data of the item is sent to the terminal;

[0061] Receive the response result of the user to the evaluation data uploaded by the terminal, if the response result is no, generate text based on the text generation model and the attributes of the item, and send the text to the terminal.

[0062] Optionally, the dialogue module is further used for:

[0063] If the emotion type is order intention, the order promotion speech of the item is sent to the terminal;

[0064] Receive the user's response result to the order promotion speech uploaded by the terminal. If the response result is none, generate text based on the text generation model and the attributes of the item, and send the text to the terminal.

[0065] According to another aspect of an embodiment of the present invention, there is further provided an electronic device, including:

[0066] one or more processors;

[0067] a storage device for storing one or more programs,

[0068] When the one or more programs are executed by the one or more processors, the one or more processors implement the method described in any one of the above embodiments.

[0069] According to another aspect of an embodiment of the present invention, a computer-readable medium is provided, on which a computer program is stored. When the program is executed by a processor, the method described in any one of the above embodiments is implemented.

[0070] An embodiment of the above invention has the following advantages or beneficial effects: because it adopts a technical means to classify user speech based on text classification model, and uses user behavior and emotion classification results as trigger state transition conditions to conduct intelligent dialogue with users, it overcomes the technical problems of low naturalness of human-computer interaction, lack of flexibility or complex system design in the prior art. The embodiment of the present invention corrects the user speech to make the user's intention clear, thereby matching accurate candidate question and answer pairs, and using user behavior and emotion classification results as trigger state transition conditions can improve the flexibility of the dialogue. Therefore, the embodiment of the present invention not only has the advantages of simple system design and high naturalness of human-computer interaction, but also can improve the expression ability, improve the dialogue structure, and enhance the smoothness of the dialogue state transition path.

[0071] The further effects of the above-mentioned non-conventional optional manner will be described below in conjunction with the specific implementation manner. BRIEF DESCRIPTION OF THE DRAWINGS

[0072] The accompanying drawings are used to better understand the present invention and do not constitute an improper limitation of the present invention.

[0073] FIG1 is a schematic diagram of the main process of the intelligent dialogue method according to an embodiment of the present invention;

[0074] FIG2 is a schematic diagram of a dialog state transfer according to an embodiment of the present invention;

[0075] FIG3 is a schematic diagram of a process of re-clarifying user intention according to an embodiment of the present invention;

[0076] FIG4 is a schematic diagram of main modules of an intelligent dialogue device according to an embodiment of the present invention;

[0077] FIG5 is a diagram of an exemplary system architecture to which an embodiment of the present invention may be applied;

[0078] Figure 6 It is a schematic diagram of the structure of a computer system of a terminal device or a server suitable for implementing an embodiment of the present invention. DETAILED DESCRIPTION

[0079] The following is a description of exemplary embodiments of the present invention in conjunction with the accompanying drawings, including various details of the embodiments of the present invention to facilitate understanding, which should be considered as merely exemplary. Therefore, it should be recognized by those of ordinary skill in the art that various changes and modifications may be made to the embodiments described herein without departing from the scope and spirit of the present invention. Similarly, for clarity and conciseness, the description of well-known functions and structures is omitted in the following description.

[0080] Figure 1Schematic diagram of the main process of the intelligent dialogue method according to an embodiment of the present invention. Figure 1 As shown, the intelligent dialogue method may include:

[0081] Step 101: receiving the speech input by the user in the interactive interface uploaded by the terminal, and performing sentiment classification on the speech based on the text classification model to obtain the sentiment type.

[0082] When browsing an item, the user enters words in the interactive interface to initiate a conversation with the intelligent dialogue system. The intelligent dialogue system receives the user words uploaded by the terminal, and then classifies the user words based on the text classification model to obtain the emotion type, such as normal questioning, negative tone, questioning the item, and order intention. Optionally, the user words can be classified based on the TextCNN text classification model.

[0083] It should be pointed out that the emotion type is determined by different business scenarios, and different business scenarios require different emotion types to be marked. First, the existing user utterances are labeled, and each label represents an emotion type. Then, the user utterances and their corresponding labels are used as training samples to perform supervised training on the TextCNN text classification model. Finally, the trained TextCNN text classification model is used to perform emotion classification on the user utterances.

[0084] The speech input by the user in the interactive interface uploaded by the receiving terminal includes: the speech input by the user in the interactive interface of the item page uploaded by the receiving terminal; wherein the interactive interface is a floating window suspended on the item page; or the interactive interface and the item page are displayed simultaneously in a vertical paging method or a left-right paging method. In an embodiment of the present invention, when a user is browsing an item, the interactive interface can be suspended on the item page in the form of a floating window, so that the user can input speech in the interactive interface; the interactive interface and the item page can also be displayed on the screen simultaneously in a vertical paging method or a left-right paging method, so that the user can input speech while browsing the item.

[0085] Step 102: If the emotion type is a normal question, a first candidate question-answer pair is matched according to the utterance, and the first candidate question-answer pair is sent to the terminal.

[0086] If the result of sentiment classification is a normal question, a first candidate question-answer pair is matched according to the utterance, and the first candidate question-answer pair is sent to the terminal. Optionally, the first candidate question-answer pair can be matched based on a retrieval question-answering system built on the ElasticSearch (ES) distributed full-text search engine. The retrieval question-answering system stores high-frequency question-answer pairs for each item, and for the utterance (query) input by the user, relevant questions and their answers can be quickly and accurately retrieved based on ES. Among them, ES uses the BM25 algorithm for retrieval, which is an algorithm for query-similar text matching based on a probabilistic retrieval model. The number of first candidate question-answer pairs sent to the terminal can be one or more, and the embodiments of the present invention do not limit this.

[0087] Step 103, receiving the user's click result on the first candidate question and answer pair uploaded by the terminal, if the click result is none, correcting the utterance, matching the second candidate question and answer pair according to the corrected utterance, and sending the second candidate question and answer pair to the terminal.

[0088] After the terminal receives the first candidate question-answer pairs, the user may click on any one of the first candidate question-answer pairs, or may not click on any one of the first candidate question-answer pairs. The terminal uploads the user's click result on the first candidate question-answer pair to the intelligent dialogue system.

[0089] If the click result is none, it means that the user did not click on any question and answer pair, then the intelligent dialogue system corrects the user's speech in step 101, and then matches a second candidate question and answer pair based on the corrected speech, and sends the second candidate question and answer pair to the terminal.

[0090] Optionally, the utterance is corrected for errors, and a second candidate question-answer pair is matched based on the corrected utterance, including: using the N-Gram model to identify the words to be corrected with the lowest probability of occurrence in the utterance; combining Chinese Pinyin, using homophones to replace the typos in the words to be corrected, so that the corrected words have the highest probability of occurrence; matching the second candidate question-answer pair based on the corrected utterance, using a text relevance calculation model to calculate the relevance between the corrected utterance and the second candidate question-answer pair, and screening out at least one second candidate question-answer pair with a high relevance to the corrected utterance. In this embodiment, the query is first corrected for errors, which is divided into two steps: the first step is to find the typos, and the N-Gram model can be used as a probability score for evaluating the occurrence of a word. The lower the score, the greater the possibility that the word is a typo; the second step is error correction, combining Chinese Pinyin, finding the word with the highest probability of occurrence of the word after replacing the typos in the homophones, as the error correction result. After the error correction is completed, the retrieval question and answer system is used to quickly retrieve candidate question and answer pairs based on BM25; then the TextCNN text relevance calculation model is used to calculate the relevance between the corrected user speech (query') and these candidate question and answer pairs; finally, the question and answer pair with a higher relevance to query' among the candidate question and answer pairs is returned as the second candidate question and answer pair. The number of second candidate question and answer pairs sent to the terminal can be one or more, and the embodiment of the present invention does not limit this.

[0091] After the terminal receives the first candidate question-answer pair, the user exits the current interactive interface (i.e., the user wants to actively end the conversation). Therefore, after step 102, the method further includes: receiving a message uploaded by the terminal indicating that the user exits the item page; generating text based on a text generation model and the attributes of the item, and sending the text to the terminal. In this embodiment, the text can be generated according to the natural language generation and language model methods, and the steps are as follows:

[0092] Training phase. In the training phase, both the encoder and decoder need input information. The encoder input is structured or semi-structured attribute data, and the decoder input is the text information corresponding to the encoder input information, which can also be simply understood as text sequence label information. It can be seen intuitively that the training phase is supervised learning. The encoder is responsible for encoding the input into a semantic vector C, and then the semantic vector C is used as the initial state of the decoder to participate in the decoder's decoding estimation.

[0093] Generation stage. In the generation stage, the decoder no longer needs external input information. It allows the data2text model to analyze and deconstruct a large number of common texts, and then generates various explanatory and descriptive texts according to the attributes of the items. For example, a T-shirt has the following attributes: round neck, print, and loose fit. Text can be generated for these three characteristics: it not only modifies the neck line, is comfortable and does not rub the chin, but also hides the flesh and makes you look thinner without any sense of restraint. It is not only helpful for users to understand the item, but also can enhance user favorability with beautiful sentences. It not only reflects the selling point of the item for users to understand, but also allows users to personally experience how the clothes look when worn on themselves.

[0094] After step 103, the method further includes: receiving a click result of the user on the second candidate question-answer pair uploaded by the terminal, and if the click result is no, generating text based on the text generation model and the attributes of the item, and sending the text to the terminal. If the user does not click on any second candidate question-answer pair, generating text based on the text generation model and the attributes of the item, and the text generation process is similar to the above embodiment and will not be repeated.

[0095] Optionally, the method further includes: receiving a response result of the user to the text uploaded by the terminal, and if the response result is no, searching for at least one characteristic item of the same category as the item, and sending the at least one characteristic item to the terminal. If the user actively asks questions after reading the text, step 101 is executed; if the user does not actively ask questions, some items (of the same category as the current item) during promotions such as discounts, rush purchases, and full discounts are pushed back to the user.

[0096] The method further includes: receiving the response result of the user to the at least one characteristic item uploaded by the terminal, if the response result is none, constructing a user vector according to the historical click behavior of the user, calculating the similarity between the user vector and each item vector by using the locality sensitive hashing method, screening out at least one item to be recommended with a high similarity, and sending the at least one item to be recommended to the terminal. If the user actively asks questions after browsing these characteristic items, step 101 is executed; if the user does not actively ask questions, recommending items to the user again may include the following steps: first, using item2vec to convert the items into vector representations, then constructing positive and negative sample data based on the user's item click behavior log, training the user vector representation through the DNN model, using it as the user vector, and then using the locality sensitive hashing method (LSH) to quickly calculate the item vectors with high similarity to the current user vector, it is considered that the user is more interested in these items, and recommending them to the user.

[0097] In step 101, the intelligent dialogue system receives the user speech uploaded by the terminal, and then performs emotion classification on the user speech based on the text classification model to obtain the emotion type. If the emotion type is negative in tone, the soothing speech is sent to the terminal. The embodiment of the present invention can respond to the user with soothing speech for negative emotions such as anger and anxiety during the conversation with customer service, thereby improving the user's dialogue experience. Then, the intelligent dialogue system receives the user's response result to the soothing speech uploaded by the terminal. If the response result is none, a text is generated based on the text generation model and the attributes of the item, and the text is sent to the terminal. If the user actively asks questions in the dialogue after being soothed, step 101 is executed; if the user does not actively ask questions, a text is generated based on the text generation model and the attributes of the item. The text generation process is similar to the above embodiment and will not be repeated.

[0098] If the emotion type is questioning the item, the evaluation data of the item is sent to the terminal. When the user questions the item, other users' positive comments about the excellent quality of the item are shown to the user. Then, the intelligent dialogue system receives the user's response to the evaluation data uploaded by the terminal. If the response result is none, a text is generated based on the text generation model and the attributes of the item, and the text is sent to the terminal. After the user reads the evaluation data, if he actively asks questions in the dialogue, step 101 is executed; if he does not actively ask questions, a text is generated based on the text generation model and the attributes of the item. The text generation process is similar to the above embodiment and will not be repeated.

[0099] If the emotion type is the intention to place an order, the order-promoting discourse of the item is sent to the terminal. The intelligent dialogue system has summarized a wealth of order-promoting discourses, such as the two-choice rule, which provides users with two choices, and users can place an order no matter which one they choose; there is also the old-new comparison method, which allows users to choose old products and new products. When users choose old products and new products, users usually want to choose new products, and this psychology is seized to make users place orders. Then, the intelligent dialogue system receives the user's response result to the order-promoting discourse uploaded by the terminal. If the response result is none, text is generated based on the text generation model and the attributes of the item, and the text is sent to the terminal. If the user actively asks questions in the dialogue after being prompted to place an order, step 101 is executed; if the user does not actively ask questions, text is generated based on the text generation model and the attributes of the item. The text generation process is similar to the above embodiment and will not be repeated.

[0100] According to the various embodiments described above, it can be seen that the embodiments of the present invention solve the technical problems of low naturalness of human-computer interaction, lack of flexibility or complex system design in the prior art by performing sentiment classification on user speech based on a text classification model, using user behavior and sentiment classification results as trigger state transition conditions, and conducting intelligent dialogue with the user. The embodiments of the present invention correct the user speech to make the user's intention clear, thereby matching accurate candidate question and answer pairs, and using user behavior and sentiment classification results as trigger state transition conditions can improve the flexibility of the dialogue. Therefore, the embodiments of the present invention not only have the advantages of simple system design and high naturalness of human-computer interaction, but also can improve the expression ability, improve the dialogue structure, and enhance the smoothness of the dialogue state transition path.

[0101] Figure 2 : is a diagram of the dialogue state transfer according to an embodiment of the present invention. The embodiment of the present invention implements the transfer of multiple dialogue states based on a finite state machine. A finite state machine (FSM) is a model with a finite number of states, each of which can be transferred to zero or more states, and the input string determines which state to transfer to. The FSM state transfer process in the present invention is as follows: Figure 2 As shown in the figure, FSM includes the following states: sentiment analysis, FAQ retrieval, guess what you want to ask, selling point marketing, activity push, guess what you like, promotion, comfort, and excellent reviews. The transitions between these states are triggered by the user's click behavior and speech emotions. Figure 2 The lines in the figure are state transition arcs, and the symbols on the arcs represent user click behaviors and user speech emotions, i.e., state transition conditions.

[0102] User click behavior type symbol:

[0103] A1: The user selects an item, that is, given the item skuid, and actively enters a query to ask a question;

[0104] A2: The user exits the interactive interface, that is, the user wants to actively end the conversation;

[0105] A3: The user clicks on the relevant questions recommended by the system, triggering the answer to be returned to the user;

[0106] A4: Issue with users canceling system recommendations.

[0107] User speech emotion type representation symbol:

[0108] B1: Normal questions;

[0109] B2: negative tone;

[0110] B3: Questioning items;

[0111] B4: Order intention.

[0112] 1) Sentiment analysis status module

[0113] The sentiment analysis state module performs sentiment classification on user utterances. It can classify user utterances based on the TextCNN text classification model. There are four types of sentiments in user utterances: normal questions, negative tone, order intention, and questioning items. If the user's utterance is negative, it will enter the comfort state module; if the user's utterance has the intention to place an order, it will enter the order promotion state module; if the user's utterance questions the quality of the item, it will enter the excellent review state module; if the user's utterance is normal, it will enter the FAQ retrieval state module.

[0114] 2) FAQ search status module

[0115] The FAQ retrieval status module is a retrieval question-and-answer system built on the ElasticSearch (ES) distributed full-text search engine. The retrieval question-and-answer system stores high-frequency question-and-answer pairs for each item. For the user's input words (query), relevant questions and their answers can be quickly and accurately retrieved based on ES. Among them, ES uses the BM25 algorithm for retrieval, which is an algorithm for query-similar text matching based on a probabilistic retrieval model.

[0116] If the user does not click on a question in the candidate question-answer pair to trigger an answer, the module will enter the guessing question state module; if the user triggers an answer and chooses to continue to enter a query after reading the answer, the module will return to the sentiment analysis state module. If the user does not actively continue to ask questions after reading the answer, the module will enter the selling point marketing state module.

[0117] 3) I guess you want to ask about the status module

[0118] The function of this module is to clarify the user's intention. The process is as follows Figure 3 As shown. First, we correct the typos in the query, which can be divided into two steps: the first step is to find the typos, and we can use the N-Gram model as the probability score to evaluate the occurrence of a word. The lower the score, the greater the possibility that the word is a typo; the second step is to correct the error, combining the pinyin of Chinese characters, and find the word with the highest probability of occurrence after replacing the typos in the homophones, as the correction result.

[0119] After the error correction is completed, the retrieval question and answer system is used to quickly retrieve candidate question and answer pairs based on BM25; then the TextCNN text relevance calculation model is used to calculate the relevance between the corrected user utterance (query') and these candidate question and answer pairs; finally, the question and answer pair with a higher relevance to query' among the candidate question and answer pairs is returned as the second candidate question and answer pair.

[0120] If the user does not click to trigger the answer to the question or does not actively ask questions after the answer is triggered, the module enters the selling point marketing state module; if the user actively continues to ask questions, the module returns to the sentiment analysis state module.

[0121] 4) Selling point marketing status module

[0122] The core of the selling point marketing status module is to describe the selling points of the item to the user, so the core of the module is the selling point text generation. The steps are as follows:

[0123] Training phase. In the training phase, both the encoder and decoder need input information. The encoder input is structured or semi-structured attribute data, and the decoder input is the text information corresponding to the encoder input information, which can also be simply understood as text sequence label information. It can be seen intuitively that the training phase is supervised learning. The encoder is responsible for encoding the input into a semantic vector C, and then the semantic vector C is used as the initial state of the decoder to participate in the decoder's decoding estimation.

[0124] Generation stage. In the generation stage, the decoder no longer needs external input information. It allows the data2text model to analyze and deconstruct a large number of common texts, and then generates various explanatory and descriptive texts according to the attributes of the items. For example, a T-shirt has the following attributes: round neck, print, and loose fit. Text can be generated for these three characteristics: it not only modifies the neck line, is comfortable and does not rub the chin, but also hides the flesh and makes you look thinner without any sense of restraint. It is not only helpful for users to understand the item, but also can enhance user favorability with beautiful sentences. It not only reflects the selling point of the item for users to understand, but also allows users to personally experience how the clothes look when worn on themselves.

[0125] If the user actively asks questions after reading the copy, the dialogue will return to the sentiment analysis status module; if the user does not actively ask questions, the activity push status module will be entered.

[0126] 5) Activity push status module

[0127] The function of this module is to push some items during discount, rush purchase, full discount and other activities back to the user. If the user actively asks questions after browsing the items, the module will return to the sentiment analysis status module; if the user does not actively ask questions, the module will enter the guess you like status module.

[0128] 6) Soothing status module

[0129] This module can respond to users with soothing words in response to negative emotions such as anger and anxiety during conversations with customer service, thereby improving the user's conversation experience.

[0130] If the user actively asks questions after being comforted, the system returns to the sentiment analysis state module; if the user does not actively ask questions, the system enters the selling point marketing state module.

[0131] 7) Order promotion status module

[0132] When the user intends to place an order for an item, he / she will enter this module to promote the order. This module summarizes a variety of promotional words, such as the two-choice rule, which provides users with two choices, and users can place an order no matter which one they choose; there is also the old-new comparison method, which allows users to choose old products and new products. When users choose old products and new products, users usually want to choose new products, and this psychology is used to make users place orders. If the user actively asks questions after being promoted, the module returns to the sentiment analysis module; if the user does not actively ask questions, the module enters the selling point marketing module.

[0133] 8) Excellent review status module

[0134] When a user has doubts about an item, this module will show the user positive comments from other users that praise the quality of the item.

[0135] If the user actively asks questions after reading the positive reviews, the module will return to the sentiment analysis status module; if the user does not actively ask questions, the module will enter the selling point marketing status module.

[0136] 9) Guess you like the status module

[0137] Build a user profile based on the user's historical click behavior tags and recommend items that the user is interested in and has a high purchase intention. First, use item2vec to convert the items into vector representations, then build positive and negative sample data based on the user's item click behavior logs, train the user vector representation through the DNN model, and use it as the user vector. Then use the Locality Sensitive Hashing (LSH) method to quickly calculate the item vector that is highly similar to the current user vector. It is considered that the user is more interested in these items and recommends them to the user.

[0138] If the user actively asks questions after browsing the items, the conversation returns to the sentiment analysis status module; if the user does not actively ask questions, the conversation ends.

[0139] The user's query may have some unclear intentions or typos. The intelligent dialogue system designed by FSM in the past lacks effective strategies to deal with such abnormal user queries, resulting in low confidence in the retrieved answers. The present invention designs a "Guess What You Want to Ask" module in FSM. When the retrieved question and answer pairs are weakly correlated with the user's query, the typos of the user's query are corrected and the intention is clarified, and then the query is retrieved again.

[0140] In addition, the specific implementation content of the intelligent dialogue method in a reference embodiment of the present invention has been described in detail in the intelligent dialogue method described above, so the repeated content will not be described here.

[0141] Figure 4 is a schematic diagram of the main modules of the intelligent dialogue device according to an embodiment of the present invention, such as Figure 4 As shown, the intelligent dialogue device 400 includes a classification module 401 and a dialogue module 402; the classification module 401 is used to receive the speech input by the user in the interactive interface uploaded by the terminal, and perform emotion classification on the speech based on the text classification model to obtain the emotion type; the dialogue module 402 is used to match a first candidate question and answer pair according to the speech if the emotion type is a normal question, and send the first candidate question and answer pair to the terminal; receive the click result of the user on the first candidate question and answer pair uploaded by the terminal, if the click result is none, correct the error of the speech, match the second candidate question and answer pair according to the corrected speech, and send the second candidate question and answer pair to the terminal.

[0142] Optionally, the dialogue module 402 is further used for:

[0143] Using the N-Gram model to identify the words to be corrected with the lowest probability of occurrence in the utterance;

[0144] Combining Chinese Pinyin, using homophones to replace the wrong characters in the words to be corrected, so that the corrected words have the highest probability of appearing;

[0145] A second candidate question-answer pair is matched according to the corrected utterance, a text relevance calculation model is used to calculate the relevance between the corrected utterance and the second candidate question-answer pair, and at least one second candidate question-answer pair with a high relevance to the corrected utterance is screened out.

[0146] Optionally, the dialogue module 402 is further used for:

[0147] The receiving terminal uploads the words input by the user in the interactive interface of the item page;

[0148] The interactive interface is a floating window suspended on the item page; or, the interactive interface and the item page are displayed simultaneously in a top-bottom paging manner or a left-right paging manner.

[0149] Optionally, the dialogue module 402 is further used for:

[0150] Receive a click result of a user on the second candidate question-answer pair uploaded by the terminal. If the click result is none, generate text based on a text generation model and the attributes of the object, and send the text to the terminal.

[0151] Optionally, the dialogue module 402 is further used for:

[0152] Receive a response result of the user to the text uploaded by the terminal, and if the response result is none, search for at least one characteristic item of the same category as the item, and send the at least one characteristic item to the terminal.

[0153] Optionally, the dialogue module 402 is further used for:

[0154] Receive a response result of the user to the at least one feature item uploaded by the terminal. If the response result is none, construct a user vector according to the user's historical click behavior, calculate the similarity between the user vector and each item vector using a local sensitive hashing method, screen out at least one item to be recommended with a high similarity, and send the at least one item to be recommended to the terminal.

[0155] Optionally, the dialogue module 402 is further used for:

[0156] receiving a message uploaded by the terminal indicating that the user has exited the interactive interface;

[0157] Generate text based on the text generation model and the attributes of the object, and send the text to the terminal.

[0158] Optionally, the dialogue module 402 is further used for:

[0159] If the emotion type is negative tone, then the soothing words are sent to the terminal;

[0160] Receive the user's response result to the soothing words uploaded by the terminal. If the response result is none, generate text based on a text generation model and the attributes of the object, and send the text to the terminal.

[0161] Optionally, the dialogue module 402 is further used for:

[0162] If the emotion type is a questionable item, the evaluation data of the item is sent to the terminal;

[0163] Receive the response result of the user to the evaluation data uploaded by the terminal, if the response result is no, generate text based on the text generation model and the attributes of the item, and send the text to the terminal.

[0164] Optionally, the dialogue module 402 is further used for:

[0165] If the emotion type is order intention, the order promotion speech of the item is sent to the terminal;

[0166] Receive the user's response result to the order promotion speech uploaded by the terminal. If the response result is none, generate text based on the text generation model and the attributes of the item, and send the text to the terminal.

[0167] According to the various embodiments described above, it can be seen that the embodiments of the present invention solve the technical problems of low naturalness of human-computer interaction, lack of flexibility or complex system design in the prior art by performing sentiment classification on user speech based on a text classification model, using user behavior and sentiment classification results as trigger state transition conditions, and conducting intelligent dialogue with the user. The embodiments of the present invention correct the user speech to make the user's intention clear, thereby matching accurate candidate question and answer pairs, and using user behavior and sentiment classification results as trigger state transition conditions can improve the flexibility of the dialogue. Therefore, the embodiments of the present invention not only have the advantages of simple system design and high naturalness of human-computer interaction, but also can improve the expression ability, improve the dialogue structure, and enhance the smoothness of the dialogue state transition path.

[0168] It should be noted that the specific implementation content of the intelligent dialogue device of the present invention has been described in detail in the above-mentioned intelligent dialogue method, so the repeated content will not be described again here.

[0169] Figure 5 An exemplary system architecture 500 is shown to which the intelligent dialogue method or intelligent dialogue device according to the embodiment of the present invention can be applied.

[0170] like Figure 5 As shown, system architecture 500 may include terminal devices 501, 502, 503, a network 504 and a server 505. Network 504 is used to provide a medium for communication links between terminal devices 501, 502, 503 and server 505. Network 504 may include various connection types, such as wired, wireless communication links or optical fiber cables, etc.

[0171] Users can use terminal devices 501, 502, 503 to interact with server 505 through network 504 to receive or send messages, etc. Various communication client applications can be installed on terminal devices 501, 502, 503, such as shopping applications, web browser applications, search applications, instant messaging tools, email clients, social platform software, etc. (only for example).

[0172] The terminal devices 501 , 502 , and 503 may be various electronic devices having a display screen and supporting web browsing, including but not limited to smart phones, tablet computers, laptop computers, desktop computers, and the like.

[0173] The server 505 may be a server that provides various services, such as a backend management server (only an example) that provides support for shopping websites browsed by users using the terminal devices 501, 502, and 503. The backend management server may analyze and process the received data such as the item information query request, and feed back the processing results (such as target push information, item information - only an example) to the terminal device.

[0174] It should be noted that the intelligent dialogue method provided in the embodiment of the present invention is generally executed by the server 505 , and accordingly, the intelligent dialogue device is generally arranged in the server 505 .

[0175] It should be understood that Figure 5 The number of terminal devices, networks and servers in the embodiment is only for illustration. Any number of terminal devices, networks and servers may be provided according to implementation requirements.

[0176] Reference below Figure 6 , which shows a schematic diagram of the structure of a computer system 600 of a terminal device suitable for implementing an embodiment of the present invention. Figure 6 The terminal device shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present invention.

[0177] like Figure 6 As shown, the computer system 600 includes a central processing unit (CPU) 601, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 602 or a program loaded from a storage part 608 into a random access memory (RAM) 603. In the RAM 603, various programs and data required for the operation of the system 600 are also stored. The CPU 601, the ROM 602, and the RAM 603 are connected to each other through a bus 604. An input / output (I / O) interface 605 is also connected to the bus 604.

[0178] The following components are connected to the I / O interface 605: an input section 606 including a keyboard, a mouse, etc.; an output section 607 including a cathode ray tube (CRT), a liquid crystal display (LCD), etc., and a speaker, etc.; a storage section 608 including a hard disk, etc.; and a communication section 609 including a network interface card such as a LAN card, a modem, etc. The communication section 609 performs communication processing via a network such as the Internet. A drive 610 is also connected to the I / O interface 605 as needed. A removable medium 611, such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, etc., is installed on the drive 610 as needed, so that a computer program read therefrom is installed into the storage section 608 as needed.

[0179] In particular, according to the embodiments disclosed in the present invention, the process described above with reference to the flowchart can be implemented as a computer software program. For example, the embodiments disclosed in the present invention include a computer program, which includes a computer program carried on a computer-readable medium, and the computer program contains program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from the network through the communication part 609, and / or installed from the removable medium 611. When the computer program is executed by the central processing unit (CPU) 601, the above-mentioned functions defined in the system of the present invention are executed.

[0180] It should be noted that the computer-readable medium shown in the present invention may be a computer-readable signal medium or a computer-readable storage medium or any combination of the above two. The computer-readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In the present invention, a computer-readable storage medium may be any tangible medium containing or storing a program that can be used by or in combination with an instruction execution system, device or device. In the present invention, a computer-readable signal medium may include a data signal propagated in a baseband or as part of a carrier wave, which carries a computer-readable program code. This propagated data signal may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. Computer-readable signal media may also be any computer-readable medium other than computer-readable storage media, which may send, propagate or transmit a program for use by or in conjunction with an instruction execution system, apparatus or device. The program code contained on the computer-readable medium may be transmitted using any appropriate medium, including but not limited to: wireless, wire, optical cable, RF, etc., or any suitable combination of the above.

[0181] The flow chart and block diagram in the accompanying drawings illustrate the possible architecture, functions and operations of the system, method and computer program according to various embodiments of the present invention. In this regard, each box in the flow chart or block diagram can represent a module, a program segment, or a part of a code, and the above-mentioned module, program segment, or a part of a code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in a different order from the order marked in the accompanying drawings. For example, two boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram or flow chart, and the combination of the boxes in the block diagram or flow chart can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.

[0182] The modules involved in the embodiments of the present invention may be implemented by software or hardware. The modules described may also be set in a processor, for example, it may be described as follows: a processor includes a classification module and a dialogue module, wherein the names of these modules do not constitute a limitation on the modules themselves in some cases.

[0183] As another aspect, the present invention also provides a computer-readable medium, which may be included in the device described in the above embodiment; or it may exist independently and not be assembled into the device. The above computer-readable medium carries one or more programs. When the above one or more programs are executed by a device, the device implements the following method: receiving the speech input by the user in the interactive interface uploaded by the terminal, performing sentiment classification on the speech based on the text classification model to obtain the sentiment type; if the sentiment type is a normal question, matching a first candidate question-answer pair according to the speech, and sending the first candidate question-answer pair to the terminal; receiving the click result of the user on the first candidate question-answer pair uploaded by the terminal, if the click result is none, correcting the speech, matching a second candidate question-answer pair according to the corrected speech, and sending the second candidate question-answer pair to the terminal.

[0184] According to the technical solution of the embodiment of the present invention, because it adopts a technical means to classify the user's speech based on the text classification model, and uses the user behavior and the emotion classification results as the trigger state transition conditions to conduct intelligent dialogue with the user, it overcomes the technical problems of low naturalness of human-computer interaction, lack of flexibility or complex system design in the prior art. The embodiment of the present invention corrects the user's speech to make the user's intention clear, thereby matching accurate candidate question and answer pairs, and using the user behavior and the emotion classification results as the trigger state transition conditions can improve the flexibility of the dialogue. Therefore, the embodiment of the present invention not only has the advantages of simple system design and high naturalness of human-computer interaction, but also can improve the expression ability, improve the dialogue structure, and enhance the smoothness of the dialogue state transition path.

[0185] The above specific implementations do not constitute a limitation on the protection scope of the present invention. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions may occur depending on design requirements and other factors. Any modification, equivalent substitution and improvement made within the spirit and principle of the present invention shall be included in the protection scope of the present invention.

Claims

1. An intelligent dialogue method, characterized in that: include: Receiving the speech input by the user in the interactive interface uploaded by the terminal, and performing sentiment classification on the speech based on the text classification model to obtain the sentiment type; If the emotion type is a normal question, matching a first candidate question-answer pair according to the utterance, and sending the first candidate question-answer pair to the terminal; receiving a click result of a user on the first candidate question-answer pair uploaded by the terminal, and if the click result is no, correcting the utterance, matching a second candidate question-answer pair according to the corrected utterance, and sending the second candidate question-answer pair to the terminal; Correcting the utterance for errors and matching a second candidate question-answer pair according to the corrected utterance includes: Using the N-Gram model to identify the words to be corrected with the lowest probability of occurrence in the utterance; Combining Chinese Pinyin, using homophones to replace the wrong characters in the words to be corrected, so that the corrected words have the highest probability of appearing; Matching a second candidate question-answer pair according to the corrected utterance, calculating the relevance between the corrected utterance and the second candidate question-answer pair using a text relevance calculation model, and selecting at least one second candidate question-answer pair having a higher relevance to the corrected utterance; The receiving terminal uploads the speech input by the user in the interactive interface, including: The receiving terminal uploads the words input by the user in the interactive interface of the item page; Wherein, the interactive interface is a floating window suspended on the item page; or, the interactive interface and the item page are displayed simultaneously in a top-bottom paging manner or a left-right paging manner; Also includes: receiving a click result of a user on the second candidate question-answer pair uploaded by the terminal, and if the click result is no, generating text based on a text generation model and the attributes of the item, and sending the text to the terminal; Also includes: receiving a message uploaded by the terminal indicating that the user has exited the interactive interface; Generate text based on a text generation model and the attributes of the object, and send the text to the terminal; The intelligent dialogue method realizes the transfer of multiple dialogue states based on a finite state automaton, and the transfer between states is triggered by the user's click behavior and speech emotion.

2. The method according to claim 1, characterized in that Also includes: Receive a response result of the user to the text uploaded by the terminal, and if the response result is none, search for at least one characteristic item of the same category as the item, and send the at least one characteristic item to the terminal.

3. The method according to claim 2, characterized in that Also includes: Receive a response result of the user to the at least one feature item uploaded by the terminal. If the response result is none, construct a user vector according to the user's historical click behavior, calculate the similarity between the user vector and each item vector using a local sensitive hashing method, screen out at least one item to be recommended with a high similarity, and send the at least one item to be recommended to the terminal.

4. The method according to claim 1, characterized in that: Also includes: If the emotion type is negative tone, then the soothing words are sent to the terminal; Receive the user's response result to the soothing words uploaded by the terminal. If the response result is none, generate text based on a text generation model and the attributes of the object, and send the text to the terminal.

5. The method according to claim 1, characterized in that Also includes: If the emotion type is a questionable item, the evaluation data of the item is sent to the terminal; Receive the response result of the user to the evaluation data uploaded by the terminal, if the response result is no, generate text based on the text generation model and the attributes of the item, and send the text to the terminal.

6. The method according to claim 1, characterized in that Also includes: If the emotion type is order intention, the order promotion speech of the item is sent to the terminal; Receive the user's response result to the order promotion speech uploaded by the terminal. If the response result is none, generate text based on the text generation model and the attributes of the item, and send the text to the terminal.

7. An intelligent dialogue device, characterized in that: include: A classification module is used to receive the speech input by the user in the interactive interface uploaded by the terminal, and perform sentiment classification on the speech based on the text classification model to obtain the sentiment type; A dialogue module, configured to match a first candidate question-answer pair according to the utterance if the emotion type is a normal question, and send the first candidate question-answer pair to the terminal; receiving a click result of a user on the first candidate question-answer pair uploaded by the terminal, and if the click result is no, correcting the utterance, matching a second candidate question-answer pair according to the corrected utterance, and sending the second candidate question-answer pair to the terminal; The dialogue module is also used to: Using the N-Gram model to identify the words to be corrected with the lowest probability of occurrence in the utterance; Combining Chinese Pinyin, using homophones to replace the wrong characters in the words to be corrected, so that the corrected words have the highest probability of appearing; Matching a second candidate question-answer pair according to the corrected utterance, calculating the relevance between the corrected utterance and the second candidate question-answer pair using a text relevance calculation model, and selecting at least one second candidate question-answer pair having a higher relevance to the corrected utterance; The dialogue module is also used to: The receiving terminal uploads the words input by the user in the interactive interface of the item page; Wherein, the interactive interface is a floating window suspended on the item page; or, the interactive interface and the item page are displayed simultaneously in a top-bottom paging manner or a left-right paging manner; The dialogue module is also used to: receiving a click result of a user on the second candidate question-answer pair uploaded by the terminal, and if the click result is no, generating text based on a text generation model and the attributes of the item, and sending the text to the terminal; The dialogue module is also used to: receiving a message uploaded by the terminal indicating that the user has exited the interactive interface; Generate text based on a text generation model and the attributes of the object, and send the text to the terminal; The intelligent dialogue device realizes the transfer of multiple dialogue states based on a finite state automaton, and the transfer between states is triggered by the user's click behavior and speech emotion.

8. An electronic device, characterized in that: include: one or more processors; a storage device for storing one or more programs, When the one or more programs are executed by the one or more processors, the one or more processors implement the method according to any one of claims 1 to 6.

9. A computer readable medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, the method according to any one of claims 1 to 6 is implemented.

Citation Information

Patent Citations

  • User interaction method based on intelligent customer service platform

    CN110443382A