CN111831800A - Question-answer interaction method, device, equipment and storage medium - Google Patents

Question-answer interaction method, device, equipment and storage medium Download PDF

Info

Publication number
CN111831800A
CN111831800A CN201910745750.4A CN201910745750A CN111831800A CN 111831800 A CN111831800 A CN 111831800A CN 201910745750 A CN201910745750 A CN 201910745750A CN 111831800 A CN111831800 A CN 111831800A
Authority
CN
China
Prior art keywords
answer
question
target
corpus
answers
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
Application number
CN201910745750.4A
Other languages
Chinese (zh)
Inventor
张含
杨晓庆
李奘
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Didi Infinity Technology and Development Co Ltd
Original Assignee
Beijing Didi Infinity Technology and Development Co Ltd
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by Beijing Didi Infinity Technology and Development Co Ltd filed Critical Beijing Didi Infinity Technology and Development Co Ltd
Priority to CN201910745750.4A priority Critical patent/CN111831800A/en
Publication of CN111831800A publication Critical patent/CN111831800A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/30Information retrieval; Database structures therefor; File system structures therefor of unstructured textual data
    • G06F16/33Querying
    • G06F16/332Query formulation
    • G06F16/3329Natural language query formulation or dialogue systems
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/22Matching criteria, e.g. proximity measures

