A product recall method, a product recall system and related devices

By combining the FM model and the deep sequence matching model, the problem that the dual-tower structure cannot utilize cross features is solved, thereby improving the accuracy and generalization of product recall and ensuring the complexity and timeliness of the recall model.

CN114119050BActive Publication Date: 2025-12-12HANGZHOU SHIQU INFORMATION TECH CO LTD
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202111485421.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-12-07
Publication Date
2025-12-12
Estimated Expiration
2041-12-07

AI Technical Summary

Technical Problem

Existing product recall algorithms, which use the classic dual-tower structure, cannot effectively utilize the cross-features between users and products to be recalled, resulting in low recall accuracy.

Method used

By employing the FM model and deep sequence matching model, and acquiring user-side and product-side features, a loss function is constructed and features are trained. A vector retrieval library is used to recall products in similar subsequences. By combining recent and historical behaviors, features are concatenated to increase the predictive ability of long-tail products.

Benefits of technology

It improves the accuracy and generalization of product recall, ensures the timeliness of online prediction and the complexity of the recall model, and enhances the accuracy of the recall algorithm.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114119050B_ABST
    Figure CN114119050B_ABST
Patent Text Reader

Abstract

The application provides a commodity recall method, comprising: training samples based on a FM model and a deep sequence matching model respectively to obtain respective user side features and commodity side features, and performing feature concatenation to obtain two feature results; determining a similar subsequence of the sample according to the similarity between the feature results; and recalling a preset number of commodities in the similar subsequence by using a vector retrieval library. The application collects and analyzes the recent behavior and historical behavior of a user, performs random negative sampling in an exposed commodity pool, increases the proportion of long-tail commodities in negative samples, enhances the prediction capability of samples containing long-tail commodities, and effectively improves the generalization of the recall model. The application also provides a commodity recall system, a computer readable storage medium and an electronic device, which have the above beneficial effects.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the field of data analysis, in particular to a commodity recall method, a commodity recall system and related devices. BACKGROUND

[0002] At present, the main purpose of an e-commerce recommendation system is to provide relevant information and effective suggestions of contents or commodities for users through a platform, and personalized recommendation is to recommend contents or commodities of interest to users according to historical behaviors and interest characteristics of the users. A complete personalized recommendation system generally includes two stages of recall and ranking. For recall, the main purpose is to quickly filter out a small part of materials in which users have potential interest from a large number of material libraries according to historical behaviors and other characteristics of the users, and hand over to the ranking stage. The ranking stage is to accurately rank the above materials through a more complex model to achieve accurate personalized recommendation.

[0003] At present, the recall algorithm often uses a classic "double tower structure" to calculate user characteristics and material characteristics to be ranked respectively. Such a structure, although intuitive and simple, cannot utilize cross characteristics between users and materials to be ranked, resulting in low accuracy of commodity recall. SUMMARY

[0004] The purpose of the present application is to provide a commodity recall method, a commodity recall system, a computer readable storage medium and an electronic device, which can improve the accuracy of commodity recall.

[0005] To solve the above technical problems, the present application provides a commodity recall method, and the specific technical solutions are as follows:

[0006] An FM model and a deep sequence matching model including a first loss function are obtained;

[0007] User-side characteristics and commodity-side characteristics of a sample are input into the FM model, and a feature vector of the FM model is configured to obtain an output result;

[0008] A second loss function of the FM model is constructed according to the output result and a label of the sample;

[0009] A total loss function is obtained by superimposing the first loss function and the second loss function, and a recall model corresponding to the total loss function is determined;

[0010] The deep sequence matching model in the recall model is used to train the sample to obtain first user-side characteristics and first commodity-side characteristics;

[0011] The FM model in the recall model is used to train the sample to obtain second user-side characteristics and second commodity-side characteristics;

[0012] concatenate the first user-side feature and the second user-side feature to obtain a first feature result, and concatenate the first commodity-side feature and the second commodity-side feature to obtain a second feature result; wherein the first feature result and the second feature result are one-dimensional vectors;

[0013] determine a similarity score sequence of the sample according to the first feature result and the second feature result; the similarity score sequence comprises similarity scores arranged from large to small;

