CN113051375B - Question and answer data processing method and device based on question and answer equipment - Google Patents

Question and answer data processing method and device based on question and answer equipment Download PDF

Info

Publication number
CN113051375B
CN113051375B CN201911382071.1A CN201911382071A CN113051375B CN 113051375 B CN113051375 B CN 113051375B CN 201911382071 A CN201911382071 A CN 201911382071A CN 113051375 B CN113051375 B CN 113051375B
Authority
CN
China
Prior art keywords
question
word
sentence
words
answer
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.)
Active
Application number
CN201911382071.1A
Other languages
Chinese (zh)
Other versions
CN113051375A (en
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.)
Alibaba Group Holding Ltd
Original Assignee
Alibaba Group Holding 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 Alibaba Group Holding Ltd filed Critical Alibaba Group Holding Ltd
Priority to CN201911382071.1A priority Critical patent/CN113051375B/en
Publication of CN113051375A publication Critical patent/CN113051375A/en
Application granted granted Critical
Publication of CN113051375B publication Critical patent/CN113051375B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

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
    • 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/3331Query processing
    • G06F16/334Query execution
    • G06F16/3344Query execution using natural language analysis
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F40/00Handling natural language data
    • G06F40/30Semantic analysis

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Computational Linguistics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Artificial Intelligence (AREA)
  • Data Mining & Analysis (AREA)
  • Databases & Information Systems (AREA)
  • Mathematical Physics (AREA)
  • Audiology, Speech & Language Pathology (AREA)
  • General Health & Medical Sciences (AREA)
  • Health & Medical Sciences (AREA)
  • Human Computer Interaction (AREA)
  • Machine Translation (AREA)

Abstract

The invention discloses a method and a device for processing question-answering data based on question-answering equipment. Wherein the method comprises the following steps: acquiring a question-answer sentence to be fed back to the front-end equipment, wherein the question-answer sentence comprises at least one of the following: question sentences and answer sentences; predicting at least one target word according to the question-answer sentence; analyzing and processing at least one target word based on the word stock to obtain a question word forming a question sentence of the next question; and combining the question words constituting the question sentence of the next question to generate the question sentence of the next question. The invention solves the technical problem that the question answering device can feed back corresponding answers to the questions provided by the user, and in the implementation process of the scheme, the answers fed back in the question answering process are preset, and the answer content is limited, so that the flexibility of the question answering process is poor.

Description

