Cboth case matching method and device

By combining the copywriting matching model trained by the gate structure module and attention mechanism, the problem of random matching between copywriting and user is solved, the precise delivery and adaptive judgment of copywriting is achieved, and the user experience and delivery effect is improved.

CN119089214APending Publication Date: 2024-12-06BEIJING JINGDONG YUANSHENG TECH CO LTD
View PDF 7 Cites 0 Cited by

Patent Information

Application Number
CN202411178531.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-08-26
Publication Date
2024-12-06

AI Technical Summary

Technical Problem

The random matching between existing copywriting and users leads to inaccurate traffic, users are not interested in copywriting, poor delivery effect, and poor user experience.

Method used

Combining the gate structure module and attention mechanism to train the copy matching model, obtain the matching results of historical copy and users, generate copy vectors and user feature vectors, and aggregate features based on the attention mechanism to train the copy matching model to achieve accurate copy delivery and Adaptive discrimination.

Benefits of technology

It improves the accuracy of matching copywriting with users, improves user experience and delivery effect, and reduces delivery costs.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119089214A_ABST
    Figure CN119089214A_ABST
Patent Text Reader

Abstract

The invention discloses a copywriting matching method and device, and relates to the technical field of computers. A specific embodiment of the method comprises the steps of obtaining a plurality of historical copywritings, each user corresponding to each historical copywriting and a matching result of each user corresponding to each historical copywriting; generating a historical copywriting vector corresponding to the historical copywriting, and performing gating processing to obtain a historical text vector; aggregating the user behavior information and the historical text vector based on an attention mechanism; obtaining a splicing vector according to the aggregated feature vector 5, the attribute information of the user and the scene information; and training according to the splicing vector and the matching result to obtain a copywriting matching model. According to the embodiment, the door structure module and the attention mechanism are combined for training to obtain the copywriting matching model, adaptive judgment of non-compliant copywriting is achieved, the prediction accuracy of copywriting and user matching can be improved, and accurate putting of the copywriting, user experience improvement and copywriting putting effect can be achieved by means of the copywriting matching model.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of computer technology, and in particular to a document matching method and device. Background Art

[0002] Copywriting, such as advertising copywriting and promotional copywriting, is used to introduce products or services to attract users' attention to them. The accuracy of the copywriting and the user's matching affects the user's attention to the product or service. Currently, copywriting and target users are matched randomly, resulting in inaccurate triggering of traffic, users' lack of interest in copywriting, poor delivery effects, and poor user experience. Summary of the invention

[0003] In view of this, an embodiment of the present invention provides a copy matching method and device, which combines the gate structure module and the attention mechanism to obtain a copy matching model for training, thereby realizing adaptive discrimination of non-compliant copy and improving the prediction accuracy of copy and user matching. The copy matching model can be used to achieve accurate copy delivery, improve user experience, improve copy delivery effects, and reduce delivery costs.

[0004] To achieve the above object, according to one aspect of an embodiment of the present invention, a method for training a copy matching model is provided, comprising:

[0005] Acquire multiple historical documents, each user corresponding to each historical document, and a matching result of each historical document and each user corresponding to the historical document, wherein the multiple historical documents include historical documents that have not been delivered and historical documents that have been delivered, and each user corresponding to each historical document that has been delivered includes a user for whom the matching result indicates a successful match and a user for whom the matching result indicates a failed match;

[0006] For each historical copy, generate a historical copy vector corresponding to the historical copy, perform gate processing on the historical copy vector, and obtain a historical text vector;

[0007] For each of the users, the attribute information, behavior information and scene information of the user are obtained; the behavior information and the historical text vector are aggregated based on the attention mechanism to obtain an aggregate feature vector; and a concatenated vector corresponding to the historical text and the user is obtained according to the aggregate feature vector, the attribute information and the scene information;

[0008] Training is performed based on the concatenation vectors and matching results of the historical texts and the user to obtain a text matching model.

[0009] Optionally, gate processing is performed on the historical copywriting vector to obtain a historical text vector, including:

[0010] Performing feature extraction on the historical copywriting vector to obtain a first vector corresponding to the historical copywriting vector;

[0011] Obtaining a second vector according to the first vector and the historical text vector;

[0012] Transforming the second vector using an activation function to obtain a gating vector;

[0013] The historical text vector is obtained according to the gating vector and the first vector.

[0014] Optionally, obtaining the historical text vector according to the gate vector and the first vector includes:

[0015] The product of the gate vector and the first vector is used as the historical text vector.

[0016] Optionally, the behavior information includes multiple commodity behavior information, and the behavior information and the historical text vector are aggregated based on an attention mechanism to obtain an aggregated feature vector, including:

[0017] For each commodity behavior information, construct a corresponding behavior feature vector according to the commodity behavior information;

[0018] Calculate the attention score corresponding to each commodity behavior information according to the behavior feature vector and the historical text vector;

[0019] Pooling is performed on the low attention score of each commodity behavior information and the behavior feature vector of the commodity behavior information to obtain the aggregated feature vector.

[0020] According to another aspect of an embodiment of the present invention, a copy matching method is provided, comprising:

[0021] Obtain multiple product description information and target user groups of the products to be launched;

[0022] For each product description information, generate a copy corresponding to the product description information; generate a copy vector corresponding to the copy, perform gate processing on the copy vector, and obtain a text vector corresponding to the copy vector;

[0023] For each target user in the target user group, obtaining target attribute information, target behavior information and target scenario information of the target user;

[0024] Aggregating the text vector and the target behavior information based on the attention mechanism to obtain a target aggregate feature vector; obtaining a concatenated vector of the text vector and the target user according to the target aggregate feature vector, the target attribute information and the target scene information;

[0025] Inputting the concatenated vector into a text matching model to obtain a matching result between the text and the target user;

[0026] The text matching model is obtained according to the text matching model training method of the embodiment of the present invention.

[0027] Optionally, generating a text corresponding to the product description information includes:

[0028] Generate a word embedding vector corresponding to the product description information;

[0029] Encoding and decoding the word embedding vector to obtain a semantic vector corresponding to the word embedding vector;