[0014] recall a pre-set number of commodities in the similarity score sequence by using a vector retrieval library.

[0015] Optionally, before obtaining the first user-side feature and the first commodity-side feature by using the deep sequence matching model in the recall model to train the sample, the method further comprises:

[0016] exposure and clicks under a current query condition of a user are taken as positive samples, and a negative sample set comprising negative samples is constructed by using random negative sampling from an exposure commodity pool of the user;

[0017] the positive samples and the negative samples in the negative sample set are taken as samples.

[0018] Optionally, obtaining the first user-side feature and the first commodity-side feature by using the deep sequence matching model in the recall model to train the sample comprises:

[0019] obtaining recent behaviors and historical behaviors of the user;

[0020] configuring a recent behavior sequence based on the recent behaviors and obtaining a historical behavior sequence based on the historical behaviors;

[0021] obtaining the first user-side feature according to the recent behavior sequence and the historical behavior sequence;

[0022] determining the first commodity-side feature by using a vector matrix corresponding to the deep sequence matching model in the recall model and composed of learnable parameters.

[0023] Optionally, before obtaining the FM model and the deep sequence matching model comprising a first loss function, the method further comprises:

[0024] calculating a similarity score between the user feature and the commodity feature determined by the deep sequence matching model by using cosine similarity, and constructing the first loss function according to the similarity score.

[0025] Optionally, determining the similarity score sequence of the sample according to the first feature result and the second feature result comprises:

[0026] calculating vector inner products between the first feature results and the second feature results, and taking each of the vector inner products as a similarity score between a user and an item;

[0027] sorting the similarity scores to obtain a similarity score sequence.

[0028] Optionally, after superimposing the first loss function and the second loss function to obtain a total loss function, and determining a recall model corresponding to the total loss function, the method further comprises:

[0029] updating model parameters of the FM model by using a first preset optimizer;

[0030] training the deep sequence matching model by using a second preset optimizer.

[0031] Optionally, before recalling a preset number of items in the similarity score sequence by using a vector retrieval library, the method further comprises:

[0032] saving the second feature results in a recommendation engine; the recommendation engine is configured to calculate the similarity score sequence according to the first feature results and the second feature results.

[0033] The application further provides a commodity recall system, comprising:

[0034] an acquisition module configured to acquire an FM model and a deep sequence matching model comprising a first loss function

[0035] a feature input module configured to input user-side features and item-side features of a sample into the FM model, and configure feature vectors of the FM model to obtain an output result;

[0036] a loss function construction module configured to construct a second loss function of the FM model according to the output result and a label of the sample;

[0037] a loss calculation module configured to superimpose the first loss function and the second loss function to obtain a total loss function, and determine a recall model corresponding to the total loss function;

[0038] a first item feature determination module configured to train the sample by using the deep sequence matching model in the recall model to obtain first user-side features and first item-side features;

[0039] a second item feature determination module configured to train the sample by using the FM model in the recall model to obtain second user-side features and second item-side features;

[0040] concatenate the first user-side feature and the second user-side feature to obtain a first feature result, and concatenate the first commodity-side feature and the second commodity-side feature to obtain a second feature result; the first feature result and the second feature result are both one-dimensional vectors;

[0041] determine a similarity score sequence of the sample according to the first feature result and the second feature result; the similarity score sequence comprises similarity scores arranged in descending order;

[0042] retrieve a preset number of commodities in the similarity score sequence by using a vector retrieval library.

[0043] The application further provides a computer readable storage medium, which stores a computer program, and the computer program is executed by a processor to implement the steps of the method.

[0044] The application further provides an electronic device, which comprises a memory and a processor, the memory stores a computer program, and the processor invokes the computer program in the memory to implement the steps of the method.