Question and answer data processing method and device based on question and answer equipment
Technical Field
The invention relates to the field of language processing, in particular to a method and a device for processing question-answering data based on question-answering equipment.
Background
Currently, commonly used dialogue products are products that are actively asked by a user to a machine, which then gives a response after the user asks the machine. For example, a chat-type conversation robot may give relevant outputs based on user inputs, but the theme definition is open and does not achieve effective practical purposes. Another automatic question-answering robot is based on reading understanding and text retrieval, first of all, a user is required to give a question, and after understanding the intention of the user, the robot extracts answers from the existing text through a large number of calculations. But the machine cannot give a response when the user's intention is a question to which the existing text does not relate.
Therefore, the current dialogue products can only answer questions based on the active questions of the user, and the trend of the dialogue can only be known by the user, so that the dialogue products have difficulty in playing the role of information mining and have poor flexibility.
The device for carrying out the question and answer can feed back corresponding answers to the questions provided by the user, and in the implementation process of the scheme, as the answers fed back in the question and answer process are preset and the answer content is limited, the problem of poor flexibility in the question and answer process is caused, and no effective solution is provided at present.
Disclosure of Invention
The embodiment of the invention provides a method and a device for processing question and answer data based on question and answer equipment, which at least solve the technical problem that the question and answer equipment can feed back corresponding answers to questions presented by users.
According to an aspect of the embodiment of the present invention, there is provided a method for processing question-answering data based on question-answering equipment, including: acquiring a question-answer sentence to be fed back to the front-end equipment, wherein the question-answer sentence comprises at least one of the following: question sentences and answer sentences; predicting at least one target word according to the question-answer sentence; analyzing and processing at least one target word based on the word stock to obtain a question word forming a question sentence of the next question; and combining the question words constituting the question sentence of the next question to generate the question sentence of the next question.
According to another aspect of the embodiment of the present invention, there is also provided a processing apparatus for question-answering data based on a question-answering device, including: the acquiring module is used for acquiring a question-answer sentence to be fed back to the front-end equipment, wherein the question-answer sentence comprises at least one of the following components: question sentences and answer sentences; the prediction module is used for predicting and obtaining at least one target word according to the question-answer sentence; the processing module is used for analyzing and processing at least one target word based on the word stock to obtain a problem word forming a problem sentence of the next question; and the combination module is used for combining the question words forming the question sentence of the next question and generating the question sentence of the next question.
According to another aspect of the embodiment of the present invention, there is also provided a processing apparatus for question-answering data based on a question-answering device, including: the acquisition module is used for acquiring historical behavior data of the dialogue object; the questioning module is used for determining a question sentence of the first questioning according to the historical behavior data and actively sending the question sentence of the first questioning to the dialogue object; the receiving module is used for receiving answer sentences of the question sentences of the first question answered by the dialogue objects; and the determining module is used for determining the question statement of the next question according to the answer statement.
According to another aspect of the embodiment of the present invention, there is also provided a storage medium including a stored program, wherein the program controls a device in which the storage medium is located to execute the following steps when running: acquiring a question-answer sentence to be fed back to the front-end equipment, wherein the question-answer sentence comprises at least one of the following: question sentences and answer sentences; predicting at least one target word according to the question-answer sentence; analyzing and processing at least one target word based on the word stock to obtain a question word forming a question sentence of the next question; and combining the question words constituting the question sentence of the next question to generate the question sentence of the next question.
According to another aspect of the embodiment of the present invention, there is also provided a processor for running a program, wherein the program executes the following steps: acquiring a question-answer sentence to be fed back to the front-end equipment, wherein the question-answer sentence comprises at least one of the following: question sentences and answer sentences; predicting at least one target word according to the question-answer sentence; analyzing and processing at least one target word based on the word stock to obtain a question word forming a question sentence of the next question; and combining the question words constituting the question sentence of the next question to generate the question sentence of the next question.
In the embodiment of the invention, a question-answer sentence to be fed back to the front-end equipment is obtained, wherein the question-answer sentence comprises at least one of the following: question sentences and answer sentences; predicting at least one target word according to the question-answer sentence; analyzing and processing at least one target word based on the word stock to obtain a question word forming a question sentence of the next question; and combining the question words constituting the question sentence of the next question to generate the question sentence of the next question. According to the scheme, the theme of the next question is determined according to the question-answering statement fed back to the front-end equipment, and then the whole question statement of the next question is predicted through the determined theme, so that the infinite question of the user can be achieved according to the answer of the user to the question, the scope of the theme of the question can be controlled, the trend of the whole dialogue can be controlled, the flexibility of the dialogue is improved, the problem that equipment for carrying out the question-answering can feed back corresponding answers to the questions provided by the user is solved, and in the implementation process of the scheme, the answers fed back in the question-answering process are preset, the answer content is limited, and the technical problem of poor flexibility of the question-answering process is caused.
Drawings
The accompanying drawings, which are included to provide a further understanding of the application and are incorporated in and constitute a part of this specification, illustrate embodiments of the application and together with the description serve to explain the application and do not constitute a limitation on the application. In the drawings:
FIG. 1 shows a block diagram of a hardware architecture of a computing device (or mobile device) for implementing a method of processing question-answering data based on a question-answering device;
fig. 2 is a flowchart of a processing method of question-answering data based on a question-answering device according to embodiment 1 of the present application;
FIG. 3 is a schematic diagram of a targeting word in accordance with embodiment 1 of the present application;
FIG. 4a is a schematic diagram of an interactive interface according to embodiment 1 of the present application;
FIG. 4b is a schematic illustration of an infinite challenge according to embodiment 1 of the present application;
fig. 5 is a flowchart of another method of processing question-answering data based on a question-answering device according to embodiment 2of the present application;
Fig. 6 is a schematic diagram of a processing apparatus of question-answering data based on a question-answering device according to embodiment 3 of the present application;
Fig. 7 is a schematic diagram of a processing apparatus of question-answering data based on a question-answering device according to embodiment 4 of the present application;
FIG. 8 is a block diagram of a computing device according to embodiment 5 of the invention;
fig. 9 is a flowchart of still another processing method of question-answering data based on a question-answering apparatus according to embodiment 7 of the present application; and
Fig. 10 is a schematic diagram of a processing apparatus of question-answering data based on a question-answering device according to embodiment 3 of the present application.
Detailed Description
In order that those skilled in the art will better understand the present invention, a technical solution in the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings in which it is apparent that the described embodiments are only some embodiments of the present invention, not all embodiments. All other embodiments, which can be made by those skilled in the art based on the embodiments of the present invention without making any inventive effort, shall fall within the scope of the present invention.
It should be noted that the terms "first," "second," and the like in the description and the claims of the present invention and the above figures are used for distinguishing between similar objects and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used may be interchanged where appropriate such that the embodiments of the invention described herein may be implemented in sequences other than those illustrated or otherwise 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.
First, partial terms or terminology appearing in the course of describing embodiments of the application are applicable to the following explanation:
SeaNMF A model for Topic generation for generating a probability distribution matrix of token-Topic (key word-target word) and a specified number of Topic (target word).
Word2vec, an open source software, can obtain N words with the maximum similarity with the input word.
Synonym forest, which records synonyms and similar words of a plurality of words.
The following net is known: a Chinese semantic knowledge net records the semantic relation among similar words and the aim relation and semantic roles among different words.
Example 1
There is also provided, in accordance with an embodiment of the present invention, an embodiment of a method of processing question-answering data based on a question-answering device, it being noted that the steps shown in the flowchart of the drawings may be performed in a computer system such as a set of computer-executable instructions, and, although a logical order is shown in the flowchart, in some cases, the steps shown or described may be performed in an order other than that herein.
The method embodiment provided by the first embodiment of the application can be executed in a mobile terminal, a computing device or similar computing equipment. Fig. 1 shows a hardware block diagram of a computing device (or mobile device) for implementing a method of processing question-answering data based on a question-answering device. As shown in fig. 1, the computing device 10 (or mobile device 10) may include one or more processors 102 (shown in the figures as 102a, 102b, … …,102 n) (the processor 102 may include, but is not limited to, a microprocessor MCU or a processing device such as a programmable logic device FPGA), a memory 104 for storing data, and a transmission module 106 for communication functions. In addition, the method may further include: a display, an input/output interface (I/O interface), a Universal Serial Bus (USB) port (which may be included as one of the ports of the I/O interface), a network interface, a power supply, and/or a camera. It will be appreciated by those of ordinary skill in the art that the configuration shown in fig. 1 is merely illustrative and is not intended to limit the configuration of the electronic device described above. For example, computing device 10 may also include more or fewer components than shown in FIG. 1, or have a different configuration than shown in FIG. 1.
It should be noted that the one or more processors 102 and/or other data processing circuits described above may be referred to generally herein as "data processing circuits. The data processing circuit may be embodied in whole or in part in software, hardware, firmware, or any other combination. Further, the data processing circuitry may be a single stand-alone processing module, or incorporated, in whole or in part, into any of the other elements in computing device 10 (or mobile device). As referred to in embodiments of the application, the data processing circuit acts as a processor control (e.g., selection of the path of the variable resistor termination connected to the interface).
The memory 104 may be used to store software programs and modules of application software, such as program instructions/data storage devices corresponding to the method for processing question and answer data based on the question and answer device in the embodiment of the present invention, and the processor 102 executes various functional applications and data processing by running the software programs and modules stored in the memory 104, that is, implements the method for processing question and answer data based on the question and answer device. Memory 104 may include high-speed random access memory, and may also include non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some examples, memory 104 may further include memory located remotely from processor 102, which may be connected to computing device 10 via a network. Examples of such networks include, but are not limited to, the internet, intranets, local area networks, mobile communication networks, and combinations thereof.
The transmission module 106 is used to receive or transmit data via a network. Specific examples of the networks described above may include wireless networks provided by communication providers of computing device 10. In one example, the transmission module 106 includes a network adapter (Network Interface Controller, NIC) that can connect to other network devices through a base station to communicate with the internet. In one example, the transmission module 106 may be a Radio Frequency (RF) module for communicating with the internet wirelessly.
The display may be, for example, a touch screen type Liquid Crystal Display (LCD) that may enable a user to interact with a user interface of the computing device 10 (or mobile device).
It should be noted here that, in some alternative embodiments, the computer device (or mobile device) shown in fig. 1 described above may include hardware elements (including circuitry), software elements (including computer code stored on a computer-readable medium), or a combination of both hardware and software elements. It should be noted that fig. 1 is only one example of a specific example, and is intended to illustrate the types of components that may be present in the computer device (or mobile device) described above.
In the above-described operation environment, the present application provides a method for processing question-answering data based on a question-answering device as shown in fig. 2. Fig. 2 is a flowchart of a processing method of question-answering data based on a question-answering device according to embodiment 1 of the present application.
Step S21, acquiring a question-answer sentence to be fed back to the front-end equipment, wherein the question-answer sentence comprises at least one of the following steps: question sentences and answer sentences.
Specifically, the front-end device may be a terminal used by a user, and the question-answering device completes interaction with the user through the front-end device. The question-answer sentence to be fed back to the front-end device refers to a dialogue object of the question-answer device, that is, the question-answer sentence to be fed back to the front-end device by the user.
In an alternative embodiment, a user firstly sends a question to a question-answering device through front-end equipment, and the question-answering device can acquire a question sentence; in another alternative embodiment, the question-answering device first issues a question to the user via the front-end device, and the user returns his answer to the question-answering device via the front-end device, i.e. the question-answering device has received the answer sentence.
The question-answer sentence may be text information input to the front-end device by the dialogue object of the question-answer device, or may include voice information input to the front-end device by the dialogue object, and the front-end device converts the voice information of the dialogue object to obtain a question sentence or an answer sentence.
And S23, predicting and obtaining at least one target word according to the question-answer sentence.
Specifically, the target word is used to represent the topic of the next question. And predicting target words to determine the theme of the next question of the question answering device.
In an alternative embodiment, at least one term may be extracted from the question-answer sentence as the target term. For example, the question-answering device receives an answer sentence: the quality of the XX-brand shuttlecock is good. Based on the answer sentence, the XX board can be used as a target word for next questioning to continue questioning, and the badminton can also be used as a target word for next questioning.
In an alternative embodiment, the target word of the next question may also be determined by analyzing the question-answer sentence. Still for example: the question-answering device receives the answer sentence: the quality of the XX-brand shuttlecock is good. Based on the answer sentence, the XX board is used as a basis, and the YY board is used as a target word of the next question.
And S25, analyzing and processing at least one target word based on the word stock to obtain a question word forming a question sentence of the next question.
After determining the target word, i.e. determining the subject of the next question, the question sentence of the next question can be predicted based on the subject of the next question.
In an alternative embodiment, a word stock corresponding to each topic may be preset for each topic, and a question word is selected from the word stock corresponding to each topic to form a question sentence of the next question.
In another alternative embodiment, the prediction of the question word at each position in the question sentence of the next question may also be performed through a preset neural network model.
The question and answer device can be used for researching the event, and when the question and answer device is used for researching the event, a plurality of target words can be determined, so that a plurality of events can be simultaneously researched in the question and answer process.
Step S27, the question words constituting the question sentence of the next question are combined to generate the question sentence of the next question.
After the question words of the question sentence of the next question are obtained, the question sentences of the next question can be obtained by connecting according to the positions of the question words. If the question word at each position is predicted according to the position in the question sentence, the complete question sentence can be obtained by combining the question words according to the time series generated by the question words when the combination is performed.
After the question sentence of the next question is obtained, the question sentence can be output to the front-end equipment to perform the next question round to the dialogue object, or the question sentence can be converted into voice information and played to the front-end equipment to perform the next question round to the user.
The embodiment of the application acquires the question-answer sentence to be fed back to the front-end equipment, wherein the question-answer sentence comprises at least one of the following: question sentences and answer sentences; predicting at least one target word according to the question-answer sentence; analyzing and processing at least one target word based on the word stock to obtain a question word forming a question sentence of the next question; and combining the question words constituting the question sentence of the next question to generate the question sentence of the next question. According to the scheme, the theme of the next question is determined according to the question-answering statement fed back to the front-end equipment, and then the whole question statement of the next question is predicted through the determined theme, so that the infinite question of the user can be achieved according to the answer of the user to the question, the scope of the theme of the question can be controlled, the trend of the whole dialogue can be controlled, the flexibility of the dialogue is improved, the problem that equipment for carrying out the question-answering can feed back corresponding answers to the questions provided by the user is solved, and in the implementation process of the scheme, the answers fed back in the question-answering process are preset, the answer content is limited, and the technical problem of poor flexibility of the question-answering process is caused.
As an alternative embodiment, predicting at least one target word according to the question-answer sentence includes: word segmentation is carried out on the question-answer sentences to obtain word segmentation results of the question-answer sentences; selecting key words with preset parts of speech from the word segmentation result according to the parts of speech of each word in the word segmentation result; at least one target word is predicted from the key words.
The scheme is used for word segmentation of the question-answer sentences, and the word segmentation result of the obtained question-answer sentences comprises a plurality of words in the question-answer sentences. According to the attribute of the word, the word with the specified part of speech may be deleted first, for example, the word with the part of speech such as the auxiliary word, the word with the word part of speech, the adjective and the like in the word segmentation result may be deleted first.
The key words are used for determining at least one target word. The predetermined parts of speech may be nouns and verbs. Since nouns and verbs are words having actual meanings, nouns and verbs are extracted from the word segmentation result as key words.
After obtaining the key words, at least one word can be extracted from the key words to serve as a target word, and the target word is derived based on the key words.
In an alternative embodiment, the question-answer sentence is segmented to obtain a segmentation result, the segmentation result comprises a plurality of words, nouns and verbs are extracted from the words to serve as target words, and at least one target word is predicted based on the extracted names and verbs.
According to the scheme, the key words are extracted from the question-answer sentences, and the target words of the next question are determined based on the key words, so that the correlation between the next question and the current round of question-answer is guaranteed, the continuity of dialogue with the user is guaranteed, and the user can be deeply mined according to the needs through the dialogue with the user.
As an alternative embodiment, predicting at least one target word from the key word includes: searching synonyms corresponding to the key words from the word stock; and determining the synonym as at least one predicted target word.
Specifically, the word stock may be a word stock for recording synonyms or relationships between words and terms, and synonyms corresponding to key words may be found based on the word stock, so that the synonyms are used as target words.
The word stock can also be a word stock interested by the question-answering device, that is, the word stock does not record all words, but only records words interested by the question-answering device, so that only when the words interested by the question-answering device have synonyms corresponding to key words, the synonyms are used as target words, that is, only words interested by the question-answering device can be used as target words, and the trend of the dialogue is developed according to the interests of the question-answering device.
In this alternative embodiment, still taking the question-answer sentence as "the quality of the shuttlecock with the XX card is good" as an example, the extracted keywords include the XX card and the shuttlecock, and the words such as the YY card, the ZZ card and the like can be obtained by searching in the word stock based on the two keywords, so that the words such as the YY card, the ZZ card and the like can be used as target words.
According to the scheme, the synonyms of the key words are used as target words, so that the next question can be transversely expanded on the basis of the question-answer sentence, and more information to be understood can be conveniently mined.
Fig. 3 is a schematic diagram of determining a target word according to embodiment 1 of the present application, and in combination with the illustration in fig. 3, first, a question-answer sentence is used as a corpus to perform word segmentation, and nouns and verbs in the word segmentation result are obtained as key words. And carrying out synonym matching in a synonym table based on the key words, and determining that the synonym corresponding to the key word is the target word of the next question under the condition of successful matching, namely completing the Topic prediction of the next question. The synonym table can be created based on a preset Topic according to a word forest and a knowledge network, can be created in a word2vec mode, and can be created according to records actively searched by a user.
As an alternative embodiment, predicting at least one target word according to the question-answer sentence further includes: determining that synonyms corresponding to key words do not exist in a word stock; carrying out vectorization processing on word segmentation results of the question-answer sentences to obtain sentence vectors corresponding to the question-answer sentences; at least one target word is predicted according to a non-negative matrix factorization algorithm based on the sentence vector.
When the synonyms of the key words are searched in the word stock, not every key word can be searched to obtain the corresponding synonym, and under the condition that the synonyms of the key words are not searched, at least one target word of the next questioning is predicted.
In the scheme, the word segmentation result is vectorized to obtain the sentence vector corresponding to the question-answer sentence, and then the target word of the next question-answer sentence is predicted based on the sentence vector through a non-negative matrix factorization algorithm.
In an alternative embodiment, the word segmentation result can be vectorized in a word2vec mode to obtain sentence vectors corresponding to question-answer sentences. The non-Negative Matrix Factorization (NMF) algorithm can be implemented by a non-negative matrix factorization model, further can be implemented by SeaNMF, and SeaNMF also takes semantic information as an input of the model compared with the common NMF algorithm. The probability matrix of the target word can be predicted by a nonnegative matrix factorization algorithm, so that the final target word can be determined according to the probability matrix of the target word.
Referring still to fig. 3, first, the question-answer sentence is taken as a corpus, and based on accumulated data of the corpus, a W matrix corresponding to the question-answer sentence is generated by means of a Topic generation algorithm SeaNMF, so that the Topic of the next question is predicted based on the W matrix, and a final prediction result is obtained. Topic in the generated W matrix may also be returned for use in constructing the synonym table.
As an alternative embodiment, predicting at least one target word according to a non-negative matrix factorization algorithm based on a sentence vector includes: inputting the sentence vector into a non-negative matrix factorization algorithm model to obtain a probability matrix output by the non-negative matrix factorization algorithm model, wherein the probability matrix is used for predicting the probability that a candidate target word corresponding to a key word is the target word of the next question; and determining the candidate target word with the highest probability as at least one target word.
In the above step, the method is used for selecting the final target word from the candidate target words corresponding to each key word according to the non-negative matrix factorization algorithm. The candidate target words corresponding to the key words can be preset interested words, so that the target words can be extracted from the interested words according to the key words, a question sentence of a next question is not only related to the question-answer sentence of the next time, but also belongs to the interested topic, continuity of dialogue with a user is guaranteed, trend of the dialogue is grasped, and the question-answer device can freely select the interested topic to question on the basis of the key words.
In an alternative embodiment, a vector corresponding to a question-answer sentence is input SeaNMF into an algorithm model, and a W matrix corresponding to the question-answer sentence is generated by using SeaNMF, where the W matrix is used for predicting a target word, and the W matrix represents a probability distribution matrix of each token-topic, where a token is a keyword, and a topic is a candidate target word. Specifically, wtoken, topic represents the probability that a token belongs to Topic. After obtaining the W matrix corresponding to the question-answer sentence, wtoken with the largest value corresponding to each token can be selected, and the token is used as the token (target word) represented by the current token.
As an alternative embodiment, analyzing at least one target word based on the word stock to obtain a question word constituting a question sentence of a next question, including: encoding the word segmentation result to obtain the hidden state of each word segmentation; decoding the hidden state to obtain a decoding result; obtaining state information of the problem words at the current position in the problem statement of the next question according to the decoding result and the generated problem words; and determining the question words forming the current position in the question sentence of the next question according to the state information.
Specifically, the above scheme encodes the word segmentation result, which may be that the sentence vector of the word segmentation result is encoded, and the obtained hidden state carries the semantic information of the question-answer sentence. The hidden state can be decoded through an attention machine system, so that state information of the words to be generated is obtained. The state information here may include feature information of a question-answer sentence obtained by encoding and decoding a sentence vector, and specifically what feature information may be determined according to a set attention mechanism.
In an alternative embodiment, as shown in FIG. 3, the sentence is segmented to obtain Namely, sentence vectors corresponding to word segmentation results are encoded by an encoder to obtain h1 and h2 … … hN, namely hidden states obtained by encoding, and are decoded by an attention mechanism to obtain S1 and S2 … … SM, namely state information of the words to be generated, and the prediction of the problem words at the current position can be performed based on the state information.
As an alternative embodiment, obtaining the state information of the question word at the current position in the question sentence of the next question according to the decoding result and the generated question word, including: predicting a first probability distribution of a problem word at a current position on the basis of state information, wherein the first probability distribution is used for representing the probability that the problem word at the current position belongs to any one phrase class, and the word stock is divided into a plurality of phrase classes; predicting a second probability distribution of the current position about the words based on the state information, wherein the second probability distribution is used for representing posterior distribution of any word at the current position; obtaining joint distribution of the current position relative to the word category and the word according to the first probability distribution and the second probability distribution; and determining the word with the highest probability value in the joint distribution as the problem word at the current position.
In the scheme, firstly, the probability of the problem word of the next question sentence at the current position belongs to each phrase category is determined, then under each phrase category, the probability of each word belonging to the phrase category if the problem word at the current position belongs to the phrase category is determined, so that the joint probability can be obtained based on the two probabilities, and the joint probability is used for describing the probability of the co-occurrence of two events, and therefore the joint probability is used for describing the probability that the current position belongs to a certain phrase category and a certain word in the phrase category.
It should be noted that, the final output joint distribution is actually probability data, and for convenience of comparison, the output probability data may be normalized, normalized in the interval of (0, 1), and then compared to determine the word with the largest probability value in the joint distribution.
Still referring to fig. 3, after the target word is predicted (i.e., topic prediction), the problem word at each location is determined according to the state information of the problem word at the current location through the above steps, and the output probability data is normalized, so as to obtain the problem word term N at each location, i.e.
As an alternative embodiment, the phrase category includes: query words, topic words, and common words, which are words other than the query words and topic words.
In the above scheme, the words in the word stock are classified into three types according to the predicted target words, and are respectively the query words, the topic words and the common words, which are shown in fig. 3, wherein the query words are fixed words, the topic words are the predicted target words, and the common words are other words excluding the query words and the topic words in the word stock. The three sub word banks are the phrase categories.
As an alternative embodiment, before acquiring the question-answer sentence to be fed back to the front-end device, the method further comprises: acquiring historical dialogue data received by front-end equipment; and determining target words of the first question according to the historical dialogue data, determining a question sentence of the first question based on the target words of the first question, and actively sending the question sentence to the front-end equipment.
Specifically, the historical dialogue data received by the front-end device may be historical dialogue data generated by the front-end device and the dialogue object, where the historical dialogue data may include question-answer sentences returned by the question-answer device to the dialogue object through the front-end device, and may also include question-answer sentences returned by the dialogue object to the question-answer device through the front-end device.
In an alternative embodiment, the topic of each piece of historical dialogue data may be extracted, the topic with the highest frequency of occurrence is selected as the target word of the first question and answer, and the question sentence of the first question is generated based on the target word. Because the topic with the highest occurrence frequency can be the topic of interest of the user, the topic is used as the target word to generate the question sentence of the first question, so that the interest of the user in answering the question asked by the question and answer equipment can be improved, and more data can be acquired.
In another alternative embodiment, the question-answering device may have a preset word of interest, after extracting the subject of each piece of history corresponding data, match the word of interest with the extracted subject, select the word of interest of the question-answering device as a target word from the extracted subject, and generate a question sentence of the first question based on the target word, so that not only can the question of the first question be related to the user, but also the question of the first question can be ensured to be the question of interest of the question-answering device, and further the question-answering device can grasp the question trend and obtain more information directionally.
The above proposal proposes a way to actively ask questions to the dialog object. In the scheme, the target words of the first question are determined through the historical dialogue data, and the question sentences of the first question are determined according to the target words of the first question, so that the effect that the question-answering equipment actively asks the user to acquire more information is achieved.
It should be noted that, the timing of sending the first question sentence to the user by the question answering device may have various setting manners. In an alternative embodiment, a question statement may be sent to the user for the first question at a specified point in time, e.g., a special date such as holiday, user birthday, etc., may be selected to initiate a stow question to the user. In another alternative embodiment, a preset trigger event may be set, when the user triggers the preset trigger event, a first question is initiated to the user, for example, taking an e-commerce platform as an example, the preset trigger event may be to initiate a return request, and when the system detects that the user initiates the return request, the first question may be initiated to the user.
As an alternative embodiment, predicting at least one target word according to the question-answer sentence includes: semantic analysis is carried out on the question-answer sentence, and the emotion tendencies of the question-answer sentence are determined, wherein the emotion tendencies comprise: positive and negative trends; if the emotion tendency is positive tendency, determining the target word as the target word of the last question; if the emotion tendency is negative, determining the target word of the question according to the target word of the question.
In the scheme, the target word of the next question is determined by carrying out semantic analysis on the question-answer sentence, and then the target sentence of the next question is determined.
The semantic analysis can be processed through a preset semantic analysis model, the result obtained by the semantic analysis model through the analysis of the question-answer sentence can be the probability that the emotion tendency of the question-answer sentence is positive, and the emotion tendency of the question-answer sentence can be determined according to a preset probability threshold. For example, the probability of outputting one question-answer sentence is 0.8, the preset probability threshold is 0.65, and the probability of the emotion tendency of the question-answer sentence being positive is greater than the probability threshold, so the emotion tendency of the question-answer sentence is positive.
Under the condition that the emotion tendency of the question-answering sentence is positive, the current theme of the current dialogue object is considered to be interested, or the dialogue object has certain excavatable information on the current theme, the current theme is confirmed to be continuously subjected to deep query, namely, the target word is not changed, and the query is continuously performed. Under the condition that the emotion tendency of the question-answering sentence is negative, the current dialogue object is considered to have low interest degree on the current theme, or the dialogue object does not have the excavatable information on the current theme, so that the replacement of the target word is determined, and the target word of the question is determined again according to the target word of the last question.
Fig. 4a is a schematic diagram of an interactive interface according to embodiment 1 of the present application, in conjunction with fig. 4a, still taking an e-commerce scenario as an example, where a target word of a first question is "double eleven", a question sentence of the first question is "please ask you to participate in a preferential activity of double eleven", if an answer sentence of a user is "participated in", it is determined that an emotion tendency of the answer sentence is positive, it may be continued to use "double eleven" as a target word to perform a next question, and if an answer sentence of the user is "none", it is determined that an emotion tendency of the answer sentence is negative, it is determined that a target word of the next question is redetermined according to "double eleven", and a redetermined manner may be a way of searching for a synonym, for example, it may be "double twelve" related to "double eleven" as a target word of the next question, and a next question sentence is constructed.
FIG. 4b is a schematic diagram of an infinite query according to embodiment 1 of the present application, and in combination with the schematic diagram shown in FIG. 4b, the question answering device determines a main question-1 of the first question according to a target word of the first question, after the user answers the main question-1, performs semantic analysis on an answer sentence of the user, if the answer sentence of the user includes a word related to the topic A-1, the question is continued based on A-1, if the answer sentence of the user includes a word related to the topic A-2, the question is continued based on A-2, and if the answer sentence of the user includes a word related to other topics, the question may also be continued based on other topics.
By way of example, taking the example where the master question-1 is the first question statement based on the "double eleven" target word, A-1 may be a logistic related question and A-2 may be a coupon related question. If the answer sentence of the user is analyzed to determine that the user is interested in the topic of the logistics, the question can be continuously asked based on the A-1, if the answer sentence of the word segmentation user is determined to be interested in the topic of the coupon, the question can be continuously asked based on the A-2, and the question can be continuously and longitudinally asked based on the target word of 'double eleven' by using the same analysis mode according to the answer of the user.
If the emotional tendency of the user's answer to a certain question sentence therein is a negative tendency, the single round ends, i.e. the question-answer with respect to the main question A-1 ends. At this time, if other main questions cannot be determined from the main question-1, the process is completely ended, and if the main question-2 can be determined from the main question-1, the switching question is asked to the user from the main question-2.
It should be noted that if, during the dialogue with the user, any one question does not receive the answer sentence of the user within the preset time, the dialogue may be terminated.
As an optional embodiment, the question-answer sentence is an answer sentence, and after predicting at least one target word according to the question-answer sentence, the method further includes: judging whether the answer sentence meets a preset termination condition or not; if the answer sentence meets the termination condition, terminating the question; if the answer sentence does not meet the termination condition, a step of predicting at least one target word according to the question-answer sentence is entered.
In the scheme, if the answer sentence of the user meets the preset termination condition, the question is terminated, otherwise, the step of predicting at least one target word according to the question-answer sentence is carried out to continue the question. The termination condition can be determined according to the requirement of the inquiry, and when the inquiry requirement of the user is met in the answer sentence of the user, the preset termination condition is determined to be met.
In an alternative embodiment, the query is used to obtain the emotional tendency of the user to a certain commodity, the termination condition may be that the emotional tendency of the commodity in a preset plurality of dimensions is contained in the answer sentence, and the query is stopped after the information is obtained. For example, it is necessary to obtain the opinion of the price and quality of the product by the user, and after the emotion information of the price and quality of the product by the user is obtained from the answer sentence, the inquiry can be stopped.
As an alternative embodiment, in the case that the value attribute value of the commodity is contained in the answer sentence, the termination condition includes: and the value attribute value in the answer sentence is lower than the preset attribute value corresponding to the commodity.
In the above scheme, when the question and answer is used for inquiring the price, if the price of the commodity contained in the answer sentence is too low, the inquiry is terminated. The preset attribute value corresponding to the commodity may be a preset commodity minimum price.
In an alternative embodiment, the question and answer device recommends a commodity air conditioner to the user, the user is interested in the air conditioner recommended by the question and answer device and inquires the price, the original price of the air conditioner is 2599, the preset minimum price of the air conditioner is 2399, if the price of the commodity proposed by the user is higher than 2399, the question and answer device can continue to inquire to prompt the user to purchase the air conditioner, and if the price proposed by the user is lower than 2399, the question and answer is terminated.
As an optional embodiment, predicting at least one target word according to the question-answer sentence includes: acquiring at least one of the following information of a dialogue object: location information, time information, and preference information; predicting the at least one target word according to at least one item of information of the dialogue object.
Specifically, the position information, the time information and the preference information are all used for representing the scene where the dialogue object is located, and the target word is determined according to the scene where the dialogue object is located, so that the effect of improving the user experience can be achieved.
When multiple items of information of the dialogue object are acquired, the priority of each item of information can be acquired, the target word is determined according to the information with the highest priority, or when the target words corresponding to the multiple items of information conflict with each other, the information with the highest priority is selected to determine the target word.
In an alternative embodiment, the location information of the user is Beijing, the time is winter, the target word can be a down jacket, and accordingly the down jacket is recommended to the user through a question, and the target word is the down jacket. Further, the preference information of the user includes that the user likes black clothes, so that black down jackets can be recommended to the user, and target words are black down jackets. In another alternative embodiment, where the user is located at home where the time is near christmas, the target word may be merchandise for indoor decoration of christmas, and the target word may be christmas, indoor decoration.
According to the scheme, the target words which are more matched with the scene where the user is located are determined by extracting the information of the dialogue object in multiple dimensions, so that the problem sentences determined according to the target words are more matched with the scene where the dialogue object is located, the interest of the dialogue object in answering the problems is stimulated, and the experience of using dialogue equipment is improved.
Example 2
According to an embodiment of the present application, there is further provided an embodiment of a method for processing question-answering data based on a question-answering device, and fig. 5 is a flowchart of another method for processing question-answering data based on a question-answering device according to embodiment 2 of the present application, and in combination with fig. 5, the method includes the steps of:
s21, historical behavior data of the dialogue object is obtained.
Specifically, the dialogue object is the user who dialogues with the question answering device, and the historical behavior of the dialogue object may include operation events of the user. Taking an e-commerce scenario as an example, the historical behavior data may include operations of browsing, joining shopping carts, paying, etc. of a user on an e-commerce website.
S23, determining a first question statement according to the historical behavior data, and actively sending the first question statement to the dialogue object.
In the scheme, the problem statement of the first question is determined according to the historical behavior data of the user, and the user is actively asked.
In an alternative embodiment, specified behavior data and question sentences corresponding to the specified behavior data are preset, when the specified behavior data appear in the historical behavior data of the user, the question sentences corresponding to the specified behavior data are determined to be question sentences for first question, and the question sentences are asked to the user.
In another alternative embodiment, the specified behavior data and the question sentences corresponding to the specified behavior data may still be preset, and when the number of times of occurrence of the specified behavior data in the historical behavior data of the user exceeds the preset number, the question sentences corresponding to the specified behavior data are determined to be question sentences for the first time, and the question is issued to the user.
S25, receiving an answer sentence of the dialogue object for answering the question sentence of the first question.
S27, determining a question sentence of the next question according to the answer sentence.
Any method for processing question-answering data based on question-answering equipment in embodiment 1 can be used in the above step S27, and the details are not repeated.
Therefore, the embodiment of the application determines the question statement of the first question based on the historical behavior data of the dialogue object by acquiring the historical behavior data of the dialogue object, thereby realizing the scheme of actively asking the user, and after receiving the answer statement of the dialogue object to the question statement of the first question, continuing to ask the user according to the answer statement, thereby realizing the infinite inquiry to the user.
As an alternative embodiment, determining a question statement of the first question according to the historical behavior data includes: searching preset trigger behavior data from the historical behavior data, wherein the trigger behavior data is used for triggering first questioning; according to the searched trigger behavior data, determining the problem statement corresponding to the trigger behavior data as the problem statement of the first question.
In an alternative embodiment, a preset trigger event may be set, when the user triggers the preset trigger event, a first question is initiated to the user, for example, taking an e-commerce platform as an example, the preset trigger event may be to initiate a return request, and when the system detects that the user initiates the return request, the first question may be initiated to the user.
According to the scheme, when the user executes the preset trigger behavior data, the first question is actively initiated to the user, so that the mining of the data is facilitated, and the analysis of the preset trigger behavior data is particularly facilitated.
As an optional embodiment, each target word is preset with a corresponding question sentence, and the first question sentence is actively sent to the dialogue object based on the target word of the first question, including: determining target words according to the historical behavior data; determining a problem statement preset with a target word as a problem statement of a first question; or predicting the question words constituting the question of the first question according to the word stock based on the target words, and obtaining the question words according to the prediction to constitute the question sentences of the first question.
In an alternative embodiment, the target word has a preset corresponding relation with a preset question sentence, and the question sentence corresponding to the target word is selected to ask the user.
In another alternative embodiment, any of the methods in embodiment 1 may be used to obtain the question sentence, which is not described herein.
It should be noted that, for simplicity of description, the foregoing method embodiments are all described as a series of acts, but it should be understood by those skilled in the art that the present invention is not limited by the order of acts described, as some steps may be performed in other orders or concurrently in accordance with the present invention. Further, those skilled in the art will also appreciate that the embodiments described in the specification are all preferred embodiments, and that the acts and modules referred to are not necessarily required for the present invention.
From the description of the above embodiments, it will be clear to a person skilled in the art that the method according to the above embodiments may be implemented by means of software plus the necessary general hardware platform, but of course also by means of hardware, but in many cases the former is a preferred embodiment. Based on such understanding, the technical solution of the present invention may be embodied essentially or in a part contributing to the prior art in the form of a software product stored in a storage medium (e.g. ROM/RAM, magnetic disk, optical disk) comprising several instructions for causing a terminal device (which may be a mobile phone, a computer, a server, or a network device, etc.) to perform the method of the various embodiments of the present invention.
Example 3
According to an embodiment of the present application, there is also provided a processing apparatus for question-answering device-based question-answering data for implementing the method for question-answering device-based question-answering data of embodiment 1, fig. 6 is a schematic diagram of a question-answering device-based question-answering data processing apparatus according to embodiment 3 of the present application, as shown in fig. 6, the apparatus 600 includes:
The obtaining module 602 is configured to obtain a question-answer sentence to be fed back to the front-end device, where the question-answer sentence includes at least one of the following: question sentences and answer sentences.
And a prediction module 604, configured to predict and obtain at least one target word according to the question-answer sentence.
The processing module 606 is configured to analyze and process at least one target word based on the word stock, so as to obtain a question word that constitutes a question sentence of the next question.
The combination module 608 is configured to combine the question words that constitute the question sentence of the next question, and generate the question sentence of the next question.
It should be noted that, the above-mentioned obtaining module 602, the predicting module 604, the processing module 606 and the combining module 608 correspond to the steps S21 to S27 in the embodiment 1, and the four modules are the same as the examples and application scenarios implemented by the corresponding steps, but are not limited to the disclosure of the above-mentioned embodiment one. It should be noted that the above module may be implemented as part of the apparatus in the computing device 10 provided in the first embodiment.
As an alternative embodiment, the prediction module includes: the word segmentation sub-module is used for segmenting the question and answer sentences to obtain word segmentation results of the question and answer sentences; the selecting submodule is used for selecting key words with preset parts of speech from the word segmentation result according to the parts of speech of each word in the word segmentation result; and the first prediction sub-module is used for predicting at least one target word according to the key word.
As an alternative embodiment, the prediction submodule includes: the searching unit is used for searching synonyms corresponding to the key words from the word stock; and the first determining unit is used for determining the synonym as at least one predicted target word.
As an alternative embodiment, the prediction module further comprises: the first determining submodule is used for determining that synonyms corresponding to key words do not exist in the word stock; the processing sub-module is used for carrying out vectorization processing on word segmentation results of the question-answer sentences to obtain sentence vectors corresponding to the question-answer sentences; and the second prediction submodule is used for predicting at least one target word according to a non-negative matrix factorization algorithm based on the statement vector.
As an alternative embodiment, the second prediction sub-module includes: the input unit is used for inputting the sentence vector into the non-negative matrix factorization algorithm model to obtain a probability matrix output by the non-negative matrix factorization algorithm model, wherein the probability matrix is used for predicting the probability that the candidate target word corresponding to the key word is the target word of the next question; and the second determining unit is used for determining the candidate target word with the highest probability as at least one target word.
As an alternative embodiment, the processing module includes: the coding sub-module is used for coding the word segmentation result to obtain the hidden state of each word segmentation; the decoding submodule is used for decoding the hidden state to obtain a decoding result; the obtaining sub-module is used for obtaining the state information of the problem words at the current position in the problem statement of the next question according to the decoding result and the generated problem words; and the second determining submodule is used for determining the problem words forming the current position in the problem statement of the next question according to the state information.
As an alternative embodiment, the obtaining submodule includes: the first prediction unit is used for predicting first probability distribution of the problem words at the current position about phrase types based on the state information, wherein the first probability distribution is used for representing probability that the problem words at the current position belong to any one phrase type, and the word stock is divided into a plurality of phrase types; a second prediction unit configured to predict a second probability distribution of the current position with respect to the word based on the state information, where the second probability distribution is used to represent a posterior distribution of the current position as any word; the third prediction unit is used for obtaining the joint distribution of the current position relative to the word category and the word according to the first probability distribution and the second probability distribution; and the third determining unit is used for determining that the word with the highest probability value in the joint distribution is the problem word at the current position.
As an alternative embodiment, the phrase category includes: query words, topic words, and common words, which are words other than the query words and topic words.
As an alternative embodiment, the above device further comprises: the historical dialogue data acquisition module is used for acquiring the historical dialogue data received by the front-end equipment before acquiring the question-answer sentence to be fed back to the front-end equipment; the active questioning module is used for determining target words of the first questioning according to the historical dialogue data, determining question sentences of the first questioning based on the target words of the first questioning, and actively sending the question sentences to the front-end equipment.
As an alternative embodiment, the prediction module includes: the analysis sub-module is used for carrying out semantic analysis on the question-answer sentences and determining emotion tendencies of the question-answer sentences, wherein the emotion tendencies comprise the following steps: positive and negative trends; the third determining submodule is used for determining that the target word is the target word of the last question if the emotion tendency is positive; and the fourth determination submodule is used for determining the target word of the question according to the target word of the question of the last time if the emotion tendency is negative.
As an alternative embodiment, the above device further comprises: the judging module is used for judging whether the answer sentence meets the preset termination condition after at least one target word is obtained according to the prediction of the question-answer sentence; the termination module is used for terminating the question if the answer sentence meets the termination condition; and the execution module is used for entering a step of predicting and obtaining at least one target word according to the question-answer sentence if the answer sentence does not meet the termination condition.
As an alternative embodiment, in the case where the value attribute value of the commodity is contained in the answer sentence, the termination condition includes: the value attribute value in the answer sentence is lower than the preset attribute value corresponding to the commodity.
As an alternative embodiment, the prediction module includes: the information acquisition sub-module is used for acquiring at least one item of information of the dialogue object: location information, time information, and preference information; and the third prediction sub-module is used for predicting at least one target word according to at least one item of information of the dialogue object.
Example 4
According to an embodiment of the present application, there is also provided a processing apparatus for question-answering device-based question-answering data for implementing the method for question-answering device-based question-answering data of embodiment 2, fig. 7 is a schematic diagram of a processing apparatus for question-answering device-based question-answering data according to embodiment 4 of the present application, as shown in fig. 7, the apparatus 700 includes:
the obtaining module 702 is configured to obtain historical behavior data of the dialog object.
And the questioning module 704 is configured to determine a question sentence of the first questioning according to the historical behavior data, and actively send the question sentence of the first questioning to the dialogue object.
A receiving module 706, configured to receive an answer sentence of the dialogue object answering the question sentence of the first question.
A determining module 708, configured to determine a question sentence of the next question according to the answer sentence.
It should be noted that, the above-mentioned obtaining module 702, the questioning module 704, the receiving module 706, and the determining module 708 correspond to steps S51 to S57 in embodiment 2, and the two modules are the same as the examples and application scenarios implemented by the corresponding steps, but are not limited to those disclosed in the above-mentioned embodiment one. It should be noted that the above module may be implemented as part of the apparatus in the computing device 10 provided in the first embodiment.
As an alternative embodiment, the questioning module comprises: the searching sub-module is used for searching preset triggering behavior data from the historical behavior data, wherein the triggering behavior data is used for triggering first questioning; the first determining sub-module is used for determining that the problem statement corresponding to the triggering behavior data is the problem statement of the first question according to the searched triggering behavior data.
As an alternative embodiment, the questioning module comprises: the second determining submodule is used for determining target words according to the historical behavior data; a third determining submodule, configured to determine a question sentence preset with the target word as a question sentence of the first question; or a prediction sub-module, which is used for predicting the question words forming the question questions of the first question according to the word stock based on the target words, and obtaining the question words according to the prediction to form the question sentences of the first question.
Example 5
Embodiments of the invention may provide a computing device, which may be any one of a group of computing devices. Alternatively, in this embodiment, the above-mentioned computing device may be replaced by a terminal device such as a mobile terminal.
Alternatively, in this embodiment, the computing device may be located in at least one network device of a plurality of network devices of the computer network.
In this embodiment, the above-described computing device may execute the program code of the following steps in the question-answering data processing method based on the question-answering device: acquiring a question-answer sentence to be fed back to the front-end equipment, wherein the question-answer sentence comprises at least one of the following: question sentences and answer sentences; predicting at least one target word according to the question-answer sentence; analyzing and processing at least one target word based on the word stock to obtain a question word forming a question sentence of the next question; and combining the question words constituting the question sentence of the next question to generate the question sentence of the next question.
Alternatively, FIG. 8 is a block diagram of a computing device according to embodiment 5 of the present invention. As shown in fig. 8, the computing device a may include: one or more (only one is shown) processors 802, memory 804, and a peripheral interface 806.
The memory may be used to store software programs and modules, such as program instructions/modules corresponding to the method and apparatus for processing question and answer data based on the question and answer device in the embodiments of the present invention, and the processor executes various functional applications and data processing by running the software programs and modules stored in the memory, that is, implements the method for processing question and answer data based on the question and answer device. The memory may include high-speed random access memory, and may also include non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some examples, the memory may further include memory remotely located with respect to the processor, which may be connected to terminal a through a network. Examples of such networks include, but are not limited to, the internet, intranets, local area networks, mobile communication networks, and combinations thereof.
The processor may call the information and the application program stored in the memory through the transmission device to perform the following steps: acquiring a question-answer sentence to be fed back to the front-end equipment, wherein the question-answer sentence comprises at least one of the following: question sentences and answer sentences; predicting at least one target word according to the question-answer sentence; analyzing and processing at least one target word based on the word stock to obtain a question word forming a question sentence of the next question; and combining the question words constituting the question sentence of the next question to generate the question sentence of the next question.
Optionally, the above processor may further execute program code for: word segmentation is carried out on the question-answer sentences to obtain word segmentation results of the question-answer sentences; selecting key words with preset parts of speech from the word segmentation result according to the parts of speech of each word in the word segmentation result; at least one target word is predicted from the key words.
Optionally, the above processor may further execute program code for: searching synonyms corresponding to the key words from the word stock; and determining the synonym as at least one predicted target word.
Optionally, the above processor may further execute program code for: determining that synonyms corresponding to key words do not exist in a word stock; carrying out vectorization processing on word segmentation results of the question-answer sentences to obtain sentence vectors corresponding to the question-answer sentences; at least one target word is predicted according to a non-negative matrix factorization algorithm based on the sentence vector.
Optionally, the above processor may further execute program code for: inputting the sentence vector into a non-negative matrix factorization algorithm model to obtain a probability matrix output by the non-negative matrix factorization algorithm model, wherein the probability matrix is used for predicting the probability that a candidate target word corresponding to a key word is the target word of the next question; and determining the candidate target word with the highest probability as at least one target word.
Optionally, the above processor may further execute program code for: encoding the word segmentation result to obtain the hidden state of each word segmentation; decoding the hidden state to obtain a decoding result; obtaining state information of the problem words at the current position in the problem statement of the next question according to the decoding result and the generated problem words; and determining the question words forming the current position in the question sentence of the next question according to the state information.
Optionally, the above processor may further execute program code for: predicting a first probability distribution of a problem word at a current position on the basis of state information, wherein the first probability distribution is used for representing the probability that the problem word at the current position belongs to any one phrase class, and the word stock is divided into a plurality of phrase classes; predicting a second probability distribution of the current position about the words based on the state information, wherein the second probability distribution is used for representing posterior distribution of any word at the current position; obtaining joint distribution of the current position relative to the word category and the word according to the first probability distribution and the second probability distribution; and determining the word with the highest probability value in the joint distribution as the problem word at the current position.
Optionally, the phrase category includes: query words, topic words, and common words, which are words other than the query words and topic words.
Optionally, the above processor may further execute program code for: before acquiring a question and answer sentence to be fed back to front-end equipment, acquiring historical dialogue data received by the front-end equipment; and determining target words of the first question according to the historical dialogue data, determining a question sentence of the first question based on the target words of the first question, and actively sending the question sentence to the front-end equipment.
Optionally, the above processor may further execute program code for: semantic analysis is carried out on the question-answer sentence, and the emotion tendencies of the question-answer sentence are determined, wherein the emotion tendencies comprise: positive and negative trends; if the emotion tendency is positive tendency, determining the target word as the target word of the last question; if the emotion tendency is negative, determining the target word of the question according to the target word of the question.
Optionally, the above processor may further execute program code for: the question-answer sentence is an answer sentence, and after at least one target word is obtained according to the prediction of the question-answer sentence, whether the answer sentence meets a preset termination condition is judged; if the answer sentence meets the termination condition, terminating the question; if the answer sentence does not meet the termination condition, a step of predicting at least one target word according to the question-answer sentence is entered.
Optionally, in the case that the value attribute value of the commodity is contained in the answer sentence, the termination condition includes: the value attribute value in the answer sentence is lower than the preset attribute value corresponding to the commodity.
Optionally, the above processor may further execute program code for: predicting at least one target word according to the question-answer sentence, including: acquiring at least one of the following information of a dialogue object: location information, time information, and preference information; at least one target word is predicted based on at least one item of information of the dialog object.
By adopting the embodiment of the invention, a scheme for processing the question-answering data based on the question-answering equipment is provided. The scheme obtains question-answer sentences to be fed back to the front-end equipment, wherein the question-answer sentences comprise at least one of the following: question sentences and answer sentences; predicting at least one target word according to the question-answer sentence; analyzing and processing at least one target word based on the word stock to obtain a question word forming a question sentence of the next question; and combining the question words constituting the question sentence of the next question to generate the question sentence of the next question. According to the scheme, the theme of the next question is determined according to the question-answering statement fed back to the front-end equipment, and then the whole question statement of the next question is predicted through the determined theme, so that the infinite question of the user can be achieved according to the answer of the user to the question, the scope of the theme of the question can be controlled, the trend of the whole dialogue can be controlled, the flexibility of the dialogue is improved, the problem that equipment for carrying out the question-answering can feed back corresponding answers to the questions provided by the user is solved, and in the implementation process of the scheme, the answers fed back in the question-answering process are preset, the answer content is limited, and the technical problem of poor flexibility of the question-answering process is caused.
It will be appreciated by those skilled in the art that the configuration shown in fig. 8 is merely illustrative, and the computing device may also be a terminal device such as a smart phone (e.g., an Android phone, an iOS phone, etc.), a tablet computer, a palm computer, a Mobile internet device (Mobile INTERNET DEVICES, MID), a PAD, etc. Fig. 8 is not limited to the structure of the electronic device. For example, computing device 80 may also include more or fewer components (e.g., network interfaces, display devices, etc.) than shown in FIG. 8, or have a different configuration than shown in FIG. 8.
Those of ordinary skill in the art will appreciate that all or part of the steps in the various methods of the above embodiments may be implemented by a program for instructing a terminal device to execute in association with hardware, the program may be stored in a computer readable storage medium, and the storage medium may include: flash disk, read-Only Memory (ROM), random-access Memory (Random Access Memory, RAM), magnetic disk or optical disk, etc.
Example 6
The embodiment of the invention also provides a storage medium. Alternatively, in this embodiment, the storage medium may be used to store program code executed by the method for processing question-answering data based on the question-answering device provided in the first embodiment.
Alternatively, in this embodiment, the storage medium may be located in any one of a group of computing devices in a computer network, or in any one of a group of mobile terminals.
Alternatively, in the present embodiment, the storage medium is configured to store program code for performing the steps of: acquiring a question-answer sentence to be fed back to the front-end equipment, wherein the question-answer sentence comprises at least one of the following: question sentences and answer sentences; predicting at least one target word according to the question-answer sentence; analyzing and processing at least one target word based on the word stock to obtain a question word forming a question sentence of the next question; and combining the question words constituting the question sentence of the next question to generate the question sentence of the next question.
Example 7
According to an embodiment of the present application, there is further provided an embodiment of a method for processing question-answering data based on a question-answering device, and fig. 9 is a flowchart of another method for processing question-answering data based on a question-answering device according to embodiment 7 of the present application, and in combination with the method shown in fig. 9, the method includes the steps of:
s91, actively sending a question sentence of the first question to the dialogue object.
Specifically, the dialogue object is the user who is conversed by the question answering device. In the scheme, the problem statement of the first question is determined according to the historical behavior data of the user, and the user is actively asked. The question statement of the first question may be determined based on the user's historical behavior, which may include operational events of the user. Taking an e-commerce scenario as an example, the historical behavior data may include operations of browsing, joining shopping carts, paying, etc. of a user on an e-commerce website.
In an alternative embodiment, the specified behavior data and the question sentences corresponding to the specified behavior data may be preset, and when the specified behavior data appears in the historical behavior data of the user, the question sentences corresponding to the specified behavior data are determined to be question sentences for first question, and the question is issued to the user. For example, the specified behavior data may be a behavior of deleting a commodity from a shopping cart, and after detecting that the user triggered the behavior of deleting a commodity from a shopping cart, a question sentence of first asking a question, that is, a question sentence corresponding to the behavior data, may be issued to the user: the reason for asking you to delete the merchandise is?
In another alternative embodiment, the specified behavior data and the question sentences corresponding to the specified behavior data may still be preset, and when the number of times of occurrence of the specified behavior data in the historical behavior data of the user exceeds the preset number, the question sentences corresponding to the specified behavior data are determined to be question sentences for the first time, and the question is issued to the user.
S93, receiving an answer sentence of the dialogue object for answering the question sentence of the first question.
S95, determining a question sentence of the next question according to the answer sentence.
Any method for processing question-answering data based on question-answering equipment in embodiment 1 can be used in the above step S95, and the details are not repeated.
Therefore, the embodiment of the application realizes infinite inquiry to the user by actively asking the user and continuously asking the user according to the answer sentence after receiving the answer sentence of the dialogue object to the question sentence of the first inquiry, thereby improving the flexibility of the question and answer process.
Example 8
According to an embodiment of the present application, there is also provided a processing apparatus for question-answering device-based question-answering data for implementing the method for question-answering device-based question-answering data of embodiment 7, fig. 10 is a schematic diagram of a processing apparatus for question-answering device-based question-answering data according to embodiment 3 of the present application, as shown in fig. 10, the apparatus 1000 includes:
The sending module 1002 is configured to actively send a question sentence of the first question to a preset dialog object.
A receiving module 1004, configured to receive an answer sentence of the dialogue object in answer to the question sentence of the first question.
A determining module 1006, configured to determine a question sentence of the next question according to the answer sentence.
Here, the above-mentioned transmitting module 1002, receiving module 1004, and determining module 1006 correspond to steps S91 to S95 in embodiment 7, and the three modules are the same as the examples and application scenarios implemented by the corresponding steps, but are not limited to the disclosure of the above-mentioned embodiment one. It should be noted that the above module may be implemented as part of the apparatus in the computing device 10 provided in the first embodiment.
Example 9
According to an embodiment of the present invention, there is also provided an intelligent terminal, including:
A processor; and
A memory, coupled to the processor, for providing instructions to the processor to process the following processing steps: actively sending a question sentence of a first question to a preset dialogue object; receiving an answer sentence of the dialogue object for answering the question sentence of the first question; and determining a question sentence of the next question according to the answer sentence.
The foregoing embodiment numbers of the present invention are merely for the purpose of description, and do not represent the advantages or disadvantages of the embodiments.
In the foregoing embodiments of the present invention, the descriptions of the embodiments are emphasized, and for a portion of this disclosure that is not described in detail in this embodiment, reference is made to the related descriptions of other embodiments.
In the several embodiments provided in the present application, it should be understood that the disclosed technology may be implemented in other manners. The above-described embodiments of the apparatus are merely exemplary, and the division of the units, such as the division of the units, is merely a logical function division, and may be implemented in another manner, for example, multiple units or components may be combined or may be integrated into another system, or some features may be omitted, or not performed. Alternatively, the coupling or direct coupling or communication connection shown or discussed with each other may be through some interfaces, units or modules, or may be in electrical or other forms.
The units described as separate units may or may not be physically separate, and units shown as units 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 may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
In addition, each functional unit in the embodiments of the present invention may be integrated in one processing unit, or each unit may exist alone physically, or two or more units may be integrated in one unit. The integrated units may be implemented in hardware or in software functional units.
The integrated units, if implemented in the form of software functional units and sold or used as stand-alone products, may be stored in a computer readable storage medium. Based on such understanding, the technical solution of the present invention may be embodied essentially or in part or all of the technical solution or in part in the form of a software product stored in a storage medium, including instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method according to the embodiments of the present invention. And the aforementioned storage medium includes: a usb disk, a Read-Only Memory (ROM), a random access Memory (RAM, random Access Memory), a removable hard disk, a magnetic disk, or an optical disk, or other various media capable of storing program codes.
The foregoing is merely a preferred embodiment of the present invention and it should be noted that modifications and adaptations to those skilled in the art may be made without departing from the principles of the present invention, which are intended to be comprehended within the scope of the present invention.