[0030] The semantic vector is input into a multi-layer perceptron to obtain the text corresponding to the product description information.

[0031] According to another aspect of an embodiment of the present invention, a training device for a copy matching model is provided, comprising:

[0032] A first acquisition module is configured to acquire a plurality of historical documents, each user corresponding to each historical document, and a matching result of each historical document and each user corresponding to the historical document, wherein the plurality of historical documents include historical documents that have not been delivered and historical documents that have been delivered, and each user corresponding to each historical document that has been delivered includes a user for whom the matching result indicates a successful match and a user for whom the matching result indicates a failed match;

[0033] A first generation module generates, for each historical copy, a historical copy vector corresponding to the historical copy, and performs gate processing on the historical copy vector to obtain a historical text vector;

[0034] A first aggregation module, for each of the users, obtains attribute information, behavior information and scene information of the user; aggregates the behavior information and the historical text vector based on an attention mechanism to obtain an aggregate feature vector; and obtains a concatenation vector of the historical text and the user according to the aggregate feature vector, the attribute information and the scene information;

[0035] The training module is used to perform training based on the concatenation vectors and matching results of the historical text and the user to obtain a text matching model.

[0036] According to another aspect of an embodiment of the present invention, there is provided a document matching device, comprising:

[0037] The second acquisition module acquires multiple product description information and target user groups of the products to be launched;

[0038] The second generation module generates, for each product description information, a text corresponding to the product description information; generates a text vector corresponding to the text, and performs gate processing on the text vector to obtain a text vector corresponding to the text vector;

[0039] The second aggregation module obtains target attribute information, target behavior information and target scene information of each target user in the target user group; aggregates the text vector and the target behavior information based on the attention mechanism to obtain a target aggregate feature vector; obtains a concatenated vector of the text vector and the target user according to the target aggregate feature vector, the target attribute information and the target scene information;

[0040] A determination module inputs the concatenated vector into a text matching model to obtain a matching result between the text and the target user;

[0041] The text matching model is obtained according to the text matching model training method of the embodiment of the present invention.

[0042] According to another aspect of an embodiment of the present invention, there is provided an electronic device, including:

[0043] one or more processors;

[0044] a storage device for storing one or more programs,

[0045] When the one or more programs are executed by the one or more processors, the one or more processors implement the text matching model training method or text matching method provided by the present invention.

[0046] According to another aspect of an embodiment of the present invention, a computer-readable medium is provided, on which a computer program is stored, and when the program is executed by a processor, the training method of the text matching model or the text matching method provided by the present invention is implemented.

[0047] One embodiment of the above invention has the following advantages or beneficial effects: the training method of the text matching model of the embodiment of the present invention first obtains multiple historical texts, each user corresponding to each historical text, and the matching results of each historical text and each user; then generates a historical text vector corresponding to each historical text, and performs gate processing on the historical text vector through a gate structure module to obtain a historical text vector; based on the attention mechanism, the historical text vector is aggregated with the user's behavior information to obtain an aggregated feature vector, and the aggregated feature vector is spliced ​​with the user's attribute information and scene information to obtain a spliced ​​vector of the historical text and the user, and a text matching model is obtained by training based on the spliced ​​vector and the corresponding matching results. The training method of the text matching model is based on the combination of the gate structure module and the attention mechanism to obtain the text matching model, and the historical text vector is feature screened based on the gate structure module, so as to achieve adaptive discrimination of non-compliant texts; based on the attention mechanism, the correlation between the user's behavior information and the historical text vector is obtained, and the text matching model is obtained by training in combination with the delivery results, which can improve the prediction accuracy of the text matching model.

[0048] The further effects of the above-mentioned non-conventional optional manner will be described below in conjunction with the specific implementation manner. BRIEF DESCRIPTION OF THE DRAWINGS

[0049] The accompanying drawings are used to better understand the present invention and do not constitute an improper limitation of the present invention.

[0050] Figure 1 is a schematic diagram of the main process of a method for training a text matching model according to an embodiment of the present invention;

[0051] Figure 2 is a schematic diagram of a door structure module according to an embodiment of the present invention;

[0052] Figure 3 is a schematic diagram of the main process of a copy matching method according to an embodiment of the present invention;

[0053] Figure 4 It is a flowchart of a method for generating a copy in an embodiment of the present invention;

[0054] Figure 5 It is a flowchart of a copy matching method according to an embodiment of the present invention;

[0055] Figure 6 is a flow chart of another copy matching method according to an embodiment of the present invention;

[0056] Figure 7 is a schematic diagram of main modules of a training device for a text matching model according to an embodiment of the present invention;

[0057] Figure 8 is an exemplary system architecture diagram to which embodiments of the present invention may be applied;

[0058] Fig. 9 It is a schematic diagram of the structure of a computer system of a terminal device or a server suitable for implementing an embodiment of the present invention. DETAILED DESCRIPTION

[0059] The following is a description of exemplary embodiments of the present invention in conjunction with the accompanying drawings, including various details of the embodiments of the present invention to facilitate understanding, which should be considered as merely exemplary. Therefore, it should be recognized by those of ordinary skill in the art that various changes and modifications may be made to the embodiments described herein without departing from the scope and spirit of the present invention. Similarly, for clarity and conciseness, the description of well-known functions and structures is omitted in the following description.

[0060] Figure 1 FIG. 1 is a schematic diagram of the main process of a method for training a text matching model according to an embodiment of the present invention. Figure 1 As shown, the training method of the copy matching model includes the following steps:

[0061] Step S101: obtaining a plurality of historical documents, each user corresponding to each historical document, and a matching result of each historical document and each user corresponding to the historical document, wherein the plurality of historical documents include undelivered historical documents and delivered historical documents, and each user corresponding to each delivered historical document includes a user for whom the matching result indicates a successful match and a user for whom the matching result indicates a failed match;

[0062] Step S102: for each historical copy, generate a historical copy vector corresponding to the historical copy, perform gate processing on the historical copy vector, and obtain a historical text vector;