Landscapes

  • Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Data Mining & Analysis (AREA)
  • Mathematical Physics (AREA)
  • Artificial Intelligence (AREA)
  • General Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • Bioinformatics & Cheminformatics (AREA)
  • Evolutionary Computation (AREA)
  • Evolutionary Biology (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Bioinformatics & Computational Biology (AREA)
  • Human Computer Interaction (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Computational Linguistics (AREA)
  • Databases & Information Systems (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The application provides a question-answer interaction method, a question-answer interaction device and a storage medium, wherein the method comprises the following steps: receiving an input target question; determining a plurality of answers corresponding to the target question according to the target question and a preset corpus; wherein, the preset corpus includes: a plurality of corpus pairs, each corpus pair comprising: a question and corresponding answer; according to a preset network, respectively determining the similarity between the target question and the multiple answers, and taking the answer with the highest similarity in the multiple answers as the target answer of the target question; and outputting the target answer. The problem that in the prior art, a single question is generally directly used as input, and answer information corresponding to the question is not used as a training corpus, so that the output answer is not necessarily the best answer is solved, and the accuracy of the answer corresponding to the target question is improved.

Description

Question-answer interaction method, device, equipment and storage medium
Technical Field
The present application relates to the field of question-answer interaction technologies, and in particular, to a question-answer interaction method, device, apparatus, and storage medium.
Background
Along with the development of science and technology, intelligent chat robots are more and more common in people's life, and many smart machines all have intelligent chat robot's function. In the using process, the intelligent chatting robot judges the intention of the questions input by the user by acquiring the question information input by the user and feeds back corresponding answers, so that the requirements of the user are met.
In the prior art, it is usually determined that the corpus corresponding to the tag of the question is the answer to the question according to the input question, the tag of the input question, and the corresponding relationship between the corpus and the tag.
However, in the prior art, the answer to the question is determined only according to the label of the question, and the accuracy of the answer is low.
Disclosure of Invention
In view of the above, an object of the present application is to provide a question-answer interaction method, device, apparatus, and storage medium, which can determine, according to similarities between a target question and a plurality of answers corresponding to the target question, an answer with the highest similarity as a target answer of the target question, and solve a problem in the prior art that an answer accuracy determined only according to a question tag is low, thereby achieving an effect of improving accuracy of an answer corresponding to the target question.
In a first aspect of the present application, the present application provides a question-answer interaction method, including:
determining a plurality of answers corresponding to the target questions according to the input target questions and a preset corpus; wherein the predetermined corpus includes: a plurality of corpus pairs, each corpus pair comprising: a question and corresponding answer;
according to a preset network, respectively determining the similarity between the target question and the answers, and taking the answer with the highest similarity in the answers as the target answer of the target question;
and outputting the target answer.
Further, the preset corpus includes: a corpus of a plurality of scenes, wherein each scene has a plurality of corpus pairs;
determining a plurality of answers corresponding to the target question according to the target question and a preset corpus includes:
and acquiring answers corresponding to the target questions from the corpus pairs of each scene respectively according to the target questions.
Further, the corpus comprises a corpus of at least two scenarios: the system comprises a taxi calling scene corpus, a song listening scene corpus, a navigation scene corpus, a weather query scene corpus and a conversation scene corpus.
Further, before the determining the similarity between the target question and the plurality of answers according to the preset network, the method further includes:
respectively carrying out vectorization representation on the target question and each answer to obtain vectorization representation of the target question and vectorization representation of each answer;
correspondingly, the determining the similarity between the target question and the plurality of answers according to the preset network includes:
and respectively determining the similarity between the vectorized representation of the target question and the vectorized representation of each answer according to a preset network.
Further, the vectorized representation of the target problem comprises: vectorized representations of all words in the target question;
the vectorized representation of each of the answers includes: vectorized representation of all words in the answer.
Further, before the determining, according to a preset network, similarities between the target question and the plurality of answers respectively and taking an answer with the highest similarity among the plurality of answers as a target answer of the target question, the method further includes:
training is carried out according to a plurality of sample corpus pairs, the similarity between questions and answers in each sample corpus pair is determined, and the preset network is generated according to training results.
In a second aspect of the present application, the present application further provides a question-answer interaction device, including: the device comprises a receiving module, a first determining module, a second determining module and an output module, wherein:
the receiving module is used for receiving an input target question;
the first determining module is used for determining a plurality of answers corresponding to the target question according to the target question and a preset corpus; wherein, the preset corpus includes: a plurality of corpus pairs, each corpus pair comprising: a question and corresponding answer;
the second determining module is configured to determine similarity between the target question and the multiple answers according to a preset network, and use an answer with the highest similarity in the multiple answers as a target answer to the target question;
the output module is used for outputting the target answer.
Further, the device further comprises a calculation module, configured to perform vectorization representation on the target question and each of the answers, respectively, to obtain a vectorization representation of the target question and a vectorization representation of each of the answers;
correspondingly, the determining the similarity between the target question and the plurality of answers according to the preset network includes:
and respectively determining the similarity between the vectorized representation of the target question and the vectorized representation of each answer according to a preset network.
Further, the device further comprises a training module, which is used for training according to a plurality of sample corpus pairs, determining the similarity between the question and the answer in each sample corpus pair, and generating the preset network according to the training result.
In a third aspect of the present application, there is provided a question-answering interaction device, a processor, a storage medium and a bus, wherein the storage medium stores machine-readable instructions executable by the processor, when the question-answering interaction device is operated, the processor and the storage medium communicate with each other through the bus, and the processor executes the machine-readable instructions to perform the steps of any one of the methods of the first aspect.
In a fourth aspect of the present application, there is also provided a storage medium having stored thereon a computer program for performing the steps of the method according to any one of the above first aspects when the computer program is executed by a processor.
Based on any one of the above aspects, according to an input target question, a plurality of answers corresponding to the target question are determined from a preset corpus including a plurality of corpus pairs, and according to the similarity between the target question and the plurality of answers, the answer with the highest similarity is used as the target answer of the target question, so that the accuracy of the answer corresponding to the target question is improved.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings that are required to be used in the embodiments will be briefly described below, it should be understood that the following drawings only illustrate some embodiments of the present application and therefore should not be considered as limiting the scope, and for those skilled in the art, other related drawings can be obtained from the drawings without inventive effort.
Fig. 1 is a schematic structural diagram illustrating a question-answer interaction system according to an embodiment of the present application;
fig. 2 is a schematic flowchart illustrating a question-answer interaction method according to an embodiment of the present application;
fig. 3 is a schematic flow chart illustrating a question-answer interaction method according to another embodiment of the present application;
fig. 4 is a schematic flow chart illustrating a question-answer interaction method according to another embodiment of the present application;
fig. 5 is a schematic structural diagram illustrating a question-answering interaction device according to an embodiment of the present application;
fig. 6 is a schematic structural diagram illustrating a question-answering interaction device according to another embodiment of the present application;
fig. 7 is a schematic structural diagram illustrating a question-answering interaction device according to another embodiment of the present application;
fig. 8 shows a schematic structural diagram of a question-answering interaction device according to an embodiment of the present application.
Detailed Description
In order to make the purpose, technical solutions and advantages of the embodiments of the present application clearer, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it should be understood that the drawings in the present application are for illustrative and descriptive purposes only and are not used to limit the scope of protection of the present application. Additionally, it should be understood that the schematic drawings are not necessarily drawn to scale. The flowcharts used in this application illustrate operations implemented according to some embodiments of the present application. It should be understood that the operations of the flow diagrams may be performed out of order, and steps without logical context may be performed in reverse order or simultaneously. One skilled in the art, under the guidance of this application, may add one or more other operations to, or remove one or more operations from, the flowchart.
In addition, the described embodiments are only a part of the embodiments of the present application, and not all of the embodiments. The components of the embodiments of the present application, generally described and illustrated in the figures herein, can be arranged and designed in a wide variety of different configurations. Thus, the following detailed description of the embodiments of the present application, presented in the accompanying drawings, is not intended to limit the scope of the claimed application, but is merely representative of selected embodiments of the application. All other embodiments, which can be derived by a person skilled in the art from the embodiments of the present application without making any creative effort, shall fall within the protection scope of the present application.
In order to enable those skilled in the art to use the present disclosure, the following embodiments are given in conjunction with the specific application scenarios "weather query", "taxi", "listen to song" and "navigate". It will be apparent to those skilled in the art that the general principles defined herein may be applied to other embodiments and applications without departing from the spirit and scope of the application. Although the present application is described primarily in the context of "weather query," "taxi," "song listening," and "navigation," it should be understood that this is but one exemplary embodiment and that the present application may be applied in a variety of scenarios where problem interaction is desired.
It should be noted that in the embodiments of the present application, the term "comprising" is used to indicate the presence of the features stated hereinafter, but does not exclude the addition of further features.
One aspect of the present application relates to a problem interaction system. The system can acquire the corresponding answer of the target question according to the target question and a preset corpus, then respectively calculate the similarity between the target question and each answer according to a preset network, and take the answer with the highest similarity with the target question as the target answer.
It should be noted that, before the application is filed, in the prior art, it is usually determined that the corpus corresponding to the tag of the question is the answer to the question according to the input question, the tag of the input question, and the corresponding relationship between the corpus and the tag.
According to the question interaction method, the answer with the highest similarity can be determined as the target answer of the target question according to the similarity between the target question and the answers corresponding to the target question, and therefore the accuracy of the answer corresponding to the target question is improved.
Fig. 1 is a schematic architecture diagram of a problem interaction system 100 according to an embodiment of the present application. For example, the issue interaction system 100 may be for a transportation service such as a taxi, a designated drive service, a express bus, a carpool, a bus service, or a regular bus service, or any platform or scenario involving smart devices or smart services, such as home, voice customer service, etc. The problem interaction system 100 may include one or more of a server 110, a network 120, a service terminal 130, and a database 140.
In some embodiments, the server 110 may include a processor. The processor may process information and/or data related to the service request to perform one or more of the functions described herein. For example, the processor may determine the user intent based on a service request obtained from the service terminal 130. In some embodiments, a processor may include one or more processing cores (e.g., a single-core processor (S) or a multi-core processor (S)). Merely by way of example, a Processor may include a Central Processing Unit (CPU), an Application Specific Integrated Circuit (ASIC), an Application Specific Instruction Set Processor (ASIP), a Graphics Processing Unit (GPU), a Physical Processing Unit (PPU), a Digital Signal Processor (DSP), a Field Programmable Gate Array (FPGA), a Programmable Logic Device (PLD), a controller, a microcontroller Unit, a reduced Instruction Set computer (reduced Instruction Set computer), a microprocessor, or the like, or any combination thereof.
In some embodiments, the device type corresponding to the service terminal 130 may be a mobile device, such as a smart home device, a wearable device, a smart mobile device, a virtual reality device, an augmented reality device, or the like, or may be a tablet computer, a laptop computer, or a built-in smart device in a motor vehicle, or the like. Taking a weather query scene as an example, the service terminal 130 may be a mobile phone of a user, and the user inputs a target question "what weather is in afternoon today" through the mobile phone, and the client obtains answers corresponding to the target question from a corpus of a plurality of scenes according to the questions input by the user (for example, the answers corresponding to the target question are obtained from a taxi playing scene corpus, a song listening scene corpus, a navigation scene corpus, and a weather query scene corpus), calculates similarity between the target question and each answer, and obtains and outputs an answer with the highest similarity.
In some embodiments, a database 140 may be connected to the network 120 to communicate with one or more components (e.g., the server 110, the service terminal 130, the service provider 140, etc.) in the issue interaction system 100. One or more components in the issue interaction system 100 may access data or instructions stored in a database 140 via the network 120. In some embodiments, the database 140 may be directly connected to one or more components in the problem interaction system 100, or the database 140 may be part of the server 110.
The following describes the problem interaction method provided in the embodiment of the present application in detail with reference to the content described in the problem interaction system 100 shown in fig. 1, where the problem interaction method is applied to the system, an execution subject may be a service terminal or a server, a preset scene may be designed and adjusted according to user needs, any scene related to an intelligent terminal or an intelligent service may be used, and the two scenes provided in the embodiment are not limited.
Referring to fig. 2, a flowchart of a problem interaction method provided in an embodiment of the present application is shown, where the method may be executed by a server or a service terminal in a problem interaction system, and includes:
s101: and determining a plurality of answers corresponding to the target question according to the input target question and a preset corpus.
Wherein, the preset corpus includes: a plurality of corpus pairs, each corpus pair comprising: a question and a corresponding answer.
Optionally, before S101, the method may further include: an input target question is received.
If the method is executed by a server, the server can receive the target problem sent by the service terminal; if the method is executed by the service terminal, the service terminal can receive the target question input by the user through an input interface of the service terminal.
It should be noted that the preset scenario may be various question-answer interaction scenarios preset by the server, for example: any user asks the server for a scenario.
The service terminal may be: and the terminal is provided with a question and answer application program, and the question and answer application program can be an application program corresponding to the robot customer service or an application program corresponding to the search service. The service terminal can be intelligent equipment, such as an intelligent sound box, an intelligent box, a smart phone, a family education machine and the like. The server may have a server-side device corresponding to the problem application.
The service terminal can receive the target question input by the user through the input interface of the question application program when the question application program is in a starting or standby state. The target question of the input can be a question in a voice format or a question in a text format. Of course, other formats are possible, and this application is not intended to limit the scope of this disclosure.
For example, in an object scenario, after a question and answer application of a service terminal, for example, an intelligent robot application installed in the service terminal, is started, a user may input a question to the service terminal through an input interface of the intelligent robot application, for example, "how is the weather today", and the service terminal may process the received object question input by the user, where the processing procedure may be: the service terminal processes the question to determine the answer corresponding to the target question; or the target question is sent to a server, and the server determines the answer corresponding to the target question.
After the input target question is obtained, a plurality of corpus pairs containing the target question can be determined from a preset corpus according to the target question, and answers in the corpus pairs are obtained to serve as a plurality of answers corresponding to the target question.
S102: and according to a preset network, respectively determining the similarity between the target question and the plurality of answers, and taking the answer with the highest similarity in the plurality of answers as the target answer of the target question.
The preset network may be a pseudo-twin network, that is, two input quantities of the preset network are not completely the same, the preset network may be used to calculate similarity between questions and answers, the preset network may be obtained by training a large number of sample corpus pairs, and each sample corpus pair may include: a sample question and a sample answer to the sample question.
In one implementation, the method may input a target question and an answer to the predetermined network, and the predetermined network determines similarity between the target question and the answer. In this way, by calculating the similarity between the input target question and each answer a plurality of times, the similarity between the target question and a plurality of answers can be obtained.
In another implementation manner, the method may further input the target question and the plurality of answers into the preset network, and the preset network sequentially determines the similarity between the target question and each answer. In this way, the similarity between the target question and the plurality of answers can be obtained through a plurality of similarity calculations.
The method may also employ the preset network, and determine an answer with the highest similarity among the plurality of answers as the target answer to the target question according to the similarities between the target question and the plurality of answers.
It should be noted that the basis for determining the target response is: and determining a target answer matched with the target question according to the similarity, wherein the answer is the target answer matched with the target question when the similarity of the target question and a certain answer is highest.
The similarity can adopt vector distance to measure the similarity between the target question and each answer.
Alternatively, the algorithm of similarity may select any one of the following: the euclidean distance algorithm (the smaller the distance, the greater the similarity), the cosine distance algorithm (the smaller the distance, the greater the similarity), and the inner product algorithm (the larger the inner product, the greater the similarity), and the selection of the specific algorithm is designed according to the needs, and is not limited herein.
According to the method, the similarity between the target question and the answers can be respectively determined according to a preset network, the similarity between the target question and the answers can be used for representing the correlation degree between the target question and the answers, the answer with the highest similarity to the target question serves as the target answer of the target question, at the moment, the correlation degree between the target question and the target answer is the highest, the obtained target answer is the best answer of the question as far as possible, and the accuracy of determining the target answer is improved.
S103: and outputting the target answer.
If the method is executed by the server, the server can send the target answer to the service terminal, and the service terminal outputs the target answer; if the method is executed by the service terminal, the service terminal can directly output the target answer.
Wherein the service terminal may employ voice output, such as output through a voice output device of the service terminal, e.g., a speaker; alternatively, the output may be performed through a voice output device connected to the service terminal, such as an earphone, a sound box, or other terminals having a voice output device. The service terminal may also output text, for example, through a display screen of the service terminal, or a display screen of another terminal connected to the service terminal, such as a display screen of a vehicle-mounted terminal. Of course, the target answer may be output in other manners, and the specific output manner may be flexibly adjusted without any limitation.
By adopting the question-answer interaction method provided by the embodiment of the application, the answer with the highest similarity can be determined as the target answer of the target question according to the similarity between the target question and the answers corresponding to the target question, so that the accuracy of the answer corresponding to the target question is improved.
According to the method, the similarity between the target question and the answers can be respectively determined according to a preset network, the similarity between the target question and the answers can be used for representing the correlation degree between the target question and the answers, the answer with the highest similarity to the target question serves as the target answer of the target question, the correlation degree between the target question and the target answer can be made to be the highest, the obtained target answer is the best answer of the question as far as possible, and the accuracy of determining the target answer is improved.
Moreover, the preset corpus in the method comprises: a plurality of corpus are right, every corpus is to including a question and corresponding answer, namely in the scheme of this application, the corpus in is not merely the question, has still included the answer that every question corresponds, so because this preset corpus obtained a plurality of answers of this target question, also more accurate.
Meanwhile, the preset network is obtained by training according to a plurality of sample corpus pairs, and the target answer selected based on the similarity between the question and the answer obtained by the preset network is more accurate.
Optionally, the predetermined corpus includes: the corpus of a plurality of scenes, wherein the corpus of each scene has a plurality of corpus pairs, and the number of the corpus pairs has no upper limit, so that the accuracy of determining the target answer corresponding to the target question can be improved; the number of the corpus pairs is designed according to the needs of the user, and is not limited herein.
The corpus of a plurality of scenes is used to store corpus pairs corresponding to the scenes. For example: the predetermined corpus may include: the method comprises the following steps that a taxi calling scene corpus, a song listening scene corpus, a navigation scene corpus, a weather query scene corpus and a conversation scene corpus are used as five scene corpora, wherein each scene corpus comprises a plurality of corpus pairs under the scene; wherein, one corpus pair comprises a question and an answer corresponding to the question.
Alternatively, S101 may include: and according to the target question, acquiring an answer corresponding to the target question in each scene from the corpus pair of each scene.
Then, the answers corresponding to the target question obtained based on the corpus may include: and in the plurality of scenes, the target question corresponds to an answer, wherein the target question can correspond to at least one answer in each scene.
In the scheme of the application, the answer corresponding to the target question in the scene can be acquired from each corpus pair of the scene according to the target question, so that the target answer determined from the multiple answers is more adaptive to the scene of the question, and the accuracy of the determined target answer is higher.
Fig. 3 is a flowchart illustrating a problem interaction method according to another embodiment of the present application, as shown in fig. 3, before step S102, the method may further include:
s104: and respectively carrying out vectorization representation on the target question and each answer to obtain the vectorization representation of the target question and the vectorization representation of each answer.
Optionally, the vectorized representation of each target issue comprises: vectorized representation of all words in the target question; accordingly, the vectorized representation of each answer includes: vectorized representation of all words in the answer.
The vectorization representation of all the words in the target problem is actually the vectorization representation of the feature vectors of all the words in the target problem; the vectorized representation of all words in the answer is actually a vectorized representation of the feature vectors of all words in the answer.
Accordingly, step 102 includes: and respectively determining the similarity between the vectorized representation of the target question and the vectorized representation of each answer according to a preset network.
It should be noted that after the target question and the multiple answers are obtained, the vectorized representations of all words in the target question and all words in each question and all words are further obtained, and the similarity between the target question and each answer and between each word is calculated respectively.
By calculating the similarity between the vectorized representation of the target question and the vectorized representation of each answer, the precision of the similarity between the target question and each answer can be improved, and the accuracy of the answer corresponding to the target question is further improved.
Fig. 4 is a flowchart illustrating a problem interaction method according to another embodiment of the present application, as shown in fig. 4, before step S102, the method further includes:
s105: training is carried out according to the plurality of sample corpus pairs, the similarity between the question and the answer in each sample corpus pair is determined, and a preset network is generated according to the training result.
Optionally, the sample corpus pair for training may include: and in each corpus pair, calculating the similarity between questions and answers after vectorization representation through vectorization representation of the questions and the answers, and generating a preset network obtained through training of the corpus pairs based on the scenes according to the training results of the corpus pairs in each field.
By adopting the question-answer interaction method provided by the embodiment of the application, the question-answer interaction method can be used for training in advance according to a large number of sample corpus pairs consisting of questions and answers, determining the similarity between the questions and the answers in each corpus pair, and generating a preset network according to the training result. According to the target questions input by the user, the answer corresponding to the target question in each scene is obtained in the preset network, the similarity between the target question and the answer corresponding to each scene is judged respectively, the answer with the highest similarity is selected as the target answer, and the target answer is output.
Based on the same inventive concept, a problem interaction device corresponding to the problem interaction method is also provided in the embodiments of the present application, and as the principle of solving the problem of the device in the embodiments of the present application is similar to the problem interaction method in the embodiments of the present application, the implementation of the device can refer to the implementation of the method, and the repeated parts of the beneficial effects are not described again.
Fig. 5 is a schematic structural diagram of a problem interaction apparatus according to an embodiment of the present application, and as shown in fig. 5, the apparatus includes: a first determination module 201, a second determination module 202, and an output module 203, wherein:
a first determining module 201, configured to determine, according to an input target question and a preset corpus, a plurality of answers corresponding to the target question; wherein, the preset corpus includes: a plurality of corpus pairs, each corpus pair comprising: a question and a corresponding answer.
The second determining module 202 is configured to determine similarities between the target question and the multiple answers according to a preset network, and use an answer with the highest similarity among the multiple answers as a target answer of the target question.
And an output module 203 for outputting the target answer.
Fig. 6 is a schematic structural diagram of a problem interaction device according to another embodiment of the present application, and as shown in fig. 6, the problem interaction device further includes: a calculating module 204, configured to perform vectorization representation on the target question and each answer, respectively, to obtain a vectorization representation of the target question and a vectorization representation of each answer;
correspondingly, the determining the similarity between the target question and the plurality of answers according to the preset network includes:
and respectively determining the similarity between the vectorized representation of the target question and the vectorized representation of each answer according to a preset network.
Fig. 7 is a schematic structural diagram of a problem interaction device according to another embodiment of the present application, and as shown in fig. 7, the problem interaction device further includes: the training module 205 is configured to train according to a plurality of sample corpus pairs, determine similarity between a question and an answer in each sample corpus pair, and generate a preset network according to a training result.
The embodiment of the application also provides question-answer interaction equipment. The question-answer interaction device can be a service terminal located at a client side or a server located at a service side. Fig. 8 is a schematic structural diagram of a problem interaction device according to an embodiment of the present application. As shown in fig. 8, an embodiment of the present application further provides a question-answer interaction device, including: a processor 601, a memory 602, and a bus 603; the memory 602 stores machine-readable instructions executable by the processor 601, when the question-answering interaction device is running, the processor 601 communicates with the memory 602 through the bus 603, and the processor 601 executes the machine-readable instructions to perform the steps of the request processing method provided by the foregoing method embodiments.
Specifically, the machine readable instructions stored in the memory 602 are execution steps of the request processing method described in the foregoing embodiment of the present application, and the processor 601 can execute the request processing method to process the request, so that the apparatus for question and answer interaction also has all the beneficial effects described in the foregoing embodiment of the method, and the description of the present application is not repeated.
It should be noted that the question-answering interaction device may be a general-purpose computer or a special-purpose computer, and other servers for processing data, and the like, and all of the three devices may be used to implement the request processing method of the present application. Although the request processing method is described only by the computer and the server separately, for convenience, the functions described in the present application may be implemented in a distributed manner on a plurality of similar platforms to balance the processing load.
For example, the question-answering interaction device may include one or more processors for executing program instructions, a communication bus, and different forms of storage media, such as a disk, ROM, or RAM, or any combination thereof. Illustratively, the computer platform may also include program instructions stored in ROM, RAM, or other types of non-transitory storage media, or any combination thereof. The method of the present application may be implemented in accordance with these program instructions.
For ease of illustration, only one processor is depicted in the question-answering interaction device. However, it should be noted that the question-answering interaction device in the present application may also include a plurality of processors, and thus the steps performed by one processor described in the present application may also be performed by a plurality of processors in combination or individually.
The embodiment of the application also provides a storage medium, wherein a computer program is stored on the storage medium, and when the computer program is executed by a processor, the steps of the problem interaction method are executed.
Specifically, the storage medium can be a general storage medium, such as a mobile disk, a hard disk, and the like, and when a computer program on the storage medium is run, the problem interaction method can be executed, so that the problems that the sentence library scale is too large and too many resources are occupied due to various language expression combination forms and a large amount of information in the prior art are solved, and the effect of reducing resource occupation is achieved.
It can be clearly understood by those skilled in the art that, for convenience and brevity of description, the specific working processes of the system and the apparatus described above may refer to corresponding processes in the method embodiments, and are not described in detail in this application. In the several embodiments provided in the present application, it should be understood that the disclosed system, apparatus and method may be implemented in other ways. The above-described apparatus embodiments are merely illustrative, and for example, the division of the modules is merely a logical division, and there may be other divisions in actual implementation, and for example, a plurality of modules or components may be combined or integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection of devices or modules through some communication interfaces, and may be in an electrical, mechanical or other form.
The modules described as separate parts may or may not be physically separate, and parts displayed as modules may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
In addition, functional units in the embodiments of the present application may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit.
The functions, if implemented in the form of software functional units and sold or used as a stand-alone product, may be stored in a non-volatile computer-readable storage medium executable by a processor. Based on such understanding, the technical solution of the present application or portions thereof that substantially contribute to the prior art may be embodied in the form of a software product stored in a storage medium and including instructions for causing a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the steps of the method according to the embodiments of the present application. And the aforementioned storage medium includes: various media capable of storing program codes, such as a U disk, a removable hard disk, a ROM, a RAM, a magnetic disk, or an optical disk.
The above description is only for the specific embodiments of the present application, but the scope of the present application is not limited thereto, and any person skilled in the art can easily conceive of the changes or substitutions within the technical scope of the present application, and shall be covered by the scope of the present application. Therefore, the protection scope of the present application shall be subject to the protection scope of the claims.

Claims (10)

1. A question-answer interaction method is characterized by comprising the following steps:
determining a plurality of answers corresponding to the target questions according to the input target questions and a preset corpus; wherein the predetermined corpus includes: a plurality of corpus pairs, each corpus pair comprising: a question and corresponding answer;
according to a preset network, respectively determining the similarity between the target question and the answers, and taking the answer with the highest similarity in the answers as the target answer of the target question;
and outputting the target answer.
2. The method of claim 1, wherein the preset corpus comprises: a corpus of a plurality of scenes, wherein each scene has a plurality of corpus pairs;
determining a plurality of answers corresponding to the target question according to the target question and a preset corpus includes:
and acquiring answers corresponding to the target questions from the corpus pairs of each scene respectively according to the target questions.
3. The method of claim 2, wherein the corpus comprises a corpus of at least two scenarios: the system comprises a taxi calling scene corpus, a song listening scene corpus, a navigation scene corpus, a weather query scene corpus and a conversation scene corpus.
4. The method of claim 1, wherein prior to determining the similarity between the target question and the plurality of answers, respectively, according to a predetermined network, the method further comprises:
respectively carrying out vectorization representation on the target question and each answer to obtain vectorization representation of the target question and vectorization representation of each answer;
correspondingly, the determining the similarity between the target question and the plurality of answers according to the preset network includes:
and respectively determining the similarity between the vectorized representation of the target question and the vectorized representation of each answer according to a preset network.
5. The method of claim 4, wherein the vectorized representation of the target problem comprises: vectorized representations of all words in the target question;
the vectorized representation of each of the answers includes: vectorized representation of all words in the answer.
6. The method according to any one of claims 1 to 5, wherein before determining the similarity between the target question and the plurality of answers respectively according to a preset network and taking the answer with the highest similarity among the plurality of answers as the target answer of the target question, the method further comprises:
training is carried out according to a plurality of sample corpus pairs, the similarity between questions and answers in each sample corpus pair is determined, and the preset network is generated according to training results.
7. A question-answer interaction apparatus, characterized in that the apparatus comprises: the device comprises a receiving module, a first determining module, a second determining module and an output module, wherein:
the receiving module is used for receiving an input target question;
the first determining module is used for determining a plurality of answers corresponding to the target question according to the target question and a preset corpus; wherein, the preset corpus includes: a plurality of corpus pairs, each corpus pair comprising: a question and corresponding answer;
the second determining module is configured to determine similarity between the target question and the multiple answers according to a preset network, and use an answer with the highest similarity in the multiple answers as a target answer to the target question;
the output module is used for outputting the target answer.
8. The apparatus according to claim 7, further comprising a training module for training according to a plurality of sample corpus pairs, determining similarity between questions and answers in each of the sample corpus pairs, and generating the predetermined network according to a training result.
9. A question-answer interaction device, comprising: a processor, a storage medium and a bus, wherein the storage medium stores machine-readable instructions executable by the processor, the processor and the storage medium communicate with each other through the bus when the question-answering interaction device is operated, and the processor executes the machine-readable instructions to execute the steps of the method according to any one of claims 1 to 6.
10. A storage medium, having stored thereon a computer program which, when executed by a processor, performs the steps of the method according to any one of claims 1 to 6.
CN201910745750.4A 2019-08-13 2019-08-13 Question-answer interaction method, device, equipment and storage medium Pending CN111831800A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910745750.4A CN111831800A (en) 2019-08-13 2019-08-13 Question-answer interaction method, device, equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910745750.4A CN111831800A (en) 2019-08-13 2019-08-13 Question-answer interaction method, device, equipment and storage medium

Publications (1)

Publication Number Publication Date
CN111831800A true CN111831800A (en) 2020-10-27

Family

ID=72912016

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910745750.4A Pending CN111831800A (en) 2019-08-13 2019-08-13 Question-answer interaction method, device, equipment and storage medium

Country Status (1)

Country Link
CN (1) CN111831800A (en)

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106844400A (en) * 2015-12-07 2017-06-13 南京中兴新软件有限责任公司 Intelligent response method and device
CN107169105A (en) * 2017-05-17 2017-09-15 北京品智能量科技有限公司 Question and answer system and method for vehicle
CN107305578A (en) * 2016-04-25 2017-10-31 北京京东尚科信息技术有限公司 Human-machine intelligence's answering method and device
CN107980130A (en) * 2017-11-02 2018-05-01 深圳前海达闼云端智能科技有限公司 It is automatic to answer method, apparatus, storage medium and electronic equipment
CN109033221A (en) * 2018-06-29 2018-12-18 上海银赛计算机科技有限公司 Answer generation method, device and server
CN109299478A (en) * 2018-12-05 2019-02-01 长春理工大学 Intelligent automatic question-answering method and system based on two-way shot and long term Memory Neural Networks
CN109299476A (en) * 2018-11-28 2019-02-01 北京羽扇智信息科技有限公司 Question answering method and device, electronic equipment and storage medium

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106844400A (en) * 2015-12-07 2017-06-13 南京中兴新软件有限责任公司 Intelligent response method and device
CN107305578A (en) * 2016-04-25 2017-10-31 北京京东尚科信息技术有限公司 Human-machine intelligence's answering method and device
CN107169105A (en) * 2017-05-17 2017-09-15 北京品智能量科技有限公司 Question and answer system and method for vehicle
CN107980130A (en) * 2017-11-02 2018-05-01 深圳前海达闼云端智能科技有限公司 It is automatic to answer method, apparatus, storage medium and electronic equipment
CN109033221A (en) * 2018-06-29 2018-12-18 上海银赛计算机科技有限公司 Answer generation method, device and server
CN109299476A (en) * 2018-11-28 2019-02-01 北京羽扇智信息科技有限公司 Question answering method and device, electronic equipment and storage medium
CN109299478A (en) * 2018-12-05 2019-02-01 长春理工大学 Intelligent automatic question-answering method and system based on two-way shot and long term Memory Neural Networks

Similar Documents

Publication Publication Date Title
CN110069608B (en) Voice interaction method, device, equipment and computer storage medium
CN108121800B (en) Information generation method and device based on artificial intelligence
CN111831897B (en) Travel destination recommending method and device, electronic equipment and storage medium
WO2021135455A1 (en) Semantic recall method, apparatus, computer device, and storage medium
CN113407850B (en) Method and device for determining and acquiring virtual image and electronic equipment
CN111898643A (en) Semantic matching method and device
CN108647273B (en) Friend-making recommendation method and device
CN110610698B (en) Voice labeling method and device
CN110727782A (en) Question and answer corpus generation method and system
CN111582459A (en) Method, electronic device, apparatus and storage medium for executing operation
CN111326147B (en) Speech recognition method, device, electronic equipment and storage medium
CN111402864A (en) Voice processing method and electronic equipment
CN111159379B (en) Automatic question setting method, device and system
CN114970666B (en) Spoken language processing method and device, electronic equipment and storage medium
CN111753062A (en) Method, device, equipment and medium for determining session response scheme
CN111831800A (en) Question-answer interaction method, device, equipment and storage medium
CN114490969B (en) Question and answer method and device based on table and electronic equipment
CN115879455A (en) Word emotion polarity prediction method and device, electronic equipment and storage medium
CN114297380A (en) Data processing method, device, equipment and storage medium
CN111858865A (en) Semantic recognition method and device, electronic equipment and computer-readable storage medium
CN107025106B (en) Graph drawing method and device
CN111161706A (en) Interaction method, device, equipment and system
CN111476039A (en) Instant language translation method of intelligent vehicle-mounted system and related product
JP7343637B2 (en) Data processing methods, devices, electronic devices and storage media
US20230342553A1 (en) Attribute and rating co-extraction

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