Claims (20)

1. A method for processing question-answering data based on question-answering equipment, comprising:
Acquiring a question-answer sentence to be fed back to the front-end equipment, wherein the question-answer sentence comprises at least one of the following: question sentences and answer sentences;
predicting and obtaining at least one target word according to the question-answer sentence;
Analyzing and processing the at least one target word based on the word stock to obtain a question word forming a question sentence of the next question;
combining the question words constituting the question sentence of the next question to generate the question sentence of the next question;
Wherein, predicting and obtaining at least one target word according to the question-answer sentence comprises the following steps: word segmentation is carried out on the question-answer sentences to obtain word segmentation results of the question-answer sentences; selecting key words with preset parts of speech from the word segmentation result according to the parts of speech of each word in the word segmentation result; predicting at least one target word according to the key word;
analyzing and processing the at least one target word based on the word stock to obtain a question word forming a question sentence of the next question, including: encoding the word segmentation result to obtain the hidden state of each word segmentation; decoding the hidden state to obtain a decoding result; obtaining state information of the problem words at the current position in the problem statement of the next question according to the decoding result and the generated problem words; and determining the question words forming the current position in the question sentence of the next question according to the state information.
2. The method of claim 1, wherein predicting at least one of the target terms from the key terms comprises:
Searching synonyms corresponding to the key words from the word stock;
and determining the synonym as at least one predicted target word.
3. The method of claim 1, wherein predicting at least one target term from the question-answer sentence further comprises:
Determining that synonyms corresponding to the key words do not exist in the word stock;
vectorizing the word segmentation result of the question-answer sentence to obtain a sentence vector corresponding to the question-answer sentence;
predicting at least one of the target words according to a non-negative matrix factorization algorithm based on the sentence vector.
4. The method of claim 3, wherein predicting at least one of the target words according to a non-negative matrix factorization algorithm based on the sentence vector comprises:
Inputting the sentence vector into the non-negative matrix factorization algorithm model to obtain a probability matrix output by the non-negative matrix factorization algorithm model, wherein the probability matrix is used for predicting the probability that the candidate target word corresponding to the key word is the target word of the next question;
and determining the candidate target word with the highest probability as at least one target word.
5. The method of claim 1, wherein obtaining the status information of the question word at the current position in the question sentence of the next question according to the decoding result and the generated question word comprises:
Predicting a first probability distribution of the problem words at the current position about phrase categories based on the state information, wherein the first probability distribution is used for representing the probability that the problem words at the current position belong to any one phrase category, and the word stock is divided into a plurality of phrase categories;
Predicting a second probability distribution of the current position about words based on the state information, wherein the second probability distribution is used for representing posterior distribution of the current position as any word;
obtaining joint distribution of the current position relative to the word category and the word according to the first probability distribution and the second probability distribution;
And determining the word with the highest probability value in the joint distribution as the problem word of the current position.
6. The method of claim 5, wherein the phrase category comprises: the system comprises query words, topic words and common words, wherein the common words are other words except the query words and the topic words.
7. The method of claim 1, wherein prior to obtaining the question-answer sentence to be fed back to the front-end device, the method further comprises:
acquiring historical dialogue data received by the front-end equipment;
And determining target words of the first question according to the historical dialogue data, determining a question sentence of the first question based on the target words of the first question, and actively sending the question sentence to the front-end equipment.
8. The method of claim 1, wherein predicting at least one target term from the question-answer sentence comprises:
carrying out semantic analysis on the question-answer sentence, and determining the emotion tendencies of the question-answer sentence, wherein the emotion tendencies comprise: positive and negative trends;
If the emotion tendency is positive tendency, determining that the target word is the target word of the last question;
and if the emotion tendency is negative, determining the target word of the question according to the target word of the question.
9. The method of claim 1, wherein the question-answer sentence is an answer sentence, and wherein after predicting at least one target word from the question-answer sentence, the method further comprises:
Judging whether the answer sentence meets a preset termination condition or not;
If the answer sentence meets the termination condition, terminating the question;
if the answer sentence does not meet the termination condition, a step of predicting at least one target word according to the question-answer sentence is entered.
10. The method according to claim 9, wherein in the case where the value attribute value of the commodity is contained in the answer sentence, the termination condition includes: and the value attribute value in the answer sentence is lower than the preset attribute value corresponding to the commodity.
11. The method of claim 1, wherein predicting at least one target term from the question-answer sentence comprises:
acquiring at least one of the following information of a dialogue object: location information, time information, and preference information;
predicting the at least one target word based on the at least one item of information of the dialog object.
12. A method for processing question-answering data based on question-answering equipment, comprising:
acquiring historical behavior data of a dialogue object;
determining a first question statement according to the historical behavior data, and actively sending the first question statement to the dialogue object;
receiving an answer sentence of the dialogue object for answering the question sentence of the first question;
Determining a question sentence of the next question according to the answer sentence;
wherein, determining the question sentence of the next question according to the answer sentence comprises: word segmentation is carried out on the answer sentence, and a word segmentation result of the answer sentence is obtained; selecting key words with preset parts of speech from the word segmentation result according to the parts of speech of each word in the word segmentation result; predicting at least one target word according to the key word; analyzing and processing the at least one target word based on the word stock to obtain the question word of the question sentence of the next question, including: encoding the word segmentation result to obtain the hidden state of each word segmentation; decoding the hidden state to obtain a decoding result; obtaining state information of the problem words at the current position in the problem statement of the next question according to the decoding result and the generated problem words; and determining the question words forming the current position in the question sentence of the next question according to the state information.
13. The method of claim 12, wherein determining a question statement for a first question based on the historical behavioral data comprises:
searching preset trigger behavior data from the historical behavior data, wherein the trigger behavior data is used for triggering the first questioning;
And according to the searched trigger behavior data, determining the problem statement corresponding to the trigger behavior data as the problem statement of the first question.
14. The method of claim 12, wherein determining a question statement for a first question based on the historical behavioral data comprises:
determining target words according to the historical behavior data;
Determining a problem statement preset with the target word as the problem statement of the first question; or (b)
And predicting the question words constituting the question questions of the first question according to the word stock based on the target words, and obtaining the question words according to the prediction to constitute the question sentences of the first question.
15. A question-answering data processing apparatus based on a question-answering device, comprising:
The acquisition module is used for acquiring a question-answer sentence to be fed back to the front-end equipment, wherein the question-answer sentence comprises at least one of the following: question sentences and answer sentences;
The prediction module is used for predicting and obtaining at least one target word according to the question-answer sentence;
The processing module is used for analyzing and processing the at least one target word based on the word stock to obtain a problem word forming a problem sentence of the next question;
The combination module is used for combining the problem words forming the problem statement of the next question and generating the problem statement of the next question;
The prediction module is further used for predicting at least one target word according to the question-answer sentence by executing the following steps: word segmentation is carried out on the question-answer sentences to obtain word segmentation results of the question-answer sentences; selecting key words with preset parts of speech from the word segmentation result according to the parts of speech of each word in the word segmentation result; predicting at least one target word according to the key word;
The processing module is further configured to analyze the at least one target word based on the word stock to obtain a question word that constitutes a question sentence of a next question by performing the following steps: encoding the word segmentation result to obtain the hidden state of each word segmentation; decoding the hidden state to obtain a decoding result; obtaining state information of the problem words at the current position in the problem statement of the next question according to the decoding result and the generated problem words; and determining the question words forming the current position in the question sentence of the next question according to the state information.
16. A question-answering data processing apparatus based on a question-answering device, comprising:
the acquisition module is used for acquiring historical behavior data of the dialogue object;
The questioning module is used for determining a question sentence of the first questioning according to the historical behavior data and actively sending the question sentence of the first questioning to the dialogue object;
The receiving module is used for receiving an answer sentence of the dialogue object for answering the question sentence of the first question;
the determining module is used for determining a question sentence of the next question according to the answer sentence;
The determining module is further configured to determine a question sentence of a next question according to the answer sentence by performing the following steps: word segmentation is carried out on the answer sentence, and a word segmentation result of the answer sentence is obtained; selecting key words with preset parts of speech from the word segmentation result according to the parts of speech of each word in the word segmentation result; predicting at least one target word according to the key word; analyzing and processing the at least one target word based on the word stock to obtain the question word of the question sentence of the next question, including: encoding the word segmentation result to obtain the hidden state of each word segmentation; decoding the hidden state to obtain a decoding result; obtaining state information of the problem words at the current position in the problem statement of the next question according to the decoding result and the generated problem words; and determining the question words forming the current position in the question sentence of the next question according to the state information.
17. A storage medium comprising a stored program, wherein the program, when run, controls a device on which the storage medium resides to perform the steps of:
Acquiring a question-answer sentence to be fed back to the front-end equipment, wherein the question-answer sentence comprises at least one of the following: question sentences and answer sentences;
predicting and obtaining at least one target word according to the question-answer sentence;
Analyzing and processing the at least one target word based on the word stock to obtain a question word forming a question sentence of the next question;
combining the question words constituting the question sentence of the next question to generate the question sentence of the next question;
Wherein, predicting and obtaining at least one target word according to the question-answer sentence comprises the following steps: word segmentation is carried out on the question-answer sentences to obtain word segmentation results of the question-answer sentences; selecting key words with preset parts of speech from the word segmentation result according to the parts of speech of each word in the word segmentation result; predicting at least one target word according to the key word;
analyzing and processing the at least one target word based on the word stock to obtain a question word forming a question sentence of the next question, including: encoding the word segmentation result to obtain the hidden state of each word segmentation; decoding the hidden state to obtain a decoding result; obtaining state information of the problem words at the current position in the problem statement of the next question according to the decoding result and the generated problem words; and determining the question words forming the current position in the question sentence of the next question according to the state information.
18. A processor for running a program, wherein the program when run performs the steps of:
Acquiring a question-answer sentence to be fed back to the front-end equipment, wherein the question-answer sentence comprises at least one of the following: question sentences and answer sentences;
predicting and obtaining at least one target word according to the question-answer sentence;
Analyzing and processing the at least one target word based on the word stock to obtain a question word forming a question sentence of the next question;
combining the question words constituting the question sentence of the next question to generate the question sentence of the next question;
Wherein, predicting and obtaining at least one target word according to the question-answer sentence comprises the following steps: word segmentation is carried out on the question-answer sentences to obtain word segmentation results of the question-answer sentences; selecting key words with preset parts of speech from the word segmentation result according to the parts of speech of each word in the word segmentation result; predicting at least one target word according to the key word;
analyzing and processing the at least one target word based on the word stock to obtain a question word forming a question sentence of the next question, including: encoding the word segmentation result to obtain the hidden state of each word segmentation; decoding the hidden state to obtain a decoding result; obtaining state information of the problem words at the current position in the problem statement of the next question according to the decoding result and the generated problem words; and determining the question words forming the current position in the question sentence of the next question according to the state information.
19. A method for processing question-answering data based on question-answering equipment, comprising:
Actively sending a question sentence of a first question to a preset dialogue object;
receiving an answer sentence of the dialogue object for answering the question sentence of the first question;
Determining a question sentence of the next question according to the answer sentence;
wherein, determining the question sentence of the next question according to the answer sentence comprises: word segmentation is carried out on the answer sentence, and a word segmentation result of the answer sentence is obtained; selecting key words with preset parts of speech from the word segmentation result according to the parts of speech of each word in the word segmentation result; predicting at least one target word according to the key word; analyzing and processing the at least one target word based on the word stock to obtain the question word of the question sentence of the next question, including: encoding the word segmentation result to obtain the hidden state of each word segmentation; decoding the hidden state to obtain a decoding result; obtaining state information of the problem words at the current position in the problem statement of the next question according to the decoding result and the generated problem words; and determining the question words forming the current position in the question sentence of the next question according to the state information.
20. An intelligent terminal, characterized by comprising:
A processor; and
A memory, coupled to the processor, for providing instructions to the processor to process the following processing steps:
Actively sending a question sentence of a first question to a preset dialogue object;
receiving an answer sentence of the dialogue object for answering the question sentence of the first question;
Determining a question sentence of the next question according to the answer sentence;
wherein, determining the question sentence of the next question according to the answer sentence comprises: word segmentation is carried out on the answer sentence, and a word segmentation result of the answer sentence is obtained; selecting key words with preset parts of speech from the word segmentation result according to the parts of speech of each word in the word segmentation result; predicting at least one target word according to the key word; analyzing and processing the at least one target word based on the word stock to obtain the question word of the question sentence of the next question, including: encoding the word segmentation result to obtain the hidden state of each word segmentation; decoding the hidden state to obtain a decoding result; obtaining state information of the problem words at the current position in the problem statement of the next question according to the decoding result and the generated problem words; and determining the question words forming the current position in the question sentence of the next question according to the state information.
CN201911382071.1A 2019-12-27 2019-12-27 Question and answer data processing method and device based on question and answer equipment Active CN113051375B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201911382071.1A CN113051375B (en) 2019-12-27 2019-12-27 Question and answer data processing method and device based on question and answer equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201911382071.1A CN113051375B (en) 2019-12-27 2019-12-27 Question and answer data processing method and device based on question and answer equipment