[0063] Step S103: for each user among the users, the user's attribute information, behavior information and scene information are obtained; based on the attention mechanism, the behavior information and the historical text vector are aggregated to obtain an aggregated feature vector; based on the aggregated feature vector, the attribute information and the scene information, a concatenated vector corresponding to the historical text and the user is obtained;

[0064] Step S104: training is performed based on the concatenation vectors and matching results of the historical texts and users to obtain a text matching model.

[0065] In an embodiment of the present invention, in the training method of the copy matching model, the copy can be an advertising copy, a promotional copy, etc. The advertising copy can be an online advertising copy or an offline advertising copy. For example, the advertising copy can be a logistics advertising copy. In the field of logistics, logistics advertising uses express parcels or express vehicles as advertising media for advertisers to place advertisements. Advertisements on express parcels are more common in logistics advertising. Advertisers provide products to be exposed, and use express parcels as carriers for targeted delivery to the audience.

[0066] In an embodiment of the present invention, when training a text matching model, first obtain a plurality of historical texts, each user corresponding to each historical text, and the matching results of each historical text and each user corresponding to it. The historical texts may include undelivered historical texts and delivered historical texts. Undelivered historical texts are texts that have not passed the review, that is, delivered historical texts are texts that have passed the review. If the historical text is an undelivered historical text, then each user corresponding to each historical text may be a user to be delivered of the undelivered historical solution, that is, an audience user; if the historical text is a delivered text, then each user corresponding to each historical text includes a user whose matching result after delivery indicates a successful match and a user whose matching result indicates a failed match. A successfully matched user may be a user who has scanned, added to a purchase, downloaded, browsed, etc. the delivered text, and a failed match user may be a user who has not scanned the delivered solution.

[0067] In an embodiment of the present invention, after obtaining multiple historical documents, a corresponding historical document vector is generated for each historical document. Specifically, a historical document vector corresponding to each historical document can be generated by word embedding. For example, a word segmentation tool such as the jieba word segmentation tool can be used to segment the historical document. After that, the historical document after word segmentation is mapped to a high-dimensional space through word embedding to generate a historical document vector.

[0068] Among them, the historical copy is obtained based on the copy generation model. Each historical copy has corresponding product description information. The product description information can be one or more attribute information of the corresponding product. The copy generation model is based on the pre-trained transformer model and multilayer perceptron (MLP). The pre-trained transformer model includes an encoding module and a decoding module. After the product description information is input into the copy generation model, the encoding module encodes the product description information to obtain a first semantic vector, and the decoding module decodes the first semantic vector to obtain a semantic vector. The second semantic vector is input into the multilayer perceptron to obtain a historical copy vector.

[0069] In an embodiment of the present invention, a historical copy vector is gated to obtain a historical text vector, including: extracting features from the historical copy vector to obtain a first vector corresponding to the historical copy vector; obtaining a second vector based on the first vector and the historical copy vector; transforming the second vector using an activation function to obtain a gated vector; and obtaining the historical text vector based on the gated vector and the first vector.

[0070] In an embodiment of the present invention, after obtaining the historical copy vector corresponding to the historical copy, the historical copy vector is processed by a gate structure module, i.e., gated processing. The gate structure module includes a gate structure part and a non-gate structure part. In the gate structure part, a multilayer perceptron is used to extract features of the historical copy vector, and a first vector corresponding to the historical copy vector is output. Then, the first vector is added to the historical copy vector to obtain a second vector, and the second vector is transformed by an activation function to obtain a gated vector, wherein the activation function may be a σ (sigmoid) function. The second vector is transformed by the activation function to obtain a gated vector, which may include: using a weight parameter and a bias parameter to convert the second vector into a third vector, and using the activation function to convert the third vector into a gated vector; specifically, the product result of the weight parameter and the second vector may be calculated, and then the sum result of the product result and the bias parameter may be calculated, and the sum result may be used as the third vector.

[0071] In an embodiment of the present invention, the historical text vector is obtained according to the gate vector and the first vector, including: taking the product of the gate vector and the first vector as the historical text vector. That is, the gate vector is used to update the first vector to obtain the historical text vector. Specifically, in the NOT gate structure part, feature extraction is performed on the historical text vector to obtain the first vector, and the historical text vector is obtained by multiplying the gate vector with the first vector to achieve the update of the first vector; the first vector can also be multiplied by a preset coefficient and then multiplied by the gate vector to obtain the historical text vector.

[0072] Figure 2 It is a schematic diagram of a gate structure module of an embodiment of the present invention. In the gate structure module, the gate structure part includes a multi-layer perceptron and an activation function, and the other parts are non-gate structure parts. First, the historical copy is segmented, and then the historical copy after the word segmentation is embedded to obtain a historical copy vector; in the gate structure part, the multi-layer perceptron is used to extract features of the historical copy vector to obtain a first vector, the first vector is added to the historical copy vector to obtain a second vector, and the activation function is used to transform the second vector to obtain a gated vector; in the non-gate structure part, the multi-layer perceptron is used to extract features of the historical copy vector to obtain a first vector, and the first vector is multiplied by the gated vector to obtain a historical text vector.

[0073] By using the gate structure module to process the historical copy vector, the necessary features in the historical copy vector can be retained and the unnecessary features can be removed, thereby improving the accuracy of the subsequent copy matching. At the same time, when constructing the sample of the copy matching model, the historical copy that has not been reviewed and approved, that is, the non-compliant historical copy, can be selected. Later, when back-propagating to optimize the model parameters, the parameters in the gate structure module are adaptively adjusted based on gradient descent, so that the compliance of the copy can be judged.

[0074] In the embodiment of the present invention, the behavior information includes multiple commodity behavior information, and the behavior information and the historical text vector are aggregated based on the attention mechanism to obtain an aggregated feature vector, including:

[0075] For each commodity behavior information, a corresponding behavior feature vector is constructed according to the commodity behavior information;

[0076] Based on the behavior feature vector and the historical text vector, the attention score corresponding to each product behavior information is calculated;

[0077] The low attention score of each product behavior information and the behavior feature vector of the product behavior information are pooled to obtain an aggregated feature vector.

