Sentence vector model generation, data recall method, device, electronic device and storage medium
By constructing and filtering sample pairs in the sentence vector model, the problem of insufficient semantic representation accuracy of the sentence vector model is solved, and the data recall rate and recall accuracy are significantly improved.
Patent Information
- Application Number
- CN202111275899.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-10-29
- Publication Date
- 2024-10-29
- Estimated Expiration
- 2041-10-29
AI Technical Summary
In existing natural language processing technology, the accuracy of semantic representation of sentence vector models is poor, resulting in high data recall rate and recall error rate.
By constructing initial positive sample pairs and initial negative sample pairs from multiple sample question groups with the same semantics, and performing simple sample and noise filtering on them, the sentence vector model is trained to improve the robustness and accuracy of the model.
It significantly improves the semantic representation accuracy of the sentence vector model, and improves the data recall rate and recall accuracy.
Smart Images

Figure CN114118057B_ABST
Abstract
Description
Technical Field
[0001] This disclosure relates to the field of natural language processing technology, and in particular to a sentence vector model generation, data retrieval method, apparatus, electronic device, and storage medium. Background Technology
[0002] Natural Language Processing (NLP) is an important area of computer science and artificial intelligence. Intelligent customer service is a significant application of NLP technology. It primarily combines a question-and-answer knowledge base, consisting of a set of (question, answer) pairs, to provide a data retrieval service.
[0003] In related technologies, during the data retrieval process—that is, identifying and returning answers to similar questions that are highly relevant to a user's question—embedding technology is often used to transform questions in the question-and-answer knowledge base into sentence vectors, which are then stored in a vector index. For a user's question, the same embedding technology is used to transform it into a vector, and then a vector retrieval tool is used to search for semantically similar questions. However, the sentence vectors obtained using embedding technology in the aforementioned technologies suffer from poor semantic representation accuracy, leading to low subsequent data recall and false positive rates. Summary of the Invention
[0004] This disclosure provides a sentence vector model generation, data retrieval method, apparatus, electronic device, and storage medium to at least address the problem of poor semantic representation accuracy in related technologies, which leads to low subsequent data recall and false recall rates. The technical solution of this disclosure is as follows:
[0005] According to a first aspect of the present disclosure, a sentence vector model generation method is provided, comprising:
[0006] A second number of sample questions are obtained from a first number of sample question groups to obtain a sample question set. The first number of sample question groups includes multiple sample questions with the same semantics.
[0007] The sample question set is input into the sentence vector model to be trained for sentence vector extraction to obtain the sentence vectors of the sample questions in the sample question set;
[0008] Based on the sentence vectors of the sample questions in the sample question set, initial positive sample pairs and initial negative sample pairs are constructed;
[0009] The initial positive sample pairs and the initial negative sample pairs are filtered to obtain target positive sample pairs and target negative sample pairs. The target positive sample pairs are positive sample pairs after filtering out simple samples, and the target negative sample pairs are negative sample pairs after filtering out simple samples and / or noise.
[0010] The first target loss is determined based on the target positive sample pairs and the target negative sample pairs;
[0011] The sentence vector model is obtained by training the sentence vector model based on the first target loss.
[0012] Optionally, the method further includes:
[0013] From the initial positive sample pairs and the initial negative sample pairs, simple sample pairs are determined;
[0014] Based on the simple sample pairs, determine the second target loss;
[0015] The sentence vector model to be trained is trained based on the second objective loss to obtain the initial sentence vector model;
[0016] The step of inputting the sample question set into the sentence vector model to be trained for sentence vector extraction to obtain the sentence vector of the sample question in the sample question set includes: inputting the sample question set into the initial sentence vector model for sentence vector extraction to obtain the sentence vector of the sample question in the sample question set;
[0017] The step of training the sentence vector model based on the first target loss to obtain the sentence vector model includes: training the initial sentence vector model based on the first target loss to obtain the sentence vector model.
[0018] Optionally, filtering the initial positive sample pairs and the initial negative sample pairs to obtain target positive sample pairs and target negative sample pairs includes:
[0019] The initial positive sample pairs are subjected to simple sample filtering to obtain the target positive sample pairs;
[0020] The initial negative sample pairs are subjected to simple sample filtering and / or noise filtering to obtain the target negative sample pairs.
[0021] Optionally, the step of performing simple sample filtering on the initial positive sample pairs to obtain the target positive sample pairs includes:
[0022] Determine the first similarity between the first sentence vector and the second sentence vector in the initial positive sample pair;
[0023] The initial positive sample pairs whose first similarity is less than or equal to the first threshold and greater than the second threshold are taken as the target positive sample pairs;
[0024] Wherein, the first threshold is a preset upper limit threshold for similarity corresponding to non-simple positive sample pairs, and the second threshold is determined based on the maximum value of the similarity between the first sentence vector and the corresponding negative sentence vector in any initial positive sample pair.
[0025] Optionally, the step of performing simple sample filtering and noise filtering on the initial negative sample pairs to obtain the target negative sample pairs includes:
[0026] Determine the second similarity between the third and fourth sentence vectors in the initial negative sample pair;
[0027] Determine the current noise filtering parameters based on the current training round;
[0028] The initial negative sample pairs whose second similarity is greater than or equal to the third threshold and less than the target threshold are taken as the target negative sample pairs;
[0029] The target threshold is the smaller value between the fourth threshold and the current noise filtering parameter. The third threshold is a preset lower similarity threshold corresponding to a non-simple negative sample pair. The fourth threshold is determined based on the minimum similarity between the third sentence vector and the corresponding positive sentence vector in any initial negative sample pair.
[0030] Optionally, the method further includes:
[0031] Determine a first weight for the target positive sample pair, wherein the first weight is negatively correlated with the similarity of the target positive sample pair;
[0032] Determine a second weight for the target negative sample pair, wherein the second weight is positively correlated with the similarity of the target negative sample pair;
[0033] The step of determining the first target loss based on the target positive sample pair and the target negative sample pair includes:
[0034] The positive example loss is determined based on the first weight and the target positive sample pair;
[0035] The negative example loss is determined based on the second weight and the target negative sample pair;
[0036] The first target loss is determined based on the negative example loss and the positive example loss.
[0037] Optionally, constructing initial positive sample pairs and initial negative sample pairs based on the sentence vectors of sample questions in the sample question set includes:
[0038] The sentence vectors of two pairs of sample questions belonging to the same sample question group are used as the initial positive sample pairs;
[0039] The sentence vectors of the pairwise sample questions belonging to different sample question groups are used as the initial negative sample pairs.
[0040] Optionally, obtaining a second number of sample questions from a first number of sample question groups to obtain a sample question set includes:
[0041] Obtain a third number of sample question groups, wherein the third number is greater than the first number;
[0042] The third number of sample question groups are each divided into multiple sets of questions in the same group; any set of questions in the same group includes the second number of sample questions in the same group.
[0043] From the third number of sample question groups, determine the first number of sample question groups;
[0044] From the multiple sets of questions corresponding to the first number of sample question groups, select one set of questions from each set to obtain the sample question set for the current training round.
[0045] Optionally, the method further includes:
[0046] Store the sentence vectors of the sample questions in the sample question set of the current training round into a preset queue.
[0047] Optionally, constructing initial positive sample pairs and initial negative sample pairs based on the sentence vectors of sample questions in the sample question set includes:
[0048] Based on the sentence vectors of the sample questions in the sample question set and the sentence vectors in the preset queue, initial positive sample pairs and initial negative sample pairs are constructed.
[0049] According to a second aspect of the present disclosure, a data retrieval method is provided, comprising:
[0050] In response to a data recall request, the target sentence vector of the target question in the data recall request is determined based on the sentence vector model generated by any of the methods described in the first aspect.
[0051] From the preset sentence vector set, obtain the target associated sentence vector of the target sentence vector, wherein the preset sentence vector set is the sentence vector of the question in the preset question set determined based on the sentence vector model;
[0052] Based on the target-related sentence vector, the first target recall data is determined.
[0053] Optionally, the device further includes:
[0054] The simple sample pair determination module is configured to determine simple sample pairs from the initial positive sample pairs and the initial negative sample pairs;
[0055] The second target loss determination module is configured to determine the second target loss based on the simple sample pairs;
[0056] The initial sentence vector model training module is configured to train the sentence vector model to be trained based on the second objective loss to obtain the initial sentence vector model;
[0057] The sentence vector extraction module is also configured to perform sentence vector extraction by inputting the sample question set into the initial sentence vector model, and obtain the sentence vectors of the sample questions in the sample question set;
[0058] The sentence vector model training module is also configured to train the initial sentence vector model based on the first target loss to obtain the sentence vector model.
[0059] Optionally, obtaining the associated sentence vector of the target sentence vector from the preset sentence vector set includes:
[0060] Determine the similarity between sentence vectors in the combination of the target sentence vector and the preset sentence vector;
[0061] Based on the similarity, the first and second related sentence vectors with the highest similarity to the target sentence vector are determined, and the similarity of the first related sentence vector is greater than that of the second related sentence vector.
[0062] Determine the similarity difference between the similarity corresponding to the first associated sentence vector and the similarity corresponding to the second associated sentence vector;
[0063] If the similarity corresponding to the first associated sentence vector is greater than or equal to the fifth threshold, and the similarity difference is greater than or equal to the sixth threshold, the first associated sentence vector is taken as the target associated sentence vector.
[0064] Optionally, the method further includes:
[0065] If the similarity corresponding to the first associated sentence vector is less than the fifth threshold, or the similarity difference is less than the sixth threshold, then based on the similarity, return the questions to be filtered from the preset question set;
[0066] In response to a question confirmation instruction triggered based on the question to be screened, second target recall data is determined based on the question corresponding to the question confirmation instruction.
[0067] According to a third aspect of the present disclosure, a sentence vector model generation apparatus is provided, comprising:
[0068] The sample question set acquisition module is configured to acquire a second number of sample questions from a first number of sample question groups to obtain a sample question set, wherein the first number of sample question groups include multiple sample questions with the same semantics within the same sample question group;
[0069] The sentence vector extraction module is configured to input the sample question set into the sentence vector model to be trained and extract sentence vectors to obtain the sentence vectors of the sample questions in the sample question set;
[0070] The sample pair construction module is configured to construct initial positive sample pairs and initial negative sample pairs based on the sentence vectors of sample questions in the sample question set;
[0071] The sample pair filtering module is configured to perform filtering on the initial positive sample pairs and the initial negative sample pairs to obtain target positive sample pairs and target negative sample pairs, wherein the target positive sample pairs are positive sample pairs after filtering out simple samples, and the target negative sample pairs are negative sample pairs after filtering out simple samples and / or noise.
[0072] The first target loss determination module is configured to determine the first target loss based on the target positive sample pairs and the target negative sample pairs;
[0073] The sentence vector model training module is configured to train the sentence vector model to be trained based on the first target loss, thereby obtaining the sentence vector model.
[0074] Optionally, the sample pair filtering module includes:
[0075] A simple sample filtering unit is configured to perform simple sample filtering on the initial positive sample pairs to obtain the target positive sample pairs;
[0076] The filtering unit is configured to perform simple sample filtering and / or noise filtering on the initial negative sample pair to obtain the target negative sample pair.
[0077] Optionally, the simple sample filtering unit includes:
[0078] The first similarity determination unit is configured to perform the task of determining the first similarity between the first sentence vector and the second sentence vector in the initial positive sample pair;
[0079] The target positive sample pair determination unit is configured to execute the determination of the initial positive sample pairs whose first similarity is less than or equal to a first threshold and greater than a second threshold as the target positive sample pairs;
[0080] Wherein, the first threshold is a preset upper limit threshold for similarity corresponding to non-simple positive sample pairs, and the second threshold is determined based on the maximum value of the similarity between the first sentence vector and the corresponding negative sentence vector in any initial positive sample pair.
[0081] Optionally, the filtering unit includes:
[0082] The second similarity determination unit is configured to perform the determination of the second similarity between the third sentence vector and the fourth sentence vector in the initial negative sample pair;
[0083] The current noise filtering parameter determination unit is configured to determine the current noise filtering parameters based on the current training round.
[0084] The target negative sample pair determination unit is configured to perform the following: an initial negative sample pair whose second similarity is greater than or equal to a third threshold and less than a target threshold is selected as the target negative sample pair.
[0085] The target threshold is the smaller value between the fourth threshold and the current noise filtering parameter. The third threshold is a preset lower similarity threshold corresponding to a non-simple negative sample pair. The fourth threshold is determined based on the minimum similarity between the third sentence vector and the corresponding positive sentence vector in any initial negative sample pair.
[0086] Optionally, the device further includes:
[0087] The first weight determination module is configured to determine the first weight of the target positive sample pair, wherein the first weight is negatively correlated with the similarity of the target positive sample pair.
[0088] The second weight determination module is configured to determine the second weight of the target negative sample pair, wherein the second weight is positively correlated with the similarity of the target negative sample pair.
[0089] The first target loss determination module includes:
[0090] The positive example loss determination unit is configured to perform a positive example loss determination based on the first weight and the target positive sample pair;
[0091] The negative example loss determination unit is configured to determine the negative example loss based on the second weight and the target negative sample pair;
[0092] The first target loss determination unit is configured to determine the first target loss based on the negative example loss and the positive example loss.
[0093] Optionally, the sample pair construction module includes:
[0094] The initial positive sample pair determination unit is configured to perform the operation of taking the sentence vectors of pairwise sample questions belonging to the same sample question group as the initial positive sample pair;
[0095] The initial negative sample pair determination unit is configured to perform the operation of taking the sentence vectors of pairwise sample questions belonging to different sample question groups as the initial negative sample pairs.
[0096] Optionally, the sample question set acquisition module includes:
[0097] The sample question group acquisition unit is configured to acquire a third number of sample question groups, wherein the third number is greater than the first number.
[0098] The sample question group splitting unit is configured to split the third number of sample question groups into multiple sets of questions in the same group; any set of questions in the same group includes the second number of sample questions in the same group;
[0099] The sample question group determination unit is configured to determine the first number of sample question groups from the third number of sample question groups;
[0100] The sample question set determination unit is configured to select one question set from each of the multiple question sets corresponding to the first number of sample question sets to obtain the sample question set for the current training round.
[0101] Optionally, the device further includes:
[0102] The sentence vector storage module is configured to store the sentence vectors of sample questions in the sample question set of the current training round into a preset queue.
[0103] Optionally, the sample pair construction module is further configured to construct initial positive sample pairs and initial negative sample pairs based on the sentence vectors of sample questions in the sample question set and the sentence vectors in the preset queue.
[0104] According to a fourth aspect of the present disclosure, a data retrieval apparatus is provided, comprising:
[0105] The target sentence vector determination module is configured to perform a response to a data recall request, based on a sentence vector model generated by any of the methods described in the first aspect, to determine the target sentence vector of the target question in the data recall request;
[0106] The target associated sentence vector acquisition module is configured to acquire the target associated sentence vector of the target sentence vector from a preset sentence vector set, wherein the preset sentence vector set is the sentence vector of the question in a preset question set determined based on the sentence vector model;
[0107] The first target recall data determination module is configured to determine the first target recall data based on the target associated sentence vector.
[0108] Optionally, the associated sentence vector acquisition module includes:
[0109] The similarity determination unit is configured to determine the similarity between the target sentence vector and the sentence vectors in the combination of the preset sentence vectors;
[0110] The associated sentence vector determination unit is configured to perform the following based on the similarity: determine the first associated sentence vector and the second associated sentence vector that are the two most similar to the target sentence vector, wherein the similarity of the first associated sentence vector is greater than the similarity of the second associated sentence vector.
[0111] The similarity difference determination unit is configured to determine the similarity difference between the similarity corresponding to the first associated sentence vector and the similarity corresponding to the second associated sentence vector;
[0112] The target associated sentence vector determination unit is configured to use the first associated sentence vector as the target associated sentence vector when the similarity corresponding to the first associated sentence vector is greater than or equal to a fifth threshold and the similarity difference is greater than or equal to a sixth threshold.
[0113] Optionally, the device further includes:
[0114] The question return module is configured to return the question to be filtered from the preset question set based on the similarity when the similarity corresponding to the first associated sentence vector is less than the fifth threshold or the similarity difference is less than the sixth threshold.
[0115] The second target recall data determination module is configured to execute a question confirmation instruction triggered based on the question to be screened, and determine the second target recall data based on the question corresponding to the question confirmation instruction.
[0116] According to a fifth aspect of the present disclosure, an electronic device is provided, comprising: a processor; and a memory for storing processor-executable instructions; wherein the processor is configured to execute the instructions to implement the method as described in any one of the first or second aspects above.
[0117] According to a sixth aspect of the present disclosure, a computer-readable storage medium is provided, wherein when instructions in the storage medium are executed by a processor of an electronic device, the electronic device is enabled to perform any of the methods described in the first or second aspect of the present disclosure.
[0118] According to a seventh aspect of the present disclosure, a computer program product including instructions is provided that, when run on a computer, causes the computer to perform the method described in either the first or second aspect of the present disclosure.
[0119] The technical solutions provided by the embodiments of this disclosure bring at least the following beneficial effects:
[0120] By combining multiple sample questions with the same semantics into a sample question set, and constructing initial positive and negative sample pairs from the sentence vectors of the sample questions in this set, simple sample and / or noise filtering is performed. This effectively ensures the effectiveness of the sample pairs used to train the sentence vector model, greatly improving the robustness and accuracy of the trained word vector model, and thus also improving the semantic representation accuracy of the word vector model, effectively ensuring the subsequent data recall rate and recall accuracy.
[0121] It should be understood that the above general description and the following detailed description are exemplary and explanatory only, and are not intended to limit this disclosure. Attached Figure Description
[0122] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with this disclosure and, together with the description, serve to explain the principles of this disclosure, and are not intended to unduly limit this disclosure.
[0123] Figure 1 This is a schematic diagram illustrating an application environment according to an exemplary embodiment;
[0124] Figure 2 This is a flowchart illustrating a sentence vector model generation method according to an exemplary embodiment;
[0125] Figure 3 This is a flowchart illustrating an exemplary embodiment of obtaining a set of sample questions by acquiring a second number of sample questions from a first number of sample question groups;
[0126] Figure 4 This is a flowchart illustrating a simple sample filtering process for obtaining target positive sample pairs from initial positive sample pairs according to an exemplary embodiment.
[0127] Figure 5 This is a flowchart illustrating a method for performing simple sample filtering and noise filtering on initial negative sample pairs to obtain target negative sample pairs, according to an exemplary embodiment.
[0128] Figure 6 This is a flowchart illustrating a data retrieval method according to an exemplary embodiment;
[0129] Figure 7This is a flowchart illustrating, according to an exemplary embodiment, a method for obtaining associated sentence vectors of a target sentence vector from a preset set of sentence vectors;
[0130] Figure 8 This is a block diagram of a sentence vector model generation device according to an exemplary embodiment;
[0131] Figure 9 This is a block diagram illustrating a data retrieval device according to an exemplary embodiment;
[0132] Figure 10 This is a block diagram illustrating an electronic device for sentence vector model generation according to an exemplary embodiment. Detailed Implementation
[0133] To enable those skilled in the art to better understand the technical solutions of this disclosure, the technical solutions in the embodiments of this disclosure will be clearly and completely described below with reference to the accompanying drawings.
[0134] It should be noted that the terms "first," "second," etc., used in the specification, claims, and accompanying drawings of this disclosure are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of this disclosure described herein can be implemented in orders other than those illustrated or described herein. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with this disclosure. Rather, they are merely examples of apparatuses and methods consistent with some aspects of this disclosure as detailed in the appended claims.
[0135] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for display, data used for analysis, etc.) involved in this disclosure are all information and data authorized by the user or fully authorized by all parties.
[0136] Please see Figure 1 , Figure 1 This is a schematic diagram illustrating an application environment according to an exemplary embodiment, such as... Figure 1 As shown, the application environment may include a server 100, a question-and-answer knowledge base 200, a sentence vector index library 300, and a terminal 400.
[0137] In an optional embodiment, server 100 can be used to generate sentence vector models, and based on these models, convert questions in question-answering knowledge base 200 into corresponding sentence vectors, storing them to obtain sentence vector index library 300. Server 100 then provides backend services to terminal 400 by combining question-answering knowledge base 200 and sentence vector index library 300. Specifically, server 100 can be a standalone physical server, a server cluster or distributed system composed of multiple physical servers, or a cloud server providing basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communication, middleware services, domain name services, security services, CDN (Content Delivery Network), and big data and artificial intelligence platforms.
[0138] In an optional embodiment, terminal 400 can be used to provide data retrieval services to any user. Specifically, terminal 400 can be, but is not limited to, electronic devices such as smartphones, desktop computers, tablets, laptops, smart speakers, digital assistants, augmented reality (AR) / virtual reality (VR) devices, and smart wearable devices, or software running on the aforementioned electronic devices, such as applications. Optionally, the operating system running on the electronic device can be, but is not limited to, Android, iOS, Linux, Windows, etc.
[0139] In addition, it should be noted that, Figure 1 The example shown is merely one application environment provided by this disclosure. In practical applications, other application environments may also be included, such as more terminals.
[0140] In the embodiments described in this specification, the server 100, question-and-answer knowledge base 200, sentence vector index library 300, and terminal 400 can be directly or indirectly connected through wired or wireless communication methods, and this disclosure does not impose any restrictions.
[0141] Figure 2 This is a flowchart illustrating a sentence vector model generation method according to an exemplary embodiment, such as... Figure 2 As shown, this sentence vector model generation method is used in electronic devices such as terminals and servers, and includes the following steps.
[0142] In step S201, a second number of sample questions are obtained from a first number of sample question groups to obtain a sample question set. The first number of sample question groups includes multiple sample questions with the same semantics within the same sample question group.
[0143] In practical applications, there are often multiple questions in a question-answer pair that address the same answer. Optionally, multiple questions with the same semantics corresponding to the same answer can be grouped into a sample question group.
[0144] In a specific embodiment, during the training of the sentence vector model, a third number of sample question groups can be used as the original training data. Correspondingly, in each training round, a second number of sample questions can be obtained from the first number of sample question groups to obtain a sample question set.
[0145] In an optional embodiment, such as Figure 3 As shown, obtaining a second set of sample questions from a first set of sample questions may include the following steps:
[0146] In step S2011, a third number of sample question groups are obtained.
[0147] In step S2013, the third number of sample question groups are split into multiple sets of questions in the same group; any set of questions in the same group includes the second number of sample questions in the same group.
[0148] In step S2015, a first number of sample question groups are determined from the third number of sample question groups;
[0149] In step S2017, one set of questions is selected from the multiple sets of questions in the same group corresponding to the first number of sample question groups to obtain the sample question set for the current training round.
[0150] In a specific embodiment, the third quantity is greater than the first quantity; the third quantity of sample question groups can be divided into multiple sets of questions belonging to the same group, each containing a second quantity of sample questions, according to the second quantity. Then, from each of the multiple sets of questions belonging to the first quantity of sample question groups, one set of questions belonging to the same group is selected to obtain the sample question set for the current training round.
[0151] In the above embodiments, by splitting multiple sample question groups with the same semantic sample questions into multiple sets of questions in the same group, it is convenient to obtain different sets of sample questions in each training round to construct training samples, thereby improving the generalization of the trained word vector model.
[0152] In step S203, the sample question set is input into the sentence vector model to be trained for sentence vector extraction to obtain the sentence vectors of the sample questions in the sample question set;
[0153] In one specific embodiment, the sentence vector model to be trained can be a pre-set sentence vector model that needs to be trained.
[0154] In a specific embodiment, in each training round, the sample question set of the current training round can be input into the sentence vector model to be trained for sentence vector extraction, so as to obtain the sentence vector of the sample question in the sample question set.
[0155] In step S205, initial positive sample pairs and initial negative sample pairs are constructed based on the sentence vectors of the sample questions in the sample question set;
[0156] In an optional embodiment, the above-mentioned construction of initial positive sample pairs and initial negative sample pairs based on the sentence vectors of sample questions in the sample question set includes:
[0157] The sentence vectors of pairwise sample questions belonging to the same sample question group are used as the initial positive sample pairs;
[0158] The sentence vectors of the pairwise sample questions belonging to different sample question groups are used as the initial negative sample pairs.
[0159] In one specific embodiment, the sentence vectors of sample questions in the sample question set include sentence vectors from sample questions in the same sample question group, as well as sentence vectors from sample questions in different sample question groups.
[0160] In an optional embodiment, during the construction of initial positive sample pairs, the sentence vector of any sample question can be used as the sentence vector to be paired. Correspondingly, any sentence vector in the same group of the sentence vectors in the sample question set and the sentence vector to be paired are used to construct an initial positive sample pair. Specifically, assuming that the sentence vectors of the sample questions in the sample question set include n (the product of the first quantity and the second quantity) sentence vectors; when the i-th sentence vector is the sentence vector to be paired, the i-th sentence vector can be used to construct an initial positive sample pair with the X-th (the second quantity minus 1) sentence vector in the same group.
[0161] In an optional embodiment, during the construction of initial negative sample pairs, the sentence vector of any sample question can be used as the sentence vector to be paired. Correspondingly, any non-grouped sentence vector in the corresponding sentence vector of the sample question set is paired with the sentence vector to be paired to construct an initial negative sample pair. Specifically, assuming that the sentence vectors of the sample questions in the sample question set include n (the product of the first quantity and the second quantity) sentence vectors; when the i-th sentence vector is the sentence vector to be paired, the i-th sentence vector can be paired with the second quantity * (first quantity - 1) non-grouped sentence vectors to form initial negative sample pairs.
[0162] In the above embodiments, by combining whether the sentence vectors of two pairs of sample questions correspond to the same sample question group, the initial positive sample pairs and initial negative sample pairs can be constructed, providing data support for subsequent word vector model training.
[0163] In an optional embodiment, the above method may further include:
[0164] Store the sentence vectors of the sample questions in the sample question set of the current training round into a preset queue.
[0165] In one specific embodiment, the preset queue can be a pre-set queue for storing sentence vectors of sample questions during the word vector model training process. Optionally, the preset queue may include, but is not limited to, FIFO (First Input First Output).
[0166] In one specific embodiment, in order to improve the generalization of the word vector model, a certain number of the latest word vectors can be stored in the preset queue.
[0167] Accordingly, constructing initial positive and initial negative sample pairs based on the sentence vectors of sample questions in the sample question set can include:
[0168] Based on the sentence vectors of sample questions in the sample question set and the sentence vectors in the preset queue, initial positive sample pairs and initial negative sample pairs are constructed.
[0169] In one specific embodiment, initial positive and initial negative sample pairs can be constructed by considering whether the sentence vectors of sample questions in the sample question set correspond to the same sample question group. Similarly, initial positive and initial negative sample pairs can also be constructed by considering whether the sentence vectors in the preset queue correspond to the same sample question group. Optionally, initial positive and initial negative sample pairs can also be constructed by considering whether the sentence vectors of sample questions in the sample question set and the sentence vectors in the preset queue correspond to the same sample question group.
[0170] In the above embodiments, the initial positive sample pairs and initial negative sample pairs are constructed by combining the sentence vectors of the current training round and the sentence vectors in the preset queue. This can expand the positive and negative sample pairs and thus improve the generalization of the word vector model.
[0171] In step S207, the initial positive sample pairs and initial negative sample pairs are filtered to obtain the target positive sample pairs and target negative sample pairs;
[0172] In one specific embodiment, the target positive sample pair can be a positive sample pair after filtering out simple samples, and the target negative sample pair can be a negative sample pair after filtering out simple samples and / or noise.
[0173] In an optional embodiment, the above-mentioned filtering of the initial positive sample pairs and the initial negative sample pairs to obtain the target positive sample pairs and the target negative sample pairs includes: performing simple sample filtering on the initial positive sample pairs to obtain the target positive sample pairs; and performing simple sample filtering and / or noise filtering on the initial negative sample pairs to obtain the target negative sample pairs.
[0174] In one specific embodiment, for an initial positive sample pair, the higher the similarity between the two sentence vectors in the initial positive sample pair, the higher the probability that the initial positive sample pair belongs to a simple sample; conversely, the lower the similarity between the two sentence vectors in an initial negative sample pair, the higher the probability that the initial positive sample pair belongs to a simple sample. In one specific embodiment, similarity can be combined to filter out initial positive sample pairs with high similarity to achieve simple positive sample filtering. In another specific embodiment, similarity can be combined to filter out initial negative sample pairs with low similarity to achieve simple negative sample filtering.
[0175] In practical applications, initial negative sample pairs with extremely high similarity are likely to be noisy data, meaning that such initial negative sample pairs may belong to positive sample pairs with the same semantics. Optionally, to reduce the negative impact of noisy data on the model, highly similar initial negative sample pairs can be filtered out based on similarity.
[0176] In addition, it should be noted that the filtering threshold can be set according to the actual application during simple sample filtering and / or noise filtering.
[0177] In the above embodiments, by performing simple sample filtering on the initial positive sample pairs and simple sample filtering and / or noise filtering on the initial negative sample pairs, the robustness and accuracy of the subsequent word vector model can be effectively guaranteed, the semantic representation accuracy of the word vector model can be improved, and the training speed can be increased.
[0178] In an optional embodiment, such as Figure 4 As shown, the above simple sample filtering of the initial positive sample pairs to obtain the target positive sample pairs may include the following steps:
[0179] In step S401, the first similarity between the first sentence vector and the second sentence vector in the initial positive sample pair is determined;
[0180] In step S403, the initial positive sample pairs with a first similarity less than or equal to the first threshold and greater than the second threshold are taken as target positive sample pairs;
[0181] In a specific embodiment, the second threshold is greater than the first threshold. The first threshold can be a preset upper limit threshold for similarity corresponding to non-simple positive sample pairs. Correspondingly, those with similarity greater than the first threshold can be simple positive sample pairs, which need to be filtered. Combining the first threshold can filter out difficult positive sample pairs.
[0182] In one specific embodiment, the second threshold can be determined based on the maximum similarity between the first sentence vector and the corresponding negative sentence vector in any initial positive sample pair. Optionally, the maximum value, or the maximum value plus a smaller value (e.g., 0.001), can be used as the second threshold to ensure that initial positive sample pairs with a similarity slightly greater than the maximum similarity between the first sentence vector and the corresponding negative sentence vector in any initial positive sample pair are retained as target positive sample pairs. Accordingly, the second threshold is used to further filter difficult positive sample pairs, better ensuring the robustness and training speed of the word vector model.
[0183] In one specific embodiment, the initial positive sample pair may include two sentence vectors arranged in order. Optionally, the first sentence vector may be the previous sentence vector in the initial positive sample pair, and the corresponding second sentence vector may be the next sentence vector in the initial positive sample pair. Alternatively, the first sentence vector may be the next sentence vector in the initial positive sample pair, and the corresponding second sentence vector may be the previous sentence vector in the initial positive sample pair.
[0184] In a specific embodiment, the negative example sentence vector of the first sentence vector can be a sentence vector of a different sample question group corresponding to the first sentence vector; correspondingly, the positive example sentence vector of the first sentence vector can be a sentence vector of the same sample question group corresponding to the first sentence vector.
[0185] In the above embodiments, by combining the upper similarity threshold corresponding to non-simple positive sample pairs and the second threshold determined based on the maximum similarity between the first sentence vector and the corresponding negative sentence vector in any initial positive sample pair, simple sample filtering of the initial positive sample pairs can effectively ensure the robustness and accuracy of the subsequent word vector model, improve the semantic representation accuracy of the word vector model, and thus improve the training speed.
[0186] In an optional embodiment, such as Figure 5 As shown, the above-mentioned simple sample filtering and noise filtering of the initial negative sample pairs to obtain the target negative sample pairs may include the following steps:
[0187] In step S501, the second similarity between the third and fourth sentence vectors in the initial negative sample pair is determined;
[0188] In step S503, the current noise filtering parameters are determined based on the current training round;
[0189] In step S505, the initial negative sample pairs whose second similarity is greater than or equal to the third threshold and less than the target threshold are taken as target negative sample pairs;
[0190] In one specific embodiment, the target threshold is greater than the third threshold. The target threshold can be the smaller value between the fourth threshold and the current noise filtering parameter. Specifically, the current noise filtering parameter can be used for noise filtering; specifically, during the noise filtering process, as the number of iterations increases, more difficult samples are gradually added to the training process. Optionally, assuming the current iteration number is T, the current noise filtering parameter can be... Here, λ can be a pre-set hyperparameter.
[0191] In a specific embodiment, the aforementioned third threshold is a preset lower similarity threshold corresponding to non-simple negative sample pairs. The corresponding initial negative sample pairs that are less than the third threshold can be simple negative sample pairs, which need to be filtered. Combined with the third threshold, difficult negative sample pairs (i.e., non-simple negative sample pairs) can be screened out.
[0192] In one specific embodiment, the aforementioned fourth threshold can be determined based on the minimum similarity between the third sentence vector and the corresponding positive sentence vector in any initial negative sample pair. Optionally, the minimum value, or the minimum value minus a small value (e.g., 0.001), can be used as the fourth threshold to ensure that initial negative sample pairs with a similarity slightly smaller than the minimum similarity between the third sentence vector and the corresponding positive sentence vector in any initial negative sample pair are retained as target positive sample pairs. Accordingly, combining the fourth threshold to further filter difficult positive sample pairs better ensures the robustness and training speed of the word vector model.
[0193] In the above embodiments, by combining the lower similarity threshold corresponding to non-simple negative sample pairs, and the fourth threshold determined based on the minimum similarity between the third sentence vector and the corresponding positive sentence vector in any initial negative sample pair, and the smaller value among the current noise filtering parameters, simple sample filtering and noise filtering are performed on the initial negative sample pairs. This can effectively ensure the robustness and accuracy of the subsequent word vector model, improve the semantic representation accuracy of the word vector model, and thus improve the training speed.
[0194] In one specific embodiment, simple sample filtering of the initial negative sample pairs to obtain target negative sample pairs may include taking the initial negative sample pairs with a second similarity greater than or equal to a third threshold and less than a fourth threshold as target negative sample pairs;
[0195] In one specific embodiment, noise filtering of the initial negative sample pairs to obtain the target negative sample pairs may include using the initial negative sample pairs with a second similarity less than the current noise filtering parameter as the target negative sample pairs.
[0196] In step S209, the first target loss is determined based on the target positive sample pairs and the target negative sample pairs;
[0197] In a specific embodiment, the higher the similarity between sentence vectors of the same group of questions obtained by combining the trained sentence vector model, the better, and the lower the similarity between sentence vectors of different groups of questions; optionally, the similarity of the target negative sample pair can be subtracted from the similarity of the target positive sample pair to obtain the above-mentioned first target loss.
[0198] In an optional embodiment, the above method further includes:
[0199] Determine the first weight of the target positive sample pairs;
[0200] Determine the second weight of the target negative sample pairs;
[0201] Accordingly, the first target loss, determined based on the target positive sample pairs and the target negative sample pairs, includes:
[0202] Determine the positive example loss based on the first weight and the target positive sample pair;
[0203] The negative loss is determined based on the second weight and the target negative sample pair;
[0204] The first target loss is determined based on the losses from negative examples and positive examples.
[0205] In a specific embodiment, the first weight of any of the aforementioned target positive sample pairs can characterize the degree of influence of the target positive sample pair on improving the semantic representation accuracy of the word vector model. Specifically, the first weight is negatively correlated with the similarity of the target positive sample pairs. Specifically, for a target positive sample pair, the higher its corresponding similarity, the less it helps to improve the semantic representation accuracy of the word vector model; correspondingly, the higher the similarity of the target positive sample pair, the lower its first weight.
[0206] In a specific embodiment, the second weight of any of the aforementioned target negative sample pairs can characterize the degree of influence of the target negative sample pair on improving the semantic representation accuracy of the word vector model. Specifically, the second weight is positively correlated with the similarity of the target negative sample pairs. Specifically, for a target negative sample pair, the higher its corresponding similarity, the greater the help in improving the semantic representation accuracy of the word vector model; correspondingly, the higher the similarity of the target negative sample pair, the higher its second weight.
[0207] In one specific embodiment, the first weight can be determined using the following formula:
[0208]
[0209] Where w1 is the first weight corresponding to the target positive sample pair composed of the i-th word vector and the j-th word vector; The similarity is the similarity between the target positive sample pairs composed of the i-th word vector and the j-th word vector. Let α be the vector of the i-th word vector and the vector of the k-th positive example sentence corresponding to the i-th word vector; α and γ are preset hyperparameters.
[0210] In one specific embodiment, the second weight can be determined using the following formula:
[0211]
[0212] Where w2 is the second weight corresponding to the target negative sample pair composed of the i-th word vector and the j-th word vector; The similarity is the similarity between the target negative sample pairs composed of the i-th word vector and the j-th word vector. β and γ are the vectors of the i-th word vector and the k-th negative example sentence corresponding to the i-th word vector; β and γ are preset hyperparameters.
[0213] In an optional embodiment, the similarity of the target positive sample pair is multiplied by the corresponding first weight to obtain the positive example loss; the similarity of the target negative sample pair is multiplied by the second weight to obtain the negative example loss; and the positive example loss is subtracted from the negative example loss to obtain the first target loss.
[0214] Furthermore, it should be noted that when the initial positive sample pairs and initial negative sample pairs include sample pairs generated by combining sentence vectors in the preset queue, since the preset queue includes sentence vectors corresponding to historical training rounds, optionally, the sentence vectors of sample questions in the sample question set of the current training round can be obtained, along with the first loss information determined by the corresponding target positive sample pairs and target negative sample pairs, and the second loss information determined by combining the sentence vectors in the preset queue with the corresponding target positive sample pairs and target negative sample pairs; and the first target loss is obtained by weighted summation of the first loss information and the second loss information. Specifically, the weights corresponding to the first loss information and the second loss information can be set according to the importance of the two in practical applications.
[0215] In the above embodiments, during the process of determining the first target loss, by combining the first weight that is negatively correlated with the similarity of the target positive sample pair and the first weight that is positively correlated with the similarity of the target negative sample pair, the role played by sample pairs with different degrees of influence on the semantic representation accuracy of the word vector model during the training process can be adjusted, thereby better ensuring the semantic representation accuracy of the subsequent word vector model.
[0216] In step S211, the sentence vector model to be trained is trained based on the first target loss to obtain the sentence vector model.
[0217] In a specific embodiment, the above-mentioned training of the sentence vector model to be trained based on the first target loss to obtain the sentence vector model may include updating the network parameters of the sentence vector model to be trained when the first target loss does not meet the preset conditions; repeating the above steps S201 and S209 based on the sentence vector model to be trained after adjusting the network parameters until the first target loss meets the preset conditions, and using the sentence vector model to be trained when the preset conditions are met as the sentence vector model.
[0218] In one specific embodiment, the first target loss can satisfy a preset condition by being less than or equal to a specified threshold, or by the difference between the corresponding first target losses in two training processes being less than a certain threshold. In the embodiments of this specification, the specified threshold and the certain threshold can be set according to actual training needs.
[0219] In an optional embodiment, the above method may further include:
[0220] From the initial positive sample pairs and the initial negative sample pairs, simple sample pairs are determined;
[0221] Based on the simple sample pairs, determine the second target loss;
[0222] The sentence vector model to be trained is trained based on the second objective loss to obtain the initial sentence vector model;
[0223] In a specific embodiment, initial positive sample pairs with a first similarity (the first similarity between the first sentence vector and the second sentence vector in the initial positive sample pair) greater than the first threshold are regarded as simple sample pairs; and initial negative sample pairs with a second similarity (the second similarity between the third sentence vector and the fourth sentence vector in the initial negative sample pair) less than the third threshold are regarded as simple sample pairs.
[0224] In a specific embodiment, the detailed determination of the second target loss based on the simple sample pairs can be found in the detailed determination of the first target loss based on the target positive sample pairs and the target negative sample pairs described above, and will not be repeated here.
[0225] In a specific embodiment, the above-mentioned inputting the sample question set into the sentence vector model to be trained for sentence vector extraction to obtain the sentence vectors of the sample questions in the sample question set includes: inputting the sample question set into the initial sentence vector model for sentence vector extraction to obtain the sentence vectors of the sample questions in the sample question set; and the specific refinement of the above-mentioned training the sentence vector model to be trained based on the second target loss to obtain the initial sentence vector model can be found in the above-mentioned training the sentence vector model to be trained based on the first target loss to obtain the sentence vector model, which will not be repeated here.
[0226] Accordingly, the sentence vector model obtained by training the sentence vector model based on the first target loss includes:
[0227] The initial sentence vector model is trained based on the first target loss to obtain the sentence vector model.
[0228] If the first target loss does not meet the preset conditions, update the network parameters of the initial sentence vector model; based on the initial sentence vector model after adjusting the network parameters, repeat the above process of obtaining a second number of sample questions from the first number of sample question groups to obtain a sample question set until the first target loss is determined according to the target positive sample pairs and the target negative sample pairs. When the first target loss meets the preset conditions, the initial sentence vector model corresponding to the preset conditions is used as the sentence vector model.
[0229] In the above embodiments, by pre-training the sentence vector model with simple sample pairs, the negative impact of noisy data on the model can be reduced. After training the initial sentence vector model based on simple sample pairs, more difficult sample pairs are gradually added to the training process as the number of iterations increases, which can better improve the robustness and accuracy of the trained word vector model.
[0230] As can be seen from the technical solutions provided in the embodiments of this specification above, in this specification, multiple sample questions with the same semantics are combined as a sample question set, and the sentence vectors of the sample questions in the sample question set are combined to construct initial positive sample pairs and initial negative sample pairs for simple sample and / or noise filtering. This effectively ensures the effectiveness of the sample pairs used to train the sentence vector model, greatly improves the robustness and accuracy of the trained word vector model, and further improves the semantic representation accuracy of the word vector model, effectively ensuring the subsequent data recall rate and recall accuracy.
[0231] The following describes a data retrieval method based on the aforementioned sentence vector model; specifically, as follows... Figure 6 As shown, Figure 6 This is a flowchart illustrating a data retrieval method according to an exemplary embodiment. The data retrieval method is used in electronic devices such as terminals and servers, and includes the following steps.
[0232] In step S601, in response to the data recall request, the target sentence vector of the target question in the data recall request is determined based on the sentence vector model;
[0233] In one specific embodiment, the sentence vector model can be obtained by training the sentence vector model to be trained based on the target positive sample pairs after filtering out simple samples and the target negative sample pairs after filtering out simple samples and / or noise.
[0234] In one specific embodiment, the terminal side can provide a user-facing data retrieval page. Accordingly, the user can enter a target question on the data retrieval page and trigger a data retrieval request. In response to the data retrieval request, the server determines the target sentence vector of the target question in the data retrieval request based on a sentence vector model.
[0235] In a specific embodiment, the target question can be input into the sentence vector model to obtain the target sentence vector mentioned above.
[0236] In step S603, the target related sentence vector of the target sentence vector is obtained from the preset sentence vector set.
[0237] In one specific embodiment, the aforementioned preset sentence vector set is the sentence vector of the questions in the preset question set determined based on the sentence vector model; specifically, the preset question set can be questions from a question-and-answer knowledge base. The preset sentence vector set can be stored in a sentence vector index library.
[0238] In an optional embodiment, such as Figure 7 As shown, obtaining the associated sentence vector of the target sentence vector from the preset sentence vector set may include the following steps:
[0239] In step S701, the similarity between the sentence vectors in the combination of the target sentence vector and the preset sentence vector is determined;
[0240] In step S703, based on similarity, the first associated sentence vector and the second associated sentence vector with the top two similarity to the target sentence vector are determined, and the similarity corresponding to the first associated sentence vector is greater than the similarity corresponding to the second associated sentence vector;
[0241] In step S705, the similarity difference between the similarity corresponding to the first associated sentence vector and the similarity corresponding to the second associated sentence vector is determined;
[0242] In step S707, if the similarity of the first associated sentence vector is greater than or equal to the fifth threshold and the similarity difference is greater than or equal to the sixth threshold, the first associated sentence vector is taken as the target associated sentence vector.
[0243] In one specific embodiment, the similarity corresponding to the first associated sentence vector is greater than the similarity corresponding to the second associated sentence vector. That is, the first associated sentence vector is the sentence vector with the highest similarity to the target sentence vector; the second associated sentence vector is the sentence vector with the second highest similarity to the target sentence vector.
[0244] In one specific embodiment, the fifth threshold can be combined with a similarity threshold determined for recall accuracy in practical applications; specifically, the higher the recall accuracy, the larger the fifth threshold. Specifically, the sixth threshold can be combined with a similarity threshold determined for recall accuracy in practical applications; specifically, the higher the recall accuracy, the larger the sixth threshold. Specifically, by ensuring that the similarity difference between the similarity corresponding to the first associated sentence vector and the similarity corresponding to the second associated sentence vector is greater than the sixth threshold, it can be effectively ensured that the similarity between other associated sentence vectors (excluding the first associated sentence vector with the highest similarity) and the target sentence vector is low.
[0245] In the above embodiments, while ensuring that the first associated sentence vector with the highest similarity to the target sentence vector has a high similarity to the target sentence vector, the comparison of the similarity difference between the sixth threshold and the similarity corresponding to the first associated sentence vector and the similarity corresponding to the second associated sentence vector can effectively ensure that, except for the first associated sentence vector with the highest similarity, the other associated sentence vectors have a low similarity to the target sentence vector, thereby effectively improving the recall accuracy.
[0246] In step S605, the first target recall data is determined based on the target associated sentence vector.
[0247] In one specific embodiment, the knowledge question-answering base can store a set of (question, answer) pairs. Accordingly, the answer to the question (question) corresponding to the target associated sentence vector can be used as target recall data and returned to the terminal.
[0248] As can be seen from the technical solutions provided in the embodiments of this specification above, in this specification, combining the sentence vector model trained based on the target positive sample pairs after filtering out simple samples and the target negative sample pairs after filtering out simple samples and / or noise to perform data recall can improve the accuracy of semantic representation of questions during the data recall process, thereby improving the data recall rate and recall accuracy.
[0249] In an optional embodiment, the above method further includes:
[0250] If the similarity of the first associated sentence vector is less than the fifth threshold, or the similarity difference is less than the sixth threshold, the question to be filtered is returned from the preset question set based on the similarity.
[0251] In response to the question confirmation instruction triggered based on the above-mentioned question to be screened, the second target recall data is determined based on the question corresponding to the question confirmation instruction.
[0252] In an optional embodiment, if the similarity to the first associated sentence vector is less than the fifth threshold, or the similarity difference is less than the sixth threshold, the similarity can be combined to return the sentence vector with the highest similarity to the target sentence vector as the question to be filtered, and after the user confirms, the answer to the question corresponding to the question confirmation instruction is used as the second target recall data.
[0253] In an optional embodiment, if the similarity corresponding to the first associated sentence vector is less than the fifth threshold, or the similarity difference is less than the sixth threshold, the similarity can be combined to return a preset number of sentence vectors with higher similarity to the target sentence vector as the questions to be filtered, and after the user confirms, the answer to the question corresponding to the question confirmation instruction is used as the second target recall data.
[0254] In the above embodiments, when it is impossible to accurately recall the target related questions, the question to be filtered can be returned to the user to ensure accurate return of the target recall data.
[0255] Figure 8 This is a block diagram of a sentence vector model generation device according to an exemplary embodiment. (Refer to...) Figure 8 The device includes:
[0256] The sample question set acquisition module 810 is configured to acquire a second number of sample questions from a first number of sample question groups to obtain a sample question set, wherein the first number of sample question groups include multiple sample questions with the same semantics within the same sample question group.
[0257] The sentence vector extraction module 820 is configured to extract sentence vectors from the sample question set by inputting it into the sentence vector model to be trained, thereby obtaining the sentence vectors of the sample questions in the sample question set.
[0258] The sample pair construction module 830 is configured to construct initial positive sample pairs and initial negative sample pairs based on the sentence vectors of sample questions in the sample question set;
[0259] The sample pair filtering module 840 is configured to perform filtering on the initial positive sample pairs and the initial negative sample pairs to obtain the target positive sample pairs and the target negative sample pairs. The target positive sample pairs are the positive sample pairs after filtering out simple samples, and the target negative sample pairs are the negative sample pairs after filtering out simple samples and / or noise.
[0260] The first target loss determination module 850 is configured to determine the first target loss based on the target positive sample pairs and the target negative sample pairs;
[0261] The sentence vector model training module 860 is configured to perform training on the sentence vector model to be trained based on the first objective loss, and obtain the sentence vector model.
[0262] Optionally, the above-mentioned device further includes:
[0263] The simple sample pair determination module is configured to determine simple sample pairs from the initial positive sample pairs and the initial negative sample pairs;
[0264] The second target loss determination module is configured to determine the second target loss based on the simple sample pairs;
[0265] The initial sentence vector model training module is configured to train the sentence vector model to be trained based on the second objective loss to obtain the initial sentence vector model;
[0266] The sentence vector extraction module is also configured to perform sentence vector extraction by inputting the sample question set into the initial sentence vector model, and obtain the sentence vectors of the sample questions in the sample question set;
[0267] The sentence vector model training module is also configured to train the initial sentence vector model based on the first target loss to obtain the sentence vector model.
[0268] Optionally, the sample pair filtering module 840 includes:
[0269] The simple sample filtering unit is configured to perform simple sample filtering on the initial positive sample pairs to obtain the target positive sample pairs;
[0270] The filtering unit is configured to perform simple sample filtering and / or noise filtering on the initial negative sample pairs to obtain the target negative sample pairs.
[0271] Optional, simple sample filtering units include:
[0272] The first similarity determination unit is configured to perform the determination of the first similarity between the first sentence vector and the second sentence vector in the initial positive sample pair;
[0273] The target positive sample pair determination unit is configured to execute the determination of initial positive sample pairs with a first similarity less than or equal to a first threshold and greater than a second threshold as target positive sample pairs;
[0274] The first threshold is a preset upper limit threshold for similarity between non-simple positive sample pairs, and the second threshold is determined based on the maximum similarity between the first sentence vector and the corresponding negative sentence vector in any initial positive sample pair.
[0275] Optionally, the filtering unit includes:
[0276] The second similarity determination unit is configured to perform the determination of the second similarity between the third sentence vector and the fourth sentence vector in the initial negative sample pair;
[0277] The current noise filtering parameter determination unit is configured to determine the current noise filtering parameters based on the current training round.
[0278] The target negative sample pair determination unit is configured to perform the following: an initial negative sample pair whose second similarity is greater than or equal to a third threshold and less than a target threshold is selected as the target negative sample pair.
[0279] The target threshold is the smaller value between the fourth threshold and the current noise filtering parameters. The third threshold is the preset lower similarity threshold corresponding to non-simple negative sample pairs. The fourth threshold is determined based on the minimum similarity between the third sentence vector and the corresponding positive sentence vector in any initial negative sample pair.
[0280] Optionally, the above-mentioned device further includes:
[0281] The first weight determination module is configured to determine the first weight of the target positive sample pair, and the first weight is negatively correlated with the similarity of the target positive sample pair.
[0282] The second weight determination module is configured to determine the second weight of the target negative sample pair, and the second weight is positively correlated with the similarity of the target negative sample pair.
[0283] The first target loss determination module 850 includes:
[0284] The positive example loss determination unit is configured to determine the positive example loss based on the first weight and the target positive sample pair;
[0285] The negative example loss determination unit is configured to determine the negative example loss based on the second weight and the target negative sample pair;
[0286] The first target loss determination unit is configured to determine the first target loss based on the negative example loss and the positive example loss.
[0287] Optionally, the sample pair building module 830 includes:
[0288] The initial positive sample pair determination unit is configured to execute the sentence vectors of pairwise sample questions belonging to the same sample question group as the initial positive sample pairs;
[0289] The initial negative sample pair determination unit is configured to take the sentence vectors of pairwise sample questions belonging to different sample question groups as initial negative sample pairs.
[0290] Optionally, the sample question set acquisition module 810 includes:
[0291] The sample question group acquisition unit is configured to acquire a third number of sample question groups, where the third number is greater than the first number.
[0292] The sample question group splitting unit is configured to split the third number of sample question groups into multiple sets of questions in the same group; any set of questions in the same group includes the second number of sample questions in the same group;
[0293] The sample question group determination unit is configured to determine a first number of sample question groups from a third number of sample question groups;
[0294] The sample question set determination unit is configured to select one set of questions from multiple sets of questions corresponding to a first number of sample question groups to obtain the sample question set for the current training round.
[0295] Optionally, the above-mentioned device further includes:
[0296] The sentence vector storage module is configured to store the sentence vectors of sample questions from the sample question set of the current training round into a preset queue.
[0297] Optionally, the sample pair construction module 830 is also configured to construct initial positive sample pairs and initial negative sample pairs based on the sentence vectors of sample questions in the sample question set and the sentence vectors in a preset queue.
[0298] Figure 9 This is a block diagram illustrating a data retrieval device according to an exemplary embodiment. (Refer to...) Figure 9 The device includes:
[0299] The target sentence vector determination module 910 is configured to perform a response to a data recall request, based on a sentence vector model, to determine the target sentence vector of the target question in the data recall request;
[0300] The target associated sentence vector acquisition module 920 is configured to acquire the target associated sentence vector from the preset sentence vector set, wherein the preset sentence vector set is the sentence vector of the question in the preset question set determined based on the sentence vector model;
[0301] The first target recall data determination module 930 is configured to determine the first target recall data based on the target association sentence vector.
[0302] Optionally, the target related sentence vector acquisition module 920 includes:
[0303] The similarity determination unit is configured to determine the similarity between sentence vectors in the combination of the target sentence vector and the preset sentence vector;
[0304] The associated sentence vector determination unit is configured to perform a similarity-based determination of the first and second associated sentence vectors that rank first and second in similarity to the target sentence vector, wherein the similarity of the first associated sentence vector is greater than that of the second associated sentence vector.
[0305] The similarity difference determination unit is configured to determine the similarity difference between the similarity corresponding to the first associated sentence vector and the similarity corresponding to the second associated sentence vector;
[0306] The target associated sentence vector determination unit is configured to use the first associated sentence vector as the target associated sentence vector if the similarity corresponding to the first associated sentence vector is greater than or equal to the fifth threshold and the similarity difference is greater than or equal to the sixth threshold.
[0307] Optionally, the above-mentioned device further includes:
[0308] The module for returning questions to be filtered is configured to return questions to be filtered from a preset question set based on similarity if the similarity of the first associated sentence vector is less than the fifth threshold or the similarity difference is less than the sixth threshold.
[0309] The second target recall data determination module is configured to execute a question confirmation instruction triggered based on the above-mentioned question to be screened, and determine the second target recall data based on the question corresponding to the question confirmation instruction.
[0310] Regarding the apparatus in the above embodiments, the specific manner in which each module performs its operation has been described in detail in the embodiments related to the method, and will not be elaborated upon here.
[0311] Figure 10 This is a block diagram illustrating an electronic device for word vector model generation or data retrieval according to an exemplary embodiment. The electronic device may be a server, and its internal structure diagram may be as follows: Figure 10 As shown, this electronic device includes a processor, memory, and a network interface connected via a system bus. The processor provides computing and control capabilities. The memory includes a non-volatile storage medium and internal memory. The non-volatile storage medium stores the operating system and computer programs. The internal memory provides an environment for the operation of the operating system and computer programs stored in the non-volatile storage medium. The network interface is used to communicate with external terminals via a network connection. When the computer program is executed by the processor, it implements a word vector model generation or data retrieval method.
[0312] Those skilled in the art will understand that Figure 10 The structure shown is merely a block diagram of a portion of the structure related to the present disclosure and does not constitute a limitation on the electronic device to which the present disclosure is applied. A specific electronic device may include more or fewer components than those shown in the figure, or combine certain components, or have different component arrangements.
[0313] In an exemplary embodiment, an electronic device is also provided, including: a processor; and a memory for storing processor-executable instructions; wherein the processor is configured to execute the instructions to implement the sentence vector model generation method as described in the embodiments of this disclosure.
[0314] In an exemplary embodiment, a computer-readable storage medium is also provided, wherein when the instructions in the storage medium are executed by a processor of an electronic device, the electronic device is enabled to perform the sentence vector model generation method of the present disclosure embodiments.
[0315] In an exemplary embodiment, a computer program product containing instructions is also provided, which, when run on a computer, causes the computer to execute the sentence vector model generation method of the present disclosure embodiments.
[0316] Those skilled in the art will understand that all or part of the processes in the methods of the above embodiments can be implemented by a computer program instructing related hardware. This computer program can be stored in a non-volatile computer-readable storage medium. When executed, the computer program can include the processes of the embodiments of the above methods. Any references to memory, storage, databases, or other media used in the embodiments provided in this application can include non-volatile and / or volatile memory. Non-volatile memory can include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM), or flash memory. Volatile memory can include random access memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in various forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), dual data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous link DRAM (SLDRAM), RAMbus direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and RAMbus dynamic RAM (RDRAM), etc.
[0317] Other embodiments of this disclosure will readily occur to those skilled in the art upon consideration of the specification and practice of the invention disclosed herein. This application is intended to cover any variations, uses, or adaptations of this disclosure that follow the general principles of this disclosure and include common knowledge or customary techniques in the art not disclosed herein. The specification and examples are to be considered exemplary only, and the true scope and spirit of this disclosure are indicated by the following claims.
[0318] It should be understood that this disclosure is not limited to the precise structures described above and shown in the accompanying drawings, and various modifications and changes can be made without departing from its scope. The scope of this disclosure is limited only by the appended claims.
Claims
1. A sentence vector model generation method, characterized in that: include: Obtaining a second number of sample questions from the first number of sample question groups respectively to obtain a sample question set, wherein the same sample question group in the first number of sample question groups includes a plurality of sample questions having the same semantics; Inputting the sample question set into the sentence vector model to be trained to extract sentence vectors, and obtaining sentence vectors of the sample questions in the sample question set; Based on the sentence vectors of the sample questions in the sample question set, constructing initial positive sample pairs and initial negative sample pairs, wherein the sentence vectors in the initial positive sample pairs correspond to two sample questions belonging to the same sample question group, and the sentence vectors in the initial negative sample pairs correspond to two sample questions belonging to different sample question groups; The initial positive sample pair and the initial negative sample pair are filtered to obtain a target positive sample pair and a target negative sample pair, wherein the target positive sample pair is a positive sample pair after the initial positive sample pair filters out simple samples, and the target negative sample pair is a negative sample pair after the initial negative sample pair filters out simple samples and / or noise; the simple samples filtered out in the initial positive sample pair include sample pairs whose similarity between corresponding sentence vectors is greater than a first threshold; the simple samples filtered out in the initial negative sample pair include sample pairs whose similarity between corresponding sentence vectors is less than a third threshold; Determine a first target loss according to the target positive sample pair and the target negative sample pair, wherein the first target loss is determined based on similarities corresponding to two sentence vectors in the target positive sample pair and similarities corresponding to two sentence vectors in the target negative sample pair; The sentence vector model to be trained is trained based on the first target loss to obtain a sentence vector model.
2. The sentence vector model generation method according to claim 1, characterized in that: The method further comprises: Determine a simple sample pair from the initial positive sample pair and the initial negative sample pair; Determining a second target loss according to the simple sample pair; Training the sentence vector model to be trained based on the second target loss to obtain an initial sentence vector model; The step of inputting the sample question set into the sentence vector model to be trained to extract sentence vectors, and obtaining sentence vectors of the sample questions in the sample question set comprises: inputting the sample question set into the initial sentence vector model to extract sentence vectors, and obtaining sentence vectors of the sample questions in the sample question set; The step of training the sentence vector model to be trained based on the first target loss to obtain the sentence vector model includes: training the initial sentence vector model based on the first target loss to obtain the sentence vector model.
3. The sentence vector model generation method according to claim 1, characterized in that: The filtering the initial positive sample pair and the initial negative sample pair to obtain a target positive sample pair and a target negative sample pair comprises: Performing simple sample filtering on the initial positive sample pair to obtain the target positive sample pair; Simple sample filtering and / or noise filtering is performed on the initial negative sample pair to obtain the target negative sample pair.
4. The sentence vector model generation method according to claim 3, characterized in that: The performing simple sample filtering on the initial positive sample pair to obtain the target positive sample pair comprises: Determining a first similarity between a first sentence vector and a second sentence vector in the initial positive sample pair; Taking the initial positive sample pair whose first similarity is less than or equal to the first threshold and greater than the second threshold as the target positive sample pair; The first threshold is a preset upper similarity threshold corresponding to a non-simple positive sample pair, and the second threshold is determined based on the maximum value of the similarity between the first sentence vector and the corresponding negative example sentence vector in any initial positive sample pair.
5. The method for generating a sentence vector model according to claim 3, wherein: The performing simple sample filtering and noise filtering on the initial negative sample pair to obtain the target negative sample pair comprises: Determining a second similarity between the third sentence vector and the fourth sentence vector in the initial negative sample pair; According to the current training round, determine the current noise filtering parameters; The initial negative sample pair whose second similarity is greater than or equal to a third threshold and less than a target threshold is used as the target negative sample pair; The target threshold is the smaller value of the fourth threshold and the current noise filtering parameter, the third threshold is the preset lower limit threshold of similarity corresponding to the non-simple negative sample pair, and the fourth threshold is determined based on the minimum value of the similarity between the third sentence vector and the corresponding positive example sentence vector in any initial negative sample pair.
6. The method for generating a sentence vector model according to any one of claims 1 to 5, characterized in that: The method further comprises: Determining a first weight of the target positive sample pair, where the first weight is negatively correlated with the similarity corresponding to the target positive sample pair; Determine a second weight of the target negative sample pair, where the second weight is positively correlated with the similarity corresponding to the target negative sample pair; The determining a first target loss according to the target positive sample pair and the target negative sample pair comprises: Determining a positive example loss according to the first weight and the target positive sample pair; Determining a negative example loss according to the second weight and the target negative sample pair; The first target loss is determined according to the negative example loss and the positive example loss.
7. The method for generating a sentence vector model according to any one of claims 1 to 5, characterized in that: The constructing of the initial positive sample pair and the initial negative sample pair based on the sentence vectors of the sample questions in the sample question set includes: Using sentence vectors of two sample questions belonging to the same sample question group as the initial positive sample pairs; The sentence vectors of two sample questions belonging to different sample question groups are used as the initial negative sample pairs.
8. The method for generating a sentence vector model according to any one of claims 1 to 5, characterized in that: The step of obtaining a second number of sample questions from the first number of sample question groups to obtain a set of sample question sentences comprises: Obtaining a third number of sample question groups, where the third number is greater than the first number; Splitting the third number of sample question groups into a plurality of sets of questions in the same group; any set of questions in the same group includes the second number of sample questions in the same group; Determining the first number of sample question groups from the third number of sample question groups; From the multiple question sets in the same group corresponding to the first number of sample question sets, one question set in the same group is selected respectively to obtain a sample question set of the current training round.
9. The method for generating a sentence vector model according to claim 8, characterized in that: The method further comprises: The sentence vectors of the sample questions in the sample question set of the current training round are stored in a preset queue.
10. The method for generating a sentence vector model according to claim 9, characterized in that: The constructing of the initial positive sample pair and the initial negative sample pair based on the sentence vectors of the sample questions in the sample question set includes: Based on the sentence vectors of the sample questions in the sample question set and the sentence vectors in the preset queue, initial positive sample pairs and initial negative sample pairs are constructed.
11. A data recall method, characterized in that: include: In response to a data recall request, determining a target sentence vector of a target question in the data recall request based on a sentence vector model generated by the sentence vector model generation method according to any one of claims 1 to 10; Acquire a target associated sentence vector of the target sentence vector from a preset sentence vector set, wherein the preset sentence vector set is a sentence vector of a question sentence in a preset question sentence set determined based on the sentence vector model; Based on the target-associated sentence vector, first target recall data is determined.
12. The data recall method according to claim 11, characterized in that: The acquiring, from a preset sentence vector set, an associated sentence vector of the target sentence vector comprises: Determine the similarity between the target sentence vector and the sentence vector in the combination of the preset sentence vector; Based on the similarity, determining a first related sentence vector and a second related sentence vector that rank first and second in similarity to the target sentence vector, wherein the similarity corresponding to the first related sentence vector is greater than the similarity corresponding to the second related sentence vector; Determine a similarity difference between the similarity corresponding to the first related sentence vector and the similarity corresponding to the second related sentence vector; When the similarity corresponding to the first related sentence vector is greater than or equal to a fifth threshold, and the similarity difference is greater than or equal to a sixth threshold, the first related sentence vector is used as the target related sentence vector.
13. The data recall method according to claim 12, characterized in that: The method further comprises: When the similarity corresponding to the first related sentence vector is less than the fifth threshold, or the similarity difference is less than the sixth threshold, returning the to-be-screened question sentence from the preset question sentence set based on the similarity; In response to a question confirmation instruction triggered based on the question to be screened, second target recall data is determined based on the question corresponding to the question confirmation instruction.
14. A sentence vector model generation device, characterized in that: include: a sample question set acquisition module, configured to acquire a second number of sample questions from the first number of sample question groups to obtain a sample question set, wherein the same sample question group in the first number of sample question groups includes a plurality of sample questions with the same semantics; A sentence vector extraction module is configured to perform sentence vector extraction by inputting the sample question set into the sentence vector model to be trained, so as to obtain the sentence vector of the sample question in the sample question set; A sample pair construction module is configured to execute sentence vectors of sample questions in the sample question set to construct initial positive sample pairs and initial negative sample pairs, wherein the sentence vectors in the initial positive sample pairs correspond to two sample questions belonging to the same sample question group, and the sentence vectors in the initial negative sample pairs correspond to two sample questions belonging to different sample question groups; A sample pair filtering module is configured to perform filtering on the initial positive sample pair and the initial negative sample pair to obtain a target positive sample pair and a target negative sample pair, wherein the target positive sample pair is a positive sample pair after the initial positive sample pair filters out simple samples, and the target negative sample pair is a negative sample pair after the initial negative sample pair filters out simple samples and / or noise; the simple samples filtered out in the initial positive sample pair include sample pairs whose similarity between corresponding sentence vectors is greater than a first threshold; the simple samples filtered out in the initial negative sample pair include sample pairs whose similarity between corresponding sentence vectors is less than a third threshold; A first target loss determination module is configured to determine a first target loss based on the target positive sample pair and the target negative sample pair, wherein the first target loss is determined based on the similarity corresponding to the sentence vectors of each two in the target positive sample pair and the similarity corresponding to the sentence vectors of each two in the target negative sample pair; The sentence vector model training module is configured to perform training of the sentence vector model to be trained based on the first target loss to obtain a sentence vector model.
15. The sentence vector model generation device according to claim 14, characterized in that: The device also includes: A simple sample pair determination module is configured to determine a simple sample pair from the initial positive sample pair and the initial negative sample pair; A second target loss determination module is configured to determine a second target loss based on the simple sample pair; an initial sentence vector model training module, configured to train the sentence vector model to be trained based on the second target loss to obtain an initial sentence vector model; The sentence vector extraction module is further configured to perform sentence vector extraction by inputting the sample question set into an initial sentence vector model to obtain sentence vectors of the sample questions in the sample question set; The sentence vector model training module is also configured to perform training of the initial sentence vector model based on the first target loss to obtain the sentence vector model.
16. The sentence vector model generation device according to claim 15, characterized in that: The sample pair filtering module comprises: A simple sample filtering unit is configured to perform simple sample filtering on the initial positive sample pair to obtain the target positive sample pair; The filtering unit is configured to perform simple sample filtering and / or noise filtering on the initial negative sample pair to obtain the target negative sample pair.
17. The sentence vector model generation device according to claim 16, characterized in that: The simple sample filtering unit comprises: A first similarity determination unit is configured to determine a first similarity between a first sentence vector and a second sentence vector in the initial positive sample pair; a target positive sample pair determination unit, configured to execute the initial positive sample pair whose first similarity is less than or equal to a first threshold and greater than a second threshold as the target positive sample pair; The first threshold is a preset upper similarity threshold corresponding to a non-simple positive sample pair, and the second threshold is determined based on the maximum value of the similarity between the first sentence vector and the corresponding negative example sentence vector in any initial positive sample pair.
18. The sentence vector model generation device according to claim 16, characterized in that: The filtering unit comprises: A second similarity determination unit is configured to determine a second similarity between the third sentence vector and the fourth sentence vector in the initial negative sample pair; A current noise filtering parameter determination unit is configured to determine a current noise filtering parameter according to a current training round; a target negative sample pair determination unit, configured to execute the initial negative sample pair whose second similarity is greater than or equal to a third threshold and less than a target threshold as the target negative sample pair; The target threshold is the smaller value of the fourth threshold and the current noise filtering parameter, the third threshold is the preset lower limit threshold of similarity corresponding to the non-simple negative sample pair, and the fourth threshold is determined based on the minimum value of the similarity between the third sentence vector and the corresponding positive example sentence vector in any initial negative sample pair.
19. The sentence vector model generation device according to any one of claims 14 to 18, characterized in that: The device also includes: A first weight determination module is configured to determine a first weight of the target positive sample pair, where the first weight is negatively correlated with the similarity corresponding to the target positive sample pair; A second weight determination module is configured to determine a second weight of the target negative sample pair, where the second weight is positively correlated with the similarity corresponding to the target negative sample pair; The first target loss determination module includes: a positive example loss determining unit, configured to determine a positive example loss according to the first weight and the target positive sample pair; a negative example loss determining unit, configured to determine a negative example loss according to the second weight and the target negative sample pair; The first target loss determining unit is configured to determine the first target loss according to the negative example loss and the positive example loss.
20. The sentence vector model generation device according to any one of claims 14 to 18, characterized in that: The sample pair building module includes: An initial positive sample pair determination unit is configured to use sentence vectors of two sample questions belonging to the same sample question group as the initial positive sample pair; The initial negative sample pair determination unit is configured to execute sentence vectors of two sample questions belonging to different sample question groups as the initial negative sample pairs.
21. The sentence vector model generation device according to any one of claims 14 to 18, characterized in that: The sample question set acquisition module includes: a sample question group acquisition unit, configured to acquire a third number of sample question groups, the third number being greater than the first number; The sample question group splitting unit is configured to split the third number of sample question groups into a plurality of sets of questions in the same group; any set of questions in the same group includes the second number of sample questions in the same group; a sample question group determining unit, configured to determine the first number of sample question groups from the third number of sample question groups; The sample question set determination unit is configured to select one question set in the same group from the multiple question sets in the same group corresponding to the first number of sample question groups, to obtain a sample question set of a current training round.
22. The sentence vector model generation device according to claim 21, characterized in that: The device also includes: The sentence vector storage module is configured to store the sentence vectors of the sample questions in the sample question set of the current training round into a preset queue.
23. The sentence vector model generation device according to claim 22, characterized in that: The sample pair construction module is further configured to construct an initial positive sample pair and an initial negative sample pair based on the sentence vectors of the sample questions in the sample question set and the sentence vectors in the preset queue.
24. A data recall device, characterized in that: include: a target sentence vector determination module configured to execute, in response to a data recall request, determining a target sentence vector of a target question in the data recall request based on a sentence vector model generated by the sentence vector model generation method according to any one of claims 1 to 10; a target-associated sentence vector acquisition module, configured to execute acquiring a target-associated sentence vector of the target sentence vector from a preset sentence vector set, wherein the preset sentence vector set is a sentence vector of a question sentence in a preset question sentence set determined based on the sentence vector model; The first target recall data determination module is configured to determine the first target recall data based on the target associated sentence vector.
25. The data recall device according to claim 24, characterized in that: The associated sentence vector acquisition module includes: A similarity determination unit, configured to determine the similarity between the target sentence vector and the sentence vector in the combination of the preset sentence vector; A related sentence vector determining unit is configured to determine, based on the similarity, a first related sentence vector and a second related sentence vector that rank first and second in similarity to the target sentence vector, wherein the similarity corresponding to the first related sentence vector is greater than the similarity corresponding to the second related sentence vector; a similarity difference determining unit, configured to determine a similarity difference between a similarity corresponding to the first related sentence vector and a similarity corresponding to the second related sentence vector; The target associated sentence vector determining unit is configured to execute, when the similarity corresponding to the first associated sentence vector is greater than or equal to a fifth threshold and the similarity difference is greater than or equal to a sixth threshold, using the first associated sentence vector as the target associated sentence vector.
26. The data recall device according to claim 25, characterized in that: The device also includes: a to-be-screened question sentence returning module, configured to return the to-be-screened question sentence from the preset question sentence set based on the similarity when the similarity corresponding to the first associated sentence vector is less than the fifth threshold, or the similarity difference is less than the sixth threshold; The second target recall data determination module is configured to execute a question confirmation instruction in response to being triggered based on the question to be screened, and determine the second target recall data based on the question corresponding to the question confirmation instruction.
27. An electronic device, characterized in that: include: processor; a memory for storing instructions executable by the processor; The processor is configured to execute the instructions to implement the sentence vector model generation method described in any one of claims 1 to 10 or any data recall method described in claims 11 to 13.
28. A computer-readable storage medium, characterized in that: When the instructions in the storage medium are executed by a processor of an electronic device, the electronic device is enabled to execute the sentence vector model generation method described in any one of claims 1 to 10 or any data recall method described in claims 11 to 13.
29. A computer program product comprising computer instructions, characterized in that When the computer instructions are executed by the processor, the sentence vector model generation method described in any one of claims 1 to 10 or the data recall method described in any one of claims 11 to 13 is implemented.
Citation Information
Patent Citations
Standard question identification method and device, computer equipment and storage medium
CN113220862A
Medical domain knowledge graph question and answer processing method, apparatus, device, and storage medium
WO2021012878A1
