CN114201589A - Dialogue method, dialogue device, dialogue equipment and storage medium - Google Patents
Dialogue method, dialogue device, dialogue equipment and storage medium Download PDFInfo
- Publication number
- CN114201589A CN114201589A CN202010981332.8A CN202010981332A CN114201589A CN 114201589 A CN114201589 A CN 114201589A CN 202010981332 A CN202010981332 A CN 202010981332A CN 114201589 A CN114201589 A CN 114201589A
- Authority
- CN
- China
- Prior art keywords
- text
- message
- session
- information
- alternative
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
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/33—Querying
- G06F16/3331—Query processing
- G06F16/334—Query execution
- G06F16/3344—Query execution using natural language analysis
-
- 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/338—Presentation of query results
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Physics & Mathematics (AREA)
- Computational Linguistics (AREA)
- Data Mining & Analysis (AREA)
- Databases & Information Systems (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Artificial Intelligence (AREA)
- Mathematical Physics (AREA)
- Human Computer Interaction (AREA)
- Machine Translation (AREA)
Abstract
The embodiment of the application provides a dialogue method, a dialogue device, dialogue equipment and a storage medium, which are used for solving the problem that in the prior art, a dialogue system based on a structured knowledge base is low in response success rate. The method comprises the following steps: acquiring session parameter information of a first session message, wherein the session parameter information at least comprises subject information and historical session messages; searching for alternative texts associated with the subject information according to the subject information; the alternative text is an external knowledge text; generating a response message of the first session message according to the alternative text, the first session message and the historical session message; the problem range that task-oriented dialogue can handle is expanded by combining with external knowledge texts, the response capability of the system for dealing with new problems of the user is improved, and the response success rate of the dialogue system is improved.
Description
Technical Field
The present application relates to the field of computer technologies, and in particular, to a dialog method and apparatus, an electronic device, and a storage medium.
Background
With the development of big data and deep learning technology, man-machine conversation is receiving more and more attention due to potential and commercial value, a conversation system is generated, and the development of the conversation system is greatly promoted by continuous progress of the deep learning technology.
Specifically, the dialog system can be roughly divided into two types: Task-Oriented (Task-Oriented) dialog systems and Non-Task-Oriented (Non-Task-Oriented) dialog systems, also known as chat robots.
Currently, most task-oriented dialog systems are based on structured knowledge bases (e.g., knowledge tables) for dialog state tracking and dialog strategy learning, so that the task-oriented dialog systems can only handle a specific range of problems. However, during a dialog in an actual application scenario, the user will typically ask the knowledge table for content that is not covered. A common solution to this situation today is to utilize a predefined system rejection reply, such as "bad meaning i do not understand" or the like, and then guide the user to continue to ask the knowledge present in the knowledge table, or to manually sort these new questions into the knowledge table.
The above solution solves the problem to some extent, but for the users who interact online, the information asked by the users is not responded to effectively. Therefore, the dialog system based on the structured knowledge base has low response success rate.
Disclosure of Invention
The embodiment of the application provides a dialogue method, which is used for solving the problem that in the prior art, a dialogue system based on a structured knowledge base is low in response success rate.
Correspondingly, the embodiment of the application also provides a dialogue device, electronic equipment and a storage medium, which are used for ensuring the realization and the application of the method.
In order to solve the above problem, an embodiment of the present application discloses a dialog method, including:
acquiring session parameter information of a first session message, wherein the session parameter information at least comprises subject information and historical session messages; searching for alternative texts associated with the subject information according to the subject information; the alternative text is an external knowledge text;
and generating a response message of the first session message according to the alternative text, the first session message and the historical session message.
The embodiment of the application also discloses a method for generating the response message, which comprises the following steps:
acquiring session parameter information of a first question message, wherein the session parameter information at least comprises subject information and historical session information;
searching for alternative texts associated with the subject information according to the subject information; the alternative text is an external knowledge text;
and generating a response message of the first question message according to the alternative text, the first question message and the historical conversation message.
The embodiment of the application also discloses a dialogue device, the device includes:
the device comprises a parameter acquisition module, a parameter processing module and a parameter processing module, wherein the parameter acquisition module is used for acquiring session parameter information of a first session message, and the session parameter information at least comprises theme information and historical session messages;
the text searching module is used for searching for alternative texts related to the subject information according to the subject information; the alternative text is an external knowledge text;
and the message generating module is used for generating a response message of the first session message according to the alternative text, the first session message and the historical session message.
The embodiment of the application also discloses a device for generating the response message, which comprises:
the information acquisition module is used for acquiring session parameter information of the first question message, wherein the session parameter information at least comprises theme information and historical session information;
the searching module is used for searching for alternative texts related to the subject information according to the subject information; the alternative text is an external knowledge text;
and the response generating module is used for generating a response message of the first question message according to the alternative text, the first question message and the historical conversation message.
The embodiment of the application also discloses an electronic device, which comprises: a processor; and a memory having executable code stored thereon that, when executed, causes the processor to perform a method as described in one or more of the embodiments of the application.
Embodiments of the present application also disclose one or more machine-readable storage media having executable code stored thereon that, when executed, cause a processor to perform a method as described in one or more of the embodiments of the present application.
Compared with the prior art, the embodiment of the application has the following advantages:
in the embodiment of the application, session parameter information of a first session message is acquired, wherein the session parameter information at least comprises subject information and historical session messages; searching for alternative texts associated with the subject information according to the subject information; and generating a response message of the first session message according to the alternative text, the first session message and the historical session message, expanding the problem range which can be processed by the task-oriented dialog by combining with an external knowledge text, improving the response capability of the system for responding to new problems of the user and improving the response success rate of the dialog system.
Drawings
FIG. 1 is a schematic diagram of a dialog method according to an embodiment of the present application;
FIG. 2 is a schematic diagram of a fourth example of an embodiment of the present application;
FIG. 3 is a schematic diagram of a fifth example of an embodiment of the present application;
FIG. 4 is a schematic illustration of a sixth example of an embodiment of the present application;
FIG. 5 is a flow chart of steps of one embodiment of a dialog method of the present application;
FIG. 6 is a flow chart of steps of an embodiment of a method of response message generation of the present application;
FIG. 7 is a block diagram of a dialog device embodiment of the present application;
fig. 8 is a block diagram of a response message generation apparatus according to an embodiment of the present application;
fig. 9 is a schematic structural diagram of an apparatus according to an embodiment of the present application.
Detailed Description
In order to make the aforementioned objects, features and advantages of the present application more comprehensible, the present application is described in further detail with reference to the accompanying drawings and the detailed description.
The terms first, second and the like in the description and in the claims of the present application are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used is interchangeable under appropriate circumstances such that the embodiments of the application are capable of operation in sequences other than those illustrated or described herein.
The embodiment of the application can be applied to the field of dialog response such as a dialog system, a customer service system and the like, and the range of problems which can be processed by task-oriented dialog is expanded by introducing an external knowledge base and expanding the selection range of the alternative texts for generating the response messages; and the unstructured text in the external knowledge base is not limited by the type of text, and various types of text can be used as alternative text, such as question and answer pairs, documents, advertisements, user comments and the like. The problem range that task-oriented dialogue can handle is expanded by combining with external knowledge texts, the response capability of the system for dealing with new problems of the user is improved, and the response success rate of the dialogue system is improved.
Specifically, the task-oriented dialog system is a main branch of the dialog system, and mainly includes four key components, which are: natural Language Understanding (NLU), Dialog State Tracking (DST), dialog Policy Learning (dialog Policy Learning), and Natural Language Generation (NLG).
Natural language understanding parses user input into predefined semantic slots, such as for an utterance, natural language understanding maps it into semantic slots, while slots are predefined according to different scenarios. The dialog state tracking is a core component for ensuring the robustness of a dialog system, and the dialog state tracking estimates the target of a user in each turn of the dialog, manages the input and the dialog history of each turn and outputs the current dialog state. Dialog strategy learning is used to generate the next available system operation based on the state identifier of the state tracker. Natural language generation is used to select operations for mapping and generate a reply message, i.e., a reply message. In the embodiment of the application, in the process of session state tracking and session strategy learning, relevant texts are searched based on an external knowledge base, and response messages are generated; in conjunction with fig. 1, an embodiment of the present Application provides a dialog method, and fig. 1 illustrates an example of the method applied to a dialog system, where the dialog system may be a customer service system, such as a customer service system of various shopping Applications (APPs), or a customer service system of an operator, a bank, or the like.
In step 101, session parameter information of a first session message is obtained, where the session parameter information at least includes topic information and historical session messages.
A first session message, e.g., a message input by a user or client, such as a question message, etc.; as a first example, a user asks for customer service of a product in a shopping APP, asking for relevant information about the product, such as a user input "ask for a question about how well the product is a young person? "is then the information asked" is asking for a question about the suitability of the product for young people? "is a first session message; as a second example, the user enters in the lifestyle service class APP: the 'place near A where cheap wontons are eaten' is a first session message; as a third example, the user enters "what new good scoring movie was last" in the group purchase-like website, and "what new good scoring movie was last" is the first session message.
After receiving the first session message, the dialog system extracts session parameter information, wherein the session parameter information comprises theme information and historical session message; topic information, i.e., the topic of an event in the first session message, such as the name of a restaurant entity, a topic, a domain, etc.; by extracting the subject information of the first session message, the purpose of the first session message queried by the user is known, such as the first example described above, in which the subject information is "whether the product is suitable for young people"; in the second example, the theme information is "a place where ravioli is eaten by a nearby cheap person"; in the third example described above, the topic information is "new good-scoring movie".
The historical conversation message is a historical conversation message of the first conversation message, for example, a preset number of messages before the first conversation message are selected as the historical conversation message, for example, ten messages input by the user are selected before the first conversation message, or a message sent by the conversation system is included as the historical conversation message, so as to further identify the first conversation message and know the requirement of the user.
In connection with fig. 1, a user enters a first session message from which the dialog system retrieves topic information.
102, searching for alternative texts associated with the subject information according to the subject information; the alternative text is an external knowledge text.
The external knowledge text may include unstructured text, i.e., unstructured data in the form of text as data; it will be appreciated that the external knowledge text may include unstructured text, and may also include structured text, such as the title, author, etc. of a document in a web page. As shown in FIG. 1, unstructured text includes question-answer pairs, web pages, advertisements, documents, and the like.
The external knowledge text can come from an external website, such as some shopping websites or living service websites, such as the second example described above, where the user wants to inquire nearby cheap wontons, the dialog system can extract alternative texts related to the second example, such as advertisement information, offer information, user rating information, and the like of some merchants, from the unstructured texts in the living service websites in the external knowledge text; the dialogue system searches merchants with wontons in food in the place A in the external knowledge text according to the requirements of users, acquires advertisement information or preferential information of the merchants, judges whether preferential commodities exist in the current time or not, or searches whether comment information related to 'cheap' exists in user evaluation information of the merchants, and takes unstructured text related to subject information as alternative text for generating subsequent response messages.
The external knowledge text may also include text from some external APPs, such as user comment information in a shopping APP, advertisement information, offer information in a lifestyle APP, and so on. For example, in the first example described above, if the subject information is "whether a product is suitable for young people", the dialog system may use, as the candidate text, text information related to "suitable", "age bracket", and the like among comment information and introduction information related to the product in the shopping APP.
In conjunction with fig. 1, the dialog system inputs the subject information into the external knowledge text (or an external text library for storing the external knowledge text), and roughly recalls some alternative texts for the subject information in the external knowledge text, for example, according to the degree of association or matching between the external knowledge text and the subject information, the external knowledge text with a higher degree of association or matching is selected as the alternative text.
In this way, structured text and/or unstructured text in external knowledge are fused to expand the range of problems that can be handled by the task-oriented dialog system, thereby improving the ability of the dialog system to deal with new problems of users.
Optionally, an external knowledge base may be configured to store the external knowledge text.
Step 103, generating a response message of the first session message according to the alternative text, the first session message and the historical session message.
Optionally, the reply message may be generated by a session generator; in conjunction with fig. 1, the dialog system performs dialog generation on the alternative text, the historical dialog message, and the first dialog message, for example, inputs all of them into a preset dialog generator, and generates a response message through the dialog generator. The conversation generator executes a preset conversation generating algorithm, for example, a Transformer algorithm, and generates a reasonable reply message, namely a response message, by using an attention mechanism; in this way, in the process of generating the response message of the first session, the unstructured text in the external knowledge text is combined to improve the problem solving capability of the response message.
In the practical application scenario of the conversational mission system, the user's expression is not restricted, such as the user may ask "whether to take a pet", "what preferential activities are available today", "can you decide between packages", "do you get a person yet? "and so on, new questions not contained in the knowledge table. For new problems not contained in the structured knowledge base, it is difficult in the prior art to enable the user to obtain an effective response reply.
For example, in the first example, the dialog system takes text information related to "suitable", "age bracket", and the like among comment information and introduction information related to the product in the shopping APP or shopping website as the candidate text, and inputs the candidate text, the first session message, and the history session message as input contents to the session generator, and the session generator generates a response message, such as: "this commodity is not suitable for young people".
For example, in the second example, if the user wants to search for a nearby cheap wonton eating place, the dialog system may extract alternative texts related to the second example, such as advertisement information, offer information, and user rating information of some merchants, from unstructured texts in the lifestyle service websites in the external knowledge texts; specifically, the dialog system searches merchants with wontons in food in place a in the external knowledge text according to the requirements of users, acquires advertisement information or preferential information of the merchants, judges whether preferential commodities exist in the current time or not, or searches whether comment information related to 'cheap' exists from user evaluation information of the merchants, takes unstructured text related to subject information as alternative text, takes the alternative text, the first session message and the historical session message as input content, inputs the input content to a session generator, and the session generator generates response messages, wherein the response messages include: "find brand B for you". If the user continues to input: "how many stores brand B has in city a", then "how many stores brand B has in city a" is taken as a new first session message, and the dialog system continues to generate a response message for the new first session message, for example, the response message is "50 stores brand B has in city a", thus, the ability of the dialog system to cope with new problems of the user is improved by unstructured text in the external knowledge text.
For example, in the third example, the user inputs "what new movie with good scores recently", the dialog system may extract alternative texts related to the movie with good scores recently from the unstructured text in the lifestyle service-like website in the external knowledge text, such as some ticketing websites, comment information in APP, and movie scores in some review-like websites; the dialog system searches unstructured texts in the external knowledge texts according to the requirements of users, acquires scores or comment information of recently-shown movies and the like, takes the unstructured texts related to the topic information as alternative texts, and takes the alternative texts, the first session messages and the historical session messages as input contents to be input to a session generator, and the session generator generates response messages, wherein the response messages comprise: "find movie C for you". If the user continues to input: "who the lead actor of movie C is", then "who the lead actor of movie C is" as a new first session message, and the dialog system continues to generate a response message for the new first session message, such as the response message is "the lead actor of movie C includes actor D".
In the embodiment of the application, session parameter information of a first session message is acquired, wherein the session parameter information at least comprises subject information and historical session messages; searching for alternative texts associated with the subject information according to the subject information; generating a response message of the first session message according to the alternative text, the first session message and the historical session message, expanding the problem range which can be processed by task-oriented dialog by combining with an external knowledge text, improving the response capability of the system to new problems of the user and improving the response success rate of the dialog system; the embodiment of the application solves the problem that in the prior art, a dialog system based on a structured knowledge base is low in response success rate.
In an alternative embodiment, the external knowledge text comprises: text obtained at the target source.
The external knowledge text may include unstructured text, i.e., unstructured data in the form of text as data, such as characters, numbers, punctuation, various printable symbols, etc.; as shown in FIG. 1, unstructured text includes question-answer pairs, web pages, advertisements, documents, and the like. The external knowledge text is obtained from a target source;
optionally, if an external knowledge base is preset, the external knowledge base may include: text pre-stored in the external knowledge base and/or text retrieved from a target source. The external knowledge base can store texts in advance, for example, the external knowledge base can update unstructured texts therein periodically, for example, the unstructured texts are acquired from an external website or an APP periodically, and the external knowledge base can search the prestored texts in the process of matching candidate texts for the subject information; for example, the external knowledge base may periodically obtain unstructured texts from the lifestyle websites according to a preset update period, such as some ticketing websites, comment information in the APP, some movie reviews in review websites, and the like; after receiving the first session message in the third example, for example, the dialog system extracts alternative texts related to the recently scored movies from the pre-stored unstructured texts, searches the unstructured texts in the external knowledge base, obtains scoring or comment information of the recently shown movies, and so on, and it is understood that the update period can be set to be short, such as several hours.
The target source comprises at least one of a target application program and a target website. The text obtained from the target source, i.e. the text obtained in real time from the target source after the dialog system receives the first session message, is as in the second example above, the user enters: the conversation system can acquire unstructured texts associated with the cheap wonton eating place near the place A from a living service website and an APP in real time and add the unstructured texts to an external knowledge text, and extract alternative texts related to a second example, such as advertisement information, preferential information and user evaluation information of some merchants; therefore, if the number of the unstructured texts prestored in the external knowledge text is small or the association degree with the main body is low, the unstructured texts can be continuously acquired from the target source in real time.
In an optional embodiment, the external knowledge text comprises at least one of web page information, application program internal push messages, question-answer pairs and documents.
Web page information such as web page information associated with the subject information, e.g., news information; internal push messages of the application, such as push messages during use or background run of the application; the question-answer pair is an adjacent language pair (adjacency pair), which means words spoken by two speakers respectively in turn and with mutually corresponding meanings, for example, a common question-answer pair is a question-answer pair.
Still referring to the second example above, the user enters in the lifestyle service class APP: the conversation system can acquire unstructured texts associated with the cheap wonton eating place near the place A from a living service website and an APP in real time and add the unstructured texts to an external knowledge text; the external knowledge text comprises at least one of webpage information related to the subject information, application program internal push messages, question-answer pairs and documents.
In an optional embodiment, the searching for the alternative text associated with the topic information according to the topic information includes:
step 1021, segmenting the external knowledge text to obtain a short text with the number of characters less than a preset word number threshold.
The preset word number threshold is a positive integer, such as 20; if the number of words of the external knowledge text is large, for example, exceeds a preset word number threshold, in order to avoid that the longer text is difficult to understand semantically, the external knowledge text is segmented to obtain a short text, the number of characters of which is less than the preset word number threshold and meets the word number requirement. For example, in the second example, the obtained external text is "E, F, G three ravioli stores with good comparison in a place a, wherein people of E and G have high consumption and low cost performance, and the price of F is reasonable", and at this time, the external text is segmented into the following three short texts: the Wantun store with good A places has E, F, G three places, the people of E and G places have high consumption and low cost performance, and the price of F places is reasonable, so that semantic analysis on three short texts is easy, and the accuracy in determining the matching degree with the theme information can be improved.
If the question-answer pair exists in the unstructured text, the question-answer pair can be used as a short text.
And 1022, matching the short text with the theme information to obtain an alternative text with a matching degree meeting a preset matching degree threshold.
After the short text is cut, matching the short text with the theme information respectively to obtain alternative texts with matching degrees meeting a preset matching degree threshold value through screening; optionally, a preset matching algorithm can be executed through a preset first matcher, and the short text is matched with the theme information; matching algorithms such as the BM25 algorithm; specifically, the BM25 is an algorithm for evaluating the correlation between the search term and the document, and is an algorithm proposed based on a probability retrieval model, for example, when the first matcher executes the BM25 algorithm, the matching degree between each short text and the main body information is determined according to the correlation between the topic information and all the short texts, the correlation between the topic information and each short text, and the weight of each short text, and the short text with the matching degree satisfying a preset matching degree threshold is selected as the candidate text.
In an optional embodiment, the generating a response message of the first session message according to the alternative text, the first session message, and the historical session message includes:
step 1031, determining matching degree parameters of the alternative texts with the first session messages and the historical session messages.
Optionally, after determining the alternative texts, matching the alternative texts with the first session message and the historical session message by using a second matcher to obtain matching degree parameters, namely scoring each alternative text; optionally, the second matcher may be a BERT-based classifier, which is a Bidirectional Encoder retrieval from Transformers (BERT).
And 1032, selecting a target text from the alternative texts according to the matching degree parameter.
After the matching parameters are obtained, the target text is selected according to the matching parameters from high to low, for example, if the number of the alternative texts is greater than the maximum number threshold, the target text with higher matching degree is selected according to the matching degree parameters from high to low, so that the number of the alternative texts is reduced, the complexity of calculation is reduced, and the accuracy of calculation is improved.
Step 1033, generating a response message of the first session message according to the target text and the historical session message.
After the target text is obtained, generating a response message of the first session message according to the target text and the historical session message; optionally, the target text and the historical conversation message may be input to a preset conversation generator, and a response message of the first conversation message is generated; the conversation generator executes a preset conversation generating algorithm, for example, a Transformer algorithm, and generates a reasonable reply message, namely a response message, by using an attention mechanism; in this way, in the process of generating the response message of the first session, the unstructured text in the external knowledge text is combined to improve the problem solving capability of the response message.
In an optional embodiment, step 1031 comprises:
step 10311, using the first session message and the historical session message as first texts, and using the alternative texts as second texts.
The first text and the second text can be respectively input to a preset second matcher to obtain a matching degree parameter between each second text and the first text.
As a fourth example, in conjunction with fig. 2, fig. 2 shows a diagram of the BERT model; wherein CLS indicates an input of a user, and S1 to Sn represent first texts, i.e., first session messages and the history session messages; SEP indicates the response reply of the system, and X1 to Xm represent m alternative texts; r (Rcls to Rk) represents a matching degree parameter (i.e., a score) and may also be referred to as a similarity, which is an output probability value of the second matcher.
For example, R1 represents the parameter of degree of matching of S1 with the first session message and the history session message, and … … Rk represents the parameter of degree of matching of Xm with the first session message and the history session message. The network between the first text, the second text and R represents a fully connected network.
Step 10312, obtaining a matching degree parameter between the first text and the second text, where the matching degree parameter is a matching degree parameter between the alternative text and the first session message and between the alternative text and the historical session message.
For example, referring to the second example above, the historical session messages are as follows:
the user: i think of the cheap wonton eating place A;
the system comprises the following steps: find brand B for you;
the current user statement (first session information) is: how many stores there are all a brand B?
The candidate short texts related to the first session information obtained by the BM25 algorithm in the external knowledge texts are as follows:
(from the webpage paragraph) brand B is a fast food chain brand under the flag of X corporation, a, from H, I, F, respectively.
(from the webpage paragraph) brand B audience was targeted to a high income young generation group, with more than 50 direct dining rooms in place a.
Question (Q) (from question-answer pair): vision of brand B; response (a): with brand B services being distributed throughout the world.
And respectively inputting the historical conversation message, the first conversation information and each short text into a BERT, and scoring one by one.
For example, for a short text 1, a complete sentence spliced by a preset token (token) is a "[ CLS ] user: i think about … how many stores a lot is cheap? (ii) a
[ SEP ] brand B is a fast food chain brand under the flag of X Limited on A, and the sponsoring teams come from H ground, I ground and F ground respectively;
the sentence is sent into a BERT model, and an output r _ cls vector is output to obtain a two-class output probability through another full-connection network as a matching degree parameter between the first text and the second text X1. After each short text is scored by BERT, carrying out a re-ordering according to the score, taking the first K short texts as the input of the next module, and taking the next module as a conversation generator.
In an alternative embodiment, step 1033 comprises:
step 10331, using the first session message and the historical session message as third texts, and using the target text as fourth text.
The conversation generator can be a transformer-based generation model, the first conversation message, the historical conversation message and the target text are spliced together, and a system reply is obtained by encoding and decoding through the transformer, wherein the system reply is a response message.
Step 10332, generating a response message according to the third text and the fourth text.
As a fifth example, in conjunction with fig. 3, fig. 3 is a schematic diagram of a model of a conversation generator, which includes a BRET model and a decoder model, and inputs a third text and a fourth text into the BRET model and outputs a response message via the decoder model.
For example, the short text 2 "brand audience of brand B is located in a middle-high income young generation group, more than 50 direct restaurants are set in place a" and selected as the short text with the highest matching degree parameter, and in the process of knowledge fusion of the BRET model, a smooth and natural expression is generated according to the conversation context (historical conversation information) and the answer in the target short text.
At this time, the encoder of the transform model is still a BERT, the input third text is a dialog history (historical session information) + the current round of user statements (first session information), and the input fourth text is topk short texts (target texts); taking k ═ 1 as an example, then the complete inputs to the BERT model are:
"CLS ] user: i think about … how many stores a lot is cheap?
[ SEP ] brand B … 50 restaurant for other direct camps;
the vector sequence output by the BRET model is used as the input of a decoder model, and a reasonable reply is generated by using an attention mechanism according to the standard process of a transform model, such as 'brand B sets up more than 50 direct-operated restaurants in all A';
at this time, the whole dialogue process is as follows:
the user: i think of the cheap wonton eating place A;
the system comprises the following steps: find brand B for you;
the user: how many stores there are all a brand B?
The system comprises the following steps: brand B offers more than 50 direct-operated restaurants in city a.
In this way, the user can also be successfully answered for questions outside the knowledge sheet.
In an optional embodiment, the method further comprises:
step 104, inputting the first session message into a preset recognizer, and recognizing target knowledge corresponding to the first session message; the target knowledge includes the external knowledge text or the structured knowledge text.
As a sixth example, as shown in fig. 4, the recognizer receives the first session message, determines the target knowledge corresponding to the first session message, for example, first determines whether a dialog processor based on the structured knowledge base can answer a question of the first session message, and if so, the target knowledge is text in the structured knowledge base, and performs step 106; otherwise, step 105 is performed.
And 105, if the target knowledge comprises the external knowledge text, acquiring session parameter information of the first session message, jumping to the step 101, and executing the subsequent steps of the step 101.
And sequentially inputting the first session message to a theme recognition module for theme recognition, then extracting knowledge, selecting a target text, and finally generating a response message.
And 106, if the target knowledge comprises the structured knowledge text, carrying out conversation processing on the first conversation message to generate a response message of the first conversation message.
The first conversation message is sequentially input to a natural language understanding module, a conversation state tracking module and a conversation strategy learning module, and finally, a natural language (response message) is generated.
Thus, after the dialog system receives the first session message input by the user, the target knowledge is selected firstly, and whether the dialog processor based on the structured knowledge base can answer the first session message is judged; if the answer can not be solved, the answer is input into the dialog processor based on the external knowledge text to generate an answer message, and the structured text and/or the unstructured text in the external knowledge are fused to process the problem range of the dialog system, so that the capability of the dialog system for dealing with new problems of the user is improved.
In the embodiment of the application, session parameter information of a first session message is acquired, wherein the session parameter information at least comprises subject information and historical session messages; searching for alternative texts associated with the subject information according to the subject information; generating a response message of the first session message according to the alternative text, the first session message and the historical session message, expanding the problem range which can be processed by task-oriented dialog by combining with an external knowledge text, improving the response capability of the system to new problems of the user and improving the response success rate of the dialog system; the embodiment of the application solves the problem that in the prior art, a dialog system based on a structured knowledge base is low in response success rate.
Referring to fig. 5, a flowchart illustrating steps of an embodiment of a dialog method according to an embodiment of the present application is shown, where the method is applicable to dialog response fields such as a dialog system and a customer service system, and expands a range of problems that can be handled by a task-oriented dialog by introducing an external knowledge base and expanding a selection range of candidate texts for generating a response message; and the unstructured text in the external knowledge base is not limited by the type of text, and various types of text can be used as alternative text, such as question and answer pairs, documents, advertisements, user comments and the like. The problem range that task-oriented dialogue can handle is expanded by combining with external knowledge texts, the response capability of the system for dealing with new problems of the user is improved, and the response success rate of the dialogue system is improved.
Referring to fig. 5, the method comprises the steps of:
A first session message, e.g., a message input by a user or client, such as a question message, etc.; as a first example, a user asks for customer service of a product in a shopping APP, asking for relevant information about the product, such as a user input "ask for a question about how well the product is a young person? "is then the information asked" is asking for a question about the suitability of the product for young people? "is a first session message; as a second example, the user enters in the lifestyle service class APP: the 'place near A where cheap wontons are eaten' is a first session message; as a third example, the user enters "what new good scoring movie was last" in the group purchase-like website, and "what new good scoring movie was last" is the first session message.
After receiving the first session message, the dialog system extracts session parameter information, wherein the session parameter information comprises theme information and historical session message; topic information, i.e., the topic of an event in the first session message, such as the name of a restaurant entity, a topic, a domain, etc.; by extracting the subject information of the first session message, the purpose of the first session message queried by the user is known, such as the first example described above, in which the subject information is "whether the product is suitable for young people"; in the second example, the theme information is "a place where ravioli is eaten by a nearby cheap person"; in the third example described above, the topic information is "new good-scoring movie".
The historical conversation message is a historical conversation message of the first conversation message, for example, a preset number of messages before the first conversation message are selected as the historical conversation message, for example, ten messages input by the user are selected before the first conversation message, or a message sent by the conversation system is included as the historical conversation message, so as to further identify the first conversation message and know the requirement of the user.
The external knowledge text may include unstructured text, i.e., unstructured data in the form of text as data; it will be appreciated that the external knowledge text may include unstructured text, and may also include structured text, such as the title, author, etc. of a document in a web page. As shown in FIG. 1, unstructured text includes question-answer pairs, web pages, advertisements, documents, and the like.
The external knowledge text can come from an external website, such as some shopping websites or living service websites, such as the second example described above, where the user wants to inquire nearby cheap wontons, the dialog system can extract alternative texts related to the second example, such as advertisement information, offer information, user rating information, and the like of some merchants, from the unstructured texts in the living service websites in the external knowledge text; the dialogue system searches merchants with wontons in food in the place A in the external knowledge text according to the requirements of users, acquires advertisement information or preferential information of the merchants, judges whether preferential commodities exist in the current time or not, or searches whether comment information related to 'cheap' exists in user evaluation information of the merchants, and takes unstructured text related to subject information as alternative text for generating subsequent response messages.
The external knowledge text may also include text from some external APPs, such as user comment information in a shopping APP, advertisement information, offer information in a lifestyle APP, and so on. For example, in the first example described above, if the subject information is "whether a product is suitable for young people", the dialog system may use, as the candidate text, text information related to "suitable", "age bracket", and the like among comment information and introduction information related to the product in the shopping APP.
With reference to fig. 1, the dialog system inputs the topic information into the external knowledge text, and roughly recalls some alternative texts for the topic information in the external knowledge text, for example, according to the association degree or matching degree of the external knowledge text and the topic information, the external knowledge text with higher association degree or matching degree is selected as the alternative text.
In this way, structured text and/or unstructured text in external knowledge are fused to expand the range of problems that can be handled by the task-oriented dialog system, thereby improving the ability of the dialog system to deal with new problems of users.
Optionally, an external knowledge base may be configured to store the external knowledge text.
Optionally, the reply message may be generated by a session generator; in conjunction with fig. 1, the dialog system performs dialog generation on the alternative text, the historical dialog message, and the first dialog message, for example, inputs all of them into a preset dialog generator, and generates a response message through the dialog generator. The conversation generator executes a preset conversation generating algorithm, for example, a Transformer algorithm, and generates a reasonable reply message, namely a response message, by using an attention mechanism; in this way, in the process of generating the response message of the first session, the unstructured text in the external knowledge text is combined to improve the problem solving capability of the response message.
In the practical application scenario of the conversational mission system, the user's expression is not restricted, such as the user may ask "whether to take a pet", "what preferential activities are available today", "can you decide between packages", "do you get a person yet? "and so on, new questions not contained in the knowledge table. For new problems not contained in the structured knowledge base, it is difficult in the prior art to enable the user to obtain an effective response reply.
For example, in the first example, the dialog system takes text information related to "suitable", "age bracket", and the like among comment information and introduction information related to the product in the shopping APP or shopping website as the candidate text, and inputs the candidate text, the first session message, and the history session message as input contents to the session generator, and the session generator generates a response message, such as: "this commodity is not suitable for young people".
For example, in the second example, if the user wants to search for a nearby cheap wonton eating place, the dialog system may extract alternative texts related to the second example, such as advertisement information, offer information, and user rating information of some merchants, from unstructured texts in the lifestyle service websites in the external knowledge texts; specifically, the dialog system searches merchants with wontons in food in place a in the external knowledge text according to the requirements of users, acquires advertisement information or preferential information of the merchants, judges whether preferential commodities exist in the current time or not, or searches whether comment information related to 'cheap' exists from user evaluation information of the merchants, takes unstructured text related to subject information as alternative text, takes the alternative text, the first session message and the historical session message as input content, inputs the input content to a session generator, and the session generator generates response messages, wherein the response messages include: "find brand B for you". If the user continues to input: "how many stores brand B has in city a", then "how many stores brand B has in city a" is taken as a new first session message, and the dialog system continues to generate a response message for the new first session message, for example, the response message is "50 stores brand B has in city a", thus, the ability of the dialog system to cope with new problems of the user is improved by unstructured text in the external knowledge text.
For example, in the third example, the user inputs "what new movie with good scores recently", the dialog system may extract alternative texts related to the movie with good scores recently from the unstructured text in the lifestyle service-like website in the external knowledge text, such as some ticketing websites, comment information in APP, and movie scores in some review-like websites; the dialog system searches unstructured texts in the external knowledge texts according to the requirements of users, acquires scores or comment information of recently-shown movies and the like, takes the unstructured texts related to the topic information as alternative texts, and takes the alternative texts, the first session messages and the historical session messages as input contents to be input to a session generator, and the session generator generates response messages, wherein the response messages comprise: "find movie C for you". If the user continues to input: "who the lead actor of movie C is", then "who the lead actor of movie C is" as a new first session message, and the dialog system continues to generate a response message for the new first session message, such as the response message is "the lead actor of movie C includes actor D".
In an alternative embodiment, the external knowledge text comprises: text obtained from a target source.
In an alternative embodiment, the target source includes at least one of a target application and a target website.
In an optional embodiment, the external knowledge text comprises at least one of web page information, application program internal push messages, question-answer pairs and documents.
In an optional embodiment, the searching for the alternative text associated with the topic information according to the topic information includes:
segmenting the external knowledge text to obtain a short text with the number of characters smaller than a preset word number threshold;
and matching the short text with the subject information to obtain an alternative text with the matching degree meeting a preset matching degree threshold value.
In an optional embodiment, the generating a response message of the first session message according to the alternative text, the first session message, and the historical session message includes:
determining a matching degree parameter of the alternative text with the first session message and the historical session message;
selecting a target text from the alternative texts according to the matching degree parameter;
and generating a response message of the first session message according to the target text and the historical session message.
In an optional embodiment, the determining the parameter of the degree of matching between the alternative text and the first session message and the historical session message includes:
the first session message and the historical session message are used as first texts, the alternative texts are used as second texts, and the second texts are respectively input to a preset second matcher;
and acquiring a matching degree parameter between the first text and the second text, wherein the matching degree parameter is the matching degree parameter of the alternative text, the first session message and the historical session message.
In an optional embodiment, the generating a response message of the first session message according to the target text and the historical session message includes:
taking the first session message and the historical session message as third texts, and taking the target text as a fourth text;
and generating a response message according to the third text and the fourth text.
In an alternative embodiment, the method comprises:
inputting the first session message into a preset recognizer, and recognizing target knowledge corresponding to the first session message; the target knowledge comprises the external knowledge text or the structured knowledge text;
if the target knowledge comprises the external knowledge text, acquiring session parameter information of a first session message;
and if the target knowledge comprises the structured knowledge text, carrying out session processing on the first session message to generate a response message of the first session message.
In the embodiment of the application, session parameter information of a first session message is acquired, wherein the session parameter information at least comprises subject information and historical session messages; searching for alternative texts associated with the subject information according to the subject information; generating a response message of the first session message according to the alternative text, the first session message and the historical session message, expanding the problem range which can be processed by task-oriented dialog by combining with an external knowledge text, improving the response capability of the system to new problems of the user and improving the response success rate of the dialog system; the embodiment of the application solves the problem that in the prior art, a dialog system based on a structured knowledge base is low in response success rate.
On the basis of the above embodiments, the embodiments of the present application further provide a response message generating method, which can solve the problem in the prior art that a dialog system based on a structured knowledge base has a low response success rate. The method can be applied to the field of dialogue response such as a dialogue system, a customer service system and the like, and can expand the range of problems which can be processed by task-oriented dialogue by introducing an external knowledge base and expanding the selection range of alternative texts for generating response messages; and the unstructured text in the external knowledge base is not limited by the type of text, and various types of text can be used as alternative text, such as question and answer pairs, documents, advertisements, user comments and the like. The problem range that task-oriented dialogue can handle is expanded by combining with external knowledge texts, the response capability of the system for dealing with new problems of the user is improved, and the response success rate of the dialogue system is improved.
Referring to fig. 6, a flowchart illustrating steps of an embodiment of a method for generating a response message of the present application is shown, the method comprising:
A first question message, such as a message input by a user or a client, such as a question message or the like; as a first example, a user asks for customer service of a product in a shopping APP, asking for relevant information about the product, such as a user input "ask for a question about how well the product is a young person? "is then the information asked" is asking for a question about the suitability of the product for young people? "is the first question message; as a second example, the user enters in the lifestyle service class APP: the 'place near A where cheap wontons are eaten' is the first question message; as a third example, the user enters "what new good-scoring movie has been recently" in the group purchase type website, and "what new good-scoring movie has been recently" as the first question message.
After receiving the first question message, the dialog system extracts session parameter information, wherein the session parameter information comprises theme information and historical session information; topic information, namely an event topic in the first question message, such as a restaurant entity name, a topic, a field and the like; by extracting the subject information of the first question message, the purpose of the first session information queried by the user is known, for example, in the first example, the subject information is "whether the commodity is suitable for young people"; in the second example, the theme information is "a place where ravioli is eaten by a nearby cheap person"; in the third example described above, the topic information is "new good-scoring movie".
The historical conversation message is a historical message of the first question message, for example, a preset number of messages before the first question message are selected as the historical conversation message, for example, ten messages input by the user before the first question message are selected, or a message sent by the dialog system is included as the historical conversation message, so as to further identify the first question message and know the requirement of the user.
The user inputs a first question message, and the dialog system acquires the subject information from the first question message.
The external knowledge text may include unstructured text, i.e., unstructured data in the form of text as data; it will be appreciated that the external knowledge text may include unstructured text, and may also include structured text, such as the title, author, etc. of a document in a web page. As shown in FIG. 1, unstructured text includes question-answer pairs, web pages, advertisements, documents, and the like.
The external knowledge text can come from an external website, such as some shopping websites or living service websites, such as the second example described above, where the user wants to inquire nearby cheap wontons, the dialog system can extract alternative texts related to the second example, such as advertisement information, offer information, user rating information, and the like of some merchants, from the unstructured texts in the living service websites in the external knowledge text; the dialogue system searches merchants with wontons in food in the place A in the external knowledge text according to the requirements of users, acquires advertisement information or preferential information of the merchants, judges whether preferential commodities exist in the current time or not, or searches whether comment information related to 'cheap' exists in user evaluation information of the merchants, and takes unstructured text related to subject information as alternative text for generating subsequent response messages.
The external knowledge text may also include text from some external APPs, such as user comment information in a shopping APP, advertisement information, offer information in a lifestyle APP, and so on. For example, in the first example described above, if the subject information is "whether a product is suitable for young people", the dialog system may use, as the candidate text, text information related to "suitable", "age bracket", and the like among comment information and introduction information related to the product in the shopping APP.
With reference to fig. 1, the dialog system inputs the topic information into the external knowledge text, and roughly recalls some alternative texts for the topic information in the external knowledge text, for example, according to the association degree or matching degree of the external knowledge text and the topic information, the external knowledge text with higher association degree or matching degree is selected as the alternative text.
In this way, structured text and/or unstructured text in external knowledge are fused to expand the range of problems that can be handled by the task-oriented dialog system, thereby improving the ability of the dialog system to deal with new problems of users.
Optionally, an external knowledge base may be configured to store the external knowledge text.
In conjunction with fig. 1, the dialog system performs dialog generation on the alternative text, the historical dialog message, and the first dialog message, such as inputting all of the three to a preset dialog generator, and generating a response message through the dialog generator. The conversation generator executes a preset conversation generating algorithm, for example, a Transformer algorithm, and generates a reasonable reply message, namely a response message, by using an attention mechanism; in this way, in the process of generating the response message of the first session, the unstructured text in the external knowledge text is combined to improve the problem solving capability of the response message.
In the practical application scenario of the conversational mission system, the user's expression is not restricted, such as the user may ask "whether to take a pet", "what preferential activities are available today", "can you decide between packages", "do you get a person yet? "and so on, new questions not contained in the knowledge table. For new problems not contained in the structured knowledge base, it is difficult in the prior art to enable the user to obtain an effective response reply.
For example, in the first example, the dialog system takes text information related to "suitable", "age bracket", and the like among comment information and introduction information related to the product in the shopping APP or shopping website as the candidate text, and inputs the candidate text, the first question message, and the history conversation message as input contents to the conversation generator, and the conversation generator generates a response message, such as: "this commodity is not suitable for young people".
For example, in the second example, if the user wants to search for a nearby cheap wonton eating place, the dialog system may extract alternative texts related to the second example, such as advertisement information, offer information, and user rating information of some merchants, from unstructured texts in the lifestyle service websites in the external knowledge texts; specifically, the dialog system searches merchants with wontons in food in place a in the external knowledge text according to the requirements of users, acquires advertisement information or preferential information of the merchants, judges whether preferential commodities exist in the current time or not, or searches whether comment information related to 'cheap' exists from user evaluation information of the merchants, takes unstructured text related to subject information as alternative text, takes the alternative text, the first question asking message and the historical conversation message as input content, inputs the input content to a conversation generator, and generates response messages, wherein the response messages include: "find brand B for you". If the user continues to input: "how many stores brand B has in city a", then "how many stores brand B has in city a" is taken as a new first question message, and the dialog system continues to generate a response message for the new first dialog message, for example, the response message is "brand B has in city a 50 stores", so that the capability of the dialog system to cope with new questions of the user is improved by unstructured text in the external knowledge text.
For example, in the third example, the user inputs "what new movie with good scores recently", the dialog system may extract alternative texts related to the movie with good scores recently from the unstructured text in the lifestyle service-like website in the external knowledge text, such as some ticketing websites, comment information in APP, and movie scores in some review-like websites; the dialog system searches unstructured texts in the external knowledge texts according to the requirements of users, acquires scores or comment information of recently-shown movies and the like, takes the unstructured texts related to the topic information as alternative texts, and takes the alternative texts, the first question messages and the historical conversation messages as input contents, and inputs the input contents into a conversation generator, and the conversation generator generates response messages, wherein the response messages comprise: "find movie C for you". If the user continues to input: "who the lead actor of movie C is", then "who the lead actor of movie C is" as a new first question message, the dialog system proceeds to generate a response message for the new first dialog message, for example, the response message is "the lead actor of movie C includes actor D".
In addition to steps 601 to 603, the method for generating a response message provided in the embodiment of the present application further includes other steps in the dialog method in the embodiment, which may specifically refer to the description of the embodiment; to avoid repetition, further description is omitted here.
In the embodiment of the application, session parameter information of a first question message is acquired, wherein the session parameter information at least comprises subject information and historical session information; searching for alternative texts associated with the subject information according to the subject information; generating a response message of the first question message according to the alternative text, the first question message and the historical conversation message, expanding a problem range which can be processed by task-oriented dialog by combining with an external knowledge text, improving the response capability of a system for responding to new problems of a user, and improving the response success rate of the dialog system; the embodiment of the application solves the problem that in the prior art, a dialog system based on a structured knowledge base is low in response success rate.
On the basis of the above embodiments, the present embodiment further provides a dialog apparatus, which is applied to electronic devices such as a terminal device and a server. By introducing an external knowledge base and expanding the selection range of the alternative texts for generating the response message, the problem range which can be processed by the task-oriented dialog is expanded; and the unstructured text in the external knowledge base is not limited by the type of text, and various types of text can be used as alternative text, such as question and answer pairs, documents, advertisements, user comments and the like. The problem range that task-oriented dialogue can handle is expanded by combining with external knowledge texts, the response capability of the system for dealing with new problems of the user is improved, and the response success rate of the dialogue system is improved.
Referring to fig. 7, a block diagram of a dialog device according to an embodiment of the present application is shown, which may specifically include the following modules:
the parameter obtaining module 701 is configured to obtain session parameter information of the first session message, where the session parameter information at least includes topic information and historical session messages.
A first session message, e.g., a message input by a user or client, such as a question message, etc.; as a first example, a user asks for customer service of a product in a shopping APP, asking for relevant information about the product, such as a user input "ask for a question about how well the product is a young person? "is then the information asked" is asking for a question about the suitability of the product for young people? "is a first session message; as a second example, the user enters in the lifestyle service class APP: the 'place near A where cheap wontons are eaten' is a first session message; as a third example, the user enters "what new good scoring movie was last" in the group purchase-like website, and "what new good scoring movie was last" is the first session message.
After receiving the first session message, the dialog system extracts session parameter information, wherein the session parameter information comprises theme information and historical session message; topic information, i.e., the topic of an event in the first session message, such as the name of a restaurant entity, a topic, a domain, etc.; by extracting the subject information of the first session message, the purpose of the first session message queried by the user is known, such as the first example described above, in which the subject information is "whether the product is suitable for young people"; in the second example, the theme information is "a place where ravioli is eaten by a nearby cheap person"; in the third example described above, the topic information is "new good-scoring movie".
The historical conversation message is a historical conversation message of the first conversation message, for example, a preset number of messages before the first conversation message are selected as the historical conversation message, for example, ten messages input by the user are selected before the first conversation message, or a message sent by the conversation system is included as the historical conversation message, so as to further identify the first conversation message and know the requirement of the user.
A text searching module 702, configured to search, according to the topic information, an alternative text associated with the topic information; the alternative text is an external knowledge text.
The external knowledge text may include unstructured text, i.e., unstructured data in the form of text as data; it will be appreciated that the external knowledge text may include unstructured text, and may also include structured text, such as the title, author, etc. of a document in a web page. As shown in FIG. 1, unstructured text includes question-answer pairs, web pages, advertisements, documents, and the like.
The external knowledge text can come from an external website, such as some shopping websites or living service websites, such as the second example described above, where the user wants to inquire nearby cheap wontons, the dialog system can extract alternative texts related to the second example, such as advertisement information, offer information, user rating information, and the like of some merchants, from the unstructured texts in the living service websites in the external knowledge text; the dialogue system searches merchants with wontons in food in the place A in the external knowledge text according to the requirements of users, acquires advertisement information or preferential information of the merchants, judges whether preferential commodities exist in the current time or not, or searches whether comment information related to 'cheap' exists in user evaluation information of the merchants, and takes unstructured text related to subject information as alternative text for generating subsequent response messages.
The external knowledge text may also include text from some external APPs, such as user comment information in a shopping APP, advertisement information, offer information in a lifestyle APP, and so on. For example, in the first example described above, if the subject information is "whether a product is suitable for young people", the dialog system may use, as the candidate text, text information related to "suitable", "age bracket", and the like among comment information and introduction information related to the product in the shopping APP.
With reference to fig. 1, the dialog system inputs the topic information into the external knowledge text, and roughly recalls some alternative texts for the topic information in the external knowledge text, for example, according to the association degree or matching degree of the external knowledge text and the topic information, the external knowledge text with higher association degree or matching degree is selected as the alternative text.
In this way, structured text and/or unstructured text in external knowledge are fused to expand the range of problems that can be handled by the task-oriented dialog system, thereby improving the ability of the dialog system to deal with new problems of users.
Optionally, an external knowledge base may be configured to store the external knowledge text.
A message generating module 703, configured to generate a response message of the first session message according to the alternative text, the first session message, and the historical session message.
In conjunction with fig. 1, the dialog system performs dialog generation on the alternative text, the historical dialog message, and the first dialog message, for example, inputs all of them into a preset dialog generator, and generates a response message through the dialog generator. The conversation generator executes a preset conversation generating algorithm, for example, a Transformer algorithm, and generates a reasonable reply message, namely a response message, by using an attention mechanism; in this way, in the process of generating the response message of the first session, the unstructured text in the external knowledge text is combined to improve the problem solving capability of the response message.
In the practical application scenario of the conversational mission system, the user's expression is not restricted, such as the user may ask "whether to take a pet", "what preferential activities are available today", "can you decide between packages", "do you get a person yet? "and so on, new questions not contained in the knowledge table. For new problems not contained in the structured knowledge base, it is difficult in the prior art to enable the user to obtain an effective response reply.
For example, in the first example, the dialog system takes text information related to "suitable", "age bracket", and the like among comment information and introduction information related to the product in the shopping APP or shopping website as the candidate text, and inputs the candidate text, the first session message, and the history session message as input contents to the session generator, and the session generator generates a response message, such as: "this commodity is not suitable for young people".
For example, in the second example, if the user wants to search for a nearby cheap wonton eating place, the dialog system may extract alternative texts related to the second example, such as advertisement information, offer information, and user rating information of some merchants, from unstructured texts in the lifestyle service websites in the external knowledge texts; specifically, the dialog system searches merchants with wontons in food in place a in the external knowledge text according to the requirements of users, acquires advertisement information or preferential information of the merchants, judges whether preferential commodities exist in the current time or not, or searches whether comment information related to 'cheap' exists from user evaluation information of the merchants, takes unstructured text related to subject information as alternative text, takes the alternative text, the first session message and the historical session message as input content, inputs the input content to a session generator, and the session generator generates response messages, wherein the response messages include: "find brand B for you". If the user continues to input: "how many stores brand B has in city a", then "how many stores brand B has in city a" is taken as a new first session message, and the dialog system continues to generate a response message for the new first session message, for example, the response message is "50 stores brand B has in city a", thus, the ability of the dialog system to cope with new problems of the user is improved by unstructured text in the external knowledge text.
For example, in the third example, the user inputs "what new movie with good scores recently", the dialog system may extract alternative texts related to the movie with good scores recently from the unstructured text in the lifestyle service-like website in the external knowledge text, such as some ticketing websites, comment information in APP, and movie scores in some review-like websites; the dialog system searches unstructured texts in the external knowledge texts according to the requirements of users, acquires scores or comment information of recently-shown movies and the like, takes the unstructured texts related to the topic information as alternative texts, and takes the alternative texts, the first session messages and the historical session messages as input contents to be input to a session generator, and the session generator generates response messages, wherein the response messages comprise: "find movie C for you". If the user continues to input: "who the lead actor of movie C is", then "who the lead actor of movie C is" as a new first session message, and the dialog system continues to generate a response message for the new first session message, such as the response message is "the lead actor of movie C includes actor D".
In an alternative embodiment, the external knowledge text comprises: text obtained from a target source.
In an alternative embodiment, the target source includes at least one of a target application and a target website.
In an optional embodiment, the external knowledge text comprises at least one of web page information, application program internal push messages, question-answer pairs and documents.
In an alternative embodiment, the text lookup module 702 includes:
the segmentation submodule is used for segmenting the external knowledge text to obtain a short text of which the number of characters is less than a preset word number threshold;
and the matching sub-module is used for matching the short text with the subject information to obtain an alternative text with the matching degree meeting a preset matching degree threshold value.
In an optional embodiment, the message generating module 703 includes:
the determining submodule is used for determining the matching degree parameter of the alternative text, the first session message and the historical session message;
the selection submodule is used for selecting a target text from the alternative texts according to the matching degree parameter;
and the generating submodule is used for generating a response message of the first session message according to the target text and the historical session message.
In an optional embodiment, the determining sub-module comprises:
a first input unit, configured to input the first session message and the historical session message as first texts and the alternative texts as second texts to a preset second matcher respectively;
a parameter obtaining unit, configured to obtain a matching degree parameter between the first text and the second text, where the matching degree parameter is a matching degree parameter between the candidate text and the first session message as well as between the candidate text and the historical session message.
In an optional embodiment, the generating sub-module includes:
a second input unit, configured to use the first session message and the historical session message as a third text, and use the target text as a fourth text;
and the message acquisition unit is used for generating a response message according to the third text and the fourth text.
In an alternative embodiment, the apparatus comprises:
the recognition module is used for inputting the first session message into a preset recognizer and recognizing target knowledge corresponding to the first session message; the target knowledge comprises the external knowledge text or the structured knowledge text;
an external processing module, configured to instruct the parameter obtaining module 701 to obtain session parameter information of the first session message if the target knowledge includes the external knowledge text;
and the structural processing module is used for carrying out session processing on the first session message if the target knowledge comprises the structural knowledge text and generating a response message of the first session message.
The dialog device provided by the embodiment of the application executes the steps in the dialog method.
In this embodiment of the present application, the parameter obtaining module 701 obtains session parameter information of a first session message, where the session parameter information at least includes topic information and historical session messages; the text searching module 702 searches for alternative texts associated with the subject information according to the subject information; the message generating module 703 generates a response message of the first session message according to the alternative text, the first session message and the historical session message, and expands the range of problems that can be handled by task-oriented dialog in combination with an external knowledge text, thereby improving the response capability of the system to new problems of the user and increasing the response success rate of the dialog system; the embodiment of the application solves the problem that in the prior art, a dialog system based on a structured knowledge base is low in response success rate.
Referring to fig. 8, a block diagram of a structure of an embodiment of an acknowledgement message generating apparatus according to the present application is shown, which may specifically include the following modules:
an information obtaining module 801, configured to obtain session parameter information of the first question message, where the session parameter information at least includes topic information and historical session messages.
A first question message, such as a message input by a user or a client, such as a question message or the like; as a first example, a user asks for customer service of a product in a shopping APP, asking for relevant information about the product, such as a user input "ask for a question about how well the product is a young person? "is then the information asked" is asking for a question about the suitability of the product for young people? "is the first question message; as a second example, the user enters in the lifestyle service class APP: the 'place near A where cheap wontons are eaten' is the first question message; as a third example, the user enters "what new good-scoring movie has been recently" in the group purchase type website, and "what new good-scoring movie has been recently" as the first question message.
After receiving the first question message, the dialog system extracts session parameter information, wherein the session parameter information comprises theme information and historical session information; topic information, namely an event topic in the first question message, such as a restaurant entity name, a topic, a field and the like; by extracting the subject information of the first question message, the purpose of the first session information queried by the user is known, for example, in the first example, the subject information is "whether the commodity is suitable for young people"; in the second example, the theme information is "a place where ravioli is eaten by a nearby cheap person"; in the third example described above, the topic information is "new good-scoring movie".
The historical conversation message is a historical message of the first question message, for example, a preset number of messages before the first question message are selected as the historical conversation message, for example, ten messages input by the user before the first question message are selected, or a message sent by the dialog system is included as the historical conversation message, so as to further identify the first question message and know the requirement of the user.
The user inputs a first question message, and the dialog system acquires the subject information from the first question message.
A searching module 802, configured to search, according to the topic information, an alternative text associated with the topic information; the alternative text is an external knowledge text.
The external knowledge text may include unstructured text, i.e., unstructured data in the form of text as data; it will be appreciated that the external knowledge text may include unstructured text, and may also include structured text, such as the title, author, etc. of a document in a web page. As shown in FIG. 1, unstructured text includes question-answer pairs, web pages, advertisements, documents, and the like.
The external knowledge text can come from an external website, such as some shopping websites or living service websites, such as the second example described above, where the user wants to inquire nearby cheap wontons, the dialog system can extract alternative texts related to the second example, such as advertisement information, offer information, user rating information, and the like of some merchants, from the unstructured texts in the living service websites in the external knowledge text; the dialogue system searches merchants with wontons in food in the place A in the external knowledge text according to the requirements of users, acquires advertisement information or preferential information of the merchants, judges whether preferential commodities exist in the current time or not, or searches whether comment information related to 'cheap' exists in user evaluation information of the merchants, and takes unstructured text related to subject information as alternative text for generating subsequent response messages.
The external knowledge text may also include text from some external APPs, such as user comment information in a shopping APP, advertisement information, offer information in a lifestyle APP, and so on. For example, in the first example described above, if the subject information is "whether a product is suitable for young people", the dialog system may use, as the candidate text, text information related to "suitable", "age bracket", and the like among comment information and introduction information related to the product in the shopping APP.
With reference to fig. 1, the dialog system inputs the topic information into the external knowledge text, and roughly recalls some alternative texts for the topic information in the external knowledge text, for example, according to the association degree or matching degree of the external knowledge text and the topic information, the external knowledge text with higher association degree or matching degree is selected as the alternative text.
In this way, structured text and/or unstructured text in external knowledge are fused to expand the range of problems that can be handled by the task-oriented dialog system, thereby improving the ability of the dialog system to deal with new problems of users.
Optionally, an external knowledge base may be configured to store the external knowledge text.
A response generating module 803, configured to generate a response message of the first question message according to the alternative text, the first question message, and the historical conversation message.
With reference to fig. 1, the dialog system inputs the alternative text, the historical dialog message, and the first question message to a preset dialog generator, and generates a response message through the dialog generator. The conversation generator executes a preset conversation generating algorithm, for example, a Transformer algorithm, and generates a reasonable reply message, namely a response message, by using an attention mechanism; in this way, in the process of generating the response message of the first session, the unstructured text in the external knowledge text is combined to improve the problem solving capability of the response message.
In the practical application scenario of the conversational mission system, the user's expression is not restricted, such as the user may ask "whether to take a pet", "what preferential activities are available today", "can you decide between packages", "do you get a person yet? "and so on, new questions not contained in the knowledge table. For new problems not contained in the structured knowledge base, it is difficult in the prior art to enable the user to obtain an effective response reply.
For example, in the first example, the dialog system takes text information related to "suitable", "age bracket", and the like among comment information and introduction information related to the product in the shopping APP or shopping website as the candidate text, and inputs the candidate text, the first question message, and the history conversation message as input contents to the conversation generator, and the conversation generator generates a response message, such as: "this commodity is not suitable for young people".
For example, in the second example, if the user wants to search for a nearby cheap wonton eating place, the dialog system may extract alternative texts related to the second example, such as advertisement information, offer information, and user rating information of some merchants, from unstructured texts in the lifestyle service websites in the external knowledge texts; specifically, the dialog system searches merchants with wontons in food in place a in the external knowledge text according to the requirements of users, acquires advertisement information or preferential information of the merchants, judges whether preferential commodities exist in the current time or not, or searches whether comment information related to 'cheap' exists from user evaluation information of the merchants, takes unstructured text related to subject information as alternative text, takes the alternative text, the first question asking message and the historical conversation message as input content, inputs the input content to a conversation generator, and generates response messages, wherein the response messages include: "find brand B for you". If the user continues to input: "how many stores brand B has in city a", then "how many stores brand B has in city a" is taken as a new first question message, and the dialog system continues to generate a response message for the new first dialog message, for example, the response message is "brand B has in city a 50 stores", so that the capability of the dialog system to cope with new questions of the user is improved by unstructured text in the external knowledge text.
For example, in the third example, the user inputs "what new movie with good scores recently", the dialog system may extract alternative texts related to the movie with good scores recently from the unstructured text in the lifestyle service-like website in the external knowledge text, such as some ticketing websites, comment information in APP, and movie scores in some review-like websites; the dialog system searches unstructured texts in the external knowledge texts according to the requirements of users, acquires scores or comment information of recently-shown movies and the like, takes the unstructured texts related to the topic information as alternative texts, and takes the alternative texts, the first question messages and the historical conversation messages as input contents, and inputs the input contents into a conversation generator, and the conversation generator generates response messages, wherein the response messages comprise: "find movie C for you". If the user continues to input: "who the lead actor of movie C is", then "who the lead actor of movie C is" as a new first question message, the dialog system proceeds to generate a response message for the new first dialog message, for example, the response message is "the lead actor of movie C includes actor D".
The response message generation device provided by the embodiment of the application executes the steps in the response message generation method.
In this embodiment of the application, the information obtaining module 801 obtains session parameter information of the first question message, where the session parameter information at least includes topic information and historical session information; the searching module 802 searches for the alternative text associated with the subject information according to the subject information; the response generating module 803 generates a response message of the first question message according to the alternative text, the first question message and the historical conversation message, expands the problem range that task-oriented dialog can handle by combining with an external knowledge text, improves the response capability of the system to respond to new problems of the user, and improves the response success rate of the dialog system; the embodiment of the application solves the problem that in the prior art, a dialog system based on a structured knowledge base is low in response success rate.
The present application further provides a non-transitory, readable storage medium, where one or more modules (programs) are stored, and when the one or more modules are applied to a device, the device may execute instructions (instructions) of method steps in this application.
Embodiments of the present application provide one or more machine-readable storage media having instructions stored thereon, which when executed by one or more processors, cause an electronic device to perform the methods as described in one or more of the above embodiments. In the embodiment of the present application, the electronic device includes various types of devices such as a terminal device and a server (cluster).
Embodiments of the present disclosure may be implemented as an apparatus, which may include electronic devices such as a terminal device, a server (cluster), etc., using any suitable hardware, firmware, software, or any combination thereof, to perform a desired configuration. Fig. 9 schematically illustrates an example apparatus 900 that may be used to implement various embodiments described herein.
For one embodiment, fig. 9 illustrates an example apparatus 900 having one or more processors 902, a control module (chipset) 904 coupled to at least one of the processor(s) 902, a memory 906 coupled to the control module 904, a non-volatile memory (NVM)/storage 908 coupled to the control module 904, one or more input/output devices 910 coupled to the control module 904, and a network interface 912 coupled to the control module 904.
The processor 902 may include one or more single-core or multi-core processors, and the processor 902 may include any combination of general-purpose or special-purpose processors (e.g., graphics processors, application processors, baseband processors, etc.). In some embodiments, the apparatus 900 can be a terminal device, a server (cluster), or the like as described in this embodiment.
In some embodiments, apparatus 900 may include one or more computer-readable media (e.g., memory 906 or NVM/storage 908) having instructions 914 and one or more processors 902 in combination with the one or more computer-readable media and configured to execute instructions 914 to implement modules to perform the actions described in this disclosure.
For one embodiment, control module 904 may include any suitable interface controllers to provide any suitable interface to at least one of the processor(s) 902 and/or any suitable device or component in communication with control module 904.
The control module 904 may include a memory controller module to provide an interface to the memory 906. The memory controller module may be a hardware module, a software module, and/or a firmware module.
The memory 906 may be used, for example, to load and store data and/or instructions 914 for the device 900. For one embodiment, memory 906 may comprise any suitable volatile memory, such as suitable DRAM. In some embodiments, the memory 906 may comprise a double data rate type four synchronous dynamic random access memory (DDR4 SDRAM).
For one embodiment, the control module 904 may include one or more input/output controllers to provide an interface to the NVM/storage 908 and input/output device(s) 910.
For example, NVM/storage 908 may be used to store data and/or instructions 914. NVM/storage 908 may include any suitable non-volatile memory (e.g., flash memory) and/or may include any suitable non-volatile storage device(s) (e.g., one or more Hard Disk Drives (HDDs), one or more Compact Disc (CD) drives, and/or one or more Digital Versatile Disc (DVD) drives).
NVM/storage 908 may include storage resources that are physically part of the device on which apparatus 900 is installed, or it may be accessible by the device and need not be part of the device. For example, NVM/storage 908 may be accessible over a network via input/output device(s) 910.
Input/output device(s) 910 may provide an interface for apparatus 900 to communicate with any other suitable device, input/output devices 910 may include communication components, audio components, sensor components, and so forth. Network interface 912 may provide an interface for device 900 to communicate over one or more networks, and device 900 may wirelessly communicate with one or more components of a wireless network according to any of one or more wireless network standards and/or protocols, such as access to a wireless network based on a communication standard, such as WiFi, 2G, 3G, 4G, 5G, etc., or a combination thereof.
For one embodiment, at least one of the processor(s) 902 may be packaged together with logic for one or more controller(s) (e.g., memory controller module) of the control module 904. For one embodiment, at least one of the processor(s) 902 may be packaged together with logic for one or more controller(s) of the control module 904 to form a System In Package (SiP). For one embodiment, at least one of the processor(s) 902 may be integrated on the same die with logic for one or more controller(s) of the control module 904. For one embodiment, at least one of the processor(s) 902 may be integrated on the same die with logic of one or more controllers of the control module 904 to form a system on a chip (SoC).
In various embodiments, the apparatus 900 may be, but is not limited to being: a server, a desktop computing device, or a mobile computing device (e.g., a laptop computing device, a handheld computing device, a tablet, a netbook, etc.), among other terminal devices. In various embodiments, apparatus 900 may have more or fewer components and/or different architectures. For example, in some embodiments, device 900 includes one or more cameras, keyboards, Liquid Crystal Display (LCD) screens (including touch screen displays), non-volatile memory ports, multiple antennas, graphics chips, Application Specific Integrated Circuits (ASICs), and speakers.
The detection device can adopt a main control chip as a processor or a control module, sensor data, position information and the like are stored in a memory or an NVM/storage device, a sensor group can be used as an input/output device, and a communication interface can comprise a network interface.
For the device embodiment, since it is basically similar to the method embodiment, the description is simple, and for the relevant points, refer to the partial description of the method embodiment.
The embodiments in the present specification are described in a progressive manner, each embodiment focuses on differences from other embodiments, and the same and similar parts among the embodiments are referred to each other.
Embodiments of the present application are described with reference to flowchart illustrations and/or block diagrams of methods, terminal devices (systems), and computer program products according to embodiments of the application. It will be understood that each flow and/or block of the flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing terminal to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing terminal, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing terminal to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing terminal to cause a series of operational steps to be performed on the computer or other programmable terminal to produce a computer implemented process such that the instructions which execute on the computer or other programmable terminal provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
While preferred embodiments of the present application have been described, additional variations and modifications of these embodiments may occur to those skilled in the art once they learn of the basic inventive concepts. Therefore, it is intended that the appended claims be interpreted as including the preferred embodiment and all such alterations and modifications as fall within the true scope of the embodiments of the application.
Finally, it should also be noted that, herein, relational terms such as first and second, and the like may be used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Also, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or terminal that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or terminal. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other like elements in a process, method, article, or terminal that comprises the element.
The above has introduced details of a dialog method and apparatus, a response message generation method and apparatus, an electronic device and a storage medium provided by the present application, and specific examples are applied herein to explain the principles and embodiments of the present application, and the descriptions of the above embodiments are only used to help understand the method and core ideas of the present application; meanwhile, for a person skilled in the art, according to the idea of the present application, there may be variations in the specific embodiments and the application scope, and in summary, the content of the present specification should not be construed as a limitation to the present application.
Claims (14)
1. A method of dialogues, the method comprising:
acquiring session parameter information of a first session message, wherein the session parameter information at least comprises subject information and historical session messages;
searching for alternative texts associated with the subject information according to the subject information; the alternative text is an external knowledge text;
and generating a response message of the first session message according to the alternative text, the first session message and the historical session message.
2. The dialog method of claim 1 wherein the external knowledge text comprises: text obtained from a target source.
3. The dialog method of claim 2 wherein the target source comprises at least one of a target application and a target website.
4. The dialog method of claim 2 wherein the external knowledge text comprises at least one of web page information, application internal push messages, question-answer pairs and documents.
5. The dialog method of claim 1 wherein said searching for alternative text associated with said subject information based on said subject information comprises:
segmenting the external knowledge text to obtain a short text with the number of characters smaller than a preset word number threshold;
and matching the short text with the subject information to obtain an alternative text with the matching degree meeting a preset matching degree threshold value.
6. The dialog method of claim 1 wherein generating a reply message to the first session message based on the alternative text, the first session message, and the historical session message comprises:
determining a matching degree parameter of the alternative text with the first session message and the historical session message;
selecting a target text from the alternative texts according to the matching degree parameter;
and generating a response message of the first session message according to the target text and the historical session message.
7. The dialog method of claim 6 wherein said determining a match between said alternative text and said first session message and said historical session message comprises:
taking the first session message and the historical session message as first texts, and taking the alternative texts as second texts;
and acquiring a matching degree parameter between the first text and the second text, wherein the matching degree parameter is the matching degree parameter of the alternative text, the first session message and the historical session message.
8. The dialog method of claim 7 wherein generating a response message to the first session message based on the target text and the historical session message comprises:
taking the first session message and the historical session message as third texts, and taking the target text as a fourth text;
and generating a response message according to the third text and the fourth text.
9. The dialog method according to claim 1, characterized in that the method comprises:
identifying target knowledge corresponding to the first session message; the target knowledge comprises the external knowledge text or the structured knowledge text;
if the target knowledge comprises the external knowledge text, acquiring session parameter information of a first session message;
and if the target knowledge comprises the structured knowledge text, carrying out session processing on the first session message to generate a response message of the first session message.
10. A method for generating a response message, the method comprising:
acquiring session parameter information of a first question message, wherein the session parameter information at least comprises subject information and historical session information;
searching for alternative texts associated with the subject information according to the subject information; the alternative text is an external knowledge text;
and generating a response message of the first question message according to the alternative text, the first question message and the historical conversation message.
11. A dialog device, characterized in that the device comprises:
the device comprises a parameter acquisition module, a parameter processing module and a parameter processing module, wherein the parameter acquisition module is used for acquiring session parameter information of a first session message, and the session parameter information at least comprises theme information and historical session messages;
the text searching module is used for searching for alternative texts related to the subject information according to the subject information; the alternative text is an external knowledge text;
and the message generating module is used for generating a response message of the first session message according to the alternative text, the first session message and the historical session message.
12. An acknowledgement message generating apparatus, characterized in that the apparatus comprises:
the information acquisition module is used for acquiring session parameter information of the first question message, wherein the session parameter information at least comprises theme information and historical session information;
the searching module is used for searching for alternative texts related to the subject information according to the subject information; the alternative text is an external knowledge text;
and the response generating module is used for generating a response message of the first question message according to the alternative text, the first question message and the historical conversation message.
13. An electronic device, comprising: a processor; and
memory having stored thereon executable code which, when executed, causes the processor to perform the method of one or more of claims 1 to 10.
14. One or more machine-readable storage media having executable code stored thereon, wherein the executable code, when executed, causes a processor to perform a method as recited in one or more of claims 1-10.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202010981332.8A CN114201589A (en) | 2020-09-17 | 2020-09-17 | Dialogue method, dialogue device, dialogue equipment and storage medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202010981332.8A CN114201589A (en) | 2020-09-17 | 2020-09-17 | Dialogue method, dialogue device, dialogue equipment and storage medium |
Publications (1)
Publication Number | Publication Date |
---|---|
CN114201589A true CN114201589A (en) | 2022-03-18 |
Family
ID=80644797
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202010981332.8A Pending CN114201589A (en) | 2020-09-17 | 2020-09-17 | Dialogue method, dialogue device, dialogue equipment and storage medium |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN114201589A (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN116127035A (en) * | 2023-01-03 | 2023-05-16 | 北京百度网讯科技有限公司 | Dialogue method, training method and training device for dialogue model |
-
2020
- 2020-09-17 CN CN202010981332.8A patent/CN114201589A/en active Pending
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN116127035A (en) * | 2023-01-03 | 2023-05-16 | 北京百度网讯科技有限公司 | Dialogue method, training method and training device for dialogue model |
CN116127035B (en) * | 2023-01-03 | 2023-12-08 | 北京百度网讯科技有限公司 | Dialogue method, training method and training device for dialogue model |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN106874467B (en) | Method and apparatus for providing search results | |
CN110121706B (en) | Providing responses in a conversation | |
US20200301954A1 (en) | Reply information obtaining method and apparatus | |
US20220164683A1 (en) | Generating a domain-specific knowledge graph from unstructured computer text | |
KR102364400B1 (en) | Obtaining response information from multiple corpuses | |
CN111428010B (en) | Man-machine intelligent question-answering method and device | |
JP2023535709A (en) | Language expression model system, pre-training method, device, device and medium | |
KR20170001550A (en) | Human-computer intelligence chatting method and device based on artificial intelligence | |
US20210234814A1 (en) | Human-machine interaction | |
EP4060517A1 (en) | System and method for designing artificial intelligence (ai) based hierarchical multi-conversation system | |
WO2017112423A1 (en) | Method and system for automatic formality classification | |
WO2017186050A1 (en) | Segmented sentence recognition method and device for human-machine intelligent question-answer system | |
US9984687B2 (en) | Image display device, method for driving the same, and computer readable recording medium | |
US11861316B2 (en) | Detection of relational language in human-computer conversation | |
US10901992B2 (en) | System and method for efficiently handling queries | |
WO2019099913A1 (en) | Aspect pre-selection using machine learning | |
CN111639162A (en) | Information interaction method and device, electronic equipment and storage medium | |
CN117421398A (en) | Man-machine interaction method, device, equipment and storage medium | |
JP2016515227A (en) | System and method for semantic URL processing | |
CN111506717A (en) | Question answering method, device, equipment and storage medium | |
CN117909560A (en) | Search method, training device, training equipment, training medium and training program product | |
CN114201589A (en) | Dialogue method, dialogue device, dialogue equipment and storage medium | |
JP2016162163A (en) | Information processor and information processing program | |
CN116595149A (en) | Man-machine dialogue generation method, device, equipment and storage medium | |
CN111161706A (en) | Interaction method, device, equipment and system |
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 |