[0078] In an embodiment of the present invention, after obtaining the historical text vector, for each user among the users corresponding to each historical advertising copy, the user's attribute information, behavior information and scenario information are obtained, wherein the user's attribute information may include the user's portrait information, which may specifically include one or more of the user's age, gender, category preference, place of residence and other portrait information; the user's behavior information may include the products browsed by the user within a preset time period and the behavior information for each product; the behavior information for each product includes one or more of the category and brand of the products browsed by the user on the Internet shopping platform within the preset time period, the number of times the browsed product has been viewed within the preset time period (such as the number of times the product has been viewed in the past 7 days and the past 30 days), whether to add to cart, whether to place an order, and the like; the scenario information may include relevant information such as the release time and date of the historical copy.

[0079] After obtaining the user's attribute information, behavior information, and scene information, feature engineering is performed on the attribute information, behavior information, and scene information respectively. The pipeline mechanism can be used to serialize the feature engineering processing mechanism. After feature engineering processing, the corresponding attribute feature vector, behavior feature vector, and scene feature vector are constructed respectively. Specifically, the user's attribute information is generally a discrete feature, and the attribute feature vector can be generated by one-hot encoding; for the behavior information of each product, discrete features such as product category can be processed by one-hot encoding, and continuous features such as the number of times the product has been trafficked within a preset time can be normalized to obtain the behavior feature vector corresponding to the behavior information of each product; for the scene information, which is also a discrete feature, the scene feature vector can be generated by one-hot encoding.

[0080] In an embodiment of the present invention, the behavior information and the historical text vector are aggregated based on the attention mechanism to obtain an aggregate feature vector. Specifically, corresponding to each commodity behavior information, the corresponding feature behavior vector is obtained by feature engineering processing; the behavior feature vector is multiplied by the historical text vector to obtain the attention score of each commodity behavior information; then the attention and behavior feature vector of each commodity behavior information are pooled, that is, the attention score of each commodity behavior information is multiplied by the behavior feature vector to obtain the product result of each commodity behavior information, and then the product results of each commodity behavior information are summed, that is, information aggregation is performed by sum pooling to obtain an aggregate feature vector, wherein the product result of the attention score of each commodity behavior information and the behavior feature vector represents the contribution of the behavior feature vector to the aggregate feature vector, so as to illustrate the correlation between the user's behavior preference and the historical copy, for example, if the user browses multiple products under the same brand, then the user may be more interested in the advertising copy of the brand; if the user browses the same commodity of different brands, then the user may be more interested in the description of the effect of the commodity. The attention score can be the weight of the corresponding behavior feature vector, and the aggregate feature vector is obtained by weighted summation.

[0081] After obtaining the aggregated feature vector, it is spliced ​​with the user's attribute feature vector and scene feature vector to obtain a spliced ​​vector; training is performed based on the spliced ​​vector and matching results of each historical copy and the corresponding user to obtain a copy matching model. Specifically, the spliced ​​vector is input into a multi-layer perceptron to obtain a delivery result, which can be a delivery probability. If the matching result between the user and the historical copy is a successful match, the delivery probability is 1; if the matching result between the user and the historical copy is a failed match, the delivery probability is 0; the matching result between the historical copy that has not been delivered and any user is a failed match, and the delivery probability is 0.

[0082] After training the copy matching model, the model parameters can be further tuned, mainly including model parameter initialization, maximum number of iterations, selection of activation function, optimizer selection, early stopping conditions, learning rate, etc., and a better model effect can be obtained based on the grid search method. The copy matching model can also be evaluated using test data. The test data can include positive samples and negative samples for model testing. Positive samples include historical copy that has been delivered and users who have successfully matched the delivered historical copy. Negative samples include historical copy that has not been delivered and users to be delivered of the historical copy that has not been delivered, historical copy that has been delivered and users who have failed to match the delivered historical copy. The classification model, i.e., the copy matching model, is evaluated using the three evaluation indicators of precision, recall, and F1 value. Among them, precision = data predicted to be positive samples and actually positive samples / all data predicted to be positive samples; recall = data predicted to be positive samples and actually positive samples / all data of positive samples; F1 value = 2*precision*recall / (recall+precision). After testing, the precision, recall and F1 value of the copy matching model are 0.86, 0.76 and 0.81 respectively, which meets business requirements.

[0083] The training method of the text matching model of the embodiment of the present invention first obtains multiple historical texts, each user corresponding to each historical text, and the matching results between each historical text and each user; then generates a historical text vector corresponding to each historical text, and performs gate processing on the historical text vector through a gate structure module to obtain a historical text vector; based on the attention mechanism, the historical text vector is aggregated with the user's behavior information to obtain an aggregated feature vector, and the aggregated feature vector is spliced ​​with the user's attribute information and scene information to obtain a spliced ​​vector of the historical text and the user, and a text matching model is obtained by training based on the spliced ​​vector and the corresponding matching results. The training method of the text matching model is based on the combination of the gate structure module and the attention mechanism to obtain the text matching model, which improves the model's feature screening of the historical text vector based on the gate structure module, thereby realizing adaptive discrimination of non-compliant texts; based on the attention mechanism, the correlation between the user's behavior information and the historical text vector is obtained, and the text matching model is obtained by training in combination with the delivery results, which can improve the prediction accuracy of the text matching model.

[0084] According to another aspect of the embodiment of the present invention, Figure 3 As shown, a copy matching method is provided, including:

[0085] Step S301: Acquire multiple product description information and target user groups of products to be launched;

[0086] Step S302: for each product description information, generate a copy corresponding to the product description information; generate a copy vector corresponding to the copy, perform gate processing on the copy vector, and obtain a text vector corresponding to the copy vector;

[0087] Step S303: for each target user in the target user group, obtain the target attribute information, target behavior information and target scene information of the target user; aggregate the text vector and the target behavior information based on the attention mechanism to obtain a target aggregate feature vector; obtain a concatenated vector of the text vector and the target user according to the target aggregate feature vector, the target attribute information and the target scene information;

[0088] Step S304: input the concatenated vector into the copy matching model to obtain the matching result between the copy and the target user;

[0089] The text matching model is obtained according to the text matching model training method of the embodiment of the present invention.

[0090] In an embodiment of the present invention, after training the copy matching model, the copy matching model can be used to obtain the users to be delivered corresponding to the copy, and the corresponding copy can be delivered to the users to be delivered, thereby improving the delivery effect of the copy. First, multiple product description information and target user groups of the products to be delivered are obtained. Each of the multiple product description information includes one or more product information of the products to be delivered, that is, the product information of the products to be delivered is obtained. The product information may include product attributes, industry (such as consumer products, 3C, etc.), brand, market orientation, object orientation, etc., and one or more product information is obtained according to different dimensions to form product description information of different dimensions, that is, multiple product description information is obtained. The target user group can be determined based on the product information of the product to be launched and the attribute information and behavior information of the user, that is, a candidate user group is obtained according to preset rules, and then the behavior information and attribute information of each user in the candidate user group are obtained, and a user feature vector is generated from the behavior information and attribute information of each user, and a product feature vector is generated based on the product information of the product to be launched. Whether to add the user to the target user group is determined based on the matching result between the user feature vector and the product feature vector. For example, the similarity between the user feature vector and the product feature vector can be calculated, and users whose similarity is greater than or equal to a preset similarity threshold are added to the target user group as target users.

[0091] In an embodiment of the present invention, for each product description information, a copy corresponding to the product description information is generated, including: generating a word embedding vector corresponding to the product description information; encoding and decoding the word embedding vector to obtain a semantic vector corresponding to the word embedding vector; inputting the semantic vector into a multi-layer perceptron to obtain the copy corresponding to the product description information.

[0092] Specifically, the copy corresponding to the product description information can be generated according to the pre-trained transformer model. For example, the product description information can be processed by word embedding technology to obtain a word embedding vector, which is input into the pre-trained transformer model. The semantic vector is obtained through the encoding module and the decoding module, and the semantic vector is input into the multi-layer perceptron to generate the copy corresponding to the product description information.

[0093] Figure 4 The figure is a flow chart of a copywriting generation method of an embodiment of the present invention. For each product description information of the product to be launched, the product description information is converted into a word embedding vector through word embedding technology, the word embedding vector is input into the pre-trained transformer model, the encoding module encodes the word embedding vector, the decoding module decodes the encoded vector, and the decoded vector is input into the multi-layer perceptron (MLP) to generate the copywriting corresponding to the product description information.

[0094] After generating the copy corresponding to the product description information, the copy is processed using word embedding technology to generate a copy vector corresponding to the copy. The copy vector is gated using a gate structure module to obtain a text vector corresponding to the copy vector.

[0095] In an embodiment of the present invention, target attribute information, target behavior information and target scene information of each target user in the target user group are obtained, the target behavior information includes product behavior information of each product browsed by the target user within a preset time, and a corresponding target behavior feature vector is constructed for each product behavior information, thereby obtaining multiple target behavior feature vectors, each of which is constructed according to the target attribute information, and each of which is constructed according to the target scene information.

[0096] Based on the attention mechanism, the text vector and the target behavior information are aggregated to obtain the target aggregate feature vector. Specifically, the attention score is calculated by the inner product of the text vector and each target behavior feature vector, and the attention score is multiplied by the target behavior feature vector to obtain the product result. The product results are summed to obtain the target aggregate feature vector. The target aggregate feature vector is spliced ​​with the user's target attribute feature vector and the target scene feature vector to obtain the target splicing vector. The target splicing vector is input into the multi-layer perceptron to obtain the matching result between the target user and the copy, and the matching result can be the delivery probability; then the delivery probability of each target user and the copy is sorted from large to small, and the target user to be delivered is selected from them according to the sorting result. In this way, the target user to be delivered corresponding to each copy of the product is obtained. When delivering, it can be aggregated according to the copy, and the crowd package corresponding to the copy is generated and delivered.

[0097] Figure 5 The flowchart of a copy matching method of an embodiment of the present invention is as follows. Multiple product description information of the products to be launched is obtained, and the copy corresponding to each product description information is generated based on the transformer model; for each copy, the copy vector of each copy is obtained by using word embedding technology, and the copy vector is gated by using a gate structure module to obtain the corresponding text vector; based on the attention mechanism, the text vector is fused with the user behavior information to obtain a fusion vector, i.e., an aggregated feature vector, and the aggregated feature vector is spliced ​​with the user's attribute information and scene information to obtain a spliced ​​vector, and the spliced ​​vector is input into a multi-layer perceptron to obtain the launch probability.

[0098] Figure 6 The flowchart of another copy matching method of the embodiment of the present invention is as follows. A plurality of product description information of the products to be put on the market is obtained, and the copy corresponding to each product description information is generated; for each copy, the copy vector of each copy is obtained by using word embedding technology, and the copy vector is gated by using a gate structure module to obtain the corresponding text vector; the user's attribute information, behavior information and scene information are obtained, and the behavior information includes the behavior information of each commodity browsed by the user within a preset time, including user browsing commodity 1, user browsing commodity 2, ... user browsing commodity n, where n is a positive integer; based on the attention mechanism, the behavior feature vector of each commodity behavior information is calculated by inner product with the text vector to obtain the attention score, and the attention score is multiplied by the behavior feature vector to obtain the multiplication result, and the pooling is performed by sum pooling, that is, each multiplication result is added to obtain the sum result; and the sum result is spliced ​​with the user's attribute feature vector and the scene feature vector to obtain the splicing vector, and the splicing vector is input into the multilayer perceptron to obtain the probability of putting on the market.

[0099] The copy matching method of the embodiment of the present invention can generate multiple copies for the products to be launched, and calculate the matching degree between each copy and each user, so as to deliver the copy to each user with a higher matching degree, realize accurate delivery of the copy, improve the delivery effect of the copy, and enhance the user experience.

[0100] In the embodiment of the present invention, an experimental group and a control group are used to verify the effect of the text matching method of the embodiment of the present invention. There is no difference between the experimental group and the control group in terms of code scanning behavior and order placing behavior. The experimental group uses the text matching method of the embodiment of the present invention to deliver advertising text, and the control group is operated by operators to deliver text based on experience. The results are shown in Table 1:

[0101]

[0102] It can be seen from Table 1 that the text matching method according to the embodiment of the present invention improves the scanning rate and conversion rate by 44.2% and 23.8% respectively compared with the prior art, indicating that the text matching method according to the embodiment of the present invention can significantly improve the scanning rate and order conversion rate of sticker advertisements.

[0103] The copy matching method of the embodiment of the present invention generates different copies according to different product description information; obtains corresponding copy vectors based on the copy, performs gate processing on the copy vector through a gate structure module to obtain corresponding text vectors; calculates the attention score of the text vector and the user's behavior information based on the attention mechanism, and obtains an aggregated feature vector based on the attention score; splices the aggregated feature vector with the user attribute feature vector and the scene feature vector, uses the spliced ​​vector to obtain the matching result between the copy and the user, and determines the user group to be delivered to the copy based on the matching result. The copy matching method generates copies of different dimensions based on a pre-trained transformer model, and can screen feature information of the copy vector based on a gate structure module to determine the compliance of different copies; obtains the audience user group corresponding to each copy based on the attention mechanism; the method can generate multiple copies, and obtain users matching each copy, so as to achieve accurate delivery of the copy, thereby improving the user experience and the delivery effect of the copy.

[0104] According to another aspect of the embodiment of the present invention, Figure 7 As shown, a training device 7 for a text matching model is provided, comprising:

[0105] The first acquisition module 701 acquires a plurality of historical documents, each user corresponding to each historical document, and a matching result of each historical document and each user corresponding to the historical document, wherein the plurality of historical documents include undelivered historical documents and delivered historical documents, and each user corresponding to each delivered historical document includes a user for whom the matching result indicates a successful match and a user for whom the matching result indicates a failed match;

[0106] The first generating module 702 generates a historical text vector corresponding to each historical text, and performs gate processing on the historical text vector to obtain a historical text vector;

[0107] The first aggregation module 703 obtains attribute information, behavior information and scene information of each user among the users; aggregates the behavior information and the historical text vector based on the attention mechanism to obtain an aggregate feature vector; obtains a concatenation vector of the historical text and the user according to the aggregate feature vector, the attribute information and the scene information;

[0108] The training module 704 performs training based on the concatenation vectors and matching results of the historical texts and users to obtain a text matching model.

[0109] In an embodiment of the present invention, the first generation module 702 is further used to: perform feature extraction on the historical text vector to obtain a first vector corresponding to the historical text vector; obtain a second vector based on the first vector and the historical text vector; transform the second vector using an activation function to obtain a gating vector; and obtain a historical text vector based on the gating vector and the first vector.

[0110] In the embodiment of the present invention, the first generating module 702 is further configured to: use the product of the gate vector and the first vector as the historical text vector.

[0111] In an embodiment of the present invention, the behavior information includes multiple commodity behavior information, and the first aggregation module 703 is further used to: for each commodity behavior information, construct a corresponding behavior feature vector based on the commodity behavior information; calculate the attention score corresponding to each commodity behavior information based on the behavior feature vector and the historical text vector; pool the attention score of each commodity behavior information and the behavior feature vector of the commodity behavior information to obtain an aggregated feature vector.

[0112] According to another aspect of an embodiment of the present invention, there is provided a document matching device, comprising:

[0113] The second acquisition module acquires multiple product description information and target user groups of the products to be launched;

[0114] The second generation module generates, for each product description information, a text corresponding to the product description information; generates a text vector corresponding to the text, performs gate processing on the text vector, and obtains a text vector corresponding to the text vector;

[0115] The second aggregation module obtains target attribute information, target behavior information and target scene information of each target user in the target user group; aggregates the text vector and the target behavior information based on the attention mechanism to obtain a target aggregate feature vector; obtains a concatenated vector of the copy vector and the target user based on the target aggregate feature vector, the target attribute information and the target scene information;

[0116] The determination module inputs the concatenated vector into the copy matching model to obtain the matching result between the copy and the target user;

[0117] The text matching model is obtained according to the text matching model training method of the embodiment of the present invention.

[0118] In an embodiment of the present invention, the second generation module is further used to: generate a word embedding vector corresponding to the product description information; encode and decode the word embedding vector to obtain a semantic vector corresponding to the word embedding vector; input the semantic vector into a multi-layer perceptron to obtain the text corresponding to the product description information.

[0119] According to another aspect of an embodiment of the present invention, there is provided an electronic device, comprising: one or more processors; a storage device for storing one or more programs, wherein when the one or more programs are executed by the one or more processors, the one or more processors implement the training method of the text matching model or the text matching method provided by the present invention.

[0120] According to another aspect of an embodiment of the present invention, a computer-readable medium is provided, on which a computer program is stored, and when the program is executed by a processor, the training method of the text matching model or the text matching method provided by the present invention is implemented.

[0121] Figure 8 An exemplary system architecture 800 is shown to which the text matching model training method or text matching model training device, text matching method or text matching device according to the embodiments of the present invention can be applied.

[0122] like Figure 8 As shown, system architecture 800 may include terminal devices 801, 802, 803, a network 804, and a server 805. Network 804 is used to provide a medium for communication links between terminal devices 801, 802, 803 and server 805. Network 804 may include various connection types, such as wired, wireless communication links, or optical fiber cables, etc.

[0123] Users can use terminal devices 801, 802, and 803 to interact with server 805 through network 804 to receive or send messages, etc. Various communication client applications can be installed on terminal devices 801, 802, and 803, such as shopping applications, web browser applications, search applications, instant messaging tools, email clients, social platform software, etc. (only examples).

[0124] The terminal devices 801 , 802 , and 803 may be various electronic devices having a display screen and supporting web browsing, including but not limited to smart phones, tablet computers, laptop computers, desktop computers, and the like.

[0125] The server 805 may be a server that provides various services, such as a backend management server (only an example) that provides support for shopping websites browsed by users using the terminal devices 801, 802, and 803. The backend management server may analyze and process the received data such as product information query requests, and feed back the processing results (such as target push information, product information - only an example) to the terminal device.

[0126] It should be noted that the text matching model training method or text matching method provided in the embodiment of the present invention is generally executed by the server 805 , and accordingly, the text matching model training device or text matching device is generally arranged in the server 805 .