[0045] The application provides a commodity retrieval method, which comprises the following steps: obtaining an FM model and a deep sequence matching model comprising a first loss function; inputting user-side features and commodity-side features of a sample into the FM model, and configuring feature vectors of the FM model to obtain an output result; constructing a second loss function of the FM model according to the output result and a label of the sample; superimposing the first loss function and the second loss function to obtain a total loss function, and determining a retrieval model corresponding to the total loss function; training the sample by using the deep sequence matching model in the retrieval model to obtain first user-side features and first commodity-side features; training the sample by using the FM model in the retrieval model to obtain second user-side features and second commodity-side features; concatenating the first user-side features and the second user-side features to obtain a first feature result, and concatenating the first commodity-side features and the second commodity-side features to obtain a second feature result; the first feature result and the second feature result are both one-dimensional vectors; determining a similarity score sequence of the sample according to the first feature result and the second feature result; the similarity score sequence comprises similarity scores arranged in descending order; and retrieving a preset number of commodities in the similarity score sequence by using a vector retrieval library.

[0046] The application exposes the long-tail commodities in the commodity pool by collecting and analyzing the recent behavior and historical behavior of the user, randomly negatively sampling, increasing the proportion of the long-tail commodities in the negative samples, enhancing the prediction ability of the samples containing the long-tail commodities, and effectively improving the generalization of the recall model. Meanwhile, the user-side features and the commodity-side features are respectively cascaded to realize the early fusion and cross of the user-side features and the commodity-side features, and the similarity scores of the deep sequence matching model and the FM model are considered during the online prediction to jointly determine the ranking result of the to-be-ranked commodities, which guarantees the timeliness of the online prediction and improves the complexity of the recall model and the accuracy of the algorithm.

[0047] The application also provides a commodity recall system, a computer readable storage medium and an electronic device, which have the above beneficial effects, which will not be repeated here. BRIEF DESCRIPTION OF DRAWINGS

[0048] In order to more clearly illustrate the technical solutions in the embodiments of the present application or the prior art, the following will briefly introduce the drawings needed to be used in the embodiments or the prior art description. Obviously, the drawings in the following description are only part of the embodiments of the present application, and for those skilled in the art, other drawings can be obtained without creative labor on the basis of the provided drawings.

[0049] Figure 1 A flowchart of a commodity recall method provided by an embodiment of the present application. DETAILED DESCRIPTION

[0050] In order to make the purpose, technical scheme and advantages of the embodiments of the present application more clear, the technical scheme in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, not all the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without creative labor are within the scope of protection of the present application.

[0051] Please refer to Figure 1 , Figure 1 A flowchart of a commodity recall method provided by an embodiment of the present application, which comprises:

[0052] S101: obtaining an FM model and a deep sequence matching model containing a first loss function;

[0053] S102: inputting the user-side features and the commodity-side features of the sample into the FM model, and configuring the feature vector of the FM model to obtain an output result;

[0054] S103: constructing a second loss function of the FM model according to the output result and the label of the sample.

[0055] S104: superimpose the first loss function and the second loss function to obtain a total loss function, and determine a recall model corresponding to the total loss function;

[0056] S105: training the sample by using the deep sequence matching model in the recall model, to obtain first user-side features and first commodity-side features;

[0057] S106: training the sample by using the FM (Factorization Machine) model in the recall model, to obtain second user-side features and second commodity-side features;

[0058] S107: concatenating the first user-side features and the second user-side features to obtain first feature results, and concatenating the first commodity-side features and the second commodity-side features to obtain second feature results; wherein the first feature results and the second feature results are both one-dimensional vectors;

[0059] S108: determining a similar score sequence of the sample according to the first feature results and the second feature results; the similar score sequence contains similar scores arranged from large to small;

[0060] S109: recalling a pre-set number of commodities in the similar score sequence by using a vector retrieval library.

[0061] In step S101, the deep sequence matching model is usually a double-tower structure. Hereinafter, the process of obtaining the recall model in steps S101 to S104 of the embodiment will be described. However, it should be noted that the recall model described below is only one preferred model construction method provided in this embodiment.

[0062] The deep sequence matching model is mainly trained by analyzing the user's recent behavior and historical behavior. Herein, the recent behavior and the historical behavior are not specifically limited. Similarly, the recent behavior is the user's behavior within the current time and the first past time, and the historical behavior is the user's behavior within the first time to the second past time. Similarly, the recent behavior can also be the user's behavior in the past three days, and the historical behavior can also be the user's behavior in the time period from the fourth past day to one month. The so-called user behavior is not specifically limited herein, and can include but is not limited to the user's browsing behavior, purchase behavior, etc.

