Movatterモバイル変換


[0]ホーム

URL:


CN114490923B - Training method, device, equipment and storage medium for similar text matching model - Google Patents

Training method, device, equipment and storage medium for similar text matching model
Download PDF

Info

Publication number
CN114490923B
CN114490923BCN202111436420.0ACN202111436420ACN114490923BCN 114490923 BCN114490923 BCN 114490923BCN 202111436420 ACN202111436420 ACN 202111436420ACN 114490923 BCN114490923 BCN 114490923B
Authority
CN
China
Prior art keywords
batch
target
similar
matching model
similar text
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202111436420.0A
Other languages
Chinese (zh)
Other versions
CN114490923A (en
Inventor
田上萱
何文栋
蔡成飞
赵文哲
孔伟杰
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Tencent Technology Shenzhen Co Ltd
Original Assignee
Tencent Technology Shenzhen Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Tencent Technology Shenzhen Co LtdfiledCriticalTencent Technology Shenzhen Co Ltd
Priority to CN202111436420.0ApriorityCriticalpatent/CN114490923B/en
Publication of CN114490923ApublicationCriticalpatent/CN114490923A/en
Application grantedgrantedCritical
Publication of CN114490923BpublicationCriticalpatent/CN114490923B/en
Activelegal-statusCriticalCurrent
Anticipated expirationlegal-statusCritical

Links

Classifications

Landscapes

Abstract

Translated fromChinese

本申请实施例公开了一种相似文本匹配模型的训练、装置、设备及存储介质,相关实施例可应用于云技术、人工智能以及智能交通等各种场景,用于提高相似文本的召回率。该方法包括:获取与目标场景对应的第一批次样本集,并输入至原始相似文本匹配模型进行向量转化操作,得到第一批次正例句向量以及第一批次负例句向量,对第一批次正例句向量进行三元组构造操作,得到若干个第一批次三元组,并进行损失计算操作,得到第一批次损失函数,并对原始相似文本匹配模型进行参数调整操作,得到中间相似文本匹配模型,重复获取与目标场景对应的第二批次样本集,并执行向量转化操作、三元组构造操作、损失计算操作以及参数调整操作,得到目标相似文本匹配模型。

The embodiments of the present application disclose a training, device, equipment and storage medium for a similar text matching model. The relevant embodiments can be applied to various scenarios such as cloud technology, artificial intelligence and intelligent transportation, and are used to improve the recall rate of similar texts. The method includes: obtaining a first batch of sample sets corresponding to the target scenario, and inputting them into the original similar text matching model for vector conversion operation to obtain a first batch of positive example sentence vectors and a first batch of negative example sentence vectors, performing a triple construction operation on the first batch of positive example sentence vectors to obtain a plurality of first batch triples, and performing a loss calculation operation to obtain a first batch loss function, and performing a parameter adjustment operation on the original similar text matching model to obtain an intermediate similar text matching model, repeatedly obtaining a second batch of sample sets corresponding to the target scenario, and performing a vector conversion operation, a triple construction operation, a loss calculation operation and a parameter adjustment operation to obtain a target similar text matching model.

Description

Training method, device, equipment and storage medium of similar text matching model
Technical Field
The embodiment of the application relates to the technical field of data processing, in particular to a training method, device and equipment for a similar text matching model and a storage medium.
Background
Along with development of science and technology, applications of retrieving similar texts are becoming wider, and when a user uses a search engine to search information, the situation that the concept of an input search word and the concept of the same word in an obtained search result are inconsistent often occurs, so that content required by the user can be retrieved from massive data more quickly and accurately, and provided or pushed to the user.
The retrieval of the similar text is usually realized based on a deep learning judgment text similarity model, but the text similarity model is a model with a supervision mechanism based on the deep learning judgment, and is better fitted and generalized by taking a large number of manual labeling training samples as supervision signals, however, the text has rich semantics, different labeling personnel have different standards about text similarity, and are difficult to unify, so that great difficulty is brought to labeling the training samples of manual data, great cost is required for training, optimizing and iterating the model, and the fitting and generalizing effects of the model are poor, so that the recall rate of the model is reduced.
Disclosure of Invention
The embodiment of the application provides a training method, a training device, training equipment and a storage medium for a similar text matching model, which are used for shortening the distance between a positive sample and a similar sample through a triplet loss function and pushing away the distance between the positive sample and a different sample so as to enable similar text vectors to form clusters in a feature space, improve the learning capability of the similar text matching model on the similarity between the text vectors, enable the similar text matching model to be better fitted, and further improve the recall rate of a target similar text matching model on the similar text.
In one aspect, the embodiment of the application provides a training method for a similar text matching model, which comprises the following steps:
Acquiring a first batch sample set corresponding to a target scene, wherein the first batch sample set comprises a first batch positive example sample and a first batch negative example sample;
Respectively inputting the first batch of positive example samples and the first batch of negative example samples into an original similar text matching model to perform vector conversion operation to obtain first batch of positive example sentence vectors and first batch of negative example sentence vectors;
performing triplet construction operation on the first batch of normal example sentence vectors to obtain a plurality of first batch of triples, wherein each first batch of triples comprises a first batch of normal example sentence vectors, a first batch of similar sentence vectors and a first batch of heterogeneous sentence vectors, and the first batch of similar sentence vectors and the first batch of heterogeneous sentence vectors are derived from a first batch of negative example sentence vectors;
Performing loss calculation operation on a plurality of first batch triples to obtain a first batch loss function corresponding to a first batch sample set;
According to the first batch of loss functions, performing parameter adjustment operation on the original similar text matching model to obtain an intermediate similar text matching model;
and repeatedly acquiring a second batch of sample sets corresponding to the target scene based on the intermediate similar text matching model, and executing vector conversion operation, ternary combination operation, loss calculation operation and parameter adjustment operation to obtain the target similar text matching model.
Another aspect of the present application provides a training device for a similar text matching model, including:
The system comprises an acquisition unit, a processing unit and a processing unit, wherein the acquisition unit is used for acquiring a first batch sample set corresponding to a target scene, and the first batch sample set comprises a first batch positive example sample and a first batch negative example sample;
The processing unit is used for respectively inputting the first batch of positive example samples and the first batch of negative example samples into the original similar text matching model to perform vector conversion operation to obtain first batch of positive example sentence vectors and first batch of negative example sentence vectors;
the processing unit is further used for performing triplet construction operation on the first batch of normal sentence vectors to obtain a plurality of first batch of triples, wherein each first batch of triples comprises a first batch of normal sentence vectors, a first batch of similar sentence vectors and a first batch of heterogeneous sentence vectors, and the first batch of similar sentence vectors and the first batch of heterogeneous sentence vectors are derived from the first batch of negative example sentence vectors;
the processing unit is also used for carrying out loss calculation operation on a plurality of first batch triples and obtaining a first batch loss function corresponding to the first batch sample set;
the processing unit is also used for carrying out parameter adjustment operation on the original similar text matching model according to the first batch loss function to obtain an intermediate similar text matching model;
The processing unit is further configured to repeatedly obtain a second batch of sample sets corresponding to the target scene based on the intermediate similar text matching model, and perform vector conversion operation, ternary combination operation, loss calculation operation and parameter adjustment operation to obtain the target similar text matching model.
In one possible design, in one implementation of another aspect of the embodiments of the present application, the obtaining unit may specifically be configured to:
Acquiring a target text data set corresponding to a target scene, wherein the target text data set at least comprises a first batch of positive examples samples and source text data corresponding to the target scene;
Retrieving N first matching texts corresponding to the first batch of positive examples from the target text data set as N first batch of negative examples, wherein N is an integer greater than 1;
Calculating matching scores between the first batch of positive examples and each first batch of negative examples to obtain N first matching scores;
respectively carrying out normalization operation on the N first matching scores to obtain N sample matching scores;
And constructing the first batch sample set according to the first batch positive sample, the first batch negative sample and the sample matching score.
In one possible design, in one implementation of another aspect of the embodiments of the present application, the processing unit may specifically be configured to:
Dividing the first batch of negative example sentence vectors according to the sample matching score to obtain a similar sentence vector set and a heterogeneous sentence vector set;
extracting any similar sentence vector from the similar sentence vector set to obtain similar sentence vectors of a first batch;
any heterogeneous sentence vector is extracted from the heterogeneous sentence vector set, and a first batch of heterogeneous sentence vectors are obtained.
In one possible design, in one implementation of another aspect of the embodiments of the present application, the processing unit may specifically be configured to:
Respectively carrying out loss calculation operation on the first batch of normal sentence vectors, the first batch of similar sentence vectors and the first batch of heterogeneous sentence vectors to obtain loss functions corresponding to a plurality of first batch triples;
And carrying out weighted calculation operation on the loss functions corresponding to the first batch of triples to obtain the first batch of loss functions.
In one possible design, in one implementation of another aspect of the embodiments of the present application, the processing unit may specifically be configured to:
Acquiring a second batch of sample sets corresponding to the target scene, and executing vector conversion operation, ternary structure construction operation and loss calculation operation according to the second batch of sample sets to obtain a second loss function;
And if the second loss function is smaller than the first threshold value, taking the current intermediate similar text matching model as a target similar text matching model.
In one possible design, in one implementation of another aspect of the embodiments of the present application, the processing unit may specifically be configured to:
obtaining intermediate model parameters of an intermediate similar text matching model;
When a second batch of sample sets corresponding to the target scene are obtained, vector conversion operation, triple construction operation and parameter adjustment operation are carried out, a current similar text matching model is obtained, and the current similar text matching model comprises current model parameters;
and if the difference value between the intermediate model parameter and the current model parameter meets a second threshold value, taking the current intermediate similar text matching model as a target similar text matching model.
In one possible design, in one implementation of another aspect of the embodiments of the present application,
The acquisition unit is also used for receiving the text to be matched;
the processing unit is also used for respectively passing the text to be matched and the target text data set through a target similar text matching model to obtain a sentence vector to be matched and a plurality of original sentence vectors;
The processing unit is also used for calculating the similarity between the sentence vector to be matched and each original sentence vector to obtain a plurality of similarity scores;
And the determining unit is used for determining the target similar text according to the plurality of similar scores and pushing the target similar text to the target terminal equipment.
From the above technical solutions, the embodiment of the present application has the following advantages:
The method comprises the steps of obtaining a first batch sample set corresponding to a target scene, respectively inputting a first batch positive example sample and a first batch negative example sample in the first batch sample set to an original similar text matching model to perform vector conversion operation to obtain a first batch positive example sentence vector and a first batch negative example sentence vector, performing triplet construction operation on the first batch positive example sentence vector to obtain a plurality of first batch triples, further performing loss calculation operation on the plurality of first batch triples to obtain a first batch loss function corresponding to the first batch sample set, performing parameter adjustment operation on the original similar text matching model according to the first batch loss function to obtain an intermediate similar text matching model, and then repeatedly obtaining a second batch sample set corresponding to the target scene based on the intermediate similar text matching model, and performing vector conversion operation, triplet construction operation, loss calculation operation and parameter adjustment operation to obtain the target similar text matching model. Through the method, the triplet loss function can be obtained by constructing the triplet through the first batch of positive example sentence vectors and the first batch of negative example sentence vectors, the distance between the positive example sample and the similar sample can be shortened through the triplet loss function, the distance between the positive example sample and the similar sample can be pushed away, so that similar text vectors can form clusters in a feature space, the learning capacity of the similar text matching model on the similarity between the text vectors is improved, the similar text matching model can be better fitted, and the recall rate of the target similar text matching model on the similar text is improved.
Drawings
FIG. 1 is a schematic diagram of an architecture of a text data control system in accordance with an embodiment of the present application;
FIG. 2 is a flow chart of one embodiment of a method of training a similar text matching model in an embodiment of the present application;
FIG. 3 is a schematic diagram of a search principle of a training method of a similar text matching model in an embodiment of the present application;
FIG. 4 is a schematic diagram of another search principle of a training method of a similar text matching model in an embodiment of the present application;
FIG. 5 is a schematic diagram of a sample set construction of a training method for a similar text matching model in an embodiment of the application;
FIG. 6 is a schematic diagram of a model training flow of a training method for a similar text matching model in an embodiment of the application;
FIG. 7 is a schematic diagram of an embodiment of a training apparatus for a similar text matching model in an embodiment of the present application;
FIG. 8 is a schematic diagram of one embodiment of a computer device in an embodiment of the application.
Detailed Description
The embodiment of the application provides a training method, a training device, training equipment and a storage medium for a similar text matching model, which are used for shortening the distance between a positive sample and a similar sample through a triplet loss function and pushing away the distance between the positive sample and a different sample so as to enable similar text vectors to form clusters in a feature space, improve the learning capability of the similar text matching model on the similarity between the text vectors, enable the similar text matching model to be better fitted, and further improve the recall rate of a target similar text matching model on the similar text.
The terms "first," "second," "third," "fourth" and the like in the description and in the claims and drawings, if any, are used for distinguishing between similar objects and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used may be interchanged where appropriate such that the embodiments of the application described herein may be implemented, for example, in sequences other than those illustrated or otherwise described herein. Furthermore, the terms "comprises," "comprising," and "includes" and any variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, system, article, or apparatus that comprises a list of steps or elements is not necessarily limited to those steps or elements expressly listed or inherent to such process, method, article, or apparatus.
With the rapid development of information, cloud technology (Cloud technology) is also gradually moving into the aspects of people's life. The cloud technology is a generic term of network technology, information technology, integration technology, management platform technology, application technology and the like based on cloud computing business model application, can form a resource pool, and is flexible and convenient as required. Cloud computing technology will become an important support. Background services of technical networking systems require a large amount of computing, storage resources, such as video websites, picture-like websites, and more portals. Along with the high development and application of the internet industry, each article possibly has an own identification mark in the future, the identification mark needs to be transmitted to a background system for logic processing, data with different levels can be processed separately, and various industry data needs strong system rear shield support and can be realized only through cloud computing.
Cloud Security (Cloud Security) refers to a generic term of Security software, hardware, users, institutions, and Security Cloud platforms based on Cloud computing business model application. Cloud security fuses emerging technologies and concepts such as parallel processing, grid computing, unknown virus behavior judgment and the like, acquires the latest information of Trojan horse and malicious programs in the Internet through abnormal monitoring of a large number of network clients on software behaviors, sends the latest information to a server for automatic analysis and processing, and distributes solutions of viruses and Trojan horse to each client. The training test method of the similar text matching model provided by the embodiment of the application can be realized through a cloud computing technology and a cloud security technology.
It should be understood that the training test method of the similar text matching model provided by the application can be applied to the fields of cloud technology, artificial intelligence, intelligent traffic and the like, and is used for completing the pushing or putting of the similar text to the target object through the matching of the similar text, for example, more matched advertisements can be recommended to the target object through the matching of the similar text to advertisement text, for example, more matched commodities can be recommended to the target object through the matching of the similar text to commodity text, for example, more matched books or documents can be recommended to the target object through the matching of the similar text to book text, in the various scenes, the model is usually judged based on deep learning to realize the matching of the similar text, but a large number of manual labeling training samples are needed to enable the model to be better fitted and generalized, however, the text semantics are rich and the standards of different labeling personnel about the text similarity are very different and are very difficult to unify, and therefore, great difficulty is brought to labeling the training samples to the training data, the training samples are required to be used for training, optimization and iteration, the model is difficult to be matched, and the model is difficult to be better, and the model is called, and the model is difficult to be called.
In order to solve the above-mentioned problems, the present application provides a training test method of a similar text matching model, which is applied to a text data control system shown in fig. 1, referring to fig. 1, fig. 1 is a schematic diagram of a structure of the text data control system in an embodiment of the present application, as shown in fig. 1, a server respectively inputs a first batch of positive examples and a first batch of negative examples in a first batch of sample sets to an original similar text matching model to perform vector conversion operation, so as to obtain a first batch of positive example sentence vectors and a first batch of negative example sentence vectors, performs a triplet construction operation on the first batch of positive example sentence vectors, so as to obtain a plurality of first batch triples, further performs a loss calculation operation on the plurality of first batch triples, obtains a first batch loss function corresponding to a first batch of sample set, and performs a parameter adjustment operation on the original similar text matching model according to the first batch loss function, so as to obtain an intermediate similar text matching model, and then repeatedly obtains a second batch of similar text matching model corresponding to the target scene, and performs a parameter adjustment operation on the first batch of sample sets, so as to obtain a target text matching operation loss. Through the method, the triplet loss function can be obtained by constructing the triplet through the first batch of positive example sentence vectors and the first batch of negative example sentence vectors, the distance between the positive example sample and the similar sample can be shortened through the triplet loss function, the distance between the positive example sample and the similar sample can be pushed away, so that similar text vectors can form clusters in a feature space, the learning capacity of the similar text matching model on the similarity between the text vectors is improved, the similar text matching model can be better fitted, and the recall rate of the target similar text matching model on the similar text is improved.
It should be understood that only one terminal device is shown in fig. 1, and in an actual scenario, a greater variety of terminal devices may participate in the data processing process, where the terminal devices include, but are not limited to, mobile phones, computers, intelligent voice interaction devices, intelligent home appliances, vehicle terminals, etc., and the specific number and variety are determined by the actual scenario, and the specific number and variety are not limited herein. In addition, one server is shown in fig. 1, but in an actual scenario, there may also be a plurality of servers involved, especially in a scenario of multi-model training interaction, the number of servers depends on the actual scenario, and the present application is not limited thereto.
It should be noted that in this embodiment, the server may be an independent physical server, or may be a server cluster or a distributed system formed by a plurality of physical servers, or may be a cloud server that provides cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communication, middleware services, domain name services, security services, a content distribution network (content delivery network, CDN), and basic cloud computing services such as big data and an artificial intelligence platform. The terminal device and the server may be directly or indirectly connected through wired or wireless communication, and the terminal device and the server may be connected to form a blockchain network, which is not limited herein.
In order to solve the above-mentioned problems, the present application proposes a training method of a similar text matching model, which is generally executed by a server or a terminal device, and accordingly, a training apparatus applied to the similar text matching model is generally provided in the server or the terminal device.
It is to be understood that the training method, apparatus, device and storage medium of the similar text matching model disclosed in the present application, wherein a plurality of servers or terminal devices may be formed into a blockchain, and the servers or terminal devices are nodes on the blockchain. In practical applications, data sharing between nodes may be required in a blockchain, and text data or the like may be stored on each node.
Referring to fig. 2 and fig. 6, an embodiment of a training method for a similar text matching model in an embodiment of the present application includes:
In step S101, a first batch sample set corresponding to a target scene is obtained, where the first batch sample set includes a first batch positive sample and a first batch negative sample;
In this embodiment, before a matching request or a search request sent by a target terminal device is obtained, for example, before a text to be matched or a text to be searched is obtained, a first batch of sample sets corresponding to a target scene may be obtained, so that an original similar text matching model may be trained by a first batch of positive examples samples and a first batch of negative examples in the first batch of sample sets, so as to optimize the original similar text matching model.
Specifically, before obtaining the text to be matched or the text to be retrieved, the target scene may be specifically represented as an advertisement scene, a news information scene, a book management scene, or the like, or may be other target scenes, which are not specifically limited herein, and further, a first batch of sample sets corresponding to the target scene may be obtained, where the first batch of sample sets may be a batch of sample data including a positive sample set and a negative sample set that are randomly extracted from the sample sets, the first positive sample set is advertisement text under a known advertisement scene, and the first negative sample set and the first positive sample are text data subjected to ES matching, where, as shown in table 1, one positive sample may correspond to one or more negative sample.
TABLE 1
For example, a first batch sample set may be 128-dimensional sample data, i.e. include 12 pieces of sample data, which may include 10 positive samples, i.e. first batch positive samples, and 118 pieces of text data that are ES-matched with 10 positive samples, i.e. first batch negative samples, respectively.
In step S102, the first batch of positive examples and the first batch of negative examples are respectively input to the original similar text matching model for vector conversion operation, so as to obtain a first batch of positive examples and a first batch of negative examples;
In this embodiment, after the first batch of positive examples and the first batch of negative examples are obtained, the first batch of positive examples and the first batch of negative examples may be input to a plurality of original similar text matching models respectively for vector conversion, so as to obtain a first batch of positive example sentence vectors and a first batch of negative example sentence vectors, so that the distance between each positive example and each negative example can be better calculated by the first batch of positive example sentence vectors and the first batch of negative example sentence vectors, and the similarity between the positive examples and the negative examples can be better represented by the distance between the positive examples and the negative examples.
Specifically, as shown in fig. 6, the original similar text matching model may be specifically represented by a Bert model combined with a plurality of fully connected layers and a pooling layer, and other text processing models may also be used, which are not particularly limited herein. After the first batch of positive examples and the first batch of negative examples are obtained, as shown in fig. 6, the first batch of positive examples and the first batch of negative examples can be respectively input into a plurality of original similar text matching models to perform vector conversion, for example, the first batch of positive examples and the first batch of negative examples are compiled by the Bert model respectively, at least two word vectors corresponding to the first batch of positive examples and at least two word vectors corresponding to the first batch of negative examples can be obtained, then at least two word vectors corresponding to the first batch of positive examples and at least two word vectors corresponding to the first batch of negative examples are respectively passed through a plurality of full-connection layers and a pooling layer, and the first batch of positive examples and the first batch of negative examples can be obtained.
In step S103, performing a triplet construction operation on the first lot normal sentence vector to obtain a plurality of first lot triples, where each first lot triplet includes a first lot normal sentence vector, a first lot similar sentence vector, and a first lot heterogeneous sentence vector, and the first lot similar sentence vector and the first lot heterogeneous sentence vector are derived from the first lot negative example sentence vector;
In this embodiment, after the first lot of positive example sentence vectors and the first lot of negative example sentence vectors are obtained, for each first lot of positive example sentence vectors, one first lot of positive example sentence vector, one first lot of similar sentence vector and one first lot of heterogeneous sentence vector may be randomly combined into one triplet, where one first lot of positive example sentence vector may correspond to one or more triples, so that a plurality of first lot triples may be obtained.
The first lot of similar sentence vectors can be understood as negative example samples with higher similarity to the first lot of positive example sentence vectors, and can be specifically expressed as sentence vectors corresponding to the negative example samples with the matching score larger than 0.5, and the first lot of heterogeneous sentence vectors can be understood as negative example samples with lower similarity to the first lot of positive example sentence vectors, and can be specifically expressed as sentence vectors corresponding to the negative example samples with the matching score smaller than 0.5.
Specifically, after the first lot of positive example sentence vectors and the first lot of negative example sentence vectors are obtained, for example, 10 first lot of positive example samples and 118 first lot of negative example samples are obtained, and for one first lot of positive example samples, the first lot of negative example samples matched with the first lot of positive example samples through ES are assumed to be 3, wherein 2 first lot of similar sentence vectors and 1 first lot of alien sentence vectors corresponding to the 3 first lot of negative example samples are randomly extracted, and one first lot of positive example sentence vectors, one first lot of similar sentence vectors and one first lot of alien sentence vectors are randomly extracted to form one triplet, so that 2 triples corresponding to the first lot of positive example samples can be obtained.
In step S104, performing a loss calculation operation on the first lot triples to obtain a first lot loss function corresponding to the first lot sample set;
In this embodiment, after obtaining the first batches of triples, a loss function may be calculated for each triplet, and then the obtained first batches of loss functions are integrated into a loss function, that is, the first batch of loss functions corresponding to the first batch of sample sets, so that the triples loss function can be constructed based on the triples, the distances between the positive samples and the similar samples can be shortened, and the distances between the positive samples and the similar samples can be pushed away, so that similar text vectors can form clusters in the feature space, and the purpose of text matching is achieved.
Further, the similarity between text sentences can be regressed through the triple loss function, so that the original similar text model is represented by the embedded vectors (Embedding) obtained after learning, namely the similarity between the sentence vectors, and the normalized matching score is as close as possible.
The first batch loss function may be expressed as a triplet loss function, which may be specifically shown as follows:
Wherein L is a first batch loss function, ES (a, p) represents a normalized matching score of a positive example sample a corresponding to a positive example sentence vector and a negative example sample p corresponding to a similar sentence vector, d (p, n) represents cosine similarity between the similar negative example sentence vector corresponding to the negative example sample p and a heterogeneous sentence vector corresponding to the negative example sample n, i.e., d (a, p) =1-cosine (a, p).
In step S105, according to the first batch loss function, performing parameter adjustment operation on the original similar text matching model to obtain an intermediate similar text matching model;
Specifically, after the first batch of loss functions are obtained, parameter adjustment operation may be performed on the original similar text matching model, specifically, a reverse gradient descent algorithm may be adopted to update the model parameters in bert until convergence, so that an intermediate similar text matching model may be obtained.
In step S106, based on the intermediate similar text matching model, a second batch of sample sets corresponding to the target scene is repeatedly acquired, and a vector conversion operation, a triplet construction operation, a loss calculation operation, and a parameter adjustment operation are performed, so as to obtain the target similar text matching model.
In this embodiment, after the intermediate similar text matching model is obtained, a second batch of sample sets corresponding to the target scene may be repeatedly obtained, and based on the obtained second batch of sample sets, the vector conversion operation, the triplet construction operation, the loss calculation operation, and the parameter adjustment operation similar to those of steps S102 to S105 may be repeatedly performed until model parameters of the intermediate similar text matching model tend to be stable, and the intermediate similar text matching model may be used as the target similar text matching model.
According to the training method of the similar text matching model, the triples can be constructed through the first batch of positive example sentence vectors and the first batch of negative example sentence vectors to obtain the triples loss function, the distances between the positive example samples and the similar samples can be shortened through the triples loss function, the distances between the positive example samples and the similar samples are pushed away, so that the similar text vectors can form clusters in the feature space, the learning capacity of the similar text matching model on the similarity between the text vectors is improved, the similar text matching model can be better fitted, and the recall rate of the target similar text matching model on the similar text is improved.
Optionally, on the basis of the embodiment corresponding to fig. 2, in another optional embodiment of the training method for a similar text matching model provided by the embodiment of the present application, obtaining a first batch of sample sets corresponding to a target scene includes:
Acquiring a target text data set corresponding to a target scene, wherein the target text data set at least comprises a first batch of positive examples samples and source text data corresponding to the target scene;
Retrieving N first matching texts corresponding to the first batch of positive examples from the target text data set as N first batch of negative examples, wherein N is an integer greater than 1;
Calculating matching scores between the first batch of positive examples and each first batch of negative examples to obtain N first matching scores;
respectively carrying out normalization operation on the N first matching scores to obtain N sample matching scores;
and constructing a first batch sample set according to the first batch positive example sample, the first batch negative example sample and the sample matching score.
In this embodiment, as shown in fig. 5, before performing model training, a corresponding target text dataset may be obtained according to a target scene, N first matching texts corresponding to a first batch of positive examples may be retrieved from the target text dataset to obtain a first batch of negative examples, then, normalization operations may be performed on N first matching scores respectively to obtain N sample matching scores to obtain a first batch of sample sets corresponding to the target scene, and the target text dataset may be constructed by a search engine (ELASTICSEARCH, ES), where ES is a text search engine supporting efficient and multiple scoring strategies, and a self-supervision training sample, such as the first batch of sample sets, may be obtained by the target text dataset, without spending a lot of time to make text similarity standards, without performing tedious manual labeling, and the target text dataset may be replaced and adjusted according to different target scenes and requirements, so that a sample set suitable for the target scene may be obtained better and more accurately, and the construction of the sample set may be more flexible and stronger.
Specifically, before the target text data set corresponding to the target scene is obtained, a search library corresponding to the target scene may be established through a search engine, that is, source text data corresponding to the target scene is obtained, where the source text data may be specifically represented by an advertisement text, a description or a commodity text, etc. under the advertisement scene, or may be represented by other text data, where no specific limitation is made, the source text data may be specifically obtained by obtaining initial text data corresponding to the target scene through the search engine, further, since the initial text data, such as an advertisement text, has more text with the same meaning, for example, only punctuation difference, only individual text is different, so, in order to enhance diversity of the obtained initial text data as much as possible, for example, an edit distance between each two texts or a length of a longest text in each two texts is calculated, if the edit distance or a length difference between each two texts is smaller than a preset distance threshold, a text with a shorter length may be used as a sample with the same meaning, then an ES may be filtered, and a text with a different length may be used as a text segment, and then a text segment may be stored in an index unit (an IKER) may be used, and a text segment may be extracted from a text segment unit may be used as a memory word.
Further, as shown in fig. 5, after the source text data is acquired, a positive example sample (query) collected according to the target scene may be acquired, and the target text data may be composed with the acquired source text data, for example, assuming that six thousand positive example samples in the advertisement scene are collected, two million six thousand target text data may be composed with two million pieces of source text data in the advertisement scene, and then, when one target text data is stored by the ES, the ES may extract word units from the target text data using the word segmenter to establish an index of the target text data.
Further, as shown in fig. 5, the retrieval may be performed in the target text data for each positive sample, for example, six positive samples are retrieved in two million and six thousand target text data, and the matching of ESs may be performed during the retrieval, specifically, may be one or more of matching methods based on a bag-of-words (bag-of-words) or a sentence matching method that generates a sentence vector from a word vector, for example, as shown in fig. 3, assuming that one positive sample is "beijing Tiananmen", a set of word units such as "beijing", "Tiananmen" may be obtained after passing through the word splitter, if one source text data is "i'm, i.e." i "," beijing ", and" Tiananmen "after dividing words, and based on the matching of keywords of the bag-of-words, that is" beijing "and" Tiananmen ", the relevance score between the positive sample and the source text data may be calculated according to the word units that are hit, and the matching score may be similarly arranged, and the matching score may be the N-th score may be obtained after dividing words into" i.e. "beijing", and the matching score may be ranked and the first text data is similar to the first score and the first text data.
For example, as shown in fig. 4, assuming that a positive sample is a "electric drill" screwdriver which is in a fire-explosion country for 1 minute and is easy to punch out a first piece of | 47 pieces of material, 500 kinds of screws | 1-fold | can be used for matching ES with target text data containing the positive sample, if the text matched with the positive sample is also the positive sample, the maximum matching score can be obtained as "133.11464", or the positive sample can be matched with a source text data such as "electric drill" which is in a fire-explosion country for 1 minute 2500 rotations, the maximum 3-second punching | 47 pieces of material can be used for applying 500 kinds of screws | 1-fold | ", a matching score can be obtained as" 105.32658", or the positive sample can be matched with another source text data such as" the electric drill is in a fire | 1 minute 250 rotations, the first piece of material is easy to punch out | 47 pieces of material, the maximum matching score can be obtained as "133.11464", or the positive sample can be matched with 500 kinds of screws | 1-fold | can be easily used for not be used for driving the positive sample, the positive sample can be obtained as "102.89305", and the electric drive out tool can be matched with a second piece of material for example 1-fold 1 minute can be obtained, and the first piece of material can be easily punched out 1-fold 1 piece of material.
Further, after N first matching scores are obtained, since the matching score does not have an explicit range, for example, the highest matching score may vary from tens to hundreds according to different positive samples, if the matching score is directly fitted to the deep learning model, the model training process is difficult to converge, so, as shown in fig. 5, each matching score may be normalized by normalizing the matching score to obtain a sample matching score, which is used for solving the comparability between the matching scores, so that each matching score is in the same order of magnitude, and thus may be better fitted to the deep learning model, so that the model training process may be better and easier to converge, and then, a first batch sample set may be better constructed according to the first batch of positive samples, the first batch of negative samples, and the sample matching score, where the normalization for each matching score may be specifically obtained by the following formula (1):
where q is a positive example sample, d is source text data, k is the total number of target text data, es_ normed (q, d) sample match scores, score (q, d) is a match score,The maximum matching score is obtained by matching the positive sample with the positive sample, wherein the positive sample is the best matching with the positive sample.
Wherein score (q, d) can be obtained by the following formula (2):
score(q,d)=coord(q,d)*queryNorm(q)*∑t∈d(tf(t∈d)*idf(t)2*
boost(t)*norm(t,d))(2)
Wherein, chord (q, d) is a coordination factor, queryNorm (q) is a query norm, tf (t E d) is a word frequency, idf (t)2 is an inverse document frequency, boost (t) is a term weight, norm (t, d) is a length norm.
Optionally, in another optional embodiment of the training method for a similar text matching model provided by the embodiment of the present application based on the embodiment corresponding to fig. 2, performing a triplet construction operation on the first batch of normal sentence vectors to obtain a plurality of first batch triples, including:
Dividing the first batch of negative example sentence vectors according to the sample matching score to obtain a similar sentence vector set and a heterogeneous sentence vector set;
extracting any similar sentence vector from the similar sentence vector set to obtain similar sentence vectors of a first batch;
any heterogeneous sentence vector is extracted from the heterogeneous sentence vector set, and a first batch of heterogeneous sentence vectors are obtained.
In this embodiment, after the first lot of positive example sentence vectors and the first lot of negative example sentence vectors are obtained, the first lot of negative example sentence vectors may be divided into a similar sentence vector set and a heterogeneous sentence vector set according to the sample matching score of the first lot of sample sets, then any similar sentence vector may be extracted from the similar sentence vector set to obtain the first lot of similar sentence vectors, and any heterogeneous sentence vector may be extracted from the heterogeneous sentence vector set to obtain the first lot of heterogeneous sentence vectors, so that a triplet may be constructed for the first lot of positive example sentence vectors based on the first lot of similar sentence vectors and the first lot of heterogeneous sentence vectors, so that the distance between the similar text and the dissimilar text may be better represented by the triplet.
Specifically, the dividing operation is performed on the first batch of negative example sentence vectors according to the sample matching score, which may specifically be that sentence vectors with the sample matching score greater than 0.5 are used as a similar sentence vector set, sentence vectors with the sample matching score less than 0.5 are used as a different sentence vector set, then any similar sentence vector can be randomly extracted from the similar sentence vector set to obtain the first batch of similar sentence vectors, and similarly, any different sentence vector is randomly extracted from the different sentence vector set to obtain the first batch of different sentence vectors.
TABLE 2
For example, as shown in table 2, the matching score corresponding to the negative example sample may be obtained, the positive example sample "the electric screwdriver is too much | 1 minute 250 turns, the | 47 pieces of screwdriver head can be easily punched, 500 kinds of screws | can be screwed well, the negative example sample 1 and the negative example sample 2 corresponding to the inexpensive | 1 are converted into the negative example sentence vector to obtain the negative example sentence vector 1 and the negative example sentence vector 2, and then the negative example sentence vector 1 may be used as the similar sentence vector and the negative example sentence vector 2 may be used as the heterogeneous sentence vector according to the sample matching score 0.89 corresponding to the negative example sentence vector 1 and the sample matching score 0.18 corresponding to the negative example sentence vector 2.
Optionally, in another optional embodiment of the training method for a similar text matching model provided by the embodiment of the present application based on the embodiment corresponding to fig. 2, performing a loss calculation operation on a plurality of first batch triples, to obtain a first batch loss function corresponding to a first batch sample set, including:
Respectively carrying out loss calculation operation on the first batch of normal sentence vectors, the first batch of similar sentence vectors and the first batch of heterogeneous sentence vectors to obtain loss functions corresponding to a plurality of first batch triples;
And carrying out weighted calculation operation on the loss functions corresponding to the first batch of triples to obtain the first batch of loss functions.
In this embodiment, after obtaining a plurality of first-batch triples constructed based on the first-batch normal sentence vector, loss calculation may be performed on each triplet, that is, loss calculation may be performed on the first-batch normal sentence vector, the first-batch similar sentence vector, and the first-batch heterogeneous sentence vector, so as to obtain a loss function corresponding to each first-batch triplet, and then, weighting calculation may be performed on the loss functions corresponding to the plurality of first-batch triples according to a preset weight, so as to obtain a first-batch loss function, and the triples loss function may be constructed based on the triples, so that distances between the normal sample and the similar sample may be pulled, and distances between the normal sample and the heterogeneous sample may be pushed, so that similar text vectors may form clusters in a feature space, thereby achieving the purpose of text matching.
Specifically, after obtaining the first plurality of triples, the loss function may be calculated for each triplet, specifically, the first lot normal sentence vector, the first lot similar sentence vector, and the first lot heterogeneous sentence vector may be substituted into a function expression of the triplet loss function in step S104 to perform calculation, so that a loss function corresponding to a triplet may be obtained, and then the obtained first plurality of loss functions may be integrated into one loss function, specifically, the loss functions corresponding to the first plurality of triples may be subjected to a weighted calculation operation through a preset weight, so as to obtain the first lot loss function corresponding to the first lot sample set, where the preset weight is set according to an actual application requirement, and the specific limitation is not imposed herein.
Optionally, in another optional embodiment of the training method for a similar text matching model provided in the embodiment of the present application based on the embodiment corresponding to fig. 2, a second batch of sample sets corresponding to the target scene is repeatedly obtained based on the intermediate similar text matching model, and a vector conversion operation, a triplet configuration operation, a loss calculation operation and a parameter adjustment operation are performed to obtain the target similar text matching model, which includes:
Acquiring a second batch of sample sets corresponding to the target scene, and executing vector conversion operation, ternary structure construction operation and loss calculation operation according to the second batch of sample sets to obtain a second loss function;
And if the second loss function is smaller than the first threshold value, taking the current intermediate similar text matching model as a target similar text matching model.
In this embodiment, after the intermediate similar text matching model is obtained, vector conversion operation, ternary combination operation and loss calculation operation may be performed continuously on a second batch of sample sets corresponding to the target scene, so as to obtain a second loss function, and reverse iterative training is performed on the intermediate similar text matching model through the second loss function, when the second loss function is smaller than the first threshold, the current intermediate similar text matching model may be used as the target similar text matching model, so that the model may fully learn the similarity between text vectors, and the target similar text matching model may be better fitted, so that the recall rate of the target similar text matching model to the similar text is improved to a certain extent.
Specifically, after the second batch of sample sets corresponding to the target scene is obtained, where the second batch of sample sets is used to refer broadly to sample sets of other batches extracted from the sample sets different from the first batch of sample sets, specifically may be represented by three batches, four batches or N batches of sample sets, and then operations similar to the vector conversion operation, the three-group construction operation and the loss calculation operation in steps S102 to S104 may be performed, which are not described herein, to obtain a second loss function, where the second loss function may be used to refer broadly to a loss function corresponding to each batch of sample sets.
Further, after the second loss function is obtained, it may be understood that the smaller the second loss function is, the better the fitting of the model is, and thus, the second loss function may be compared with a first threshold, where the first threshold may specifically be represented by a smaller value, such as 0.18, and the first threshold is set according to the actual application requirement, and is not specifically limited herein, and then, when the second loss function is smaller than the first threshold, it may be understood that when the second loss function is already small enough, the current intermediate similar text matching model tends to be stable, and the current intermediate similar text matching model has converged, and then the current intermediate similar text matching model may be regarded as the target similar text matching model.
Optionally, in another optional embodiment of the training method for a similar text matching model provided in the embodiment of the present application based on the embodiment corresponding to fig. 2, a second batch of sample sets corresponding to the target scene is repeatedly obtained based on the intermediate similar text matching model, and a vector conversion operation, a triplet configuration operation, a loss calculation operation and a parameter adjustment operation are performed to obtain the target similar text matching model, which includes:
obtaining intermediate model parameters of an intermediate similar text matching model;
obtaining a second batch of sample sets corresponding to the target scene, and performing vector conversion operation, triple construction operation and parameter adjustment operation to obtain a current similar text matching model, wherein the current similar text matching model comprises current model parameters;
And if the difference value between the intermediate model parameter and the current model parameter meets a second threshold value, taking the current intermediate similar text matching model as a target similar text matching model.
In this embodiment, after the intermediate similar text matching model is obtained, vector conversion operation, ternary combination operation and loss calculation operation may be performed continuously on a second batch of sample sets corresponding to the target scene, so as to obtain a second loss function, and reverse iterative training is performed on the intermediate similar text matching model through the second loss function, when the difference between the intermediate model parameter and the current model parameter meets a second threshold, the current intermediate similar text matching model may be used as the target similar text matching model, so that the model may learn the similarity between text vectors sufficiently, and the target similar text matching model may be better fitted, so that the recall rate of the target similar text matching model to the similar text may be improved to a certain extent, where the second threshold may be specifically expressed as a smaller value, and the second threshold is set according to the actual application requirement, and is not particularly limited herein.
Specifically, after the intermediate similar text matching model is obtained, the intermediate model parameters may be extracted, further, a sample set of the next batch corresponding to the target scene may be obtained, and operations similar to the vector conversion operation, the triplet construction operation and the parameter adjustment operation in the steps S102 to S105 are repeatedly executed, which are not described herein, so that the current similar text matching model can be obtained, and the model parameters of the current similar text matching model are extracted, so as to obtain the current model parameters.
Further, since the intermediate similar text matching model tends to be stable, the convergence of the intermediate similar text matching model may be represented by the stability of the model parameters, and thus, the difference between the intermediate model parameters and the current model parameters may be calculated, and if the difference between the intermediate model parameters and the current model parameters is smaller than the second threshold, it may be understood that the difference between the intermediate model parameters and the current model parameters is sufficiently small, that is, the model parameters tend to be stable, that is, the intermediate similar text matching model tends to be stable, and then the current intermediate similar text matching model may be used as the target similar text matching model.
Optionally, in another optional embodiment of the training method for a similar text matching model provided by the embodiment of the present application based on the embodiment corresponding to fig. 2, based on the intermediate similar text matching model, a second batch of sample sets corresponding to the target scene are repeatedly obtained, and a vector conversion operation, a triplet configuration operation, a loss calculation operation and a parameter adjustment operation are performed, so that after the target similar text matching model is obtained, the method further includes:
receiving a text to be matched;
Respectively passing the text to be matched and the target text data set through a target similar text matching model to obtain sentence vectors to be matched and a plurality of original sentence vectors;
Calculating the similarity between the sentence vector to be matched and each original sentence vector to obtain a plurality of similarity scores;
And determining a target similar text according to the plurality of similar scores, and pushing the target similar text to the target terminal equipment.
In this embodiment, after the target similar text matching model is obtained, the target similar text matching model may be applied, by receiving the text to be matched and obtaining a target text data set corresponding to the text to be matched, then, the text to be matched and the target text data set are respectively input into the target similar text matching model, a sentence vector to be matched and a plurality of original sentence vectors are obtained through the target similar text model, a plurality of similarity scores may be obtained by calculating the similarity between the sentence vector to be matched and each original sentence vector, and the target similar text may be determined according to the plurality of similarity scores, and the target similar text may be pushed to the target terminal device, so that the matched target similar text may be recommended for the target object better and more accurately.
Specifically, the text to be matched may be specifically represented by advertisement text, commodity keywords, and the like, and may also be other text, which is not particularly limited herein. After the target similar text matching model is obtained, if a text to be matched such as an advertisement document a sent by a target object through target terminal equipment is received, a target scene such as an advertisement retrieval scene to which the text to be matched belongs can be determined first, a corresponding target similar text matching model and a target text data set such as an advertisement document retrieval library can be determined according to the target scene, then the obtained text to be matched and the target text data set can be respectively input into the target similar text matching model, a sentence vector to be matched and a plurality of original sentence vectors can be obtained through the target similar text matching model, further, the sentence vector to be matched and each original sentence vector can be subjected to pairwise matching, and the similarity between the sentence vector to be matched and each original sentence vector can be calculated, so that the similarity score between the sentence vector to be matched and each original sentence vector can be obtained, wherein the calculation mode of the similarity can be specifically through the euclidean distance or cosine similarity, and other similarity calculation modes can be also used, and the calculation modes of the similarity are not limited specifically.
Further, after obtaining the similarity score between the sentence vector to be matched and each original sentence vector, the similarity scores may be ranked according to the principle that the higher the similarity score is, and the similarity score may be ranked from high to low, and the original sentence vectors corresponding to the first ten or hundred similarity scores may be selected according to requirements of the target scene, for example, then, texts corresponding to the ten or hundred selected original sentence vectors are determined to be target similar texts, and pushed to the target terminal device.
When pushing the target similar text to the target terminal device, the pushing may be specifically performed according to the type of the target similar text, for example, the target similar text may be directly pushed to the target terminal device on the assumption that the target similar text is represented by a commodity image or a commodity link, or the target similar text may be further determined to be more matched with the target object from the target similar text on the assumption that the target similar text is represented by a video advertisement or hot spot information, or the like, according to the historical click rate and conversion rate of the target object, and the like, and then pushed to the target terminal device.
It can be understood that the target similar text matching model can also be used for a plurality of links such as commodity retrieval, advertisement material retrieval, advertisement estimation model characteristics, advertisement analysis and diagnosis and the like, and the overall advertisement putting effect of the whole link can be improved. For example, the commodity or advertisement material is usually provided with a corresponding document, and matching precision and recall rate can be greatly improved by combining text keyword search and target similar text matching model search, so that more matched commodity or advertisement is recommended for a target object. Or the method can be applied to a plurality of links such as recall, coarse-ranking or fine-ranking model estimation, strategy adjustment, analysis and diagnosis of the advertising effect and the like related to the advertising process. For example, in the rough ranking step, similar texts and picture videos in advertisements are acquired through the target similar text matching model so as to filter the similar advertisements and increase the diversity of the advertisements, or the advertisements can be better understood and the generalization performance of the models can be increased through the combination of the rough ranking or fine ranking estimated model and the target similar text matching model.
It will be appreciated that the target similar text matching model may also be applied to other text retrieval scenarios, such as common general knowledge, virtual or physical object retrieval, book retrieval in fine-grained fields, legal document retrieval, etc., without specific limitation.
Referring to fig. 7, fig. 7 is a schematic diagram showing an embodiment of a training apparatus for a similar text matching model according to an embodiment of the present application, and the training apparatus 20 for a similar text matching model includes:
An obtaining unit 201, configured to obtain a first batch sample set corresponding to a target scene, where the first batch sample set includes a first batch positive sample and a first batch negative sample;
The processing unit 202 is configured to input a first batch of positive example samples and a first batch of negative example samples to the original similar text matching model to perform vector conversion operation, so as to obtain a first batch of positive example sentence vectors and a first batch of negative example sentence vectors;
The processing unit 202 is further configured to perform a triplet construction operation on the first lot normal sentence vector to obtain a plurality of first lot triples, where each first lot triplet includes a first lot normal sentence vector, a first lot similar sentence vector, and a first lot heterogeneous sentence vector, and the first lot similar sentence vector and the first lot heterogeneous sentence vector are derived from the first lot negative example sentence vector;
the processing unit 202 is further configured to perform a loss calculation operation on the plurality of first batch triples, and obtain a first batch loss function corresponding to the first batch sample set;
The processing unit 202 is further configured to perform parameter adjustment operation on the original similar text matching model according to the first batch loss function, so as to obtain an intermediate similar text matching model;
The processing unit 202 is further configured to repeatedly obtain a second batch of sample sets corresponding to the target scene based on the intermediate similar text matching model, and perform vector conversion operation, ternary combination operation, loss calculation operation, and parameter adjustment operation to obtain the target similar text matching model.
Alternatively, in another embodiment of the training device for a similar text matching model provided in the embodiment of the present application based on the embodiment corresponding to fig. 7, the obtaining unit 201 may specifically be configured to:
Acquiring a target text data set corresponding to a target scene, wherein the target text data set at least comprises a first batch of positive examples samples and source text data corresponding to the target scene;
retrieving N first matching texts corresponding to the first batch of positive examples from the target text data set as N first batch of negative examples;
Calculating matching scores between the first batch of positive examples and each first batch of negative examples to obtain N first matching scores;
respectively carrying out normalization operation on the N first matching scores to obtain N sample matching scores;
And constructing the first batch sample set according to the first batch positive sample, the first batch negative sample and the sample matching score.
Optionally, in another embodiment of the training device for a similar text matching model provided in the embodiment of the present application based on the embodiment corresponding to fig. 7, the processing unit 202 may specifically be configured to:
Dividing the first batch of negative example sentence vectors according to the sample matching score to obtain a similar sentence vector set and a heterogeneous sentence vector set;
extracting any similar sentence vector from the similar sentence vector set to obtain similar sentence vectors of a first batch;
any heterogeneous sentence vector is extracted from the heterogeneous sentence vector set, and a first batch of heterogeneous sentence vectors are obtained.
Optionally, in another embodiment of the training device for a similar text matching model provided in the embodiment of the present application based on the embodiment corresponding to fig. 7, the processing unit 202 may specifically be configured to:
Respectively carrying out loss calculation operation on the first batch of normal sentence vectors, the first batch of similar sentence vectors and the first batch of heterogeneous sentence vectors to obtain loss functions corresponding to a plurality of first batch triples;
And carrying out weighted calculation operation on the loss functions corresponding to the first batch of triples to obtain the first batch of loss functions.
Optionally, in another embodiment of the training device for a similar text matching model provided in the embodiment of the present application based on the embodiment corresponding to fig. 7, the processing unit 202 may specifically be configured to:
Acquiring a second batch of sample sets corresponding to the target scene, and executing vector conversion operation, ternary structure construction operation and loss calculation operation according to the second batch of sample sets to obtain a second loss function;
And if the second loss function is smaller than the first threshold value, taking the current intermediate similar text matching model as a target similar text matching model.
Optionally, in another embodiment of the training device for a similar text matching model provided in the embodiment of the present application based on the embodiment corresponding to fig. 7, the processing unit 202 may specifically be configured to:
obtaining intermediate model parameters of an intermediate similar text matching model;
When a second batch of sample sets corresponding to the target scene are obtained, vector conversion operation, triple construction operation and parameter adjustment operation are carried out, a current similar text matching model is obtained, and the current similar text matching model comprises current model parameters;
And if the difference value between the intermediate model parameter and the current model parameter meets a second threshold value, taking the current intermediate similar text matching model as a target similar text matching model.
Alternatively, based on the embodiment corresponding to fig. 7, in another embodiment of the training device for a similar text matching model provided in the embodiment of the present application,
The obtaining unit 201 is further configured to receive a text to be matched;
The processing unit 202 is further configured to obtain a sentence vector to be matched and a plurality of original sentence vectors by respectively passing the text to be matched and the target text dataset through a target similar text matching model;
the processing unit 202 is further configured to calculate a similarity between the sentence vector to be matched and each original sentence vector, so as to obtain a plurality of similarity scores;
And the determining unit 203 is configured to determine a target similar text according to the plurality of similar scores, and push the target similar text to the target terminal device.
Another aspect of the present application provides another schematic diagram of a computer device, as shown in fig. 8, where fig. 8 is a schematic diagram of a computer device structure provided in an embodiment of the present application, where the computer device 300 may have a relatively large difference due to different configurations or performances, and may include one or more central processing units (central processing units, CPUs) 310 (e.g., one or more processors) and a memory 320, one or more storage mediums 330 (e.g., one or more mass storage devices) storing application programs 331 or data 332. Wherein memory 320 and storage medium 330 may be transitory or persistent storage. The program stored on the storage medium 330 may include one or more modules (not shown), each of which may include a series of instruction operations in the computer device 300. Still further, the central processor 310 may be configured to communicate with the storage medium 330 and execute a series of instruction operations in the storage medium 330 on the computer device 300.
The computer device 300 may also include one or more power supplies 340, one or more wired or wireless network interfaces 350, one or more input/output interfaces 360, and/or one or more operating systems 333, such as a Windows ServerTM,Mac OS XTM,UnixTM,LinuxTM,FreeBSDTM, or the like.
The computer device 300 described above is also used to perform the steps in the corresponding embodiment as in fig. 2.
Another aspect of the application provides a computer readable storage medium having instructions stored therein which, when run on a computer, cause the computer to perform the steps of the method described in the embodiment shown in fig. 2.
Another aspect of the application provides a computer program product comprising instructions which, when run on a computer or processor, cause the computer or processor to perform the steps in the method described in the embodiment shown in fig. 2.
It will be clear to those skilled in the art that, for convenience and brevity of description, specific working procedures of the above-described systems, apparatuses and units may refer to corresponding procedures in the foregoing method embodiments, which are not repeated herein.
In the several embodiments provided in the present application, it should be understood that the disclosed systems, devices, and methods may be implemented in other manners. For example, the apparatus embodiments described above are merely illustrative, e.g., the division of the units is merely a logical function division, and there may be additional divisions when actually implemented, e.g., multiple units or components may be combined or integrated into another system, or some features may be omitted or not performed. Alternatively, the coupling or direct coupling or communication connection shown or discussed with each other may be an indirect coupling or communication connection via some interfaces, devices or units, which may be in electrical, mechanical or other form.
The units described as separate units may or may not be physically separate, and units shown as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
In addition, each functional unit in the embodiments of the present application may be integrated in one processing unit, or each unit may exist alone physically, or two or more units may be integrated in one unit. The integrated units may be implemented in hardware or in software functional units.
The integrated units, if implemented in the form of software functional units and sold or used as stand-alone products, may be stored in a computer readable storage medium. Based on such understanding, the technical solution of the present application may be embodied essentially or in part or all of the technical solution or in part in the form of a software product stored in a storage medium, including instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method according to the embodiments of the present application. The storage medium includes a U disk, a removable hard disk, a read-only memory (ROM), a random access memory (random access memory, RAM), a magnetic disk, an optical disk, or other various media capable of storing program codes.

Claims (15)

Translated fromChinese
1.一种相似文本匹配模型的训练方法,其特征在于,包括:1. A training method for a similar text matching model, characterized by comprising:获取与目标场景对应的第一批次样本集,其中,所述第一批次样本集为自监督训练样本集,所述第一批次样本集包括第一批次正例样本以及第一批次负例样本;Acquire a first batch of sample sets corresponding to the target scene, wherein the first batch of sample sets is a self-supervised training sample set, and the first batch of sample sets includes a first batch of positive samples and a first batch of negative samples;分别将所述第一批次正例样本以及所述第一批次负例样本输入至原始相似文本匹配模型进行向量转化操作,得到第一批次正例句向量以及第一批次负例句向量;Inputting the first batch of positive example samples and the first batch of negative example samples into the original similar text matching model for vector conversion operation respectively, to obtain the first batch of positive example sentence vectors and the first batch of negative example sentence vectors;对所述第一批次正例句向量进行三元组构造操作,得到若干个第一批次三元组,其中,每个所述第一批次三元组包括所述第一批次正例句向量、第一批次同类句向量以及第一批次异类句向量,所述第一批次同类句向量以及所述第一批次异类句向量来源于所述第一批次负例句向量;Performing a triplet construction operation on the first batch of positive example sentence vectors to obtain a plurality of first batch triples, wherein each of the first batch triples includes the first batch of positive example sentence vectors, the first batch of similar sentence vectors, and the first batch of heterogeneous sentence vectors, and the first batch of similar sentence vectors and the first batch of heterogeneous sentence vectors are derived from the first batch of negative example sentence vectors;对所述若干个第一批次三元组进行损失计算操作,获取与所述第一批次样本集对应的第一批次损失函数;Performing a loss calculation operation on the plurality of first batch triples to obtain a first batch loss function corresponding to the first batch sample set;根据所述第一批次损失函数,对所述原始相似文本匹配模型进行参数调整操作,得到中间相似文本匹配模型;According to the first batch loss function, adjusting the parameters of the original similar text matching model to obtain an intermediate similar text matching model;基于所述中间相似文本匹配模型,重复获取与所述目标场景对应的第二批次样本集,并执行所述向量转化操作、所述三元组构造操作、所述损失计算操作以及所述参数调整操作,得到目标相似文本匹配模型;Based on the intermediate similar text matching model, repeatedly obtaining a second batch of sample sets corresponding to the target scene, and performing the vector conversion operation, the triple construction operation, the loss calculation operation, and the parameter adjustment operation to obtain a target similar text matching model;所述获取与目标场景对应的第一批次样本集,包括:The step of obtaining a first batch of sample sets corresponding to the target scene includes:获取与所述目标场景相对应的目标文本数据集,其中,所述目标文本数据集至少包括所述第一批次正例样本以及与所述目标场景相对应的源文本数据;Acquire a target text data set corresponding to the target scenario, wherein the target text data set at least includes the first batch of positive example samples and source text data corresponding to the target scenario;从所述目标文本数据集中检索与所述第一批次正例样本对应的N个第一匹配文本,作为N个所述第一批次负例样本,其中,所述N为大于1的整数;Retrieving N first matching texts corresponding to the first batch of positive example samples from the target text data set as N first batch of negative example samples, where N is an integer greater than 1;计算所述第一批次正例样本与每个所述第一批次负例样本之间的匹配分数,得到N个第一匹配分数;Calculate the matching scores between the first batch of positive example samples and each of the first batch of negative example samples to obtain N first matching scores;分别对所述N个第一匹配分数进行归一化操作,得到N个样本匹配分数;Normalizing the N first matching scores respectively to obtain N sample matching scores;根据所述第一批次正例样本、所述第一批次负例样本以及所述样本匹配分数构造所述第一批次样本集。The first batch of sample sets is constructed according to the first batch of positive samples, the first batch of negative samples, and the sample matching scores.2.根据权利要求1所述的方法,其特征在于,所述对所述第一批次正例句向量进行三元组构造操作,得到若干个第一批次三元组,包括:2. The method according to claim 1, characterized in that the step of performing a triple construction operation on the first batch of positive example sentence vectors to obtain a plurality of first batch triples comprises:根据所述样本匹配分数,对所述第一批次负例句向量进行划分操作,得到同类句向量集以及异类句向量集;According to the sample matching scores, the first batch of negative example sentence vectors are divided to obtain a similar sentence vector set and a heterogeneous sentence vector set;在所述同类句向量集中提取任一同类句向量,得到所述第一批次同类句向量;Extract any similar sentence vector from the similar sentence vector set to obtain the first batch of similar sentence vectors;在所述异类句向量集中提取任一异类句向量,得到所述第一批次异类句向量。Any heterogeneous sentence vector is extracted from the heterogeneous sentence vector set to obtain the first batch of heterogeneous sentence vectors.3.根据权利要求1所述的方法,其特征在于,所述对所述若干个第一批次三元组进行损失计算操作,获取与所述第一批次样本集对应的第一批次损失函数,包括:3. The method according to claim 1, characterized in that the step of performing a loss calculation operation on the plurality of first batch triplets to obtain a first batch loss function corresponding to the first batch sample set comprises:分别对所述第一批次正例句向量、所述第一批次同类句向量以及所述第一批次异类句向量进行损失计算操作,得到与所述若干个第一批次三元组对应的损失函数;Performing loss calculation operations on the first batch of positive example sentence vectors, the first batch of similar sentence vectors, and the first batch of heterogeneous sentence vectors respectively to obtain loss functions corresponding to the plurality of first batch triples;对所述若干个第一批次三元组对应的损失函数进行加权计算操作,得到所述第一批次损失函数。A weighted calculation operation is performed on the loss functions corresponding to the plurality of first batch triplets to obtain the first batch loss functions.4.根据权利要求1所述的方法,其特征在于,所述基于所述中间相似文本匹配模型,重复获取与所述目标场景对应的第二批次样本集,并执行所述向量转化操作、所述三元组构造操作、所述损失计算操作以及所述参数调整操作,得到目标相似文本匹配模型,包括:4. The method according to claim 1, characterized in that the step of repeatedly acquiring a second batch of sample sets corresponding to the target scene based on the intermediate similar text matching model, and performing the vector conversion operation, the triple construction operation, the loss calculation operation, and the parameter adjustment operation to obtain a target similar text matching model comprises:获取与所述目标场景对应的第二批次样本集,并根据所述第二批次样本集,执行所述向量转化操作、所述三元组构造操作、所述损失计算操作,得到第二损失函数;Acquire a second batch of sample sets corresponding to the target scene, and perform the vector conversion operation, the triplet construction operation, and the loss calculation operation according to the second batch of sample sets to obtain a second loss function;若所述第二损失函数小于第一阈值,则将当前的中间相似文本匹配模型作为所述目标相似文本匹配模型。If the second loss function is less than the first threshold, the current intermediate similar text matching model is used as the target similar text matching model.5.根据权利要求1所述的方法,其特征在于,所述基于所述中间相似文本匹配模型,重复获取与所述目标场景对应的第二批次样本集,并执行所述向量转化操作、所述三元组构造操作、所述损失计算操作以及所述参数调整操作,得到目标相似文本匹配模型,包括:5. The method according to claim 1, characterized in that the step of repeatedly acquiring a second batch of sample sets corresponding to the target scene based on the intermediate similar text matching model, and performing the vector conversion operation, the triple construction operation, the loss calculation operation, and the parameter adjustment operation to obtain a target similar text matching model comprises:获取所述中间相似文本匹配模型的中间模型参数;Obtaining intermediate model parameters of the intermediate similar text matching model;当获取与所述目标场景对应的第二批次样本集,并执行所述向量转化操作、所述三元组构造操作以及上述参数调整操作后,得到当前相似文本匹配模型,所述当前相似文本匹配模型包括当前模型参数;After obtaining a second batch of sample sets corresponding to the target scene and performing the vector conversion operation, the triplet construction operation and the parameter adjustment operation, a current similar text matching model is obtained, wherein the current similar text matching model includes current model parameters;若所述中间模型参数与所述当前模型参数的差值满足第二阈值,则将当前的中间相似文本匹配模型作为所述目标相似文本匹配模型。If the difference between the intermediate model parameters and the current model parameters meets the second threshold, the current intermediate similar text matching model is used as the target similar text matching model.6.根据权利要求1所述的方法,其特征在于,所述基于所述中间相似文本匹配模型,重复获取与所述目标场景对应的第二批次样本集,并执行所述向量转化操作、所述三元组构造操作、所述损失计算操作以及所述参数调整操作,得到目标相似文本匹配模型之后,所述方法还包括:6. The method according to claim 1 is characterized in that, based on the intermediate similar text matching model, a second batch of sample sets corresponding to the target scene are repeatedly obtained, and the vector conversion operation, the triple construction operation, the loss calculation operation and the parameter adjustment operation are performed to obtain the target similar text matching model, and the method further comprises:接收待匹配文本;Receive text to be matched;分别将所述待匹配文本以及所述目标文本数据集通过所述目标相似文本匹配模型,得到待匹配句向量以及若干个原始句向量;Passing the to-be-matched text and the target text dataset through the target similar text matching model respectively to obtain a to-be-matched sentence vector and a plurality of original sentence vectors;计算所述待匹配句向量与每个原始句向量之间相似度,得到若干个相似得分;Calculate the similarity between the sentence vector to be matched and each original sentence vector to obtain a number of similarity scores;根据所述若干个相似得分确定目标相似文本,并将所述目标相似文本推送至目标终端设备。A target similar text is determined according to the plurality of similarity scores, and the target similar text is pushed to a target terminal device.7.一种相似文本匹配模型的训练装置,其特征在于,包括:7. A training device for a similar text matching model, comprising:获取单元,用于获取与目标场景对应的第一批次样本集,其中,所述第一批次样本集为自监督训练样本集,所述第一批次样本集包括第一批次正例样本以及第一批次负例样本;An acquisition unit, configured to acquire a first batch of sample sets corresponding to a target scene, wherein the first batch of sample sets is a self-supervised training sample set, and the first batch of sample sets includes a first batch of positive samples and a first batch of negative samples;处理单元,用于分别将所述第一批次正例样本以及所述第一批次负例样本输入至原始相似文本匹配模型进行向量转化操作,得到第一批次正例句向量以及第一批次负例句向量;A processing unit, configured to input the first batch of positive example samples and the first batch of negative example samples into an original similar text matching model for vector conversion operation to obtain a first batch of positive example sentence vectors and a first batch of negative example sentence vectors;所述处理单元,还用于对所述第一批次正例句向量进行三元组构造操作,得到若干个第一批次三元组,其中,每个所述第一批次三元组包括所述第一批次正例句向量、第一批次同类句向量以及第一批次异类句向量,所述第一批次同类句向量以及所述第一批次异类句向量来源于所述第一批次负例句向量;The processing unit is further used to perform a triple construction operation on the first batch of positive example sentence vectors to obtain a plurality of first batch triples, wherein each of the first batch triples includes the first batch of positive example sentence vectors, the first batch of similar sentence vectors, and the first batch of heterogeneous sentence vectors, and the first batch of similar sentence vectors and the first batch of heterogeneous sentence vectors are derived from the first batch of negative example sentence vectors;所述处理单元,还用于对所述若干个第一批次三元组进行损失计算操作,获取与所述第一批次样本集对应的第一批次损失函数;The processing unit is further used to perform a loss calculation operation on the plurality of first batch triples to obtain a first batch loss function corresponding to the first batch sample set;所述处理单元,还用于根据所述第一批次损失函数,对所述原始相似文本匹配模型进行参数调整操作,得到中间相似文本匹配模型;The processing unit is further used to perform a parameter adjustment operation on the original similar text matching model according to the first batch loss function to obtain an intermediate similar text matching model;所述处理单元,还用于基于所述中间相似文本匹配模型,重复获取与所述目标场景对应的第二批次样本集,并执行所述向量转化操作、所述三元组构造操作、所述损失计算操作以及所述参数调整操作,得到目标相似文本匹配模型;The processing unit is further used to repeatedly obtain a second batch of sample sets corresponding to the target scene based on the intermediate similar text matching model, and perform the vector conversion operation, the triple construction operation, the loss calculation operation and the parameter adjustment operation to obtain a target similar text matching model;获取单元具体可以用于:The acquisition unit can be used specifically for:获取与所述目标场景相对应的目标文本数据集,其中,所述目标文本数据集至少包括所述第一批次正例样本以及与所述目标场景相对应的源文本数据;Acquire a target text data set corresponding to the target scenario, wherein the target text data set at least includes the first batch of positive example samples and source text data corresponding to the target scenario;从所述目标文本数据集中检索与所述第一批次正例样本对应的N个第一匹配文本,作为N个所述第一批次负例样本,其中,所述N为大于1的整数;Retrieving N first matching texts corresponding to the first batch of positive example samples from the target text data set as N first batch of negative example samples, where N is an integer greater than 1;计算所述第一批次正例样本与每个所述第一批次负例样本之间的匹配分数,得到N个第一匹配分数;Calculate the matching scores between the first batch of positive example samples and each of the first batch of negative example samples to obtain N first matching scores;分别对所述N个第一匹配分数进行归一化操作,得到N个样本匹配分数;Normalizing the N first matching scores respectively to obtain N sample matching scores;根据所述第一批次正例样本、所述第一批次负例样本以及所述样本匹配分数构造所述第一批次样本集。The first batch of sample sets is constructed according to the first batch of positive samples, the first batch of negative samples, and the sample matching scores.8.根据权利要求7所述的装置,其特征在于,处理单元具体可以用于:8. The device according to claim 7, characterized in that the processing unit can be specifically used for:根据所述样本匹配分数,对所述第一批次负例句向量进行划分操作,得到同类句向量集以及异类句向量集;According to the sample matching scores, the first batch of negative example sentence vectors are divided to obtain a similar sentence vector set and a heterogeneous sentence vector set;在所述同类句向量集中提取任一同类句向量,得到所述第一批次同类句向量;Extract any similar sentence vector from the similar sentence vector set to obtain the first batch of similar sentence vectors;在所述异类句向量集中提取任一异类句向量,得到所述第一批次异类句向量。Any heterogeneous sentence vector is extracted from the heterogeneous sentence vector set to obtain the first batch of heterogeneous sentence vectors.9.根据权利要求7所述的装置,其特征在于,处理单元具体可以用于:9. The device according to claim 7, wherein the processing unit can be specifically used for:分别对所述第一批次正例句向量、所述第一批次同类句向量以及所述第一批次异类句向量进行损失计算操作,得到与所述若干个第一批次三元组对应的损失函数;Performing loss calculation operations on the first batch of positive example sentence vectors, the first batch of similar sentence vectors, and the first batch of heterogeneous sentence vectors respectively to obtain loss functions corresponding to the plurality of first batch triples;对所述若干个第一批次三元组对应的损失函数进行加权计算操作,得到所述第一批次损失函数。A weighted calculation operation is performed on the loss functions corresponding to the plurality of first batch triplets to obtain the first batch loss functions.10.根据权利要求7所述的装置,其特征在于,处理单元具体可以用于:10. The device according to claim 7, wherein the processing unit can be specifically used for:获取与所述目标场景对应的第二批次样本集,并根据所述第二批次样本集,执行所述向量转化操作、所述三元组构造操作、所述损失计算操作,得到第二损失函数;Acquire a second batch of sample sets corresponding to the target scene, and perform the vector conversion operation, the triplet construction operation, and the loss calculation operation according to the second batch of sample sets to obtain a second loss function;若所述第二损失函数小于第一阈值,则将当前的中间相似文本匹配模型作为所述目标相似文本匹配模型。If the second loss function is less than the first threshold, the current intermediate similar text matching model is used as the target similar text matching model.11.根据权利要求7所述的装置,其特征在于,处理单元具体可以用于:11. The device according to claim 7, wherein the processing unit can be specifically used for:获取所述中间相似文本匹配模型的中间模型参数;Obtaining intermediate model parameters of the intermediate similar text matching model;当获取与所述目标场景对应的第二批次样本集,并执行所述向量转化操作、所述三元组构造操作以及上述参数调整操作后,得到当前相似文本匹配模型,所述当前相似文本匹配模型包括当前模型参数;After obtaining a second batch of sample sets corresponding to the target scene and performing the vector conversion operation, the triplet construction operation and the parameter adjustment operation, a current similar text matching model is obtained, wherein the current similar text matching model includes current model parameters;若所述中间模型参数与所述当前模型参数的差值满足第二阈值,则将当前的中间相似文本匹配模型作为所述目标相似文本匹配模型。If the difference between the intermediate model parameters and the current model parameters meets the second threshold, the current intermediate similar text matching model is used as the target similar text matching model.12.根据权利要求7所述的装置,其特征在于,获取单元,还用于接收待匹配文本;12. The device according to claim 7, characterized in that the acquisition unit is further used to receive the text to be matched;处理单元,还用于分别将所述待匹配文本以及所述目标文本数据集通过所述目标相似文本匹配模型,得到待匹配句向量以及若干个原始句向量;The processing unit is further used to respectively pass the to-be-matched text and the target text data set through the target similar text matching model to obtain a to-be-matched sentence vector and a plurality of original sentence vectors;处理单元,还用于计算所述待匹配句向量与每个原始句向量之间相似度,得到若干个相似得分;The processing unit is further used to calculate the similarity between the sentence vector to be matched and each original sentence vector to obtain a plurality of similarity scores;确定单元,用于根据所述若干个相似得分确定目标相似文本,并将所述目标相似文本推送至目标终端设备。A determination unit is used to determine a target similar text according to the plurality of similarity scores, and push the target similar text to a target terminal device.13.一种计算机设备,其特征在于,包括:存储器、收发器、处理器以及总线系统;13. A computer device, comprising: a memory, a transceiver, a processor and a bus system;其中,所述存储器用于存储程序;Wherein, the memory is used to store programs;所述处理器用于执行所述存储器中的程序时实现如权利要求1至6中任一项所述的方法;The processor is used to implement the method according to any one of claims 1 to 6 when executing the program in the memory;所述总线系统用于连接所述存储器以及所述处理器,以使所述存储器以及所述处理器进行通信。The bus system is used to connect the memory and the processor so that the memory and the processor can communicate with each other.14.一种计算机可读存储介质,包括指令,当其在计算机上运行时,使得计算机执行如权利要求1至6中任一项所述的方法。14. A computer-readable storage medium comprising instructions, which, when executed on a computer, causes the computer to perform the method according to any one of claims 1 to 6.15.一种计算机程序产品,包括计算机程序/指令,其特征在于,该计算机程序/指令被处理器执行时实现权利要求1至6任一项所述方法的步骤。15. A computer program product, comprising a computer program/instruction, characterized in that when the computer program/instruction is executed by a processor, the steps of the method according to any one of claims 1 to 6 are implemented.
CN202111436420.0A2021-11-292021-11-29 Training method, device, equipment and storage medium for similar text matching modelActiveCN114490923B (en)

Priority Applications (1)

Application NumberPriority DateFiling DateTitle
CN202111436420.0ACN114490923B (en)2021-11-292021-11-29 Training method, device, equipment and storage medium for similar text matching model

Applications Claiming Priority (1)

Application NumberPriority DateFiling DateTitle
CN202111436420.0ACN114490923B (en)2021-11-292021-11-29 Training method, device, equipment and storage medium for similar text matching model

Publications (2)

Publication NumberPublication Date
CN114490923A CN114490923A (en)2022-05-13
CN114490923Btrue CN114490923B (en)2025-02-14

Family

ID=81492144

Family Applications (1)

Application NumberTitlePriority DateFiling Date
CN202111436420.0AActiveCN114490923B (en)2021-11-292021-11-29 Training method, device, equipment and storage medium for similar text matching model

Country Status (1)

CountryLink
CN (1)CN114490923B (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
CN115130456B (en)*2022-05-252025-07-25腾讯科技(深圳)有限公司Sentence analysis and matching model training method, sentence analysis and matching model training device, sentence analysis and matching model training equipment and storage medium
CN115658903B (en)*2022-11-012023-09-05百度在线网络技术(北京)有限公司Text classification method, model training method, related device and electronic equipment
CN116150380B (en)*2023-04-182023-06-27之江实验室Text matching method, device, storage medium and equipment

Citations (1)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
CN111950269A (en)*2020-08-212020-11-17清华大学 Text sentence processing method, apparatus, computer equipment and storage medium

Family Cites Families (6)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
CN107967255A (en)*2017-11-082018-04-27北京广利核系统工程有限公司A kind of method and system for judging text similarity
CN111274811B (en)*2018-11-192023-04-18阿里巴巴集团控股有限公司Address text similarity determining method and address searching method
CN111368989B (en)*2018-12-252023-06-16同方威视技术股份有限公司 Neural network model training method, device, equipment and readable storage medium
CN112232408B (en)*2020-10-152024-06-28平安科技(深圳)有限公司Target recommendation method, device, electronic equipment and computer readable storage medium
CN113657249B (en)*2021-08-132024-05-17北京神州数码云科信息技术有限公司 Training method, prediction method, device, electronic device and storage medium
CN113705589A (en)*2021-10-292021-11-26腾讯科技(深圳)有限公司Data processing method, device and equipment

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
CN111950269A (en)*2020-08-212020-11-17清华大学 Text sentence processing method, apparatus, computer equipment and storage medium

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
Hoffer E et al.DEEP METRIC LEARNING USING TRIPLET NETWORK,Similarity-Based Pattern Recognition.Cham:Springer International Publishing,2015,84-92.*

Also Published As

Publication numberPublication date
CN114490923A (en)2022-05-13

Similar Documents

PublicationPublication DateTitle
CN114490923B (en) Training method, device, equipment and storage medium for similar text matching model
Huang et al.Social friend recommendation based on multiple network correlation
WO2022041979A1 (en)Information recommendation model training method and related device
CN112119388A (en) Train Image Embedding Models and Text Embedding Models
CN111611801B (en)Method, device, server and storage medium for identifying text region attribute
CN112074828A (en)Training image embedding model and text embedding model
CN109471978B (en)Electronic resource recommendation method and device
CN106354856B (en) Deep neural network enhanced search method and device based on artificial intelligence
CN110119477B (en)Information pushing method, device and storage medium
US20170235726A1 (en)Information identification and extraction
CN103593425A (en)Intelligent retrieval method and system based on preference
JP2016540332A (en) Visual-semantic composite network and method for forming the network
CN109564573A (en)Platform from computer application metadata supports cluster
CN105531701A (en)Personalized trending image search suggestion
CN110008397A (en)A kind of recommended models training method and device
CN115062732A (en) Resource sharing cooperation recommendation method and system based on big data user tag information
CN113342944B (en)Corpus generalization method, apparatus, device and storage medium
CN110442614B (en)Metadata searching method and device, electronic equipment and storage medium
CN113641797A (en)Data processing method, device, equipment, storage medium and computer program product
CN114328800B (en) Text processing method, device, electronic device and computer-readable storage medium
CN115131058B (en) Account identification method, device, equipment and storage medium
CN109819002B (en)Data pushing method and device, storage medium and electronic device
Fang et al.Attribute-enhanced metric learning for face retrieval
Vishwakarma et al.A comparative study of K-means and K-medoid clustering for social media text mining
Zhang et al.Matching state estimation scheme for content-based sensor search in the Web of things

Legal Events

DateCodeTitleDescription
PB01Publication
PB01Publication
SE01Entry into force of request for substantive examination
SE01Entry into force of request for substantive examination
GR01Patent grant
GR01Patent grant

[8]ページ先頭

©2009-2025 Movatter.jp