[0127] It should be understood that Figure 8 The number of terminal devices, networks and servers in the embodiment is only for illustration. Any number of terminal devices, networks and servers may be provided according to implementation requirements.

[0128] Reference below Fig. 9 , which shows a schematic diagram of the structure of a computer system 900 of a terminal device suitable for implementing an embodiment of the present invention. Fig. 9 The terminal device shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present invention.

[0129] like Fig. 9 As shown, the computer system 900 includes a central processing unit (CPU) 901, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 902 or a program loaded from a storage part 908 into a random access memory (RAM) 903. In the RAM 903, various programs and data required for the operation of the system 900 are also stored. The CPU 901, the ROM 902, and the RAM 903 are connected to each other through a bus 904. An input / output (I / O) interface 905 is also connected to the bus 904.

[0130] The following components are connected to the I / O interface 905: an input section 906 including a keyboard, a mouse, etc.; an output section 907 including a cathode ray tube (CRT), a liquid crystal display (LCD), etc., and a speaker, etc.; a storage section 908 including a hard disk, etc.; and a communication section 909 including a network interface card such as a LAN card, a modem, etc. The communication section 909 performs communication processing via a network such as the Internet. A drive 910 is also connected to the I / O interface 905 as needed. A removable medium 911, such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, etc., is installed on the drive 910 as needed, so that a computer program read therefrom is installed into the storage section 908 as needed.

[0131] In particular, according to the embodiments disclosed in the present invention, the process described above with reference to the flowchart can be implemented as a computer software program. For example, the embodiments disclosed in the present invention include a computer program product, which includes a computer program carried on a computer-readable medium, and the computer program contains program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from the network through the communication part 909, and / or installed from the removable medium 911. When the computer program is executed by the central processing unit (CPU) 901, the above-mentioned functions defined in the system of the present invention are executed.

[0132] It should be noted that the computer-readable medium shown in the present invention may be a computer-readable signal medium or a computer-readable storage medium or any combination of the above two. The computer-readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In the present invention, a computer-readable storage medium may be any tangible medium containing or storing a program that can be used by or in combination with an instruction execution system, device or device. In the present invention, a computer-readable signal medium may include a data signal propagated in a baseband or as part of a carrier wave, which carries a computer-readable program code. This propagated data signal may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. Computer-readable signal media may also be any computer-readable medium other than computer-readable storage media, which may send, propagate or transmit a program for use by or in conjunction with an instruction execution system, apparatus or device. The program code contained on the computer-readable medium may be transmitted using any appropriate medium, including but not limited to: wireless, wire, optical cable, RF, etc., or any suitable combination of the above.

[0133] The flow chart and block diagram in the accompanying drawings illustrate the possible architecture, function and operation of the system, method and computer program product according to various embodiments of the present invention. In this regard, each box in the flow chart or block diagram can represent a module, a program segment, or a part of a code, and the above-mentioned module, program segment, or a part of a code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in a different order from the order marked in the accompanying drawings. For example, two boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram or flow chart, and the combination of the boxes in the block diagram or flow chart can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.

[0134] The modules involved in the embodiments of the present invention may be implemented in software or hardware. The modules described may also be provided in a processor, for example, may be described as: a processor including a first acquisition module, a first generation module, a first aggregation module and a training module. The names of these modules do not, in some cases, constitute limitations on the modules themselves, for example, the first acquisition module may also be described as "a module for acquiring multiple historical documents, the users corresponding to each historical document, and the matching results of each historical document and each user corresponding to the historical document".

[0135] As another aspect, the present invention also provides a computer-readable medium, which may be included in the device described in the above embodiment; or it may exist independently and not be assembled into the device. The above computer-readable medium carries one or more programs, and when the above one or more programs are executed by a device, the device includes: obtaining multiple historical documents, each user corresponding to each historical document, and the matching result of each historical document and each user corresponding to each historical document, the multiple historical documents include undelivered historical documents and delivered historical documents, and each user corresponding to each delivered historical document includes a user whose matching result indicates a successful match and a user whose matching result indicates a failed match; for each historical document, generating a historical document vector corresponding to the historical document, performing gated processing on the historical document vector, and obtaining a historical text vector; for each user among the users, obtaining the user's attribute information, behavior information, and scene information; aggregating the behavior information and the historical text vector based on the attention mechanism to obtain an aggregated feature vector; obtaining a spliced ​​vector corresponding to the historical document and the user according to the aggregated feature vector, the attribute information, and the scene information; training according to the spliced ​​vector and the matching result of the historical document and the user to obtain a document matching model.

[0136] According to the technical solution of the embodiment of the present invention, the training method of the text matching model of the embodiment of the present invention first obtains multiple historical texts, each user corresponding to each historical text, and the matching results of each historical text and each user; then generates a historical text vector corresponding to each historical text, and performs gate processing on the historical text vector through a gate structure module to obtain a historical text vector; based on the attention mechanism, the historical text vector is aggregated with the user's behavior information to obtain an aggregated feature vector, and the aggregated feature vector is spliced ​​with the user's attribute information and scene information to obtain a spliced ​​vector of the historical text and the user, and the text matching model is trained according to the spliced ​​vector and the corresponding matching results. The training method of the text matching model is based on the combination of the gate structure module and the attention mechanism to obtain the text matching model, which improves the model's feature screening of the historical text vector based on the gate structure module, thereby realizing adaptive discrimination of non-compliant texts; based on the attention mechanism, the correlation between the user's behavior information and the historical text vector is obtained, and the text matching model is obtained by training in combination with the delivery results, which can improve the prediction accuracy of the text matching model.

[0137] The copy matching method of the embodiment of the present invention generates different copies according to different product description information; obtains corresponding copy vectors based on the copy, performs gate processing on the copy vector through a gate structure module to obtain corresponding text vectors; calculates the attention score of the text vector and the user's behavior information based on the attention mechanism, and obtains an aggregated feature vector based on the attention score; splices the aggregated feature vector with the user attribute feature vector and the scene feature vector, uses the spliced ​​vector to obtain the matching result between the copy and the user, and determines the user group to be delivered to the copy based on the matching result. The copy matching method generates copies of different dimensions based on a pre-trained transformer model, and can screen feature information of the copy vector based on a gate structure module to determine the compliance of different copies; obtains the audience user group corresponding to each copy based on the attention mechanism; the method can generate multiple copies, and obtain users matching each copy, so as to achieve accurate delivery of the copy, thereby improving the user experience and the delivery effect of the copy.