[0063] The recent behavior sequence and the historical behavior sequence are both user behavior sequences, which are composed of commodities that have interacted with the user, and each commodity at least contains unique commodity information such as commodity name, and can also contain other information such as commodity category information, or even the anchor who recommended the commodity.

[0064] In other words, it is necessary to dynamically combine the recent behavior and the historical behavior to obtain the interest information of the user. For the recent behavior sequence of the user, each commodity in the sequence can be represented by a vector e i :

[0065]

[0066] Wherein, F contains the id, anchor and category information of the commodity. The commodity vector in the recent behavior sequence first fuses the above information together, and then learns the feature representation of the user through self-attention network, ResNet and Dense three network structures in turn, to obtain the recent behavior sequence feature mapping result p s of the user. The fusion process refers to the concatenation process of the vector: for the same commodity, the id vector containing the id information (vector dimension is 1x64), the anchor vector containing the anchor information (vector dimension is 1x32), and the category vector containing the category information (vector dimension is 1x32) are fused together through concatenation to obtain the final vector (vector dimension is 1x(64+32+32) i.e. 1x128). For the historical behavior sequence of the user, each commodity in the sequence is represented by a vector {g i}, wherein Unlike the recent behavior sequence, the commodity vector in the historical behavior sequence does not fuse all the information of the commodity in advance, but constructs vectors for the id information, category information and anchor information of the commodity respectively, and learns the feature representation through deep networks such as self-attention network, residual network and fully connected network, and then fuses the vectors through the concatenation method described above to obtain the historical behavior sequence feature mapping result p l of the user. Then, a "gate structure" is constructed to dynamically fuse the "recent behavior" and "historical behavior" of the user, and obtain the final user behavior sequence feature mapping result

[0067] G = sigmoid(W s p s +W l p l +b) (2)

[0068]

[0069] Wherein, G is the output result of the gate structure, W s , W l , b are the parameter matrix of the fully connected layer, Dot product of the corresponding positions of the vector dimensions. Thus, the network structure of the "user tower" in the "double tower structure" is successfully constructed. As for the "commodity tower" on the other side, a fully connected network layer is used to represent the features, and the final commodity feature mapping result is obtained The to-be-recalled commodities and user behaviors are taken as the input of the overall network, and after a series of calculations of the network, the commodity features and user features are obtained. Finally, the similarity score between the user features and the commodity features is obtained through the calculation of the cosine similarity, and the first loss function is constructed by using the similarity score:

[0070]

[0071] Among them, there is 1 positive sample and k-1 negative samples in each tuplet (tuple), s is a hyperparameter, which can be s=0.01, of course, s can also be other values, cos(θ p ) and cos(θ n ) respectively represent the similarity scores between the user features and the commodity features in the positive sample and the negative sample, so that the deep sequence matching model can be obtained.

[0072] For the FM model, unlike the simple linear model such as LR, the FM model can combine any two features to realize the introduction of the second-order feature combination into the model, and the specific form is:

[0073]

[0074] Among them, x represents any feature on the user side or the commodity side, and v is the feature vector that the FM model needs to learn and maintain. During offline training, the user features and the commodity features are input into the FM model without distinction, and the output result can be obtained. Then, the second loss function is constructed according to the output result of the FM model and the sample label (label):

[0075]

[0076] Among them, y represents the sample label, is the prediction result of the FM model.

[0077] Finally, the first loss function of the deep sequence matching model and the second loss function of the FM model are linearly fused together to obtain the total loss function, which is used for the overall training of the model, and the recall model can be obtained:

[0078] L=L tuplet +L logit (8)

[0079] It should be noted that the parameters of the deep sequence matching model and the FM model in formula (8) are both 1, so the representation is omitted, but in other applications of the present application, the parameters can be other numerical values, which are not limited herein.

[0080] For the samples used in training the model, the goods exposed and clicked by the user under the current query condition are taken as positive samples, and a negative sample set containing negative samples is constructed by using random negative sampling from the user's exposed goods pool. The positive samples and the negative samples in the negative sample set are taken as samples.

[0081] The goods exposed and clicked by the user under the current query condition are taken as positive samples, but the goods exposed but not clicked are not used as negative samples, because for the entire recommendation system, the goods eventually exposed are actually the topN ranking results of the recall model, so the goods exposed but not clicked by the user cannot be used as negative samples for model training of the recall model. Therefore, random negative sampling is performed for each user to construct a negative sample set in the tuplet. When doing random negative sampling, the general practice in the industry is to randomly sample from the clicked goods pool for each user, but this often samples "hot" goods, making the model's prediction of samples containing long-tail goods insufficient. To solve this problem, the present application selects random negative sampling from the exposed goods pool for each user, which increases the proportion of long-tail goods in the negative samples and effectively improves the generalization of the recall model.

[0082] In the offline training process, in order to improve the training speed and better optimize the model parameters, two different optimizers are used to train the model. When updating the parameters of the FM model, the common AdaDelta optimizer is used, which can alleviate the problem of rapid gradient decay by calculating the exponentially weighted average of the gradient, and can adaptively adjust the learning rate. For the deep sequence matching model, the model needs to learn more parameters than the FM model, and the dimension of the final maintained goods feature mapping is also larger, so the FTRL (Follow the Regularized Leader) optimizer is used to update the model parameters. This optimizer introduces L1 regularization to improve the sparsity of the model parameters while ensuring the accuracy of the model.

[0083] In the actual goods recall process, for step S105, it can include the following steps:

[0084] S1051: Obtain the recent behavior and historical behavior of the user;

[0085] S1052: Configure a recent behavior sequence based on the recent behavior, and obtain a historical behavior sequence based on the historical behavior;

[0086] S1053: obtaining a first user-side feature according to the recent behavior sequence and the historical behavior sequence;

[0087] S1054: determining a first commodity-side feature by using a vector matrix composed of learnable parameters corresponding to the deep sequence matching model in the recall model.

[0088] It should be noted that the user feature representation can be learned by self-attention network, ResNet and Dense network structure, etc. through the fusion of the attributes of the commodity, to obtain the recent behavior sequence of the user. In the process of obtaining the historical behavior sequence, the fusion of the attributes of the commodity can not be performed, a vector can be constructed for each type of information, and the feature representation can be learned through a deep network, and then the vectors are fused through a cascading manner to obtain the historical behavior sequence of the user. Steps S1051 to S1054 are similar to the steps of the deep sequence matching model training process, and will not be repeated here.

[0089] Similarly, step S106 aims to train the same sample by using the FM model to obtain a second user-side feature and a second commodity-side feature.

[0090] The first commodity-side feature and the second commodity-side feature can be cascaded to obtain the second feature result X i mentioned above, which is saved in the recommendation engine in advance. Thereafter, only the first feature result of the user side needs to be determined, and the similarity score of the sample can be determined by using the recommendation engine, thereby improving the recall efficiency. The second commodity-side feature is obtained by summing all feature vectors contained in the current commodity:

[0091]

[0092] where v is the feature vector learned by the FM model.

[0093] When online recalling, since the second feature result of the commodity side has been determined, the feature of the user, i.e., the first user-side feature and the second user-side feature are first predicted in real time by the trained model, and then the two are cascaded to obtain X u . Similar to the commodity side, is obtained by summing all feature vectors contained in the current user:

[0094]

[0095] Finally, the top N items with the highest similarity scores are recalled to complete the entire recall process. Recall can be performed using a vector retrieval library based on the KNN algorithm. The similarity score is calculated by... i and X u The vector dot product < X i ,X u > obtained. <X i ,X u The inner product of > measures the similarity between users and the items to be ranked. As mentioned above, In the training process of the deep sequence matching model, the model's output is calculated... and The cosine similarity between them is obtained, so in the prediction process, only the cosine similarity between them needs to be calculated. and Normalization allows us to measure the similarity between users and each sample using the vector inner product. And for... and For example, the following formula is true:

[0096]

[0097] Comparing the original formula (5) of the FM model, it can be seen that the formula (11) for online real-time prediction only lacks the second-order feature combination within the feature sets of the user side and the product side, but it is equivalent for the calculation of cross-features between users and products. In general, it is not necessary to consider the feature combination results within the user side and the product side, because this form of feature weight has little impact on the similarity calculation results between users and products to be ranked. Therefore, formula (11) and formula (5) can be considered approximately equivalent. Thus, the method proposed in this application based on <X i ,X u Using the inner product of > to measure the similarity between users and samples to be sorted is reasonable and effective.

[0098] For the samples used for training the model, the goods exposed and clicked by the user under the current query condition are regarded as positive samples, but the goods exposed but not clicked are not used as negative samples, because for the entire recommendation system, the goods eventually exposed are actually the better ranking results of the recall model, so the goods simply exposed by the user but not clicked cannot be used as negative samples for model training. Therefore, random negative sampling is performed for each user query to construct the negative sample set in the tuple. When performing random negative sampling, the general practice in the industry is to randomly sample from the pool of clicked goods for each user query, but this often samples "hot" goods, making the model insufficient in predicting samples containing long-tail goods. To solve this problem, the embodiment of the application selects to randomly sample from the pool of exposed goods for each user query, which increases the proportion of long-tail goods in the negative samples and effectively improves the generalization of the recall model.

[0099] The recall model is a double-tower model including a deep sequence matching model and an FM model. When performing this step, the model parameters of the FM model can be updated using an AdaDelta optimizer, and the model parameters can be updated by introducing L1 regularization using a FTRL optimizer, so that two different optimizers are used to train different results in the model. The AdaDelta optimizer alleviates the problem of rapid gradient decay by calculating the exponentially weighted average of the gradient, and can adaptively adjust the learning rate. The FTRL optimizer improves the sparsity of the model parameters on the basis of ensuring the accuracy of the model due to the introduction of L1 regularization.

[0100] When performing this step, the first preset number of goods in the similar subsequence can be recalled based on the vector retrieval library of the KNN algorithm. Of course, those skilled in the art can also use the vector retrieval library of other algorithms to recall goods. Here, the first preset number is not limited, and can be set by those skilled in the art according to actual recall requirements.

[0101] The embodiment of the application increases the proportion of long-tail goods in the negative samples by collecting and analyzing the recent behavior and historical behavior of the user and performing random negative sampling in the exposed goods pool, enhances the prediction ability of samples containing long-tail goods, and effectively improves the generalization of the recall model. At the same time, the pre-fusion and cross of the user-side features and the goods-side features are realized by cascading the goods-side features and the user-side features respectively, and the similarity scores of the deep sequence matching model and the FM model are considered during online prediction to jointly determine the ranking result of the goods to be ranked, which guarantees the timeliness of online prediction while improving the complexity of the recall model and the accuracy of the algorithm.

[0102] The product recall system provided by the embodiments of the present application is introduced as follows, and the product recall system described below can be correspondingly referred to the product recall method described above.

[0103] The present application also provides a product recall system, comprising:

[0104] The acquisition module is configured to acquire an FM model and a deep sequence matching model comprising a first loss function.

[0105] The feature input module is configured to input the user-side features and the product-side features of the sample into the FM model, configure the feature vectors of the FM model, and obtain an output result.

[0106] The loss function construction module is configured to construct a second loss function of the FM model according to the output result and the label of the sample.

[0107] The loss calculation module is configured to superimpose the first loss function and the second loss function to obtain a total loss function, and determine a recall model corresponding to the total loss function.

[0108] The first product feature determination module is configured to train the sample by using the deep sequence matching model in the recall model to obtain first user-side features and first product-side features.

[0109] The second product feature determination module is configured to train the sample by using the FM model in the recall model to obtain second user-side features and second product-side features.

[0110] The feature concatenation module is configured to concatenate the first user-side features and the second user-side features to obtain a first feature result, and concatenate the first product-side features and the second product-side features to obtain a second feature result; wherein the first feature result and the second feature result are both one-dimensional vectors.

[0111] The similarity score calculation module is configured to determine a similarity score sequence of the sample according to the first feature result and the second feature result; the similarity score sequence comprises similarity scores arranged from large to small.

[0112] The recall module is configured to recall a preset number of products in the similarity score sequence by using a vector retrieval library.

[0113] Based on the above embodiments, as a preferred embodiment, the present application further comprises:

[0114] The sample determination module is configured to take a product exposed and clicked under a current query condition of a user as a positive sample, construct a negative sample set comprising negative samples from a negative sample pool of exposed products of the user by using random negative sampling, and take the positive sample and the negative samples in the negative sample set as samples.

[0115] Based on the above embodiment, as a preferred embodiment, the first commodity feature determination module comprises:

[0116] a behavior acquisition unit configured to acquire recent behaviors and historical behaviors of the user;

[0117] a behavior sequence configuration unit configured to configure a recent behavior sequence based on the recent behaviors and a historical behavior sequence based on the historical behaviors;

[0118] a first user-side feature determination unit configured to obtain a first user-side feature according to the recent behavior sequence and the historical behavior sequence;

[0119] a first commodity-side feature determination unit configured to determine a first commodity-side feature by using a vector matrix corresponding to the deep sequence matching model in the recall model and constituted by learnable parameters.

[0120] Based on the above embodiment, as a preferred embodiment, the method further comprises:

[0121] a first loss function calculation module configured to calculate a similarity score between the user feature and the commodity feature determined by the deep sequence matching model by using cosine similarity, and construct the first loss function according to the similarity score.

[0122] Based on the above embodiment, as a preferred embodiment, the similarity score calculation module is a module configured to calculate vector inner products between the first feature result and the second feature result, and take each vector inner product as a similarity score between the user and the commodity; and a module configured to sort the similarity scores to obtain a similarity score sequence.

[0123] Based on the above embodiment, as a preferred embodiment, the method further comprises:

[0124] an optimization module configured to update model parameters of the FM model by using a first preset optimizer, and train the deep sequence matching model by using a second preset optimizer.

[0125] Based on the above embodiment, as a preferred embodiment, the method further comprises:

[0126] an engine configuration module configured to save the second feature result in a recommendation engine; the recommendation engine is configured to calculate the similarity score sequence according to the first feature result and the second feature result.

[0127] The application further provides a computer readable storage medium, which has a computer program stored thereon, and the computer program can implement the steps provided by the above embodiments when executed. The storage medium can include a U disk, a mobile hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk or an optical disk, and various media that can store program codes.

[0128] The application further provides an electronic device, which can include a memory and a processor, the memory has a computer program stored therein, and the processor can implement the steps provided by the above embodiments when invoking the computer program in the memory. Of course, the electronic device can further include various network interfaces, power supplies and other components.

[0129] The embodiments in the specification are described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same or similar parts of each embodiment can be referred to each other. For the system provided by the embodiments, since it corresponds to the method provided by the embodiments, the description is relatively simple, and the related parts can be referred to the method part.

[0130] The principles and implementation manners of the application are described by using specific examples in the present disclosure, and the above embodiment descriptions are only used to help understand the method and core idea of the application. It should be noted that, for those skilled in the art, without departing from the principles of the application, some improvements and modifications can be made to the application, and these improvements and modifications also fall within the protection scope of the claims of the application.

[0131] It should be further noted that, in the present specification, the relationship terms such as first and second are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between the entities or operations. Moreover, the terms "include", "contain" or any other variants thereof are intended to cover non-exclusive inclusion, so that the process, method, article or device including a series of elements not only includes those elements, but also includes other elements not explicitly listed or inherent to such process, method, article or device. Without more limitations, the element defined by the statement "including a" does not exclude the presence of another identical element in the process, method, article or device including the element.

Claims

1. A product recall method characterized by, The method comprises the following steps: obtaining an FM model and a deep sequence matching model comprising a first loss function; inputting user-side features and commodity-side features of a sample into the FM model, and configuring a feature vector of the FM model to obtain an output result; constructing a second loss function of the FM model according to the output result and a label of the sample; superimposing the first loss function and the second loss function to obtain a total loss function, and determining a recall model corresponding to the total loss function; taking commodities exposed and clicked under a current query condition of a user as positive samples, and constructing a negative sample set comprising negative samples from a user's exposed commodity pool by using random negative sampling; taking the positive samples and negative samples in the negative sample set as samples; training the samples by using the deep sequence matching model in the recall model to obtain first user-side features and first commodity-side features; training the samples by using the FM model in the recall model to obtain second user-side features and second commodity-side features; concatenating the first user-side features and the second user-side features to obtain a first feature result, and concatenating the first commodity-side features and the second commodity-side features to obtain a second feature result; wherein the first feature result and the second feature result are both one-dimensional vectors; determining a similarity score sequence of the sample according to the first feature result and the second feature result; the similarity score sequence comprises similarity scores arranged from large to small; recalling a preset number of commodities in the similarity score sequence by using a vector retrieval library.

2. The product recall method according to claim 1, characterized by, Before training the samples by using the deep sequence matching model in the recall model to obtain first user-side features and first commodity-side features, the method further comprises the following steps: taking commodities exposed and clicked under a current query condition of a user as positive samples, and constructing a negative sample set comprising negative samples from a user's exposed commodity pool by using random negative sampling; taking the positive samples and negative samples in the negative sample set as samples.

3. The product recall method according to claim 1, characterized by, The method further comprises the following steps before training the samples by using the deep sequence matching model in the recall model to obtain first user-side features and first commodity-side features: obtaining recent behaviors and historical behaviors of a user; configuring a recent behavior sequence based on the recent behaviors, and obtaining a historical behavior sequence based on the historical behaviors; obtaining first user-side features according to the recent behavior sequence and the historical behavior sequence; determining first commodity-side features by using a vector matrix composed of learnable parameters corresponding to the deep sequence matching model in the recall model.

4. The product recall method of claim 1, wherein Before obtaining the FM model and the deep sequence matching model comprising the first loss function, the method further comprises the following steps: calculating a similarity score between user features and commodity features determined by the deep sequence matching model by using cosine similarity, and constructing the first loss function according to the similarity score.

5. The product recall method of claim 1, wherein The method further comprises the following steps before determining a similarity score sequence of the sample according to the first feature result and the second feature result: calculating vector inner products between the first feature result and the second feature result, and taking each vector inner product as a similarity score between a user and a commodity; sorting the similarity scores to obtain a similarity score sequence.

6. The product recall method of claim 1, wherein The step of superimposing the first loss function and the second loss function to obtain a total loss function and determining a recall model corresponding to the total loss function further comprises: updating the model parameters of the FM model by using a first preset optimizer; training the deep sequence matching model by using a second preset optimizer.

7. The product recall method of claim 1, wherein The step of recalling the first preset number of commodities in the similar score sequence by using a vector retrieval library further comprises: saving the second feature result in a recommendation engine; the recommendation engine is configured to calculate the similar score sequence according to the first feature result and the second feature result.

8. A product recall system, characterized by, The method comprises the steps of: obtaining an FM model and a deep sequence matching model comprising a first loss function a feature input module configured to input the user-side features and the commodity-side features of a sample into the FM model and configure the feature vectors of the FM model to obtain an output result; a loss function construction module configured to construct a second loss function of the FM model according to the output result and the label of the sample; a loss calculation module configured to superimpose the first loss function and the second loss function to obtain a total loss function and determine a recall model corresponding to the total loss function; a first commodity feature determination module configured to train the sample by using the deep sequence matching model in the recall model to obtain first user-side features and first commodity-side features; a second commodity feature determination module configured to train the sample by using the FM model in the recall model to obtain second user-side features and second commodity-side features; a feature concatenation module configured to concatenate the first user-side features and the second user-side features to obtain a first feature result and concatenate the first commodity-side features and the second commodity-side features to obtain a second feature result; wherein the first feature result and the second feature result are both one-dimensional vectors; a similarity score calculation module configured to determine a similar score sequence of the sample according to the first feature result and the second feature result; the similar score sequence comprises similarity scores arranged in descending order; a recall module configured to recall the first preset number of commodities in the similar score sequence by using a vector retrieval library.

9. A computer readable storage medium having stored thereon a computer program, characterized in that, The computer program is executed by a processor to implement the steps of the commodity recall method according to any one of claims 1-7.

10. An electronic device, comprising: The computer program is executed by a processor to implement the steps of the commodity recall method according to any one of claims 1-7. The computer program is executed by a processor to implement the steps of the commodity recall method according to any one of claims 1-7.

Citation Information

Patent Citations

  • Recommendation recall method and device and storage medium

    CN110866191A

  • Information recommendation method and system based on recall model and prediction model

    CN112685633A

  • Content recall model training method, content recall method, device thereof and equipment

    CN113515690A