CN109002498B - Man-machine conversation method, device, equipment and storage medium - Google Patents
Man-machine conversation method, device, equipment and storage medium Download PDFInfo
- Publication number
- CN109002498B CN109002498B CN201810693841.3A CN201810693841A CN109002498B CN 109002498 B CN109002498 B CN 109002498B CN 201810693841 A CN201810693841 A CN 201810693841A CN 109002498 B CN109002498 B CN 109002498B
- Authority
- CN
- China
- Prior art keywords
- statement
- sentence
- client
- weight value
- numerical value
- Prior art date
Links
- 230000004044 response Effects 0.000 claims abstract description 42
- 230000003993 interaction Effects 0.000 claims description 34
- 238000006243 chemical reactions Methods 0.000 claims description 9
- 238000004590 computer program Methods 0.000 claims description 7
- 230000000875 corresponding Effects 0.000 claims description 7
- 238000000034 methods Methods 0.000 claims description 7
- 238000010586 diagrams Methods 0.000 description 12
- 230000000694 effects Effects 0.000 description 7
- 230000005540 biological transmission Effects 0.000 description 2
- 230000001276 controlling effects Effects 0.000 description 2
- 239000000686 essences Substances 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 238000006011 modification reactions Methods 0.000 description 1
- 230000001537 neural Effects 0.000 description 1
- 230000003287 optical Effects 0.000 description 1
- 238000006467 substitution reactions Methods 0.000 description 1
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F40/00—Handling natural language data
- G06F40/30—Semantic analysis
Abstract
Description
Technical Field
The invention relates to the field of artificial intelligence, in particular to a man-machine conversation method, a man-machine conversation device, man-machine conversation equipment and a storage medium.
Background
With the development of artificial intelligence technology, language-based human-computer conversation has become one of the main human-computer interaction scenes. In the man-machine conversation scenario, the device determines, based on a sentence input by the user, that the sentence to which the input sentence relates is to reply, and thus, it appears that the user is conversing with the device.
In the current human-computer conversation scene, most of the sentences are matched with keywords and reply sentences are determined according to matching results. However, in practical applications, most sentences input by the user may be relatively random, so that the semantics are not reasonable, and thus random or fixed reply sentences are returned if corresponding sentences cannot be obtained through keyword matching.
Therefore, the current man-machine conversation technology easily enables a user to think that equipment or a robot is not intelligent enough, and the man-machine interaction experience is poor.
Disclosure of Invention
The invention provides a man-machine conversation method, a man-machine conversation device, equipment and a storage medium, so that the response of the equipment or a robot is more intelligent in a man-machine conversation scene, and the user experience is improved.
In a first aspect, the present invention provides a man-machine interaction method, including:
receiving a request sent by a client device, wherein the request comprises an input first statement;
analyzing the first statement to obtain a weight value of the first statement, wherein the weight value is used for representing the rationality of the first statement;
determining a second sentence for replying the first sentence from a preset corpus according to the weight value;
sending a response to the client device, the response comprising: the second statement, the response to cause the client device to output the second statement.
In a second aspect, the present invention provides a human-machine interaction device, comprising:
the receiving module is used for receiving a request sent by client equipment, wherein the request comprises an input first statement;
the analysis module is used for analyzing the first statement to obtain a weight value of the first statement, and the weight value is used for representing the rationality of the first statement;
the determining module is used for determining a second sentence for replying the first sentence from a preset corpus according to the weight value;
a sending module configured to send a response to the client device, the response including: the second statement, the response to cause the client device to output the second statement.
In a third aspect, the present invention provides a server device, including: a memory and a processor; the memory is connected with the processor;
the memory to store program instructions;
the processor is configured to implement the man-machine interaction method according to the first aspect when the program instructions are executed.
In a fourth aspect, the present invention provides a computer-readable storage medium having stored thereon a computer program which, when executed by a processor, implements the human-machine interaction method of the first aspect.
The invention provides a man-machine conversation method, a man-machine conversation device, a man-machine conversation equipment and a storage medium, wherein a request including a first statement sent by a client device can be received through a server, the first statement is analyzed to obtain a weight value of the first statement, the weight value is used for representing the reasonability of the first statement, a second statement used for replying the first statement is determined from a preset corpus according to the weight value, then a response including the second statement is returned to the client device, and the client device is enabled to output the second statement. In the method, the second sentence for replying the first sentence is determined according to the reasonableness of the first sentence, and is not a random sentence or a fixed sentence, so that the reply of the client device in a man-machine conversation scene is more intelligent, and the user experience in the man-machine conversation is improved.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, a brief description will be given below of the drawings required for the embodiments or the technical solutions in the prior art, and it is obvious that the drawings in the following description are some embodiments of the present invention, and for those skilled in the art, other drawings can be obtained according to these drawings without creative efforts.
Fig. 1 is a schematic diagram of a human-computer conversation system according to an embodiment of the present invention;
FIG. 2 is a first flowchart of a human-computer conversation method according to an embodiment of the present invention;
FIG. 3 is a flowchart II of a human-machine conversation method according to an embodiment of the present invention;
fig. 4 is a flowchart three of a man-machine conversation method provided by the embodiment of the present invention;
FIG. 5 is a fourth flowchart of a human-machine conversation method according to an embodiment of the present invention;
FIG. 6 is a first schematic structural diagram of a human-machine interaction device according to an embodiment of the present invention;
fig. 7 is a schematic structural diagram of a human-machine interaction device according to an embodiment of the present invention;
fig. 8 is a schematic structural diagram of a server device according to an embodiment of the present invention;
fig. 9 is a schematic structural diagram of a client device according to an embodiment of the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are some, but not all, embodiments of the present invention. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
It should be noted that the terms "first", "second", third "and the like in the various parts of the embodiments and drawings are used for distinguishing similar objects and not necessarily for describing a particular order or sequence. It is to be understood that the data so used is interchangeable under appropriate circumstances such that the embodiments of the invention described herein are capable of operation in sequences other than those illustrated or described herein. Furthermore, the terms "comprises," "comprising," and "having," and any variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, system, article, or apparatus that comprises a list of steps or elements is not necessarily limited to those steps or elements expressly listed, but may include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus.
The method flow diagrams of the embodiments of the invention described below are merely exemplary and do not necessarily include all of the contents and steps, nor do they necessarily have to be performed in the order described. For example, some steps may be broken down and some steps may be combined or partially combined, so that the order of actual execution may be changed according to actual situations.
The functional blocks in the block diagrams referred to in the embodiments of the present invention described below are only functional entities and do not necessarily correspond to physically separate entities. I.e. these functional entities may be implemented in the form of software, or in one or more hardware modules or integrated circuits, or in different networks and/or processors and/or microcontrollers.
The man-machine conversation method provided by the following embodiments of the present invention is applicable to a man-machine conversation system, and fig. 1 is a schematic diagram of a man-machine conversation system provided by an embodiment of the present invention. As shown in fig. 1, the man-machine conversation system may include: a server device 11, a client device 12, and a user 13. The server device 11 is connectable to at least one client device 12 for controlling the client device 12 connected thereto to have a conversation with the user 13. The client device 12 may be a desktop computer, a notebook, a Personal Digital Assistant (PDA), a smart phone, a tablet computer, an intelligent machine device, and the like. The client devices 12 that may have a human-machine conversation with the user may also be referred to as "bots".
The functions of the server device 11 may be performed by one server or by a plurality of servers, and different servers are used to implement different functions. That is, the server device 11 may be composed of at least one server. Each server constituting the server device 11 may be a physical entity, i.e. a physical machine, or may be a functional entity, e.g. a functional module on a physical machine.
The client device 12 has an input device for obtaining the sentence inputted by the user and an output device for outputting the reply sentence to the user. And then man-machine conversation is realized.
The man-machine interaction method, the man-machine interaction device, the electronic equipment and the storage medium provided by the embodiment of the invention are described in the following by combining a plurality of examples.
Fig. 2 is a first flowchart of a man-machine conversation method according to an embodiment of the present invention. The man-machine conversation method can be interactively executed by the client device and the server device. As shown in fig. 2, the man-machine conversation method shown in this embodiment may include the following:
s201, the client device receives an input first statement.
The client device may receive the first sentence input by a user through an input device of the client device or an input device connected to the client device.
The first sentence may be a different type of sentence based on the type of input device.
In one example, the input device may be a keyboard or a touch panel, for example, and the first sentence may be a text-type sentence.
In yet another example, the input device may be a voice input device, for example, and the first sentence may be a speech-type sentence.
The first sentence may be a sentence input to the client device in the real-time conversation, and the first sentence may also be referred to as a question sentence, and correspondingly, a second sentence for replying to the first sentence described below may be referred to as a reply sentence.
S202, the client device sends a request to the server device, wherein the request comprises: the first statement.
The client device may send a request including the first sentence to the server device after receiving the input first data, so as to request a sentence from the server device in reply to the first sentence.
Correspondingly, the method further comprises the following steps:
the server device receives a request sent by the client device, wherein the request comprises the input first statement.
S203, the server side equipment analyzes the first statement to obtain a weight value of the first statement, and the weight value is used for representing the rationality of the first statement.
After receiving the request, the server device may perform reasonability analysis on the first statement to obtain a weight value of the first statement, which may be used to represent reasonability of the first statement.
In a specific implementation process, the server device may analyze the first sentence according to a preset analysis model to obtain a weight value of the first sentence. In one example, a higher weight value may indicate a higher rationality of the first sentence; the smaller the weight value, the lower the rationality of the first sentence can be represented.
For example, the client device may send a request including the first statement to a first server in the server device, the first server may send the first statement to a second server, and the second server analyzes the first statement. The first server may be, for example, an application server or a control server in the server device, and the first server may be referred to as "server. The second server may be a server in which an analysis model is installed in the server device. The first server may select, for example, an optimal one of the at least one server in which the analysis model is installed as a second server for analyzing the first sentence. The first server can perform real-time load balancing and scheduling according to the deployment condition of the analysis model, and when the load balancing is satisfied, the server which has the largest available resources and extremely high Query Per Second (QPS) rate and is provided with the analysis model is determined as the second server. Each server of the server may be, for example, an object entity or a functional entity.
As described above, the first server may be referred to as a prediction engine server and the second server may be referred to as a model server, wherein the analytical model may be referred to as a prediction model.
And S204, the server device determines a second sentence for replying the first sentence from a preset corpus according to the weight value.
The corpus may include at least one corpus corresponding to a weight value, and the corpus corresponding to each weight value may be used to reply to a sentence having the weight value of the sentence being the weight value of the each weight value. In the method, the server device may determine, according to the weight value, a corpus answer matching algorithm from the preset corpus that the corpus corresponding to the weight value is the second sentence for replying the first sentence, by using a corpus answer matching algorithm.
S205, the server device sends a response to the client device, wherein the response comprises the second statement.
Correspondingly, the method can further comprise the following steps:
the client device receives a response from the server device that includes the second statement.
And S206, the client device outputs the second statement.
The client device can directly output the second statement after receiving the second statement; after receiving the second sentence, the second sentence may be processed, for example, converted in format, and then output. The client device can output the second sentence to the user through a display screen or a voice playing device, for example, so as to realize human-computer interaction between the user and the client device.
The man-machine conversation method provided by the embodiment of the invention can receive a request including a first statement sent by client equipment through a server, analyze the first statement to obtain a weight value of the first statement, the weight value is used for representing the rationality of the first statement, determine a second statement used for replying the first statement from a preset corpus according to the weight value, and then return a response including the second statement to the client equipment so as to enable the client equipment to output the second statement. In the method, the second sentence used for replying the first sentence is determined according to the reasonableness of the first sentence, and is not a random sentence or a fixed sentence, so that the reply of the client device in a man-machine conversation scene is more intelligent, and the user experience is improved.
On the basis of the man-machine conversation method provided by the above example, the invention also can provide a man-machine conversation method. Fig. 3 is a flowchart of a human-computer conversation method according to an embodiment of the present invention. Fig. 3 may be a possible example of performing sentence analysis in the man-machine interaction method described above in the case that the first sentence is a speech-type sentence. As shown in fig. 3, in the method for human-computer interaction, before the server device analyzes the first sentence in S203 to obtain a weight value of the first sentence, the method may further include:
s301, the server side device converts the first sentence into the first sentence of text type by adopting an Automatic Speech Recognition (ASR) technology.
That is, after receiving the input first statement of the voice type, the client device may carry the first statement of the voice type in the request and send the request to the server device. The first sentence of the speech type may also be referred to as speech audio of the first sentence.
In this embodiment, the client device may directly send the first sentence of the voice type to the server device. In another example, after receiving the input first sentence of the speech type, the client device may also employ the ASR technique to convert the first sentence into the first sentence of the text type, and then send the first sentence of the text type to the server device for execution. The implementation process of sentence format conversion for the client device is not described herein again.
In the above method, the step S203 of analyzing the first sentence by the server device to obtain the weight value of the first sentence may include:
s302, the server side equipment analyzes the first statement of the text type to obtain the weight value.
The embodiment is an example of the input sentence being a speech-type first sentence, of course, the first sentence may also be a text-type sentence, and if the input sentence is a text-type sentence, the server device directly analyzes the text-type first sentence without performing format conversion, so as to obtain the weight value.
The method provided by the embodiment can realize the voice conversation between the user and the client equipment on the basis of improving the intelligence of the man-machine conversation, and improve the user experience.
On the basis of the man-machine conversation method provided by the above example, the invention also can provide a man-machine conversation method. Fig. 4 is a flowchart three of a man-machine conversation method according to an embodiment of the present invention. Fig. 4 may be a possible example of the voice response of the client device in the man-machine interaction method in the case that the second sentence is a text-type sentence. As shown in fig. 4, before the server device sends a response to the client device in S205 in the man-machine interaction method, the method may further include:
s401, the server side device converts the second sentence into the second sentence of a voice type by adopting a Text To Speech (TTS) technology.
After determining the second sentence for replying the first sentence, the server device may perform TTS processing on the second sentence of the text type by using a TTS technology to obtain the second sentence of the voice type, thereby implementing format conversion of the second sentence from the text type to the voice type.
The step of sending, by the server device, the response to the client device in S205 in the foregoing method may include:
s402, the server side equipment sends a response comprising the voice type and the second statement to the client side equipment.
Correspondingly, in the human-computer conversation method, the step S206 of outputting the second sentence by the client device may include:
s403, the client device outputs the second statement of the voice type.
The client device may play the second sentence by voice, for example, the second sentence of the voice type may be output by a voice output device.
This embodiment is an example of the reply sentence determined by the server device as the second sentence of the text type. In another example, if the second sentence is a text-type sentence, the server device may send the second sentence to the client device without performing format conversion on the second sentence, and the client device displays the second sentence of the text-type, thereby implementing a human-computer conversation between the client device and the user.
Of course, the second sentence may also be a speech-type sentence, and if the second sentence is a speech-type sentence, the server device does not need to perform format conversion, and the second sentence is directly sent to the client device and is output by the client device.
The method provided by the embodiment can realize the voice conversation between the user and the client equipment on the basis of improving the intelligence of the man-machine conversation, and improve the user experience.
On the basis of the man-machine conversation method provided by the above example, the invention also can provide a man-machine conversation method. In the man-machine conversation method, in S203, the analyzing, by the server device, the first sentence to obtain a weight value of the first sentence may include:
and the server side equipment analyzes the first statement according to the length of the first statement to obtain the weight value.
That is to say, under the condition that the weight value used for representing the rationality of the first sentence is determined, the length of the first sentence can be combined, so that the weight value is more accurate, the rationality of the first sentence is represented more accurately, and the intelligence of man-machine conversation is improved.
Fig. 5 is a fourth flowchart of a man-machine conversation method according to an embodiment of the present invention. The man-machine dialog method shown in fig. 5 may be one possible example of analyzing the first sentence. It should be noted that the method for analyzing the first statement may not be limited to the method shown in fig. 5, but may also be implemented in other manners, and is not described herein again.
As shown in fig. 5, the analyzing, by the server device, the first sentence according to the length of the first sentence to obtain the weight value may include:
s501, the server side equipment performs language analysis on the first statement by adopting a preset language model according to the length of the first statement to obtain a first numerical value of the first statement.
The first value is used to characterize the linguistic reasonableness of the first sentence.
The language model may be, for example, a Tri-gram language model based on statistical algorithms.
That is to say, the server device may analyze the first statement by using a statistical algorithm according to the length of the first statement, and obtain a first numerical value used for representing the language reasonableness of the first statement.
S502, the server side equipment performs semantic analysis on the first statement by adopting a preset semantic model according to the length of the first statement to obtain a second numerical value of the first statement.
The second value is used to characterize the semantic reasonableness of the first statement.
The semantic model may be, for example, a semantic model of Deep Convolutional neural networks (DNNs).
The server-side equipment can perform semantic analysis on the first statement by adopting a DNN algorithm according to the length of the first statement to obtain a second numerical value for representing the semantic rationality of the first statement.
And S503, the server side equipment performs rule analysis on the first statement by adopting a preset statement dependency model according to the length of the first statement to obtain a third numerical value of the first statement.
The third value is used to characterize the rule reasonableness of the first statement.
The sentence dependency model can store at least one sentence structure rule. The server-side device can perform rule analysis on the first statement by adopting a preset statement dependency model according to the length of the first statement to obtain a third numerical value for representing the rule rationality of the first statement. In this embodiment, the rule analysis may be a rule analysis of a sentence structure, and the rule reasonableness may refer to the rule reasonableness of the sentence structure.
S504, the server device weights the first numerical value, the second numerical value and the third numerical value according to the length of the first statement to obtain the weight value.
That is to say, the weighted value used for representing the rationality of the first sentence may be obtained by analyzing, by the server device, the preset hybrid model and the length of the first sentence.
The hybrid model may be, for example: the language model, the semantic model and the sentence dependency model.
In the man-machine conversation method provided in this embodiment, a weight value representing the reasonability of the first sentence may be determined according to a first numerical value representing the language reasonability of the first sentence, a second numerical value representing the semantic reasonability of the first sentence, a third numerical value representing the rule reasonability of the first sentence, and the length of the first sentence, so that the weight value may be more accurate and represent the reasonability of the first sentence more accurately, thereby improving the intelligence of the man-machine conversation.
Optionally, in the man-machine conversation method as described in any of the above, the corpus may include: corpora from a corpus of multiple question-answering and/or encyclopedia applications.
The server-side equipment can acquire corpora from various question-answer application corpora and/or encyclopedia application corpora through the crawler module to obtain a corpus for man-machine conversation.
Because the corpus in the corpus of the question-and-answer application is generally closer to spoken language, in the method, the server device can determine the corpus of the question-and-answer application from the database corresponding to the question-and-answer application to train the corpus, so as to obtain the corpus for man-machine conversation.
The corpus comprises the corpora in the corpora of the question-answer application, so that the answer sentences can be spoken more, the intelligence of man-machine conversation is improved, and the man-machine interaction experience is improved. The corpus also comprises corpora of encyclopedic application, so that the reply sentences are more professional, the intelligence of man-machine conversation is improved, and the man-machine interaction experience is improved.
On the basis of any one of the man-machine conversation methods, the method further comprises the following steps:
and the server-side equipment updates the corpus according to a preset period.
The method can update the information of the corpus, ensures the continuous update of the corpus, ensures that the reply sentences determined based on the corpus are more accurate, can make the reply of the client equipment in a man-machine conversation scene more intelligent, and improves the user experience.
The following is an embodiment of the apparatus of the present invention, which can be used to implement the above-mentioned embodiment of the method of the present invention, and the implementation principle and technical effects are similar.
Fig. 6 is a first schematic structural diagram of a human-machine interaction device according to an embodiment of the present invention. The man-machine conversation device is integrated on the server side equipment in a software and/or hardware mode. As shown in fig. 6, the man-machine interaction device 60 of the present embodiment may include:
the receiving module 61 is configured to receive a request sent by a client device, where the request includes an input first statement.
The analysis module 62 is configured to analyze the first sentence to obtain a weight value of the first sentence, where the weight value is used to represent the rationality of the first sentence.
A determining module 63, configured to determine, according to the weight value, a second sentence that is used for responding to the first sentence from a preset corpus.
A sending module 64, configured to send a response to the client device, where the response includes: the second statement, the response to cause the client device to output the second statement.
The man-machine conversation device provided by the embodiment can enable the response of the client equipment in a man-machine conversation scene to be more intelligent, and improve the man-machine interaction experience.
Optionally, the first sentence is a speech-type sentence.
The man-machine interaction device 60 further comprises:
a first conversion module for converting the first sentence into the first sentence of text type using ASR technology.
The analysis module 62 is specifically configured to analyze the first sentence of the text type to obtain the weight value.
Optionally, the second sentence is a text-type sentence. The man-machine interaction device 60 further comprises:
and the second conversion module is used for converting the second sentence into the second sentence of the voice type by adopting a TTS technology.
The response is to cause the client device to output the second statement in speech-type.
Optionally, the analyzing module 62 is specifically configured to analyze the first sentence according to the length of the first sentence, so as to obtain the weight value.
Optionally, the analysis module 62 is specifically configured to perform language analysis on the first sentence by using a preset language model according to the length of the first sentence, so as to obtain a first numerical value of the first sentence; according to the length of the first statement, performing semantic analysis on the first statement by adopting a preset semantic model to obtain a second numerical value of the first statement; according to the length of the first statement, a preset statement dependency model is adopted to perform rule analysis on the first statement to obtain a third numerical value of the first statement; and weighting the first numerical value, the second numerical value and the third numerical value according to the length of the first statement to obtain the weight value.
The first numerical value is used for representing the language reasonableness of the first statement, the second numerical value is used for representing the semantic reasonableness of the first statement, and the third numerical value is used for representing the rule reasonableness of the first statement.
Optionally, the corpus includes: corpora from a corpus of multiple question-answering and/or encyclopedia applications.
Optionally, the man-machine interaction device 60 further includes:
and the updating module is used for updating the corpus according to a preset period.
The man-machine conversation apparatus provided in this embodiment may execute the man-machine conversation method executed by the server device shown in any one of fig. 1 to fig. 5, and specific implementation and effective effects thereof can be referred to above, and are not described herein again.
Fig. 7 is a schematic structural diagram of a human-machine interaction device according to an embodiment of the present invention. The man-machine interaction device is integrated on the client device in a software and/or hardware mode. As shown in fig. 7, the man-machine interaction device 70 of the present embodiment may include:
an input module 71, configured to receive an input first sentence.
A sending module 72, configured to send a request to a server device, where the request includes: the first statement.
A receiving module 73, configured to receive a response returned by the server device, where the response includes: the second statement is used for analyzing the first statement by the server side equipment to obtain a weight value of the first statement, and the second statement is determined from a preset corpus to be used for answering the first statement according to the weight value; wherein the weight value is used for representing the rationality of the first statement;
an output module 74, configured to output the second sentence.
The man-machine conversation device provided by the embodiment can enable the response of the client equipment in a man-machine conversation scene to be more intelligent, and improve the man-machine interaction experience.
Optionally, the input module 71 is specifically configured to receive the first sentence input by voice; the first sentence is a speech-type sentence.
Optionally, the output module 74 is specifically configured to play the second sentence through voice.
The man-machine conversation apparatus provided in this embodiment may execute the man-machine conversation method executed by the client device shown in any one of fig. 1 to fig. 5, and specific implementation and effective effects thereof can be referred to above, and are not described herein again.
Fig. 8 is a schematic structural diagram of a server device according to an embodiment of the present invention. As shown in fig. 8, the server device 80 of the present embodiment includes: a memory 81 and a processor 82. The memory 81 is connected to the processor 82 via a bus 83.
A memory 81 for storing program instructions.
A processor 82 for receiving a request sent by the client device when the program instructions are executed, the request comprising the input first statement; analyzing the first statement to obtain a weight value of the first statement, wherein the weight value is used for representing the rationality of the first statement; determining a second sentence for replying the first sentence from a preset corpus according to the weight value; sending a response to the client device, the response comprising: the second statement, the response to cause the client device to output the second statement.
Optionally, the first sentence is a speech-type sentence.
A processor 82, further configured to employ ASR techniques to convert the first sentence into the first sentence of text type; and analyzing the first statement of the text type to obtain the weight value.
Optionally, the second sentence is a text-type sentence.
The processor 82 is further configured to convert the second sentence into a speech-type second sentence using TTS technology.
The response is to cause the client device to output the second statement in speech-type.
Optionally, the processor 82 is further configured to analyze the first sentence according to the length of the first sentence, so as to obtain the weight value.
Optionally, the processor 82 is further configured to perform language analysis on the first sentence by using a preset language model according to the length of the first sentence, so as to obtain a first numerical value of the first sentence; according to the length of the first statement, performing semantic analysis on the first statement by adopting a preset semantic model to obtain a second numerical value of the first statement; according to the length of the first statement, a preset statement dependency model is adopted to perform rule analysis on the first statement to obtain a third numerical value of the first statement; and weighting the first numerical value, the second numerical value and the third numerical value according to the length of the first statement to obtain the weight value.
The first numerical value is used for representing the language reasonableness of the first statement, the second numerical value is used for representing the semantic reasonableness of the first statement, and the third numerical value is used for representing the rule reasonableness of the first statement.
Optionally, the corpus includes: corpora from a corpus of multiple question-answering and/or encyclopedia applications.
Optionally, the processor 82 is further configured to update the corpus according to a preset period.
The server device of this embodiment may execute the human-computer interaction method executed by the server device shown in any one of fig. 1 to fig. 5, and specific implementation and effective effects thereof can be referred to above, and are not described herein again.
An embodiment of the present invention further provides a computer-readable storage medium, where a computer program is stored on the computer-readable storage medium, and the computer program can be executed by the processor 82 shown in fig. 8 to implement the human-computer interaction method executed by the server device shown in any embodiment, for specific implementation and effective effect, which can be referred to above and will not be described herein again.
Fig. 9 is a schematic structural diagram of a client device according to an embodiment of the present invention. As shown in fig. 9, the server device 90 of the present embodiment includes: an input device 91, an output device 92, a transmission interface 93, a reception interface 94, a memory 95, and a processor 96. The input device 91, the output device 92, the transmission interface 93, the reception interface 94, and the memory 95 are connected to the processor 96 via a bus 97.
A memory 95 for storing program instructions.
A processor 96 for controlling the input device 91 to receive an input of a first sentence when the program instructions are executed; the control sending interface 93 sends a request to the server device, where the request includes: the first statement; the control receiving interface 94 receives a response returned by the server device, where the response includes: a second statement.
The second statement is a statement which is determined from a preset corpus and used for answering the first statement by the server side equipment, wherein the first statement is analyzed by the server side equipment to obtain a weight value of the first statement; wherein the weight value is used for representing the rationality of the first statement;
the processor 96 is further configured to control the output device 92 to output the second sentence.
Optionally, the processor 96 is further configured to receive the first sentence inputted by voice through the input device 91; the first sentence is a speech-type sentence.
Optionally, the processor 96 is further configured to play the second sentence by voice through the input device 92.
The client device of this embodiment may execute the human-computer conversation method executed by the client device shown in any one of fig. 1 to fig. 5, and specific implementation and effective effects thereof can be referred to above, and are not described herein again.
An embodiment of the present invention further provides a computer-readable storage medium, where a computer program is stored on the computer-readable storage medium, and the computer program can be executed by the processor 96 shown in fig. 9 to implement the human-computer interaction method executed by the server device shown in any embodiment, for specific implementation and effective effect, see above, and are not described herein again.
Those of ordinary skill in the art will understand that: all or a portion of the steps of implementing the above-described method embodiments may be performed by hardware associated with program instructions. The computer program may be stored in a computer readable storage medium. When executed, the program performs steps comprising the method embodiments described above; and the aforementioned storage medium includes: various media capable of storing program codes, such as a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk, and an optical disk.
Finally, it should be noted that: the above embodiments are only used to illustrate the technical solution of the present invention, and not to limit the same; while the invention has been described in detail and with reference to the foregoing embodiments, it will be understood by those skilled in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some or all of the technical features may be equivalently replaced; and the modifications or the substitutions do not make the essence of the corresponding technical solutions depart from the scope of the technical solutions of the embodiments of the present invention.
Claims (12)
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201810693841.3A CN109002498B (en) | 2018-06-29 | 2018-06-29 | Man-machine conversation method, device, equipment and storage medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201810693841.3A CN109002498B (en) | 2018-06-29 | 2018-06-29 | Man-machine conversation method, device, equipment and storage medium |
Publications (2)
Publication Number | Publication Date |
---|---|
CN109002498A CN109002498A (en) | 2018-12-14 |
CN109002498B true CN109002498B (en) | 2020-05-05 |
Family
ID=64601718
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201810693841.3A CN109002498B (en) | 2018-06-29 | 2018-06-29 | Man-machine conversation method, device, equipment and storage medium |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN109002498B (en) |
Families Citing this family (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN110083687A (en) * | 2019-04-28 | 2019-08-02 | 上海盛付通电子支付服务有限公司 | A kind of information conversion method, equipment and storage medium |
Citations (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN107861969A (en) * | 2017-09-14 | 2018-03-30 | 平安普惠企业管理有限公司 | Sentence amending method, scanning platform and computer-readable recording medium |
Family Cites Families (9)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US7124073B2 (en) * | 2002-02-12 | 2006-10-17 | Sunflare Co., Ltd | Computer-assisted memory translation scheme based on template automaton and latent semantic index principle |
US8473449B2 (en) * | 2005-01-06 | 2013-06-25 | Neuric Technologies, Llc | Process of dialogue and discussion |
WO2010105216A2 (en) * | 2009-03-13 | 2010-09-16 | Invention Machine Corporation | System and method for automatic semantic labeling of natural language texts |
CN102236645B (en) * | 2010-05-06 | 2016-03-30 | 上海五和际软件信息有限公司 | Based on the natural language man-machine conversation device of semantic logic |
CN102708185A (en) * | 2012-05-11 | 2012-10-03 | 广东欧珀移动通信有限公司 | Picture voice searching method |
CN104809103B (en) * | 2015-04-29 | 2018-03-30 | 北京京东尚科信息技术有限公司 | A kind of interactive semantic analysis and system |
CN105138507A (en) * | 2015-08-06 | 2015-12-09 | 电子科技大学 | Pattern self-learning based Chinese open relationship extraction method |
CN106202270B (en) * | 2016-06-28 | 2020-03-20 | 广州幽联信息技术有限公司 | Man-machine conversation method and device based on natural language |
CN106202476B (en) * | 2016-07-14 | 2017-06-06 | 广州安望信息科技有限公司 | A kind of interactive method and device of knowledge based collection of illustrative plates |
-
2018
- 2018-06-29 CN CN201810693841.3A patent/CN109002498B/en active IP Right Grant
Patent Citations (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN107861969A (en) * | 2017-09-14 | 2018-03-30 | 平安普惠企业管理有限公司 | Sentence amending method, scanning platform and computer-readable recording medium |
Also Published As
Publication number | Publication date |
---|---|
CN109002498A (en) | 2018-12-14 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
Bocklisch et al. | Rasa: Open source language understanding and dialogue management | |
KR102178738B1 (en) | Automated assistant calls from appropriate agents | |
AU2015374382B2 (en) | Discriminating ambiguous expressions to enhance user experience | |
US9818409B2 (en) | Context-dependent modeling of phonemes | |
US10217463B2 (en) | Hybridized client-server speech recognition | |
EP2896039B1 (en) | Improving phonetic pronunciation | |
EP2904607B1 (en) | Mapping an audio utterance to an action using a classifier | |
US10007660B2 (en) | Contextual language understanding for multi-turn language tasks | |
US9865264B2 (en) | Selective speech recognition for chat and digital personal assistant systems | |
JP2017534941A (en) | Orphan utterance detection system and method | |
US9792279B2 (en) | Methods and systems for analyzing communication situation based on emotion information | |
US20150279366A1 (en) | Voice driven operating system for interfacing with electronic devices: system, method, and architecture | |
US9805718B2 (en) | Clarifying natural language input using targeted questions | |
US10540965B2 (en) | Semantic re-ranking of NLU results in conversational dialogue applications | |
US20180342238A1 (en) | Generating target sequences from input sequences using partial conditioning | |
US20180174020A1 (en) | Systems and methods for an emotionally intelligent chat bot | |
US9269354B2 (en) | Semantic re-ranking of NLU results in conversational dialogue applications | |
CN103268313B (en) | A kind of semantic analytic method of natural language and device | |
US20170372200A1 (en) | End-to-end memory networks for contextual language understanding | |
EP3477638A2 (en) | Dialog system with self-learning natural language understanding | |
US9390711B2 (en) | Information recognition method and apparatus | |
KR20170033722A (en) | Apparatus and method for processing user's locution, and dialog management apparatus | |
EP3549069B1 (en) | Neural network data entry system | |
US9881082B2 (en) | System and method for automatic, unsupervised contextualized content summarization of single and multiple documents | |
US10387410B2 (en) | Method and system of classification in a natural language user interface |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |