CN112395396A - Question-answer matching and searching method, device, system and storage medium - Google Patents

Question-answer matching and searching method, device, system and storage medium Download PDF

Info

Publication number
CN112395396A
CN112395396A CN201910739811.6A CN201910739811A CN112395396A CN 112395396 A CN112395396 A CN 112395396A CN 201910739811 A CN201910739811 A CN 201910739811A CN 112395396 A CN112395396 A CN 112395396A
Authority
CN
China
Prior art keywords
answer
vector
question
matched
candidate
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN201910739811.6A
Other languages
Chinese (zh)
Inventor
谢韬
秦昌博
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Ecovacs Robotics Suzhou Co Ltd
Ecovacs Commercial Robotics Co Ltd
Original Assignee
Ecovacs Robotics Suzhou Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Ecovacs Robotics Suzhou Co Ltd filed Critical Ecovacs Robotics Suzhou Co Ltd
Priority to CN201910739811.6A priority Critical patent/CN112395396A/en
Publication of CN112395396A publication Critical patent/CN112395396A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/30Information retrieval; Database structures therefor; File system structures therefor of unstructured textual data
    • G06F16/33Querying
    • G06F16/332Query formulation
    • G06F16/3329Natural language query formulation or dialogue systems

Abstract

The embodiment of the application provides a question-answer matching and searching method, device and system and a storage medium. In the embodiment of the application, firstly, vectorization processing is carried out on the problem to be matched to obtain a corresponding problem vector; then, searching the question vector in the known answer vector to obtain at least one candidate answer vector; and obtaining the answer of the question to be matched from the answers corresponding to the at least one candidate answer vector. The question-answer matching mode directly matches the question vectors with the answer vectors without inquiring the existing questions, can save the question-answer matching time and further is beneficial to improving the question-answer matching efficiency.

Description

Question-answer matching and searching method, device, system and storage medium
Technical Field
The present application relates to the field of artificial intelligence technologies, and in particular, to a method, device, system, and storage medium for question and answer matching and search.
Background
Currently, in many application scenarios, there is a question-answer matching requirement. For example, a user may initiate a question inquiry to the question and answer platform through the intelligent terminal, and the question and answer platform needs to match a suitable answer to a question inquired by the user and return the answer to the user. For another example, in a human-computer interaction system, a user may perform a voice question-answer interaction with a robot.
The existing question-answer matching method generally includes matching a user question with an existing question, finding an existing question matched with the user question, and returning an answer corresponding to the existing question to the user. However, the efficiency of the question-answer matching method is low.
Disclosure of Invention
Various aspects of the present application provide a question and answer matching and searching method, device, system, and storage medium to save the question and answer matching time, thereby contributing to improving the question and answer matching efficiency.
The embodiment of the application provides a question-answer matching method, which comprises the following steps:
obtaining a problem to be matched;
vectorizing the problem to be matched to obtain a problem vector;
retrieving the question vector in a known answer vector to obtain at least one candidate answer vector;
and obtaining the answer of the question to be matched from the answers corresponding to the at least one candidate answer vector.
An embodiment of the present application provides a computer device, including: a memory and a processor; the memory is used for storing a computer program, a known answer vector and an answer corresponding to the known answer vector;
the processor is coupled to the memory for executing the computer program for:
obtaining a problem to be matched; vectorizing the problem to be matched to obtain a problem vector; retrieving the question vector in a known answer vector to obtain at least one candidate answer vector; and obtaining the answer of the question to be matched from the answers corresponding to the at least one candidate answer vector.
An embodiment of the present application further provides a terminal device, including: a memory, a processor, and a communications component;
wherein the memory is used for storing a computer program;
the processor is coupled to the memory for executing the computer program for:
sending a question to be matched to server equipment, so that the server equipment retrieves the question vector of the question to be matched from a known answer vector to obtain an answer of the question to be matched and returns the answer;
and receiving an answer of the question to be matched.
An embodiment of the present application further provides a question-answer matching system, including: the system comprises terminal equipment and server-side equipment;
the terminal device is used for sending a problem to be matched to the server device;
the server device is configured to: vectorizing the problem to be matched to obtain a problem vector; retrieving the question vector in a known answer vector to obtain at least one candidate answer vector; obtaining answers of the questions to be matched from answers corresponding to the at least one candidate answer vector; and returning the answer of the question to be matched to the terminal equipment.
Embodiments of the present application also provide a computer-readable storage medium storing computer instructions, which, when executed by one or more processors, cause the one or more processors to perform the steps of the above question-answer matching method.
The embodiment of the present application further provides a search method, including:
acquiring a keyword to be searched;
vectorizing the keywords to be searched to obtain keyword vectors;
searching the keyword vector in a known information vector to obtain at least one candidate information vector;
and obtaining a search result corresponding to the keyword to be searched from the information corresponding to the at least one candidate information vector.
An embodiment of the present application further provides a computer device, including: a memory and a processor;
the memory is used for storing a computer program, a known information vector and information corresponding to the known information vector;
the processor is coupled to the memory for executing the computer program for: acquiring a keyword to be searched; vectorizing the keywords to be searched to obtain keyword vectors; searching the keyword vector in a known information vector to obtain at least one candidate information vector; and obtaining a search result corresponding to the keyword to be searched from the information corresponding to the at least one candidate information vector.
Embodiments of the present application also provide a computer-readable storage medium storing computer instructions, which, when executed by one or more processors, cause the one or more processors to perform the steps of the above-mentioned search method.
In the embodiment of the application, firstly, vectorization processing is carried out on the problem to be matched to obtain a corresponding problem vector; then, searching the question vector in the known answer vector to obtain at least one candidate answer vector; and obtaining the answer of the question to be matched from the answers corresponding to the at least one candidate answer vector. The question-answer matching mode directly matches the question vectors with the answer vectors without inquiring the existing questions, can save the question-answer matching time and further is beneficial to improving the question-answer matching efficiency.
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 application, illustrate embodiment(s) of the application and together with the description serve to explain the application and not to limit the application. In the drawings:
fig. 1 is a schematic flow chart of a question-answer matching method according to an embodiment of the present disclosure;
fig. 2a and fig. 2b are schematic diagrams illustrating answer space division provided in the embodiment of the present application;
fig. 3 is a schematic structural diagram of a computer device according to an embodiment of the present application;
fig. 4a is a schematic structural diagram of a terminal device according to an embodiment of the present application;
fig. 4b is a schematic structural diagram of a question-answer matching system according to an embodiment of the present application;
fig. 5 is a schematic flowchart of a searching method according to an embodiment of the present application;
fig. 6 is a schematic structural diagram of another computer device according to an embodiment of the present application.
Detailed Description
In order to make the objects, technical solutions and advantages of the present application more apparent, the technical solutions of the present application will be described in detail and completely with reference to the following specific embodiments of the present application and the accompanying drawings. It should be apparent that the described embodiments are only some of the embodiments of the present application, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
Aiming at the technical problem that the existing question-answering matching efficiency is low, the embodiment of the application provides a solution, and the basic idea is as follows: firstly, vectorizing a problem to be matched to obtain a corresponding problem vector; then, searching the question vector in the known answer vector to obtain at least one candidate answer vector; and obtaining the answer of the question to be matched from the answers corresponding to the at least one candidate answer vector. The question-answer matching mode directly matches the question vectors with the answer vectors without inquiring the existing questions, can save the question-answer matching time and further is beneficial to improving the question-answer matching efficiency.
The technical solutions provided by the embodiments of the present application are described in detail below with reference to the accompanying drawings.
Fig. 1 is a schematic flow chart of a question-answer matching method according to an embodiment of the present application. As shown in fig. 1, the method includes:
101. and acquiring the problem to be matched.
102. And vectorizing the problem to be matched to obtain a problem vector.
103. The question vector is searched in the known answer vector to obtain at least one candidate answer vector.
104. And obtaining the answer of the question to be matched from the answers corresponding to the at least one candidate answer vector.
In this embodiment, the question to be matched is a question asked by the user. The implementation forms of the computer devices are different, and the ways of acquiring the problems to be matched are different. For example, in some embodiments, the computer device has voice recognition functionality, then the user may send a voice signal to the computer device that contains the question to be matched. Accordingly, the computer device can receive the voice signal and analyze the problem to be matched from the voice signal. In other embodiments, the computer device provides a human-machine interface through which a user may input questions to be matched. Correspondingly, the computer equipment responds to the operation of inputting the questions on the human-computer interaction interface by the user, and takes the questions input by the user as the questions to be matched. In these embodiments, the computer device may be a smart device such as a smartphone, wearable device, smart mirror, smart stereo, tablet, robot, and the like. In still other embodiments, the computer device is a server device, such as an online customer service or the like, and the computer device may receive the question sent by the user through the terminal device thereof, and take the received question as the question to be matched. The user can send the problem to be matched to the server side equipment in a plurality of modes such as a voice mode or a text mode through the terminal equipment.
Further, in step 102, the computer device performs vectorization processing on the problem to be matched to obtain a problem vector corresponding to the problem to be matched, so as to perform vectorization retrieval, where the vectorization retrieval is a manner of performing retrieval in a known answer vector by using the problem vector. The specific implementation of vectorizing the to-be-matched problem will be described below, and details are not repeated here. Further, in step 103, the question vector of the question to be matched may be retrieved from the known answer vector library to obtain at least one candidate answer vector. Then, in step 104, the answer to the question to be matched is obtained from the answers corresponding to the candidate answer vectors.
In this embodiment, the computer device stores a known answer vector. It is known that the number of answer vectors is plural, which means 2 or more than 2. Each answer vector corresponds to an answer. The more the number of the answer vectors is, the richer the answer library is, and the higher the accuracy of the answers matched for the questions to be matched is.
Optionally, in some embodiments, after obtaining the answer corresponding to the question to be matched, the answer corresponding to the question to be matched may also be output to the user. In this embodiment, a manner in which the computer device outputs the answer corresponding to the question to be matched is not limited. For example, in some embodiments, the computer device may play the answer to the question to be matched through an audio component thereon. In other embodiments, the computer device presents answers to the questions to be matched on its human-computer interface. In still other embodiments, the computer device is a server device, such as an online customer service, and the computer device sends the answer to the question to be matched to the terminal device of the user, so that the user can obtain the answer to the question to be matched. The computer device can send the answer of the question to be matched to the terminal device of the user in a plurality of modes such as a voice mode or a text mode.
In this embodiment, firstly, vectorization processing is performed on a problem to be matched to obtain a corresponding problem vector; then, searching the question vector in the known answer vector to obtain at least one candidate answer vector; and obtaining the answer of the question to be matched from the answers corresponding to the at least one candidate answer vector. The question-answer matching mode directly matches the question vectors with the answer vectors without inquiring the existing questions, can save the question-answer matching time and further is beneficial to improving the question-answer matching efficiency.
On the other hand, for computer equipment, the problem corresponding to the known answer does not need to be stored, so that the storage space can be saved, and the utilization rate of the storage space is improved.
Further, for the way of matching the question to be matched with the existing question to obtain the answer to the question to be matched, a large number of known question-answer pairs are required for matching. If it is known that there is no listed question to be matched in the question, the question-answer matching method may not be able to obtain the answer to the question to be matched. The question-answer matching method provided by this embodiment matches the question vector with the answer vector, so that the probability of failure in matching can be reduced, and when the corpus is increased, only the answer needs to be added, so that the workload can be reduced.
It should be noted that, in the embodiments of the present application, the question to be matched is not limited to the question asked in a question manner, but may also be the last sentence in a normal conversation. Accordingly, the answer to the question to be matched may be the next sentence in the dialog. For example, the upper sentence is "today weather true good"; the answer is 'yes, much mood' and the like.
In some embodiments, when vectorizing the problem to be matched, word segmentation processing may be performed on the problem to be matched to obtain a word vector corresponding to the problem to be matched. The word in the word segmentation process may be a word or a word. Wherein the words are to be understood as: for Chinese, a word can be a word; for English, a word may be an English word, and so on. And then, carrying out coding conversion processing on the word vector corresponding to the problem to be matched to obtain a problem vector corresponding to the problem to be matched. Optionally, word vector models such as a word2vec model, an embedded from language model (ELMo model), a generated forward training (GPT) model, or a deformer-based Bidirectional Encoding Representation (BERT) model may be used to vectorize the matching problem.
Further, before vectorizing the problem to be matched by using a word2vec model, an ELMo model, a GPT model or a BERT model, the word vector models need to be trained. Preferably, the word-vector model may be trained either feature-based or fine-tuning (fine-tuning) based methods. For example, for the BERT model, the BERT model may be fine-tuned and trained using sample problems. The BERT model uses word block embedding (WordPiece embedding) as a word vector, and adds a position vector and a sentence segmentation vector.
Correspondingly, inputting the problem to be matched into the trained word vector model, and performing vectorization processing on the problem to be processed in the word vector model to obtain the problem vector of the problem to be matched.
Further, the question vector may be retrieved from the known answer vectors to obtain at least one candidate answer vector. In some embodiments, the similarity between the known answer vectors and the question vectors can be calculated; and selecting at least one candidate answer vector from the known answer vectors according to the similarity between the known answer vectors and the question vectors respectively. Preferably, an answer vector having a similarity greater than or equal to a preset similarity threshold with the question vector may be selected from the known answer vectors as the at least one candidate answer vector. Or, according to the number M of candidate answers, M answer vectors may be sequentially selected as at least one candidate answer vector in the order from high to low of the similarity between the known answer vector and the question vector. Wherein M is a positive integer. Preferably, M.gtoreq.2.
Alternatively, when calculating the similarity between the known answer vectors and the question vectors, the distances between the known answer vectors and the question vectors may be calculated, and the distances between the known answer vectors and the question vectors may be used as the similarity between the answer vectors and the question vectors. Alternatively, the cosine distance, euclidean distance, mahalanobis distance, mahhattan distance, hamming distance, etc. between the known answer vectors and the question vectors, respectively, may be calculated, but are not limited thereto.
In still other embodiments, the method of matching the question vector with the known answer vector one by one to obtain at least one candidate answer vector is considered to have higher complexity and lower search efficiency. In order to improve the search efficiency, in this embodiment, the known answer vector may be spatially divided by using an approximate nearest neighbor algorithm to obtain a multi-layer answer vector. The Approximate Nearest Neighbor (ANN) algorithm may be, but is not limited to, an Annoy algorithm, a locality sensitive hashing algorithm, a vector quantization algorithm, or a K Nearest Neighbor (KNN) algorithm.
Correspondingly, based on the multilayer answer vector, when the question vector is searched in the known answer vector, the target answer subspace to which the question vector belongs can be determined from the multilayer answer space according to the specified candidate answer quantity; further, at least one candidate answer vector is selected from the answer vectors contained in the target answer subspace. The retrieval mode can quickly find the target answer subspace to which the question answers belong, is favorable for improving the retrieval efficiency, and further improves the efficiency of subsequent question-answer matching.
Furthermore, the similarity between each answer vector contained in the target answer subspace and the question vector can be calculated, and at least one candidate answer feature vector is selected from the answer feature vectors in the target answer subspace according to the similarity between the answer vectors contained in the target answer subspace and the question feature vectors. Therefore, the problem vectors only need to be subjected to similarity calculation by the answer vectors in the target answer subspace, the calculation complexity can be reduced, the retrieval efficiency can be further improved, and the subsequent question-answer matching efficiency can be further improved. For a specific implementation of calculating the similarity between each answer vector included in the target answer subspace and the question vector and selecting at least one candidate answer feature vector from the answer feature vectors in the target answer subspace, reference may be made to the relevant contents of the above embodiments, which are not described herein again.
The following is an exemplary description of a specific embodiment of using the Annoy algorithm as an example to perform spatial partitioning on the known answer vector and to search the question vector in the known answer vector.
The Annoy algorithm may build the known answer vector into a binary tree, that is, the multi-level answer vector space is in a binary tree structure, and the time complexity of the search is reduced to o (logn) when the question vector is searched in the known answer vector. Where N is the number of known answer vectors. The following describes an exemplary process of performing spatial partitioning on the known answer vector by using the Annoy algorithm as an example, with reference to fig. 2a and 2 b. In fig. 2a and 2b, the known answer vectors are identified by dots for ease of illustration.
Step 1: two answer vectors are randomly selected from the known answer vectors, and the two answer vectors are used as initial central nodes to execute a K-means (K-means) clustering process with a clustering number of 2, and finally two converged clustering central vectors are generated, as shown in fig. 2a by five-pointed stars.
Step 2: the two cluster center vectors form a hyperplane (shown by the dotted line in fig. 2 a), and an equidistant vertical hyperplane of the hyperplane is established, as shown by the solid line in fig. 2a, and the equidistant vertical hyperplane divides the total space formed by the known answer vectors into two parts, namely, two answer subspaces, namely, a and B. I.e. the equidistant vertical hyperplane is the hyperplane 1 corresponding to the answer subspaces a and B.
And step 3: and (3) continuously dividing the divided answer subspaces by adopting the method in the step (2) to perform continuous recursive iteration until the number of the remaining answer vectors in each answer subspace is less than or equal to K. And K is the number of answer vectors which are contained in each preset answer subspace at most.
To this end, the known answer vector is divided into multiple layers of answer spaces, and the multiple layers of answer spaces form a binary tree. The root node of the binary tree represents a full space formed by known answer vectors, and left and right subtrees corresponding to the same father node in each layer of the binary tree respectively represent two answer subspaces divided by the answer space corresponding to the father node. For example, as shown in FIG. 2B, hyperplane 2 further divides the answer subspace A into answer subspaces A1 and A2, and hyperplane 3 further divides the answer subspace B into answer subspaces B1 and B2. Then, the left and right subtrees corresponding to the parent node a represent answer subspaces a1 and a2, respectively; the left and right subtrees corresponding to the parent node B represent answer subspaces B1 and B2, respectively.
In the embodiment of the present application, the answer space corresponding to the parent node is divided into the hyperplanes of the two answer subspaces, and is defined as the hyperplanes corresponding to the two answer subspaces. That is, the hyperplane corresponding to the answer subspaces A1 and A2 is hyperplane 2, and the hyperplane corresponding to the answer subspaces B1 and B2 is hyperplane 3.
Based on the binary tree, when a target answer subspace to which a question vector belongs is determined from a multi-layer answer space, determining the traversal direction of the binary tree according to the geometric relationship between the question vector corresponding to a question to be matched and hyperplanes corresponding to left and right subtrees of each layer on the binary tree, and traversing the binary tree along the traversal direction until a target subtree is found, wherein the number of answer vectors contained in the represented answer subspace is less than the number M of specified candidate answers; and taking the answer subspace represented by the parent node of the target subtree as the target answer subspace to which the question vector belongs. The target sub-tree, in which the number of answer vectors included in the represented answer subspace is less than the number M of the specified candidate answers, means: during traversal, the first-occurring represented answer subspace contains a number of answer vectors that is less than the given sub-tree of the number M of candidate answers.
For example, as shown in fig. 2a and 2B, answer subspaces a and B represent the left and right subtrees of the root node, respectively; answer subspaces A1 and A2 represent the left and right subtrees of parent node A, respectively; answer subspaces B1 and B2 represent the left and right subtrees of parent node B, respectively; when the traversal direction of the problem vector to the binary tree is determined, the geometric relationship between the problem vector and the hyperplane 1 corresponding to the answer subspaces A and B can be determined; and further determining whether the question vector belongs to the answer subspace A or the answer subspace B according to the geometric relationship between the question vector and the hyperplane 1 corresponding to the answer subspaces A and B. Further, assuming that the question vector belongs to the answer subspace a, a geometric relationship between the question vector and the hyperplane 2 corresponding to the answer subspaces a1 and a2 is further determined, and according to the geometric relationship, whether the question vector belongs to the answer subspace a1 or the answer subspace a2 is determined. Further, assuming that the question vector belongs to the answer subspace A2, the traversal direction for the binary tree is: and traversing the full space- > answer subspace A-2 formed by the known answer vectors in turn according to the above manner until finding an answer subspace with the number of answer vectors smaller than the specified number M of candidate answers, and taking the upper-layer subspace with the number of answer vectors smaller than the specified number M of candidate answers as a target answer subspace to which the answer to the question belongs. Further, at least one candidate answer vector is selected from the answer vectors contained in the target answer subspace.
In the embodiment of the present application, the answer to the question to be matched may be obtained from the answers corresponding to at least one candidate answer vector. Optionally, relevance scores for matching answers corresponding to at least one candidate answer vector with answers to the question respectively can be calculated; and selecting the answer corresponding to the highest relevance score from the answers corresponding to the at least one candidate answer vector as the answer of the question to be matched.
Further, when calculating the relevance scores of the answers corresponding to the at least one candidate answer vector respectively matching with the answers to the questions, the answers corresponding to the at least one candidate answer vector and the questions to be matched may be input into the ranking model, and the relevance scores of the answers corresponding to the at least one candidate answer vector respectively matching with the answers to the questions are calculated by using the ranking model. Wherein, the ranking model may be: a word sense-Focused Architecture (duplication-Focused Architecture) model or an Interaction-Focused Architecture (Interaction-Focused Architecture) model. Wherein the basic assumption of the architectural model in the word sense set is that the relevance depends on the combined meaning of the input text. The basic assumption of an interaction-focused architecture model is that relevance is essentially a relationship between input text, so learning directly from interactions rather than from a single representation is more efficient. Further, the word sense focused Architecture Model may be a Deep Structured Semantic Model (DSSM), an Architecture-I (Arc-I) Model, a Convolutional Neural Tensor Network (CNTN), a Convolutional Latent Semantic Model (CLSM), or the like, but is not limited thereto. The interaction centralization Architecture model may be a Deep dependent matching model (DRMN), a Deep text matching model (K-NRM), Architecture-I I (Arc-II), or Match-SRNN, but is not limited thereto.
In this embodiment, before the answer corresponding to the at least one candidate answer vector and the question to be matched are input into the ranking model, the ranking model may be subjected to model training. And training the initial sequencing model by utilizing the sample question-answer pairs to obtain the sequencing model. The output of the initial ranking model is the relevance score of each question and the answer in the sample answer question-answer pair. The initial ranking model is an initial training model of the ranking model, namely the two super-parameters are the same, and the process of training the initial ranking model, namely the learnable parameters in the initial training model, is trained to obtain the ranking model.
Further, when the ranking model is trained, the loss function can be minimized to be a training target, and model training is performed on input by using sample question and answer to obtain the ranking model. The loss function is determined according to the relevance score of each question and the answer in the sample question-answer pair obtained by model training and the actual relevance score of each question and the answer in the sample question-answer pair. In the sample question-answer pairs, each sample question has a unique sample answer, i.e., the actual correlation between the sample question and the sample answer of each sample question-answer pair is 1. Accordingly, the loss function can be expressed as an absolute value of the correlation score of the initial ranking model output and the 1 difference.
Optionally, when training the ranking model, the initial ranking model may be trained based on a fine-tuning (fine-tuning) method, a part of the network in the ranking model may be trained, and the network model participating in training is smaller, which helps to improve the training rate of the model, and further helps to reduce the system pressure of the computer device.
Optionally, the ranking model may include: m layers of sub-networks. Wherein M is not less than 2 and is an integer. Further, when the ranking model is trained, the first N layers of sub-networks in the ranking model can be pre-trained by utilizing the sample corpus. Wherein N is less than M and is a positive integer. Preferably, N ═ M-1. Further, the first N layers of sub-networks may be pre-trained in a variety of ways. For example, the language prediction and the next sentence language prediction with the highest accuracy can be masked as training targets, and the front N layers of sub-networks are pre-trained by using the sample corpus. The masking language prediction may adopt an algorithm logic of a Masking Language Model (MLM). For another example, the highest accuracy rate of predicting the word by using the word context is taken as a training target, and the top N layers of sub-networks are pre-trained by using the sample corpus. For another example, the highest accuracy rate of predicting the word above the word is taken as a training target, and the preceding N layers of sub-networks are pre-trained by using the sample corpus; and the like, but are not limited thereto.
Further, the sample corpus may be any corpus, such as any sentence, any article, any question-answer pair, and so on. Preferably, the sample corpus is a question-answer pair related to an application scenario to which question-answer matching is applied, so that the accuracy of subsequent training of the initial ranking model can be improved.
Further, when the ranking model is trained, the loss function can be minimized to be a training target, and the pre-trained front N layers of sub-networks and the non-pre-trained rear (M-N) layers of sub-networks in the ranking model are subjected to fine tuning training by using sample question and answer to obtain the ranking model. The sample question-answer pairs can be question-answer pairs related to application scenes applied by question-answer matching, and therefore the accuracy of subsequent question-answer matching can be improved. For example, for an application scenario of online customer service, the sample question-answer pairs may be question-answer pairs that are often involved in a shopping scenario. For another example, for an application scenario of weather forecast, the sample question-answer pair may be a question-answer pair related to weather conditions acquired by the user; and so on.
Alternatively, the above-mentioned ranking model may be a BERT model, a GPT model, or an ELMo model, etc., but is not limited thereto.
Optionally, the problem to be matched is subjected to vector processing, the problem to be matched may be input into the ranking model, and an intermediate calculation result of the ranking model is used as a problem vector. For example, the output results of the pre-trained models in the ranking model may be selected as the problem vector. Of course, this method can also be used to perform vector processing on the answers corresponding to the known answer vectors.
The following takes a specific embodiment as an example to describe the question-answer matching method provided in the embodiment of the present application.
Suppose the problem Q to be matched is: do you like me? In this embodiment, vectorization processing is performed on the problem Q to be matched to obtain a problem vector Vq. Further, the question vector Vq is retrieved among the known answer vectors. Optionally, among the answer vectors included in the target answer subspace to which the question vector Vq belongs, the 8 candidate answer vectors closest to the cosine of the question vector Vq are Va1, Va2, …, and Va8, and the corresponding answers are a1, a2, …, and a8, respectively. The results are shown in table 1 below:
TABLE 1 candidate answer vector List
Figure BDA0002163560310000131
Further, the question Q to be matched and the answers corresponding to the 8 candidate vectors are respectively input into the ranking model, and the correlation scores between the answers corresponding to the 8 candidate vectors and the question Q to be matched are calculated, and the obtained results are shown in the following table 2:
TABLE 2 relevance score List
Problem to be matched Answer to the question Relevance score
Does you like me But I do not like you 0.9926
Does you like me Am who am fond my 0.9928
Does you like me No matter you like dislike me, I like you 0.9914
Does you like me You like me to be useless, i have a person who likes 0.9924
Does you like me I like you as you do, and single love is love 0.9912
Does you like me Since I like, how to do nothing but every other 0.9960
Does you like me In addition to you, I like me himself 0.9752
Does you like me Like you and have no reason 0.9873
Further, according to the relevance scores of the answers corresponding to the candidate answer vectors and the answers to the questions, the answer with the highest score is selected as the answer to the question Q to be matched. That is, in table 2 above, the answer corresponding to the highest correlation score (0.9960) is "since i are liked, there is no possibility of how to do not click" and this answer is taken as the answer to the question Q to be matched. Further, an answer to the question to be matched may be output.
Embodiments of the present application also provide a computer-readable storage medium storing computer instructions, which, when executed by one or more processors, cause the one or more processors to perform the steps of the above question-answer matching method.
Fig. 3 is a schematic structural diagram of a computer device according to an embodiment of the present application. As shown in fig. 3, the computer apparatus includes: a memory 30a and a processor 30 b.
The memory 30a is used for storing the computer program, the known answer vector and the answer corresponding to the known answer vector.
The processor 30b is coupled to the memory 30a for executing a computer program for: obtaining a problem to be matched; vectorizing the problem to be matched to obtain a problem vector; searching the question vector in the known answer vector to obtain at least one candidate answer vector; and obtaining the answer of the question to be matched from the answers corresponding to the at least one candidate answer vector.
In some embodiments, the processor 30b, when retrieving the question vector in the known answer vector, is specifically configured to: determining a target answer subspace to which a question vector belongs from a multi-layer answer space according to the number of the specified candidate answers, wherein the known answer vector is divided into the multi-layer answer space; at least one candidate answer vector is selected from the answer vectors contained in the target answer subspace.
Optionally, the multiple layers of answer spaces form a binary tree, a root node of the binary tree represents a full space formed by known answer vectors, and left and right subtrees in each layer of the binary tree, which correspond to the same father node, respectively represent two answer subspaces into which the answer space corresponding to the father node is divided.
Accordingly, the processor 30b, when determining the target answer subspace to which the question vector belongs from the multi-layer answer space according to the specified number of candidate answers, is specifically configured to: determining the traversal direction of the binary tree according to the geometric relationship between the question vector and hyperplanes corresponding to left and right subtrees of each layer on the binary tree, and traversing the binary tree along the traversal direction until a target subtree is found, wherein the number of answer vectors contained in the represented answer subspace is smaller than the number of the specified candidate answers; and taking the answer subspace represented by the parent node of the target subtree as the target answer subspace to which the question vector belongs.
Further, the processor 30b, when selecting at least one candidate answer vector from the answer vectors included in the target answer subspace, is specifically configured to: calculating the similarity between each answer vector contained in the target answer subspace and the question vector; and selecting at least one candidate answer feature vector from the answer feature vectors in the target answer subspace according to the similarity between the answer vectors contained in the target answer subspace and the question feature vectors.
Optionally, the processor 30b is further configured to, before determining the target answer subspace to which the question vector belongs from the multi-layer answer space: and carrying out space division on the known answer vector by using an approximate nearest neighbor algorithm to obtain a multilayer answer space.
In other embodiments, the processor 30b is specifically configured to, when obtaining the answer to the question to be matched from the answers corresponding to the at least one candidate answer vector: calculating the relevance scores of the answers corresponding to at least one candidate answer vector and the questions to be matched respectively; and selecting the answer corresponding to the highest relevance score from the answers corresponding to the at least one candidate answer vector as the answer of the question to be matched.
Further, when the processor 30b calculates the relevance scores between the answers corresponding to the at least one candidate answer vector and the question to be matched, it is specifically configured to: inputting answers corresponding to at least one candidate answer vector and the questions to be matched into a ranking model; and calculating the relevance scores of the answers corresponding to the at least one candidate answer vector and the questions to be matched respectively by using the ranking model.
Accordingly, the processor 30b is further configured to, before inputting the answer corresponding to the at least one candidate answer vector and the question to be matched into the ranking model: taking the minimization of the loss function as a training target, and performing model training by using the sample question-answer pair to obtain a sequencing model; the loss function is determined according to the relevance score of each question and the answer in the sample question-answer pair obtained by model training and the actual relevance score of each question and the answer in the sample question-answer pair.
Further, when the sample question-answer pair is trained on the input initial ranking model, the processor 30b is specifically configured to: pre-training the first N layers of sub-networks in the sequencing model by using sample corpora with the highest accuracy of the masking language prediction and the next sentence prediction as a training target; taking the minimization of a loss function as a training target, and carrying out fine tuning training on the pre-trained front N layers of sub-networks and the non-pre-trained rear (M-N) layers of sub-networks in the sequencing model by utilizing a sample question-and-answer mode to obtain a sequencing model; the sequencing model comprises M layers of sub-networks, wherein M is more than or equal to 2 and is an integer; n is less than M and is a positive integer. Optionally, the initial ranking model is a BERT model, a GPT model, or an ELMo model.
In some embodiments, the computer device further comprises: audio component 30 c. Accordingly, when the processor 30b obtains the problem to be matched, it is specifically configured to: receiving a voice signal from a user through the audio component 30c, the voice signal including a question to be matched; and resolving the problem to be matched from the voice signal. Accordingly, the processor 30b, after obtaining the answer to the question to be matched from the answer corresponding to the at least one candidate answer vector, is further configured to: the answer to the question to be matched is played through the audio component 30 c.
In other embodiments, the computer device further comprises: and a display screen 30 d. Wherein, a man-machine interface is displayed on the display screen 30 d. When the processor 30b obtains the problem to be matched, it is specifically configured to: and responding to the operation of inputting the question on the human-computer interaction interface by the user, and acquiring the question input by the user as the question to be matched. Accordingly, the processor 30b, after obtaining the answer to the question to be matched from the answer corresponding to the at least one candidate answer vector, is further configured to: and displaying the answers of the questions to be matched on the human-computer interaction interface.
In still other embodiments, the computer device further comprises: a communication component 30 e. If the computer device can also be implemented as a server device, the processor 30b is specifically configured to, when acquiring the problem to be matched: the question sent by the user is received as a question to be matched through the communication component 30 e. Accordingly, the processor 30b, after obtaining the answer to the question to be matched from the answer corresponding to the at least one candidate answer vector, is further configured to: and sending the answer of the question to be matched to the terminal equipment of the user so that the user can obtain the answer of the question to be matched.
In some optional embodiments, as shown in fig. 3, the computer device may further include: the power supply assembly 30 f. Only some of the components shown in fig. 3 are schematically depicted, and it is not meant that the computer device must include all of the components shown in fig. 3, nor that the computer device only includes the components shown in fig. 3.
In addition, in addition to the components shown in fig. 3, the computer device may also be provided with other components according to application requirements. For example, if the computer device is a smart robot, a smart phone, a wearable device, etc., the computer device may further include components such as a camera, a sensor, etc.; for another example, if the computer device is an intelligent mirror, the method may further include: mirror, bracket, etc.; and so on.
In the present embodiment, the memory 30a is used for storing a computer program, and may be configured to store other various data to support operations on the computer device. Wherein the processor 30b may execute a computer program stored in the memory 30a to implement the corresponding control logic. The memory 30a may be implemented by any type or combination of volatile or non-volatile memory devices, such as Static Random Access Memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic or optical disks.
In the present embodiment, the audio component 30c may be configured to output and/or input an audio signal. For example, the audio component includes a Microphone (MIC) configured to receive an external audio signal when the device in which the audio component is located is in an operational mode, such as a call mode, a recording mode, and a voice recognition mode. The received audio signal may further be stored in a memory or transmitted via the communication component 30 e. In some embodiments, the audio assembly further comprises a speaker for outputting audio signals. For example, for a computer device with language interaction functionality, voice interaction with a user or the like may be enabled through the audio component 30 c.
In the present embodiment, the display screen 30d may include a Liquid Crystal Display (LCD) and a Touch Panel (TP). If the screen includes a touch panel, the screen may be implemented as a touch screen to receive an input signal from a user. The touch panel includes one or more touch sensors to sense touch, slide, and gestures on the touch panel. The touch sensor may not only sense the boundary of a touch or slide action, but also detect the duration and pressure associated with the touch or slide operation.
In the present embodiment, the communication component 30e is configured to facilitate communication between the computer device and other devices in a wired or wireless manner. The computer device may access a wireless network based on a communication standard, such as WiFi, 2G or 3G, 4G, 5G, or a combination thereof. In an exemplary embodiment, the communication component receives a broadcast signal or broadcast related information from an external broadcast management system via a broadcast channel. In an exemplary embodiment, the communication component may also be implemented based on Near Field Communication (NFC) technology, Radio Frequency Identification (RFID) technology, infrared data association (IrDA) technology, Ultra Wideband (UWB) technology, Bluetooth (BT) technology, or other technologies.
In this embodiment, the power supply component 30f is configured to provide power to the various components of the computer device. The power components 30f may include a power management system, one or more power supplies, and other components associated with generating, managing, and distributing power for the device in which the power component is located.
The computer device provided by the embodiment can perform vectorization processing on the problem to be matched to obtain a corresponding problem vector; then, searching the question vector in the known answer vector to obtain at least one candidate answer vector; and obtaining the answer of the question to be matched from the answers corresponding to the at least one candidate answer vector. The question-answer matching mode directly matches the question vectors with the answer vectors without inquiring the existing questions, can save the question-answer matching time and further is beneficial to improving the question-answer matching efficiency.
On the other hand, for computer equipment, the problem corresponding to the known answer does not need to be stored, so that the storage space can be saved, and the utilization rate of the storage space is improved.
Fig. 4a is a schematic structural diagram of a terminal device according to an embodiment of the present application. As shown in fig. 4a, the terminal device includes: memory 41, processor 42 and communication component 43.
In the present embodiment, the memory 41 is used to store a computer program. A processor 42 is coupled to the memory for executing the computer program for: sending the question to be matched to the server device through the communication component 43, so that the server device retrieves the question vector of the question to be matched from the known answer vector to obtain the answer of the question to be matched and returns the answer; and receiving the answer to the question to be matched via the communication component 43. For a specific implementation manner of the server device obtaining the answer to the question to be matched, reference may be made to the relevant contents of the above embodiments, which are not described herein again.
In some embodiments, the terminal device further comprises: a display screen 44. Optionally, the processor 42 may also present the answer to the question to be matched on the display screen 44.
Further, the terminal device further includes: an audio component 45. Optionally, the processor 42 may also play the answer to the question to be matched through the audio component 45.
In some optional embodiments, the terminal device may further include: and a power supply assembly 46. Only some of the components are schematically shown in fig. 4a, and it is not meant that the terminal device must contain all of the components shown in fig. 4a, nor that the terminal device only comprises the components shown in fig. 4 a. For specific implementation forms of the memory, the processor, the communication component, the audio component, the power component, and the display screen, reference may be made to relevant contents of the foregoing embodiments, and details are not described herein.
The terminal device provided by this embodiment is matched with the server device to retrieve the question vector of the question to be matched from the known answer vector, and obtain the answer to the question to be matched. The question-answer matching mode directly matches the question vectors with the answer vectors without inquiring the existing questions, can save the question-answer matching time and further is beneficial to improving the question-answer matching efficiency.
In addition to the computer device and the terminal device, the embodiment of the application also provides a question-answer matching system. As shown in fig. 4b, the system comprises: a terminal device 40a and a server device 40 b.
The server device 40b and the terminal device 40a may be connected wirelessly or by wire. Alternatively, the server device 40b may be communicatively connected to the terminal device 40a through a mobile network, and accordingly, the network format of the mobile network may be any one of 2G (gsm), 2.5G (gprs), 3G (WCDMA, TD-SCDMA, CDMA2000, UTMS), 4G (LTE), 4G + (LTE +), 5G, WiMax, and the like. Alternatively, the server device 40b may also be communicatively connected to the terminal device 40a through bluetooth, WiFi, infrared, or the like.
In this embodiment, the server device 40b is a computer device capable of performing answer vector and answer management, responding to the request of the terminal device 40a, and providing an answer matched with the question of the user for the user, and generally has the capability of undertaking and guaranteeing the service. The server device 40b may be a single server device, a cloud server array, or a Virtual Machine (VM) running in the cloud server array. In addition, the server device may also refer to other computing devices with corresponding service capabilities, such as a terminal device (running a service program) such as a computer.
In this embodiment, the terminal device 40a is a computer device used by a user and having functions of accessing internet, communicating and the like, and may be, for example, a smart phone, a tablet computer, a personal computer, a wearable device and the like. The terminal device 40a typically comprises at least one processing unit and at least one memory. The number of processing units and memories depends on the configuration and type of terminal device 40 a. The Memory may include volatile, such as RAM, non-volatile, such as Read-Only Memory (ROM), flash Memory, etc., or both. The memory typically stores an Operating System (OS), one or more application software, such as instant messaging software corresponding to the server 10a, and program data. In addition to the processing unit and the memory, the terminal device 40a may also include a network card chip, an IO bus, an audio/video component, and other basic configurations. Optionally, depending on the implementation of the terminal device 40a, the terminal device 40a may also include some peripheral devices, such as a keyboard, a mouse, a stylus, a printer, etc. These peripheral devices are well known in the art and will not be described in detail herein.
In this embodiment, the terminal device 40a is configured to send the problem to be matched to the server device 40 b. Correspondingly, the server device 40b receives the problem to be matched, and performs vectorization processing on the problem to be matched to obtain a problem vector; searching the question vector in the known answer vector to obtain at least one candidate answer vector; and obtaining the answer of the question to be matched from the answers corresponding to the at least one candidate answer vector.
The specific implementation manners of the server device 40b performing vectorization processing on the question to be matched, retrieving the question vector in the known answer vector, and obtaining the answer to the question to be matched from the answer corresponding to the at least one candidate answer vector may refer to the related contents of the above embodiments, and are not described herein again.
Alternatively, the server device 40b may send the answer to the question to be matched to the terminal device 40 a. Accordingly, the terminal device 40a receives the answer to the question to be matched and outputs the answer for the user to obtain the answer to the question to be matched.
In the question-answer matching system provided in this embodiment, the server device may perform vectorization processing on the question to be matched to obtain a corresponding question vector; then, searching the question vector in the known answer vector to obtain at least one candidate answer vector; and obtaining the answer of the question to be matched from the answers corresponding to the at least one candidate answer vector. The question-answer matching mode directly matches the question vectors with the answer vectors without inquiring the existing questions, can save the question-answer matching time and further is beneficial to improving the question-answer matching efficiency.
On the other hand, for the server-side equipment, the problem corresponding to the known answer does not need to be stored, so that the storage space can be saved, and the utilization rate of the storage space is improved.
The embodiment of the present application further provides a search method, and the following exemplarily illustrates the search method provided by the embodiment of the present application.
Fig. 5 is a schematic flowchart of a search method according to an embodiment of the present application. As shown in fig. 5, the method includes:
501. and acquiring a keyword to be searched.
502. And vectorizing the keywords to be searched to obtain keyword vectors.
503. And searching the keyword vector in the known information vector to obtain at least one candidate information vector.
504. And obtaining a search result corresponding to the keyword to be searched from the information corresponding to at least one candidate information vector.
In the present embodiment, the keyword to be searched may be a word, a sentence, or the like, but is not limited thereto. The number of the keywords to be searched can be 1 or more. For example, the relevant word to be searched may be a plurality of words, or may also be the above-mentioned problem to be matched. In the embodiments of the present application, a plurality means 2 or more. The implementation forms of the computer devices are different, and the ways of acquiring the keywords to be searched are different. The implementation form of the computer device and the specific implementation manner of obtaining the keyword to be searched can refer to the related content in the question-answer matching method, and details are not described herein.
Further, in step 502, the computer device performs vectorization processing on the keyword to be searched to obtain a keyword vector corresponding to the keyword to be searched, so as to perform vectorization search. Vectorized search refers to a way of searching among known information vectors using keyword vectors. Based on this, in step 503, the keyword vector of the keyword to be searched may be retrieved from the known information vector to obtain at least one candidate information vector. Then, in step 504, a search result corresponding to the keyword to be searched is obtained from the answers corresponding to the candidate information vectors.
Wherein the number of the known information vectors is multiple. The more the number of the information vectors is, the richer the information base is, and the higher the accuracy of matching result information for the keywords to be searched subsequently is. Each information vector corresponds to one piece of information, and is a result obtained by vectorizing one piece of information. For a specific implementation of vectorizing the keywords to be searched, reference may be made to the above-mentioned related contents of vectorizing the questions to be matched, which is not described herein again.
After the search result corresponding to the keyword to be searched is obtained, the search result can be output to the user. In this embodiment, the manner in which the computer device outputs the search result is not limited. For example, in some embodiments, the computer device may play the search result corresponding to the keyword to be searched through an audio component thereon. In other embodiments, the computer device may display the search result corresponding to the keyword to be searched on the human-computer interaction interface. In still other embodiments, the computer device is a server device, such as an online customer service, and the computer device sends information corresponding to the keyword to be searched to a terminal device of the user, so that the user can obtain a search result corresponding to the keyword to be searched. The computer equipment can send the search result corresponding to the keyword to be searched to the terminal equipment of the user in the modes of mail, short message, in-application message and the like.
In this embodiment, firstly, vectorization processing is performed on a keyword to be searched to obtain a corresponding keyword vector; then, searching the keyword vector in the known information vector to obtain at least one candidate information vector; and obtaining a search result corresponding to the keyword to be searched from the information corresponding to the at least one candidate information vector. The search mode directly matches the keyword vector with the information vector without inquiring the existing keywords, can save the search time and further is beneficial to improving the search efficiency.
On the other hand, for computer equipment, keywords corresponding to known information do not need to be stored, so that the storage space can be saved, and the utilization rate of the storage space is improved.
In some application scenarios, the mapping relationship between the keywords and the result words is stored in advance. In these application scenarios, the existing search methods are generally: and matching the keywords to be searched in the mapping relation between the known keywords and the result words, and acquiring the result words corresponding to the matched keywords as the search results of the keywords to be searched. However, in this embodiment, vectorization processing is performed on the result words in the mapping relationship between the keywords and the result words in advance to obtain vectors of the result words (which may be simply referred to as result word vectors), and the vectors of the result words are used as known information vectors. Based on the above, in the searching process, according to the keyword vector corresponding to the keyword to be searched, searching can be performed in the vector of the result word in the mapping relation between the keyword and the result word to obtain at least one candidate result word vector, and then according to the result word corresponding to the at least one candidate result word vector, the searching result corresponding to the keyword to be searched can be obtained. In this application scenario, the aforementioned "known information vector" mainly refers to a vector of result words in a mapping relationship between the keywords and the result words. The result words are information matched with the keywords, and the result words may be text information such as words, sentences or paragraphs, or the result words may also be streaming media information such as pictures, audio or video, but is not limited thereto.
In other embodiments, an alternative implementation of step 503 is: determining a target information subspace to which the keyword vector belongs from a multi-layer information space according to the specified candidate information quantity, wherein the known information vector is divided into the multi-layer information space; and selecting at least one candidate information vector from the information vectors contained in the target information subspace. The retrieval mode can quickly find the target information subspace to which the information corresponding to the keyword vector belongs, and is beneficial to improving the retrieval efficiency.
Optionally, the known information vector is spatially divided by using an approximate nearest neighbor algorithm to obtain a multi-layer information space. For a specific implementation of performing spatial division on the known information vector, reference may be made to the above-mentioned related contents of performing spatial division on the known answer vector, which are not described herein again.
Furthermore, the similarity between each information vector contained in the target information subspace and the keyword vector can be calculated, and at least one candidate information feature vector can be selected from the information feature vectors in the target information subspace according to the similarity between the information vectors contained in the target information subspace and the keyword feature vector. Therefore, the keyword vector only needs to carry out similarity calculation on the information vector in the target information subspace, so that the calculation complexity can be reduced, and the retrieval efficiency can be further improved. For a specific implementation of calculating the similarity between each information vector included in the target information subspace and the keyword vector and selecting at least one candidate information feature vector from the information feature vectors in the target information subspace, reference may be made to the relevant contents of the above embodiments, which are not described herein again.
In some embodiments, the multiple layers of information spaces form a binary tree, a root node of the binary tree represents a full space formed by the known information vectors, and left and right subtrees in each layer of the binary tree, corresponding to the same father node, respectively represent two information subspaces into which the information space corresponding to the father node is divided.
Based on the binary tree, according to the specified number of candidate information, one embodiment of determining the target information subspace to which the keyword vector belongs from the multi-layer information space is as follows: determining the traversal direction of the binary tree according to the geometric relationship between the keyword vector and hyperplanes corresponding to left and right subtrees on each layer of the binary tree, and traversing the binary tree along the traversal direction until a target subtree is found, wherein the number of information vectors contained in the represented information subspace is smaller than the number of the specified candidate information; and the information subspace represented by the parent node of the target subtree is used as the target information subspace to which the keyword vector belongs.
In other embodiments, one optional implementation of selecting at least one candidate information vector from the information vectors contained in the target information subspace is as follows: calculating the similarity between each information vector contained in the target information subspace and the keyword vector; and selecting at least one candidate information characteristic vector from the information characteristic vectors in the target information subspace according to the similarity between the information vectors contained in the target information subspace and the keyword characteristic vectors.
In still other embodiments, an alternative implementation of step 504 is: calculating the relevance scores of the information corresponding to at least one candidate information vector and the keywords to be searched respectively; and selecting the information corresponding to the highest correlation score from the information corresponding to the at least one candidate information vector as a search result of the keyword to be searched.
Further, an optional implementation manner of calculating the relevance scores of the information corresponding to the at least one candidate information vector and the keywords to be searched respectively is as follows: inputting information corresponding to at least one candidate information vector and a keyword to be searched into a sequencing model; and calculating the relevance scores of the information corresponding to the at least one candidate information vector and the keywords to be searched respectively by utilizing the ranking model.
Optionally, before inputting the information corresponding to the at least one candidate information vector and the keyword to be matched into the ranking model, minimizing a loss function as a training target, and performing model training by using a sample question-answer pair to obtain a ranking model; the loss function is determined according to the relevance score of each keyword and the result word in the sample keyword-result word pair obtained by model training and the actual relevance score of each keyword and the result word in the sample keyword-result word pair.
Optionally, model training is performed by using the sample keyword-result word pair, and one embodiment of obtaining the ranking model is as follows: pre-training the first N layers of sub-networks in the sequencing model by using sample corpora with the highest accuracy of the masking language prediction and the next sentence prediction as a training target; taking the minimization of a loss function as a training target, and carrying out fine tuning training on the pre-trained front N layers of sub-networks in the ranking model and the non-pre-trained rear (M-N) layers of sub-networks in the ranking model by using a sample keyword-result word pair to obtain a ranking model; the sequencing model comprises M layers of sub-networks, wherein M is more than or equal to 2 and is an integer; n is less than M and is a positive integer.
Embodiments of the present application also provide a computer-readable storage medium storing computer instructions, which, when executed by one or more processors, cause the one or more processors to perform the steps of the above-described search method.
Fig. 6 is a schematic structural diagram of a computer device according to an embodiment of the present application. As shown in fig. 3, the computer apparatus includes: a memory 60a and a processor 60 b.
The memory 60a is used for storing a computer program, a known information vector and information corresponding to the known information vector.
The processor 60b is coupled to the memory 60a for executing computer programs for: acquiring a keyword to be searched; vectorizing the keywords to be searched to obtain keyword vectors; searching the keyword vector in the known information vector to obtain at least one candidate information vector; and obtaining a search result corresponding to the keyword to be searched from the information corresponding to the at least one candidate information vector.
In some embodiments, the known information vector may be a vector of result words in a keyword to result word mapping relationship.
Accordingly, the processor 60b, prior to searching the keyword vector in the known information vector, is further configured to: and vectorizing the result words in the mapping relation between the keywords and the result words to obtain vectors of the result words, and taking the vectors of the result words as known information vectors.
In other embodiments, the processor 60b is specifically configured to, when searching the keyword vector in the known information vector: determining a target information subspace to which the keyword vector belongs from a multi-layer information space according to the specified candidate information quantity, wherein the known information vector is divided into the multi-layer information space; and selecting at least one candidate information vector from the information vectors contained in the target information subspace.
Optionally, the processor 60b, before determining the target information subspace to which the keyword vector belongs from the multi-layer information space, is further configured to: and carrying out space division on the known information vector by using an approximate nearest neighbor algorithm to obtain a multilayer information space.
Further, the processor 60b, when selecting at least one candidate information vector from the information vectors included in the target information subspace, is specifically configured to: and calculating the similarity between each information vector contained in the target information subspace and the keyword vector, and selecting at least one candidate information characteristic vector from the information characteristic vectors in the target information subspace according to the similarity between the information vectors contained in the target information subspace and the keyword characteristic vector.
In some embodiments, the multiple layers of information spaces form a binary tree, a root node of the binary tree represents a full space formed by the known information vectors, and left and right subtrees in each layer of the binary tree, corresponding to the same father node, respectively represent two information subspaces into which the information space corresponding to the father node is divided.
Based on the binary tree, when determining the target information subspace to which the keyword vector belongs from the multi-layer information space, the processor 60b is specifically configured to: determining the traversal direction of the binary tree according to the geometric relationship between the keyword vector and hyperplanes corresponding to left and right subtrees on each layer of the binary tree, and traversing the binary tree along the traversal direction until a target subtree is found, wherein the number of information vectors contained in the represented information subspace is smaller than the number of the specified candidate information; and the information subspace represented by the parent node of the target subtree is used as the target information subspace to which the keyword vector belongs.
In other embodiments, the processor 60b, when selecting at least one candidate information vector from the information vectors contained in the target information subspace, is specifically configured to: calculating the similarity between each information vector contained in the target information subspace and the keyword vector; and selecting at least one candidate information characteristic vector from the information characteristic vectors in the target information subspace according to the similarity between the information vectors contained in the target information subspace and the keyword characteristic vectors.
In still other embodiments, when obtaining the search result corresponding to the keyword to be searched, the processor 60b is specifically configured to: calculating the relevance scores of the information corresponding to at least one candidate information vector and the keywords to be searched respectively; and selecting the information corresponding to the highest correlation score from the information corresponding to the at least one candidate information vector as a search result of the keyword to be searched.
Further, when calculating the correlation scores between the information corresponding to the at least one candidate information vector and the keywords to be searched, the processor 60b is specifically configured to: inputting information corresponding to at least one candidate information vector and a keyword to be searched into a sequencing model; and calculating the relevance scores of the information corresponding to the at least one candidate information vector and the keywords to be searched respectively by utilizing the ranking model.
Optionally, the processor 60b is further configured to, before inputting the information corresponding to the at least one candidate information vector and the keyword to be matched into the ranking model: taking the minimization of the loss function as a training target, and performing model training by using the sample question-answer pair to obtain a sequencing model; the loss function is determined according to the relevance score of each keyword and the result word in the sample keyword-result word pair obtained by model training and the actual relevance score of each keyword and the result word in the sample keyword-result word pair.
Optionally, the processor 60b, when performing model training using the sample keyword-result word pairs, is specifically configured to: pre-training the first N layers of sub-networks in the sequencing model by using sample corpora with the highest accuracy of the masking language prediction and the next sentence prediction as a training target; taking the minimization of a loss function as a training target, and carrying out fine tuning training on the pre-trained front N layers of sub-networks in the ranking model and the non-pre-trained rear (M-N) layers of sub-networks in the ranking model by using a sample keyword-result word pair to obtain a ranking model; the sequencing model comprises M layers of sub-networks, wherein M is more than or equal to 2 and is an integer; n is less than M and is a positive integer.
In some embodiments, the computer device further comprises: audio component 60 c. Correspondingly, when the processor 60b obtains the keyword to be searched, it is specifically configured to: receiving a voice signal sent by a user through the audio component 60c, wherein the voice signal comprises a keyword to be searched; and analyzing the keywords to be searched from the voice signals. Accordingly, the processor 60b, after obtaining the information of the keyword to be searched from the information corresponding to the at least one candidate information vector, is further configured to: and playing the search result corresponding to the keyword to be searched through the audio component 60 c.
In other embodiments, the computer device further comprises: and a display screen 60 d. Wherein, a human-computer interaction interface is displayed on the display screen 60 d. When acquiring the keyword to be searched, the processor 60b is specifically configured to: and responding to the operation of inputting the keywords on the human-computer interaction interface by the user, and acquiring the keywords input by the user as the keywords to be searched. Accordingly, the processor 60b, after obtaining the search result of the keyword to be searched from the information corresponding to the at least one candidate information vector, is further configured to: and displaying the search result corresponding to the keyword to be searched on the man-machine interaction interface.
In still other embodiments, the computer device further comprises: a communication component 60 e. If the computer device can also be implemented as a server device, the processor 60b is specifically configured to, when obtaining the keyword to be searched: the keyword transmitted by the user is received as the keyword to be searched through the communication component 60 e. Accordingly, after obtaining the search result corresponding to the keyword to be searched from the information corresponding to the at least one candidate information vector, the processor 60b is further configured to: and sending the search result corresponding to the keyword to be searched to the terminal equipment of the user so that the user can obtain the search result corresponding to the keyword to be searched.
In some optional embodiments, as shown in fig. 6, the computer device may further include: the power supply assembly 60 f. Only some of the components shown in fig. 6 are schematically shown, and it is not meant that the computer device must include all of the components shown in fig. 6, nor that the computer device only includes the components shown in fig. 6.
The implementation forms of the memory, the communication component, the power component, the display screen, and the audio component can be referred to the relevant contents of the above embodiments, and are not described herein again.
In addition, in addition to the components shown in fig. 6, the computer device may also be provided with other components according to application requirements. For example, if the computer device is a smart robot, a smart phone, a wearable device, etc., the computer device may further include components such as a camera, a sensor, etc.; for another example, if the computer device is an intelligent mirror, the method may further include: mirror, bracket, etc.; and so on.
The computer device provided by the embodiment can perform vectorization processing on the keywords to be searched to obtain corresponding keyword vectors; then, searching the keyword vector in the known information vector to obtain at least one candidate information vector; and obtaining a search result corresponding to the keyword to be searched from the information corresponding to the at least one candidate information vector. The search mode directly matches the keyword vector with the information vector without inquiring the existing keywords, can save the search time and further is beneficial to improving the search efficiency.
On the other hand, for computer equipment, keywords corresponding to known information do not need to be stored, so that the storage space can be saved, and the utilization rate of the storage space is improved.
The search method provided in the embodiment of the present application may also be implemented in a client-server (C/S) network system, where for the specific implementation of the search method implemented in the C/S, reference may be made to relevant contents in the system architecture shown in fig. 4b, and details are not described here again.
It should be noted that the execution subjects of the steps of the methods provided in the above embodiments may be the same device, or different devices may be used as the execution subjects of the methods. For example, the execution subject of steps 101 and 102 may be device a; for another example, the execution subject of step 101 may be device a, and the execution subject of step 102 may be device B; and so on.
In addition, in some of the flows described in the above embodiments and the drawings, a plurality of operations are included in a specific order, but it should be clearly understood that the operations may be executed out of the order presented herein or in parallel, and the sequence numbers of the operations, such as 101, 102, etc., are merely used for distinguishing different operations, and the sequence numbers do not represent any execution order per se. Additionally, the flows may include more or fewer operations, and the operations may be performed sequentially or in parallel.
It should be noted that, the descriptions of "first", "second", etc. in this document are used for distinguishing different messages, devices, modules, etc., and do not represent a sequential order, nor limit the types of "first" and "second" to be different.
As will be appreciated by one skilled in the art, embodiments of the present invention may be provided as a method, system, or computer program product. Accordingly, the present invention may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present invention may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
The present invention is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the invention. It will be understood that each flow and/or block of the flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
In a typical configuration, a computing device includes one or more processors (CPUs), input/output interfaces, network interfaces, and memory.
The memory may include forms of volatile memory in a computer readable medium, Random Access Memory (RAM) and/or non-volatile memory, such as Read Only Memory (ROM) or flash memory (flash RAM). Memory is an example of a computer-readable medium.
Computer-readable media, including both non-transitory and non-transitory, removable and non-removable media, may implement information storage by any method or technology. The information may be computer readable instructions, data structures, modules of a program, or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), Static Random Access Memory (SRAM), Dynamic Random Access Memory (DRAM), other types of Random Access Memory (RAM), Read Only Memory (ROM), Electrically Erasable Programmable Read Only Memory (EEPROM), flash memory or other memory technology, compact disc read only memory (CD-ROM), Digital Versatile Discs (DVD) or other optical storage, magnetic cassettes, magnetic tape magnetic disk storage or other magnetic storage devices, or any other non-transmission medium that can be used to store information that can be accessed by a computing device. As defined herein, a computer readable medium does not include a transitory computer readable medium such as a modulated data signal and a carrier wave.
It should also be noted that the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other like elements in a process, method, article, or apparatus that comprises the element.
The above description is only an example of the present application and is not intended to limit the present application. Various modifications and changes may occur to those skilled in the art. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application should be included in the scope of the claims of the present application.

Claims (21)

1. A question-answer matching method is characterized by comprising the following steps:
obtaining a problem to be matched;
vectorizing the problem to be matched to obtain a problem vector;
retrieving the question vector in a known answer vector to obtain at least one candidate answer vector;
and obtaining the answer of the question to be matched from the answers corresponding to the at least one candidate answer vector.
2. The method of claim 1, wherein the retrieving the question vector from a known answer vector to obtain at least one candidate answer vector comprises:
determining a target answer subspace to which the question vector belongs from a multi-layer answer space according to the number of the specified candidate answers, wherein the known answer vector is divided into the multi-layer answer space;
selecting the at least one candidate answer vector from the answer vectors contained in the target answer subspace.
3. The method according to claim 2, wherein the multiple layers of answer spaces form a binary tree, a root node of the binary tree represents a full space formed by known answer vectors, and left and right subtrees in each layer of the binary tree corresponding to a same parent node respectively represent two answer subspaces into which the answer space corresponding to the parent node is divided.
4. The method according to claim 3, wherein the determining a target answer subspace to which the question vector belongs from a multi-layer answer space according to the specified number of candidate answers comprises:
determining the traversal direction of the binary tree according to the geometric relationship between the question vector and hyperplanes corresponding to left and right subtrees of each layer on the binary tree, and traversing the binary tree along the traversal direction until a target subtree is found, wherein the number of answer vectors contained in the represented answer subspace is smaller than the number of the specified candidate answers;
and taking an answer subspace represented by a parent node of the target subtree as a target answer subspace to which the question vector belongs.
5. The method of claim 2, wherein prior to determining the target answer subspace to which the question vector belongs from a multi-level answer space according to a specified number of candidate answers, the method further comprises:
and carrying out space division on the known answer vector by using an approximate nearest neighbor algorithm to obtain the multilayer answer space.
6. The method according to claim 2, wherein said selecting said at least one candidate answer vector from among the answer vectors contained in said target answer subspace comprises:
calculating the similarity between each answer vector contained in the target answer subspace and the question vector;
and selecting the at least one candidate answer feature vector from the answer feature vectors in the target answer subspace according to the similarity between the answer vectors contained in the target answer subspace and the question feature vector.
7. The method according to claim 1, wherein the obtaining the answer to the question to be matched from the answers corresponding to the at least one candidate answer vector comprises:
calculating the relevance scores of the answers corresponding to the at least one candidate answer vector and the questions to be matched respectively;
and selecting the answer corresponding to the highest relevance score from the answers corresponding to the at least one candidate answer vector as the answer of the question to be matched.
8. The method according to claim 7, wherein said calculating the relevance scores of the answers corresponding to the at least one candidate answer vector and the question to be matched respectively comprises:
inputting answers corresponding to the at least one candidate answer vector and the questions to be matched into a ranking model;
and calculating the relevance scores of the answers corresponding to the at least one candidate answer vector and the questions to be matched respectively by using the ranking model.
9. The method according to claim 8, wherein before inputting the answer corresponding to the at least one candidate answer vector and the question to be matched into the ranking model, the method further comprises:
taking the minimization of the loss function as a training target, and performing model training by using sample question-answer pairs to obtain the sequencing model;
the loss function is determined according to the relevance score of each question and the answer in the sample question-answer pair obtained by model training and the actual relevance score of each question and the answer in the sample question-answer pair.
10. The method of claim 9, wherein the model training using sample question-answer pairs with the loss function minimization as a training target to obtain the ranking model comprises:
pre-training the first N layers of sub-networks in the sequencing model by using sample corpora with the highest accuracy of the masking language prediction and the next sentence prediction as a training target;
taking the minimization of the loss function as a training target, and performing fine tuning training on the pre-trained front N layers of sub-networks in the sequencing model and the non-pre-trained rear (M-N) layers of sub-networks in the sequencing model by using the sample question-answer to obtain the sequencing model;
the sequencing model comprises M layers of sub-networks, wherein M is more than or equal to 2 and is an integer; n is less than M and is a positive integer.
11. The method according to any one of claims 1-10, wherein the obtaining of the question to be matched comprises:
receiving a voice signal sent by a user, wherein the voice signal comprises the problem to be matched; analyzing the problem to be matched from the voice signal;
alternatively, the first and second electrodes may be,
and responding to the operation of inputting questions on a human-computer interaction interface by a user, and acquiring the questions input by the user as the questions to be matched.
12. The method according to claim 11, further comprising, after obtaining the answer to the question to be matched from the answer corresponding to the at least one candidate answer vector, the following steps:
playing the answer of the question to be matched through an audio component; alternatively, the first and second electrodes may be,
displaying the answers of the questions to be matched on the human-computer interaction interface; alternatively, the first and second electrodes may be,
and sending the answer of the question to be matched to the terminal equipment of the user.
13. A computer device, comprising: a memory and a processor;
the memory is used for storing a computer program, a known answer vector and an answer corresponding to the known answer vector;
the processor is coupled to the memory for executing the computer program for: obtaining a problem to be matched; vectorizing the problem to be matched to obtain a problem vector; retrieving the question vector in a known answer vector to obtain at least one candidate answer vector; and obtaining the answer of the question to be matched from the answers corresponding to the at least one candidate answer vector.
14. A terminal device, comprising: a memory, a processor, and a communications component;
wherein the memory is used for storing a computer program;
the processor is coupled to the memory for executing the computer program for:
sending a question to be matched to server equipment through the communication assembly, so that the server equipment retrieves the question vector of the question to be matched from a known answer vector to obtain an answer of the question to be matched and returns the answer;
receiving, by the communication component, an answer to the question to be matched.
15. A question-answer matching system, comprising: the system comprises terminal equipment and server-side equipment;
the terminal device is used for sending a problem to be matched to the server device;
the server device is configured to: vectorizing the problem to be matched to obtain a problem vector; retrieving the question vector in a known answer vector to obtain at least one candidate answer vector; obtaining answers of the questions to be matched from answers corresponding to the at least one candidate answer vector; and returning the answer of the question to be matched to the terminal equipment.
16. A computer-readable storage medium having stored thereon computer instructions, which, when executed by one or more processors, cause the one or more processors to perform the steps of the method of any one of claims 1-12.
17. A method of searching, comprising:
acquiring a keyword to be searched;
vectorizing the keywords to be searched to obtain keyword vectors;
searching the keyword vector in a known information vector to obtain at least one candidate information vector;
and obtaining a search result corresponding to the keyword to be searched from the information corresponding to the at least one candidate information vector.
18. The method of claim 17, wherein the known information vector is a vector of result words in a keyword to result word mapping relationship.
19. The method of claim 18, further comprising, prior to searching the keyword vector in a known information vector:
and vectorizing the result words in the mapping relation between the keywords and the result words to obtain vectors of the result words, and taking the vectors of the result words as the known information vectors.
20. A computer device, comprising: a memory and a processor;
the memory is used for storing a computer program, a known information vector and information corresponding to the known information vector;
the processor is coupled to the memory for executing the computer program for: acquiring a keyword to be searched; vectorizing the keywords to be searched to obtain keyword vectors; searching the keyword vector in a known information vector to obtain at least one candidate information vector; and obtaining a search result corresponding to the keyword to be searched from the information corresponding to the at least one candidate information vector.
21. A computer-readable storage medium having stored thereon computer instructions, which, when executed by one or more processors, cause the one or more processors to perform the steps of the method of any one of claims 17-19.
CN201910739811.6A 2019-08-12 2019-08-12 Question-answer matching and searching method, device, system and storage medium Pending CN112395396A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910739811.6A CN112395396A (en) 2019-08-12 2019-08-12 Question-answer matching and searching method, device, system and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910739811.6A CN112395396A (en) 2019-08-12 2019-08-12 Question-answer matching and searching method, device, system and storage medium

Publications (1)

Publication Number Publication Date
CN112395396A true CN112395396A (en) 2021-02-23

Family

ID=74602266

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910739811.6A Pending CN112395396A (en) 2019-08-12 2019-08-12 Question-answer matching and searching method, device, system and storage medium

Country Status (1)

Country Link
CN (1) CN112395396A (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113722452A (en) * 2021-07-16 2021-11-30 上海通办信息服务有限公司 Semantic-based quick knowledge hit method and device in question-answering system
CN113742471A (en) * 2021-09-15 2021-12-03 重庆大学 Vector retrieval type dialogue method of general question-answering system
WO2022228176A1 (en) * 2021-04-25 2022-11-03 阿里巴巴(中国)有限公司 Order processing method, and device and storage medium
CN116228440A (en) * 2023-02-22 2023-06-06 自贡市第一人民医院 Medical insurance intelligent management method, system, device and medium

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20160247068A1 (en) * 2013-11-01 2016-08-25 Tencent Technology (Shenzhen) Company Limited System and method for automatic question answering
CN108304437A (en) * 2017-09-25 2018-07-20 腾讯科技(深圳)有限公司 A kind of automatic question-answering method, device and storage medium
CN109271505A (en) * 2018-11-12 2019-01-25 深圳智能思创科技有限公司 A kind of question answering system implementation method based on problem answers pair
CN109710612A (en) * 2018-12-25 2019-05-03 百度在线网络技术(北京)有限公司 Vector index recalls method, apparatus, electronic equipment and storage medium

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20160247068A1 (en) * 2013-11-01 2016-08-25 Tencent Technology (Shenzhen) Company Limited System and method for automatic question answering
CN108304437A (en) * 2017-09-25 2018-07-20 腾讯科技(深圳)有限公司 A kind of automatic question-answering method, device and storage medium
CN109271505A (en) * 2018-11-12 2019-01-25 深圳智能思创科技有限公司 A kind of question answering system implementation method based on problem answers pair
CN109710612A (en) * 2018-12-25 2019-05-03 百度在线网络技术(北京)有限公司 Vector index recalls method, apparatus, electronic equipment and storage medium

Non-Patent Citations (3)

* Cited by examiner, † Cited by third party
Title
SMALLCSER: "海量数据相似查找系列2 -- Annoy算法", Retrieved from the Internet <URL:https://blog.csdn.net/lsp1991/article/details/78127754> *
张俊林: "Bert时代的创新:Bert在NLP各领域的应用进展", Retrieved from the Internet <URL:https://cloud.tencent.com/developer/article/1446190> *
王东升;王卫民;王石;符建辉;诸峰;: "面向限定领域问答系统的自然语言理解方法综述", 计算机科学, no. 08, 15 August 2017 (2017-08-15) *

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2022228176A1 (en) * 2021-04-25 2022-11-03 阿里巴巴(中国)有限公司 Order processing method, and device and storage medium
CN113722452A (en) * 2021-07-16 2021-11-30 上海通办信息服务有限公司 Semantic-based quick knowledge hit method and device in question-answering system
CN113722452B (en) * 2021-07-16 2024-01-19 上海通办信息服务有限公司 Semantic-based rapid knowledge hit method and device in question-answering system
CN113742471A (en) * 2021-09-15 2021-12-03 重庆大学 Vector retrieval type dialogue method of general question-answering system
CN113742471B (en) * 2021-09-15 2023-09-12 重庆大学 Vector retrieval type dialogue method of Pu-Fa question-answering system
CN116228440A (en) * 2023-02-22 2023-06-06 自贡市第一人民医院 Medical insurance intelligent management method, system, device and medium
CN116228440B (en) * 2023-02-22 2024-04-12 自贡市第一人民医院 Medical insurance intelligent management method, system, device and medium

Similar Documents

Publication Publication Date Title
CN108491433B (en) Chat response method, electronic device and storage medium
US10963499B2 (en) Generating command-specific language model discourses for digital assistant interpretation
CN109635273B (en) Text keyword extraction method, device, equipment and storage medium
US20200301954A1 (en) Reply information obtaining method and apparatus
CN105630856B (en) Automatic aggregation of online user profiles
CN112164391B (en) Statement processing method, device, electronic equipment and storage medium
CN112395396A (en) Question-answer matching and searching method, device, system and storage medium
CN111753060A (en) Information retrieval method, device, equipment and computer readable storage medium
US10963495B2 (en) Automated discourse phrase discovery for generating an improved language model of a digital assistant
US10929613B2 (en) Automated document cluster merging for topic-based digital assistant interpretation
US10768954B2 (en) Personalized digital assistant device and related methods
US10762150B2 (en) Searching method and searching apparatus based on neural network and search engine
US11645585B2 (en) Method for approximate k-nearest-neighbor search on parallel hardware accelerators
US11881209B2 (en) Electronic device and control method
US11862171B2 (en) Multithreaded speech data preprocessing
CN111078842A (en) Method, device, server and storage medium for determining query result
WO2020055497A1 (en) Inferring topics with entity linking and ontological data
CN111126084B (en) Data processing method, device, electronic equipment and storage medium
CN108628911B (en) Expression prediction for user input
US20230350929A1 (en) Method and system for generating intent responses through virtual agents
US11755671B2 (en) Projecting queries into a content item embedding space
AU2022203806A1 (en) Machine learning models for detecting topic divergent digital videos
CN115017914A (en) Language processing method, language processing device, electronic equipment and storage medium
US11263394B2 (en) Low-resource sentence compression system
US11810572B2 (en) Multi-threaded speaker identification

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