Disclosure of Invention
The invention provides a dialogue interaction processing method, a dialogue interaction processing device, a terminal device and a storage medium, which can simultaneously give consideration to dialogue interaction in a boring state and a non-boring state, do not need to manually adjust or select corresponding dialogue modes in advance, and improve the convenience of using intelligent customer service dialogue by a user. .
The invention provides a dialogue interaction processing method, which comprises the following steps: acquiring text input data input by a user;
extracting keywords from the text input data to obtain a keyword data set;
Comparing the keyword data set with a preset semantic slot, and determining chat intention of a user according to the comparison result; wherein the chat intent comprises: chat intents and non-chat intents;
When the chat intention is a chat intention, calling a preset chat module to enable the chat module to acquire a first reply text for answering a user according to the text input data; when the chat intention is not the chatting intention, acquiring a candidate problem set from a preset QA knowledge base according to the text input data and the keyword data set, acquiring a target candidate problem with the maximum similarity with the text input data from the candidate problem set according to the text input data and the candidate problem set, acquiring a target reply text corresponding to the target candidate problem, and taking the target reply text as a second reply text for answering a user.
Further, the semantic slot includes: the system comprises fault entity slots for representing service related problem main bodies, processing request slots for representing problem processing request keywords and processing attribute slots for representing corresponding specific processing points of problem entities.
Further, the comparing the keyword dataset with a preset semantic slot, and determining the chat intention of the user according to the comparison result includes:
Comparing each keyword in the keyword data set with a preset semantic slot, and if each keyword does not belong to a fault entity slot, a processing request slot and a processing attribute slot, or only one keyword in each keyword belongs to a keyword of the processing request slot, and the other keywords do not belong to keywords of the fault entity slot and the processing attribute slot, determining that chat intention of a user is chatting intention; otherwise, determining that the chat intention of the user is a non-boring chat intention.
Further, the non-boring intent includes: strong processing intent, query intent, polling intent, and unknown intent;
If the keyword data set has a keyword belonging to a fault entity slot, a keyword belonging to a processing request slot and a keyword belonging to a processing attribute slot, determining that the non-boring intention is a strong processing intention;
If the keyword data set has a keyword belonging to the processing request slot and a keyword belonging to the processing attribute slot, determining the non-boring intent as the processing intent;
If the keyword data set has a keyword belonging to a fault entity slot, or has a keyword belonging to a fault entity slot and a keyword belonging to a processing request slot, or has a keyword belonging to a fault entity slot and a keyword belonging to a processing attribute slot, determining the non-chatting intention as an inquiry intention;
If only one keyword in the keyword data set belongs to the keyword of the processing attribute slot, determining the non-boring intent as the polling intent;
And if at least two keywords in the keyword data set belong to keywords of the fault entity slot, and/or at least two keywords belong to keywords of the processing attribute slot, determining that the non-boring intention is an unknown intention.
Further, the obtaining, according to the text input data and the candidate question set, a target candidate question with the maximum similarity with the text input data from the candidate question set includes:
Calculating semantic similarity of the text input data and each candidate problem in the candidate problem set, and obtaining first similarity;
Calculating semantic similarity between the context of the text input data and each candidate problem context in the candidate problem set, and obtaining second similarity;
Calculating the similarity between the abstract information of the text input data and the abstract information of each candidate problem in the candidate problem set, and obtaining a third similarity;
And calculating the target similarity of the text input data and each candidate problem in the candidate problem set according to the first similarity, the second similarity and the third similarity, and taking the candidate problem with the maximum target similarity as a target candidate problem.
Further, the target similarity between the text input data and each candidate question in the candidate question set is calculated by the following formula:
wherein, Similarity of the calculated candidate questions to the current input; /(I)Representing a first similarity of the candidate question to the current input; sim (C k,Di) represents a second similarity of the candidate question to the current input; Representing a third similarity of the candidate question to the current input; lambda 1、λ2 and lambda 3 are respectively preset weighting coefficients.
Further, the keyword extraction is performed on the text input data to obtain a keyword dataset, including:
and recognizing and extracting keywords with parts of speech being nouns or verbs in the text input data, and establishing a keyword data set according to the extracted keywords.
On the basis of the method item embodiments, the invention correspondingly provides device item embodiments;
the invention provides a dialogue interaction processing device, which comprises: the system comprises a data acquisition module, a keyword extraction module, a chat intention module and a text acquisition module;
the data acquisition module is used for acquiring text input data input by a user;
the keyword extraction module is used for extracting keywords from the text input data to obtain a keyword data set;
The chat intention module is used for comparing the keyword data set with a preset semantic slot, and determining the chat intention of the user according to the comparison result; wherein the chat intent comprises: chat intents and non-chat intents;
The text acquisition module is used for calling a preset chatting module when the chatting intention is the chatting intention, so that the chatting module acquires a first reply text for answering a user according to the text input data; when the chat intention is not the chatting intention, acquiring a candidate problem set from a preset QA knowledge base according to the text input data and the keyword data set, acquiring a target candidate problem with the maximum similarity with the text input data from the candidate problem set according to the text input data and the candidate problem set, acquiring a target reply text corresponding to the target candidate problem, and taking the target reply text as a second reply text for answering a user.
On the basis of the method item embodiment, the invention correspondingly provides a terminal equipment item embodiment;
The invention provides a terminal device, which comprises a processor, a memory and a computer program stored in the memory and configured to be executed by the processor, wherein the processor realizes any one of the dialogue interaction processing methods when executing the computer program.
Based on the method item embodiment, the invention correspondingly provides a storage medium item embodiment;
The invention provides a storage medium which comprises a stored computer program, wherein the computer program controls equipment where the storage medium is located to execute any one of the dialogue interaction processing methods when running.
The embodiment of the invention has the following beneficial effects:
The invention provides a dialogue interaction processing method, a dialogue interaction processing device, terminal equipment and a storage medium; the method comprises the steps of extracting keywords from text input data input by a user after the text input data are acquired, and acquiring a keyword data set; and comparing the acquired keyword data set with a preset semantic slot, so that the chat intention of the user can be determined. If the chat intention of the user is the chat intention, directly calling the existing preset chat module and directly outputting a first reply text for the chat; if the chat intention of the user is not the chatting intention, a candidate question set is required to be acquired from a preset QA knowledge base, a target candidate question with the maximum similarity with the text input data is calculated, and then a target reply text corresponding to the target candidate question is acquired and used as a second reply text for answering the user. By implementing the invention, the conversation interaction in the boring state and the non-boring state can be simultaneously considered, and the corresponding conversation mode does not need to be manually adjusted or selected in advance, so that the convenience of using intelligent customer service conversations by the user is improved.
Detailed Description
The following description of the embodiments of the present invention will be made more apparent and fully hereinafter with reference to the accompanying drawings, in which some, but not all embodiments of the invention are shown. All other embodiments, which can be made by those skilled in the art based on the embodiments of the invention without making any inventive effort, are intended to be within the scope of the invention.
As shown in fig. 1, a method for processing dialogue interaction according to an embodiment includes:
Step S101, acquiring text input data input by a user;
step S102, extracting keywords from the text input data to obtain a keyword dataset;
Step S103, comparing the keyword data set with a preset semantic slot, and determining chat intention of a user according to the comparison result; wherein the chat intent comprises: chat intents and non-chat intents;
Step S104, when the chat intention is a chatting intention, calling a preset chatting module to enable the chatting module to acquire a first reply text for answering a user according to the text input data; when the chat intention is not the chatting intention, acquiring a candidate problem set from a preset QA knowledge base according to the text input data and the keyword data set, acquiring a target candidate problem with the maximum similarity with the text input data from the candidate problem set according to the text input data and the candidate problem set, acquiring a target reply text corresponding to the target candidate problem, and taking the target reply text as a second reply text for answering a user.
For step S101, in a preferred embodiment, text input data entered by a user is obtained while performing a dialogue interaction with the user.
For step S102, in a preferred embodiment, keyword extraction is performed on the text input data to obtain a keyword dataset, which specifically includes:
After the text input data is obtained, the keywords with the parts of speech being nouns or verbs in the text input data are identified, and then the keywords with the identified parts of speech being nouns or verbs are extracted to establish a keyword data set. The method for identifying the keyword with part of speech as noun or verb is any method in the prior art, and the invention is not particularly limited.
For step S103, in a preferred embodiment, the semantic slots include, but are not limited to: the system comprises a fault entity slot for representing a business related problem main body, a processing request slot for representing a problem processing request and a processing attribute slot for representing a corresponding specific processing point of a problem entity.
Comparing the keyword dataset with a preset semantic slot, and determining chat intention of a user according to the comparison result, wherein the method specifically comprises the following steps:
And comparing each keyword in the keyword data set with each preset semantic slot, and determining chat intention of the user as chatting intention if each keyword does not belong to the fault entity slot, the processing request slot and the processing attribute slot or only one keyword in each keyword belongs to the keyword of the processing request slot and the other keywords do not belong to the keywords of the fault entity slot and the processing attribute slot. Otherwise, determining that the chat intention of the user is a non-boring chat intention.
Judging that the chat intention of the user is a chatting intention, wherein the chatting intention is mainly based on a comparison result of keywords and preset semantic slots, if all the keywords do not belong to the preset slots, or only one keyword belongs to a processing request slot, and the other keywords do not belong to a fault entity and a processing attribute slot, the chatting content of the user is indicated to not relate to preset service related problems, or only to processing requests but not to specific problem entities and attributes; in this case, the chat intention of the user is more prone to boring, and thus the chat intention of the user is judged as boring.
In a preferred embodiment, the non-boring intent includes: strong processing intent, query intent, polling intent, and unknown intent;
If the keyword data set has a keyword belonging to a fault entity slot, a keyword belonging to a processing request slot and a keyword belonging to a processing attribute slot, determining that the non-boring intention is a strong processing intention;
If the keyword data set has a keyword belonging to the processing request slot and a keyword belonging to the processing attribute slot, determining the non-boring intent as the processing intent;
If the keyword data set has a keyword belonging to a fault entity slot, or has a keyword belonging to a fault entity slot and a keyword belonging to a processing request slot, or has a keyword belonging to a fault entity slot and a keyword belonging to a processing attribute slot, determining the non-chatting intention as an inquiry intention;
If only one keyword in the keyword data set belongs to the keyword of the processing attribute slot, determining the non-boring intent as the polling intent;
And if at least two keywords in the keyword data set belong to keywords of the fault entity slot, and/or at least two keywords belong to keywords of the processing attribute slot, determining that the non-boring intention is an unknown intention.
For step S104, in a preferred embodiment, when it is determined that the chat intention is a chat intention, then an existing preset chat module may be directly invoked, so that the chat module retrieves corresponding text according to the text input data to answer. The method for talking with the user under the chat intention belongs to the conventional means in the prior art, so the chat module is not particularly limited, and belongs to any chat module capable of realizing related functions in the prior art.
When the chat intention is determined to be not the chatting intention, searching a preset QA knowledge base according to the text input data and the keyword data set to obtain a candidate problem set with an association relation with the text input data and the keyword data set, and then obtaining a target candidate problem with the maximum similarity with the text input data from the candidate problem set according to the text input data and the candidate problem set; because the target reply texts corresponding to the target candidate questions are all data pre-stored in the QA knowledge base, after the target candidate questions are determined, the corresponding target reply texts can be directly obtained, and then the target reply texts are used as second reply texts for answering the user.
In a preferred embodiment, according to the text input data and the candidate problem set, the method for obtaining the target candidate problem with the maximum similarity with the text input data from the candidate problem set specifically includes:
firstly, calculating semantic similarity of the text input data and each candidate problem in the candidate problem set, and obtaining first similarity;
then calculating semantic similarity between the context of the text input data and each candidate problem context in the candidate problem set, and obtaining a second similarity;
calculating the similarity between the abstract information of the text input data and the abstract information of each candidate problem in the candidate problem set, and obtaining a third similarity;
and finally, calculating the target similarity of the text input data and each candidate problem in the candidate problem set according to the first similarity, the second similarity and the third similarity, and taking the candidate problem with the maximum target similarity as a target candidate problem.
Optionally, the method for calculating the second similarity is: acquiring context distributed expression of the context of the current text input data through a cyclic neural network, and taking the context distributed expression as a first context distributed expression; respectively acquiring context distributed expressions of the contexts of the candidate questions in the candidate question set through a cyclic neural network to serve as second context distributed expressions; and finally, respectively calculating the similarity of the first context distributed expression and the second context distributed expression as the second similarity of the corresponding candidate problem and the current input.
The method for calculating the third similarity comprises the following steps: abstract extraction is carried out on the current text input data (also can be multi-round dialogue data) to obtain abstract information of the current multi-round dialogue; and respectively carrying out abstract extraction on each candidate multi-round dialogue in the candidate multi-round dialogue set to obtain abstract information of each candidate multi-round dialogue, and respectively calculating the similarity between the abstract information of the current multi-round dialogue and the abstract information of each candidate multi-round dialogue in the candidate multi-round dialogue set to serve as a third similarity between the corresponding candidate problem and the current input.
In a preferred embodiment, the target similarity between the text input data and each candidate problem in the candidate problem set is calculated by means of weighted summation, and the target similarity is expressed by the following formula:
wherein, Similarity of the calculated candidate questions to the current input; /(I)Representing a first similarity of the candidate question to the current input; sim (C k,Di) represents a second similarity of the candidate question to the current input; Representing a third similarity of the candidate question to the current input; lambda 1、λ2 and lambda 3 are respectively preset weighting coefficients.
In an alternative embodiment, as shown in fig. 2, the dialogue interaction processing method includes the following steps:
s1: receiving text input by a user;
S2: identifying user intention and analyzing slot positions;
s3: executing dialogue logic processing by using dialogue track trace backtracking and slot constraint according to FSM business logic to know whether the user has chat intention;
S4: if the chat intention is the chatting intention, calling a preset chatting module to perform query processing according to the text input to acquire a first reply text;
S5: if the chat intention is not the chatting intention, the multi-round multi-phone reply selection method based on the QA knowledge base reasoning is utilized to query and process the text input by the user, and a second reply text is obtained.
In an optional embodiment, for step S2, identifying the user intention and analyzing the slot, and determining the chat intention of the user specifically includes:
S21: and creating a semantic slot, wherein the semantic slot comprises three slots of a fault entity A, a processing request B and a processing attribute C. Specifically, the fault entity a refers to a business related problem body, such as "how bad my computer screen, how do it need to be repaired? "wherein" computer "is the failed entity. Processing request B refers to keywords that can represent problem processing requests, such as "repair", "how do", "are? ". The processing attribute C represents a specific processing point corresponding to the problem entity, for example, the "screen" is the "computer" processing attribute.
S22: and carrying out semantic extraction on the text input, and judging the intention of the text input as boring intention if the keyword belonging to any slot position in the semantic slot cannot be extracted from the text input or only one keyword belonging to a processing request is extracted from the text input. Specifically, if only keywords belonging to the processing request exist in the semantics of the text input, or keywords with no available semantics exist, the text input can be determined to be boring. Otherwise, judging the intention of the text input as a non-boring intention.
In this embodiment, the non-boring intents include strong processing intents, query intents, polling intents, and unknown intents. And if a keyword belonging to a fault entity, a keyword belonging to a processing request and a keyword belonging to a processing attribute are extracted from the text input, judging that the intention of the text input is a strong processing intention.
And if a keyword belonging to a processing request and a keyword belonging to a processing attribute are extracted from the text input, judging that the intention of the text input is the processing intention.
And if a keyword belonging to the fault entity is extracted from the text input, or a keyword belonging to the fault entity and a keyword belonging to the processing request are extracted, or a keyword belonging to the fault entity and a keyword belonging to the processing attribute are extracted, judging that the intention of the text input is the query intention.
If only one keyword belonging to the processing attribute is extracted from the text input, judging that the intention of the text input is a polling intention.
And if a plurality of keywords belonging to the fault entity are extracted from the text input and/or a plurality of keywords belonging to the processing attribute, judging that the intention of the text input is unknown.
In an alternative embodiment, for step S3, as shown in fig. 3: executing dialogue logic processing by using dialogue track trace backtracking and slot constraint according to FSM business logic to know whether a user has chat intention or not, and specifically comprising the following steps:
S31: updating probability distribution of state tracking by using the identified user intention and/or the analysis slot;
s32: the FSM determines whether the dialogue state is transferred or not, and updates the dialogue track and the instant constraint;
S33: checking whether the current dialogue has slot negation or constraint modification;
S34: if yes, positioning a backtracking position according to the backtracking list, determining a transfer direction by the FSM, executing service logic according to the transferred state and the node position of the FSM, and continuing step S5;
s35: if not, service logic is executed according to the current state and the node position of the FSM, and the step S4 is continued. In this case, the state distribution may be updated in step S31 by the user intention and/or the analyzed slot recognized in step S22. Then in step S32, the finite state machine decides whether the dialogue state is transferred according to the current state distribution and the instant constraint list, and updates the dialogue track and the instant constraint. In step S33, it is checked whether there is a slot negation or constraint modification for the current dialog. If there is a negative slot or constraint modification, locating the trace-back position according to the trace-back list in step S34, determining a transfer direction by the finite state machine according to the updated state, and executing service logic of finite state machine modeling according to the transferred state and the node position of the finite state machine; if neither slot negation nor constraint modification exists, then in step S35, finite state machine modeled business logic is executed based on the current state and node locations of the finite state machine. FSM represents a finite state machine. That is, first, the state distribution is updated by recognizing the user intention and slot information, and then it is decided whether the dialog state is transferred according to the current state distribution and the instant constraint list, and the dialog track and the instant constraint are updated. Then, checking whether the current dialogue has negative slot position or constraint modification, if so, positioning the backtracking position according to the backtracking list, and determining the transfer direction according to the updated state; if not, executing the service logic of finite state machine modeling according to the current state and the node position of the finite state machine, wherein the processing flow is used for realizing the dynamic adjustment and flow control of the dialogue system.
The FSM node locations described above: a Finite State Machine (FSM) is a computational model that describes states and transitions of states of objects, and in a dialog system, FSM node locations can be understood as states or phases in which a current dialog is placed. Constraint modification: constraints refer to restrictions or regulations on certain behaviors or conditions, and in a dialog system, constraints may relate to restrictions on logic, flow, rules, etc. of a dialog, which may mean that the state or flow of the dialog needs to be adjusted or traced back if there is a slot negation or constraint modification. Positioning the backtracking position: backtracking is an algorithm, belonging to the prior art, for returning to a previous state and trying other paths during a search, where in a dialog system the backtracking location can be understood as the dialog state or step that needs to be returned. Finite state machine: a finite state machine is a computational model that describes states of a system or object and transitions between states, and in a dialog system, can be used to model the states and flow of a dialog.
Furthermore, the finite state machine is used to model business logic by setting the following basic state nodes: user node (UserNode): the node is responsible for receiving and analyzing the intention of a user query (query), the node is activated only if the user query is consistent with the intention of the analysis responsible for the node, and meanwhile, the node also has a dialogue slot collecting function, a plurality of nodes can be appointed and collected at the node, clarification and modification of slots are supported, and the user can inform the slot information according to any sequence. Robot node (BotNode): the node is responsible for informing the user of the execution result of the Dialogue Manager (DM) and has the function of dialogue logic guidance, and the user is guided to conduct dialogue according to the expected logic by sending a preset guidance language. Functional node (Funct ionNode, or FUNCNode): the node may execute a pre-set functional script or call a third party Application Program Interface (API) to perform some dialog-independent function using information collected during the dialog. Switching node (Swi tchNode): the node has a branch forwarding function, and is generally used for switching the logical branches of the dialogue according to the slots, global variables, function execution results and even intentions collected in the dialogue. Slot Node (S lot Node): the node is usually used for collecting the slot position which is dominant at the machine end, a plurality of nodes can be appointed to be collected at the node, clarification and modification of the slot position are supported, and a user can inform the slot position information according to any sequence. Topic node (SubNode): the node encapsulates functionality that invokes a specified topic, which is responsible for managing the triggering and result return of the topic. It enables a dependency nesting between topics. It is responsible for multiplexing the dialog logic, which can be packaged as a single topic, and any topic using the dialog logic can be multiplexed by the topic node.
In an alternative embodiment, as shown in fig. 4, step S5 includes the steps of:
Extracting keywords from the current multi-round dialogue to obtain a first keyword combination;
The method comprises the steps of taking a first keyword combination and current input as questions, retrieving a candidate question set from a QA knowledge base, acquiring corresponding contexts of each candidate question, and constructing a candidate multi-round dialogue set; the QA knowledge base is constructed based on a plurality of dialogue data sets acquired in advance;
Constructing a candidate multi-round dialogue set, which specifically comprises the following steps: searching the QA knowledge base according to the first keyword combination to obtain multiple rounds of conversations containing keywords in the first keyword combination as a first multiple rounds of conversation set; searching the QA knowledge base according to the current input to obtain N candidate sentences which are most similar to the current input and multiple rounds of conversations containing the sentences as a second multiple round of conversation set; and acquiring intersections of the first multi-round dialogue set and the second multi-round dialogue set to obtain a candidate problem set and a candidate multi-round dialogue set.
The construction method of the QA knowledge base comprises the following steps: performing word segmentation and keyword extraction on a multi-round dialogue data set acquired in advance; indexing the multi-round dialogue data set by using the keywords, and storing the keywords and IDs of the multi-round dialogues containing the keywords; for each multi-round dialogue, establishing an inverted index for each sentence, and storing the sentence containing the keyword, the ID of the multi-round dialogue to which the sentence belongs and the position of the sentence in the multi-round dialogue.
In an alternative embodiment, the natural language dialogue interactive processing method comprises the following working principles: firstly judging the chat intention of the user according to the text input of the user, distributing a corresponding query module according to the chat intention to perform query processing, obtaining a corresponding reply text, meeting the user requirement as much as possible, and efficiently completing the question-answering task. The method can be used without a great amount of data combined with deep learning to perform relation extraction, named entity recognition, intention recognition and training of natural language generation, and is aimed at general questions and answers. The method is oriented to small sample data, and the core logic is mainly realized by making rules, but not by a deep learning mode. The interactive robot implementing the method is suitable for retail industry, can flexibly expand, can flexibly and efficiently reply only by a small amount of data, and can freely add specific scenes. The reply selection method based on the QA knowledge base can effectively utilize the context information in the knowledge base and the context information of the current multi-round dialogue to push so as to greatly improve the relevance and rationality of reply sentences and improve the robustness of correctly selecting the reply sentences, thereby greatly improving the dialogue experience of users.
On the basis of the method item embodiments, the invention correspondingly provides the device item embodiments.
As shown in fig. 5, an embodiment of the present invention provides a dialogue interaction processing apparatus, including: the system comprises a data acquisition module, a keyword extraction module, a chat intention module and a text acquisition module;
the data acquisition module is used for acquiring text input data input by a user;
the keyword extraction module is used for extracting keywords from the text input data to obtain a keyword data set;
The chat intention module is used for comparing the keyword data set with a preset semantic slot, and determining the chat intention of the user according to the comparison result; wherein the chat intent comprises: chat intents and non-chat intents;
The text acquisition module is used for calling a preset chatting module when the chatting intention is the chatting intention, so that the chatting module acquires a first reply text for answering a user according to the text input data; when the chat intention is not the chatting intention, acquiring a candidate problem set from a preset QA knowledge base according to the text input data and the keyword data set, acquiring a target candidate problem with the maximum similarity with the text input data from the candidate problem set according to the text input data and the candidate problem set, acquiring a target reply text corresponding to the target candidate problem, and taking the target reply text as a second reply text for answering a user.
It should be noted that the apparatus embodiments described above are merely illustrative, and the modules described as separate components may or may not be physically separate, and components shown as modules may or may not be physical modules, i.e., may be located in one place, or may be distributed over multiple network modules. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of this embodiment. In addition, in the drawings of the embodiment of the device provided by the invention, the connection relation between the modules represents that the modules have communication connection, and can be specifically implemented as one or more communication buses or signal lines. Those of ordinary skill in the art will understand and implement the present invention without undue burden.
It will be clearly understood by those skilled in the art that, for convenience and brevity, the specific working process of the apparatus described above may refer to the corresponding process in the foregoing method embodiment, which is not described herein again.
On the basis of the method item embodiment, the invention correspondingly provides a terminal equipment item embodiment.
Another embodiment of the present invention provides a terminal device including a processor, a memory, and a computer program stored in the memory and configured to be executed by the processor; when the processor executes the computer program, the dialogue interaction processing method according to any embodiment of the invention is realized.
Illustratively, in this embodiment the computer program may be partitioned into one or more modules, which are stored in the memory and executed by the processor to perform the present invention. The one or more module elements may be a series of computer program instruction segments capable of performing a specific function, the instruction segments describing the execution of the computer program in the device;
the terminal equipment can be computing equipment such as a desktop computer, a notebook computer, a palm computer, a cloud server and the like. The device may include, but is not limited to, a processor, a memory;
The Processor may be a central processing module (Centra l Process I ng Un it, CPU), or other general purpose Processor, digital signal Processor (DI GITA L SI GNA L Processor, DSP), application specific integrated circuit (APP L I CAT I on SPEC I F I C I NTEGRATED CI rcu it, AS ic), off-the-shelf programmable gate array (Fi e l d-Programmab L E GATE ARRAY, FPGA) or other programmable logic device, discrete gate or transistor logic device, discrete hardware components, or the like. The general purpose processor may be a microprocessor or the processor may be any conventional processor or the like, which is a control center of the device, and which connects various parts of the entire device using various interfaces and lines;
The memory may be used to store the computer program and/or modules, and the processor may implement various functions of the device by running or executing the computer program and/or modules stored in the memory, and invoking data stored in the memory. The memory may mainly include a storage program area and a storage data area, wherein the storage program area may store an operating system, an application program required for at least one function, and the like; in addition, the memory may include high-speed random access memory, and may also include non-volatile memory, such as a hard disk, memory, plug-in hard disk, smart memory card (SMART MED I A CARD, SMC), secure digital (Secure Di g ita l, SD) card, flash memory card (F L ASH CARD), at least one magnetic disk storage device, flash memory device, or other volatile solid-state storage device.
Based on the method item embodiments, the invention correspondingly provides storage medium item embodiments.
Another embodiment of the present invention provides a storage medium, where the storage medium includes a stored computer program, where when the computer program runs, the device where the storage medium is controlled to execute the dialogue interaction processing method according to any one of the embodiments of the present invention.
In this embodiment, the storage medium is a computer-readable storage medium, and the computer program includes computer program code, where the computer program code may be in a source code form, an object code form, an executable file, or some intermediate form, and so on. The computer readable medium may include: any entity or device capable of carrying the computer program code, a recording medium, a U disk, a removable hard disk, a magnetic disk, an optical disk, a computer Memory, a Read-On-y Memory (ROM), a random access Memory (RAM, random Access Memory), an electrical carrier signal, a telecommunications signal, a software distribution medium, and so forth.
The above embodiment of the present invention has the following effects by implementing the present invention:
1. The method can be used without a great amount of data combined with deep learning to perform relation extraction, named entity recognition, intention recognition and training of natural language generation, and is aimed at general questions and answers. The method is oriented to small sample data, and the core logic is mainly realized by making rules, but not by a deep learning mode.
2. The interactive robot implementing the method is suitable for retail industry, can flexibly expand, can flexibly and efficiently reply only by a small amount of data, and can freely add specific scenes.
3. The reply selection method based on the QA knowledge base can effectively utilize the context information in the knowledge base and the context information of the current multi-round dialogue to infer, can greatly improve the relevance and rationality of reply sentences, and improves the robustness of correctly selecting the reply sentences, thereby greatly improving the dialogue experience of users.
4. The method and the device can simultaneously give consideration to dialogue interaction in the boring state and the non-boring state, do not need to manually adjust or select corresponding dialogue modes in advance, and improve the convenience of using intelligent customer service dialogue by users.
While the foregoing is directed to the preferred embodiments of the present invention, it will be appreciated by those skilled in the art that changes and modifications may be made without departing from the principles of the invention, such changes and modifications are also intended to be within the scope of the invention.