Publications (2)

Publication Number Publication Date
CN113051375A CN113051375A (en) 2021-06-29
CN113051375B true CN113051375B (en) 2024-06-14

Family

ID=76507115

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201911382071.1A Active CN113051375B (en) 2019-12-27 2019-12-27 Question and answer data processing method and device based on question and answer equipment

Country Status (1)

Country Link
CN (1) CN113051375B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113988070B (en) * 2021-10-09 2023-05-05 广州快决测信息科技有限公司 Investigation problem generation method, investigation problem generation device, computer equipment and storage medium

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107704563A (en) * 2017-09-29 2018-02-16 广州多益网络股份有限公司 A kind of question sentence recommends method and system

Family Cites Families (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108153780B (en) * 2016-12-05 2021-11-23 阿里巴巴集团控股有限公司 Man-machine conversation device and method for realizing man-machine conversation
JP2018185661A (en) * 2017-04-26 2018-11-22 トヨタ自動車株式会社 Text analysis and presentation method
CN109697228A (en) * 2018-12-13 2019-04-30 平安科技(深圳)有限公司 Intelligent answer method, apparatus, computer equipment and storage medium
CN110059174B (en) * 2019-04-28 2023-05-30 科大讯飞股份有限公司 Query guiding method and device
CN110110048B (en) * 2019-05-10 2023-06-02 科大讯飞股份有限公司 Query guiding method and device
CN110348006A (en) * 2019-06-11 2019-10-18 平安科技(深圳)有限公司 Generation method, device, computer equipment and its storage medium of problem information
CN110472045B (en) * 2019-07-11 2023-02-03 中山大学 Short text false problem classification prediction method and device based on document embedding

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107704563A (en) * 2017-09-29 2018-02-16 广州多益网络股份有限公司 A kind of question sentence recommends method and system

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
中文口语开放域问答***中问句分析处理方法的研讨;何晓彦;黄家琳;;北京工商大学学报(自然科学版);20071115(06);全文 *

Also Published As

Publication number Publication date
CN113051375A (en) 2021-06-29

Similar Documents

Publication Publication Date Title
US12010073B2 (en) Systems and processes for operating and training a text-based chatbot
CN108153876B (en) Intelligent question and answer method and system
CN110008322B (en) Method and device for recommending dialogues in multi-turn conversation scene
US11735163B2 (en) Human-machine dialogue method and electronic device
CN108536852B (en) Question-answer interaction method and device, computer equipment and computer readable storage medium
US20200301954A1 (en) Reply information obtaining method and apparatus
CN110083693B (en) Robot dialogue reply method and device
CN111552880A (en) Data processing method, device and medium based on knowledge graph and electronic equipment
CN111914179B (en) Semantic-based fuzzy search method and device, storage medium and electronic equipment
CN113360622B (en) User dialogue information processing method and device and computer equipment
CN103970791B (en) A kind of method, apparatus for recommending video from video library
CN109460503B (en) Answer input method, answer input device, storage medium and electronic equipment
CN108846030B (en) method, system, electronic device and storage medium for visiting official website
CN110399473B (en) Method and device for determining answers to user questions
CN112183098B (en) Session processing method and device, storage medium and electronic device
CN110457454A (en) A kind of dialogue method, server, conversational system and storage medium
CN111475632A (en) Question processing method and device, electronic equipment and storage medium
CN110489519B (en) Session method based on session prediction model and related products
CN115658889A (en) Dialogue processing method, device, equipment and storage medium
CN113051375B (en) Question and answer data processing method and device based on question and answer equipment
CN112307166B (en) Intelligent question-answering method and device, storage medium and computer equipment
CN110377803B (en) Information processing method and device
CN111506717A (en) Question answering method, device, equipment and storage medium
CN107562788B (en) Interaction method, interaction device and computer-readable storage medium
CN110535749B (en) Dialogue pushing method and device, electronic equipment and storage medium

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