[0138] The above specific implementations do not constitute a limitation on the protection scope of the present invention. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions may occur depending on design requirements and other factors. Any modification, equivalent substitution and improvement made within the spirit and principle of the present invention shall be included in the protection scope of the present invention.

Claims

1. A method for training a copywriting matching model, characterized in that: include: Acquire multiple historical documents, each user corresponding to each historical document, and a matching result of each historical document and each user corresponding to the historical document, wherein the multiple historical documents include historical documents that have not been delivered and historical documents that have been delivered, and each user corresponding to each historical document that has been delivered includes a user for whom the matching result indicates a successful match and a user for whom the matching result indicates a failed match; For each historical copy, generate a historical copy vector corresponding to the historical copy, perform gate processing on the historical copy vector, and obtain a historical text vector; For each of the users, the attribute information, behavior information and scene information of the user are obtained; the behavior information and the historical text vector are aggregated based on the attention mechanism to obtain an aggregate feature vector; and a concatenated vector corresponding to the historical text and the user is obtained according to the aggregate feature vector, the attribute information and the scene information; Training is performed based on the concatenation vectors and matching results of the historical texts and the user to obtain a text matching model.

2. The method according to claim 1, characterized in that The historical text vector is gated to obtain a historical text vector, including: Performing feature extraction on the historical copywriting vector to obtain a first vector corresponding to the historical copywriting vector; Obtaining a second vector according to the first vector and the historical text vector; Transforming the second vector using an activation function to obtain a gating vector; The historical text vector is obtained according to the gating vector and the first vector.

3. The method according to claim 2, characterized in that Obtaining the historical text vector according to the gate vector and the first vector includes: The product of the gate vector and the first vector is used as the historical text vector.

4. The method according to claim 2, characterized in that: The behavior information includes multiple commodity behavior information, and the behavior information and the historical text vector are aggregated based on the attention mechanism to obtain an aggregated feature vector, including: For each commodity behavior information, construct a corresponding behavior feature vector according to the commodity behavior information; Calculate the attention score corresponding to each commodity behavior information according to the behavior feature vector and the historical text vector; Pooling is performed on the attention score of each commodity behavior information and the behavior feature vector of the commodity behavior information to obtain the aggregated feature vector.

5. A copy matching method, characterized in that: include: Obtain multiple product description information and target user groups of the products to be launched; For each product description information, generate a copy corresponding to the product description information; Generate a copywriting vector corresponding to the copywriting, perform gate processing on the copywriting vector, and obtain a text vector corresponding to the copywriting vector; For each target user in the target user group, obtaining target attribute information, target behavior information and target scenario information of the target user; Aggregating the text vector and the target behavior information based on the attention mechanism to obtain a target aggregate feature vector; obtaining a target concatenation vector of the text vector and the target user according to the target aggregate feature vector, the target attribute information and the target scene information; Inputting the target concatenation vector into a text matching model to obtain a matching result between the text and the target user; The text matching model is trained according to any one of the methods of claims 1-4.

6. The method according to claim 5, characterized in that Generate the copy corresponding to the product description information, including: Generate a word embedding vector corresponding to the product description information; Encoding and decoding the word embedding vector to obtain a semantic vector corresponding to the word embedding vector; The semantic vector is input into a multi-layer perceptron to obtain the text corresponding to the product description information.

7. A training device for a copywriting matching model, characterized in that: include: A first acquisition module is configured to acquire a plurality of historical documents, each user corresponding to each historical document, and a matching result of each historical document and each user corresponding to the historical document, wherein the plurality of historical documents include historical documents that have not been delivered and historical documents that have been delivered, and each user corresponding to each historical document that has been delivered includes a user for whom the matching result indicates a successful match and a user for whom the matching result indicates a failed match; A first generation module generates, for each historical copy, a historical copy vector corresponding to the historical copy, and performs gate processing on the historical copy vector to obtain a historical text vector; A first aggregation module, for each of the users, obtains attribute information, behavior information and scene information of the user; aggregates the behavior information and the historical text vector based on an attention mechanism to obtain an aggregated feature vector; Obtaining a concatenation vector of the historical text and the user according to the aggregated feature vector, the attribute information, and the scene information; The training module is used to perform training based on the concatenation vectors and matching results of the historical text and the user to obtain a text matching model.

8. A text matching device, characterized in that: include: The second acquisition module acquires multiple product description information and target user groups of the products to be launched; The second generation module generates, for each product description information, a text corresponding to the product description information; generates a text vector corresponding to the text, and performs gate processing on the text vector to obtain a text vector corresponding to the text vector; A second aggregation module, for each target user in the target user group, obtains target attribute information, target behavior information and target scenario information of the target user; Aggregating the text vector and the target behavior information based on the attention mechanism to obtain a target aggregate feature vector; obtaining a concatenated vector of the text vector and the target user according to the target aggregate feature vector, the target attribute information and the target scene information; A determination module inputs the concatenated vector into a text matching model to obtain a matching result between the text and the target user; The text matching model is trained according to any one of the methods of claims 1-4.

9. An electronic device, characterized in that: include: one or more processors; a storage device for storing one or more programs, When the one or more programs are executed by the one or more processors, the one or more processors implement the method according to any one of claims 1 to 6.

10. A computer readable medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, the method according to any one of claims 1 to 6 is implemented.

Citation Information

Patent Citations

  • Training method and device of intention recognition model and intention recognition method and device

    CA3180493A1

  • Copywriting generation method and device

    CN109992764A

  • Information pushing method and device

    CN113763112A

  • Text matching method and device, electronic equipment and computer readable storage medium

    CN114492451A

  • Big language model-based copywriting generation method and device, storage medium and computer equipment

    CN118427370A