Personalized commodity recommendation method based on reliable virtual hard negative sampling under e-commerce platform

By adopting reliable virtual hard negative sampling method on e-commerce platforms, the problem of pseudo-negative examples and insufficient utilization of graph topology information in negative sampling methods is solved, the performance and accuracy of the recommended model are improved, and higher quality is achieved. Product recommendation.

CN119107142AActive Publication Date: 2024-12-10Shenzhen City Vocational College

Patent Information

Application Number
CN202411069227.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-08-06
Publication Date
2024-12-10
Estimated Expiration
2044-08-06

AI Technical Summary

Technical Problem

The existing negative sampling method ignores the pseudo-negative examples in hard negative samples during the training process, and fails to effectively utilize the topological information of the graph, resulting in the performance of the recommended model being affected.

Method used

Using a personalized product recommendation method based on reliable virtual hard negative sampling, randomly select candidate negative sample pools, use mixed data enhancement to generate candidate virtual hard negative samples, and transform virtual hard negative samples through feature differences with the assistance of graph topological information. The sample is a more reliable negative sample, solving the problem of pseudo-negative cases.

Benefits of technology

Improve the performance of the recommendation model, generate high-quality virtual hard negative samples, alleviate the risk of false negative cases, and enable the recommendation system to make more accurate product recommendations.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119107142A_ABST
    Figure CN119107142A_ABST
Patent Text Reader

Abstract

The invention discloses a personalized commodity recommendation method based on reliable virtual hard negative sampling under an e-commerce platform, and the method comprises the steps: constructing a candidate negative sample pool through employing a random negative sampling mode, generating a candidate virtual hard negative sample pool through employing a data enhancement mode, and finally carrying out the recognition of the candidate negative sample pool through employing a dynamic sampling strategy. And selecting a negative sample most similar to the user from the virtual hard negative sample pool as a virtual hard negative sample. And finally, designing a conversion module based on the candidate negative sample pool to convert the virtual hard negative sample into a more reliable virtual hard negative sample, and converting the virtual hard negative sample which may be a pseudo negative example into a more reliable virtual hard negative sample by using the feature difference between the real hard negative sample which may be a pseudo negative example and the reliable real negative sample. According to the method, high-quality virtual hard negative samples can be generated, risks caused by pseudo negative examples can be relieved, the performance of a recommendation model is improved, and a recommendation system can perform more accurate commodity recommendation.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of machine learning, and in particular to a personalized product recommendation method based on reliable virtual hard negative sampling on an e-commerce platform. Background Art

[0002] Recommendation systems solve the problem of information overload by analyzing users' historical behaviors to predict products or content that users may like, allowing users to more effectively discover and obtain information of interest.

[0003] Collaborative filtering is an important technology of recommendation system. Its core idea is to make recommendations based on the similarity of user behavior data or product attribute data. The data sets processed by the recommendation model based on collaborative filtering can be divided into two categories: explicit feedback data sets and implicit feedback data sets. Among them, the collaborative filtering recommendation model based on explicit feedback makes recommendations based on user ratings, comment content and other information, and the data collection cost is relatively high. The collaborative filtering recommendation model based on implicit feedback makes recommendations based on user interaction behavior. This data is not only easy to collect, but also can provide diverse information such as listening behavior, purchasing behavior and social behavior. Therefore, the current recommendation system mainly focuses on the collaborative filtering recommendation model based on implicit feedback.

[0004] Most collaborative filtering recommendation models based on implicit feedback use negative sampling methods for training when making product recommendations. Negative sampling methods mainly focus on generating high-quality hard negative samples because these negative samples have richer information. Specifically, these negative samples will get higher scores than other negative samples in training. Hard negative samples can be divided into two categories according to the way they are generated: one is real hard negative samples and the other is virtual hard negative samples. Among them, real hard negative samples are hard negative samples selected from the original dataset according to a specific strategy. These samples are observation data points that actually exist in the original dataset; virtual hard negative samples are hard negative samples generated by operating in the feature space. These samples cannot find corresponding observation data points in the original dataset. Compared with sampling real hard negative samples for training, sampling virtual hard negative samples for training is more challenging because virtual hard negative samples are more difficult and can enable the model to better learn how to distinguish between positive and negative samples.

[0005] Many existing negative sampling methods improve the performance of recommendation models on e-commerce platforms by generating high-quality virtual hard negative samples, but there are still the following problems: the existence of pseudo-negative examples in hard negative samples is ignored during the training process. For example, if a user likes a certain product very much but has never purchased it, there is no purchase behavior in the data set, so the negative sampling method identifies this product as a negative sample of the user. Using such negative samples for training will have a negative impact on the performance of the model. Existing negative sampling methods that consider pseudo-negative examples ignore the topological structure information of the graph and only identify pseudo-negative examples from the variance of each round during the training process. First, there is no guarantee that this method is applicable to different data sets on e-commerce platforms. Second, when considering the pseudo-negative problem, the model cannot capture the relationship between nodes well, thus affecting the performance of the recommendation model. Therefore, it is necessary to design a negative sampling method with better effects that can meet new needs. Summary of the invention

[0006] In order to solve the problem that the negative sampling method in the prior art cannot solve the problem of pseudo negative examples while ensuring the quality of negative samples, the present invention proposes a personalized product recommendation method based on reliable virtual hard negative sampling. This method can not only generate high-quality virtual hard negative samples, but also alleviate the risks brought by pseudo negative examples, improve the performance of the recommendation model, and enable the recommendation system to make more accurate product recommendations.

[0007] The present invention is specifically implemented through the following technical solutions: A personalized product recommendation method based on reliable virtual hard negative sampling on an e-commerce platform, the method comprising: For any user , from the training set Select the items that the user has purchased As positive samples, the user is obtained through the collaborative filtering recommendation model u and purchased items Vector representation of and ; The user is obtained by a reliable hard negative sampling method u The negative sample feature vector ; Based on the negative sample feature vector , positive sample feature vector and user vector Training the collaborative filtering recommendation model so that the collaborative filtering recommendation model learns more accurate personalized preferences of users; Wherein, the reliable hard negative sampling method includes: Step 1: Given a recommendation dataset based on implicit feedback , divide the data set into training set , test set and validation set ,in Represented as a collection of users, Represented as a collection of goods, user purchase behavior data Represented as user u Purchased items ; Step 2: For any user purchase behavior data , randomly select M users u Build a candidate negative sample pool for products that have not been interacted with , get user u , the items that the user has purchased And candidate negative sample pool The corresponding vector representation and ; Step 3: Vector of any candidate negative sample product , generated candidate virtual hard negative samples , get the candidate virtual hard negative sample vector set ; Step 4: Based on the inner product of the user and the negative sample, select the candidate virtual hard negative sample vector set In , a high-difficulty virtual hard negative sample is selected. The specific operation is shown in the following formula: ; Step 5: For any user vector ,user u The corresponding positive sample vector and users u The candidate negative sample item vector set , the most difficult hard negative sample and the most realistic negative sample are selected from the candidate negative sample vector set through the inner integral score of the positive sample vector and the candidate negative sample item vector set; Step 6: Calculate the difference between the hardest hard negative sample and the most reliable negative sample to obtain the feature difference from the hard negative sample to the simple negative sample ; Step 7: In vector space, use The candidate virtual hard negative samples generated in step 4 Converted into a more reliable hard negative sample, the conversion process is shown as follows: , in β Indicates the degree of conversion of virtual hard negative samples.

[0008] As a further improvement of the present invention, the following Bayesian Personalized Ranking loss function is defined to train the collaborative filtering recommendation model: , in Expressed as sigmoid Activation function.

[0009] As a further improvement of the present invention, a collaborative filtering recommendation model based on graph neural network or matrix decomposition is used. Get User u , the items that the user has purchased And the candidate negative sample pool The corresponding vector representation and .

[0010] As a further improvement of the present invention, the generated candidate virtual hard negative samples The operation is shown below: , , in, q Indicates the degree of negative sample enhancement, q The lower the value, the more virtual hard negative samples The higher the positive sample information contained in , the more difficult it is for the model to distinguish the sample.

[0011] As a further improvement of the present invention, the similarity between the user and the product is calculated by the inner product of the user and the product, and the expected risk requirement expected loss of the inner product is minimized. and experience loss Satisfy the following formula: , in and They are represented as estimated positive sample distribution and negative sample distribution respectively, T represents the number of node pairs, K Indicates the number of negative samples corresponding to each user in the loss function.

[0012] As a further improvement of the present invention, the method of obtaining the most difficult hard negative sample vector is as shown in the following formula: , The way to obtain the most reliable negative sample vector is as follows: .

[0013] As a further improvement of the present invention, the Euclidean distance is used to calculate the difference between the most difficult hard negative sample and the most reliable negative sample. , the calculation formula is as follows: .

[0014] The beneficial effects of the present invention are as follows: the present invention uses a hard negative sampling module to generate virtual hard negative samples, firstly constructs a candidate negative sample pool by random negative sampling, then generates a candidate virtual hard negative sample pool by hybrid data enhancement, and finally uses a dynamic negative sampling strategy to select the negative sample that is most similar to the user from the virtual hard negative sample pool as a virtual hard negative sample. The present invention uses a conversion module to convert virtual hard negative samples into more reliable virtual hard negative samples. With the assistance of graph topology information, a conversion mechanism is designed, which utilizes the feature differences between real hard negative samples that may be pseudo negative examples and reliable real negative samples to convert virtual hard negative samples that may be pseudo negative examples into more reliable virtual hard negative samples. The present invention solves the deficiency that the negative sampling method in the prior art cannot solve the pseudo negative problem while ensuring the quality of negative samples. The method of the present invention can not only generate high-quality virtual hard negative samples, but also alleviate the risks brought by pseudo negative examples, improve the performance of the recommendation model, and enable the recommendation system to make more accurate product recommendations. BRIEF DESCRIPTION OF THE DRAWINGS

[0015] Figure 1 This is the overall framework diagram of the reliable hard negative sampling method of the present invention; Figure 2 This is a flow chart of the personalized product recommendation method of the present invention. DETAILED DESCRIPTION

[0016] The present invention is further described below in conjunction with the accompanying drawings and specific implementation methods.

[0017] like Figure 1 As shown, the present invention first proposes a reliable hard negative sampling method for obtaining user u Negative sample features , the reliable hard negative sampling method comprises the following steps: Step 1: Given a recommendation dataset based on implicit feedback ,in Represented as a collection of users, Represented as a collection of products. User purchase behavior data Represented as user u Purchased items . The data set is divided into training set and , test set and validation set .

[0018] Step 2: For any user purchase behavior data , randomly select M items that user u has not interacted with as candidate negative sample pool , through collaborative filtering recommendation models based on graph neural networks or matrix decomposition Get user u and the items the user has purchased And the candidate negative sample pool The corresponding vector representation and .

[0019] Step 3: Different from the traditional data enhancement method, which will cause information loss through operations similar to mean pooling, the present invention designs a Mixup ++ sample enhancement method. This method can retain the real information of vectors in different dimensions during the injection process, so that the generated hard negative samples have real-world sample information. Specifically, for any candidate negative sample product vector , the operation of generating candidate virtual hard negative samples is shown in formula (1): (1) (2) in, q Indicates the degree of negative sample enhancement, q The lower the value, the more virtual hard negative samples The higher the positive sample information contained in , the more difficult it is for the model to distinguish the sample.

[0020] Step 4: Calculate the similarity between the user and the product through the inner product of the user and the product, and minimize the expected risk requirement of the inner product. and experience loss Satisfies formula (3): (3)

[0021] in and They are represented as estimated positive sample distribution and negative sample distribution respectively, T represents the number of node pairs, KRepresents the number of negative samples corresponding to each user in the loss function. This shows that if the distribution of negative samples is positively correlated with the distribution of positive samples, the expected risk depends solely on the distribution of positive samples. The distribution of positive samples can be accurately estimated by the inner product scores of users and purchased goods, so the distribution of negative samples can also be estimated by the inner product scores, and then the ones with the highest inner product scores are selected as negative samples to reduce the expected risk. This method is also consistent with the intuition that the more similar the hard negative samples are to the positive samples, the better the performance of the recommendation model. Therefore, the present invention is based on the inner product of the user and the negative sample, and selects the candidate virtual hard negative sample vector set. In , a virtual hard negative sample with high difficulty is selected. The specific operation is shown in formula (4): (4) Step 5. Although the generated hard negative samples with high difficulty can bring richer information to the model training and make the model have stronger identification ability, when the generated virtual hard negative samples are too similar to the positive samples, the generated virtual negative samples themselves may be pseudo negative examples. To some extent, as the difficulty of generating virtual hard negative samples increases, the probability of the sample becoming a pseudo negative example also increases. In order to solve this problem, we need to find the difference between pseudo negative examples and hard negative samples. Considering that the pseudo negative example information in the data set is difficult to obtain, the present invention uses positive samples to estimate the difference between pseudo negative examples and hard negative samples. For any user vector ,user u The corresponding positive sample vector and users u The candidate negative sample item vector set , the hardest hard negative sample and the most realistic negative sample are selected from the candidate negative sample vector set by the inner integral score of the positive sample vector and the candidate negative sample item vector set. Compared with other negative samples in the candidate vector set, the hardest hard negative sample is more similar to the positive sample and is more likely to be a pseudo-negative example. The method of obtaining the hard negative sample vector is shown in formula (5): (5) The most reliable negative sample is more likely to be the negative sample that is least similar to the positive sample. The method of obtaining its vector is shown in formula (6): (6) Step 6: Use the Euclidean distance to calculate the difference between the hardest hard negative sample and the most reliable negative sample. The calculation formula is shown in (7): (7) in It represents the feature difference from hard negative samples to simple negative samples, and also represents the feature difference from hard negative samples that may be pseudo negative samples to reliable negative samples. Using this feature difference, we can convert virtual hard negative samples that are very similar to positive samples and are likely to be pseudo negative samples into more reliable virtual hard negative samples, reducing the risk of pseudo negative samples.

[0023] Step 7: In vector space, use The candidate virtual hard negative samples generated in step 3 Transformed into a more reliable hard negative sample, the transformation process is shown in formula (8): (8) in β Indicates the degree of conversion of virtual hard negative samples. In order to make the recommendation model more generalizable, we .

[0024] like Figure 2 As shown, the reliable hard negative sampling method is applied to the personalized product recommendation model based on collaborative filtering, and the personalized product recommendation method based on reliable virtual hard negative sampling under the e-commerce platform of the present invention is obtained, and the method includes: For any user ,from Select the items that the user has purchased As a positive sample. And through any collaborative filtering recommendation model to obtain the user u and purchased items Vector representation of and .

[0025] The user is obtained by this reliable hard negative sampling method u Negative sample features .

[0026] Define the following Bayesian Personalized Ranking loss function to train the collaborative filtering recommendation model: (9) in Expressed as sigmoid Activation function. By minimizing this loss function, the collaborative filtering recommendation model can learn more accurate personalized preferences of users. When recommending products, products that are more similar to the user vector will be selected from the product set for recommendation, ensuring that users are more satisfied with the recommended products and improving user experience.

[0027] The above description is only a preferred embodiment of the present invention, and does not limit the patent scope of the present invention. Any equivalent structure or equivalent process transformation made by using the contents of the present invention specification and drawings, or directly or indirectly applied in other related technical fields, are also included in the patent protection scope of the present invention. For ordinary technicians in this field, several simple deductions or substitutions can be made without departing from the concept of the present invention, which should be regarded as belonging to the protection scope of the present invention.

Claims

1. A personalized product recommendation method based on reliable virtual hard negative sampling on an e-commerce platform, the method comprising: For any user u∈U, from the training set D train Select the products that the user has purchased + As positive samples, the collaborative filtering recommendation model is used to obtain the user u and the purchased item p + The vector representation of e u and The negative sample feature vector of user u is obtained by reliable hard negative sampling method Based on the negative sample feature vector Positive sample feature vector and the user vector e u Training the collaborative filtering recommendation model so that the collaborative filtering recommendation model learns more accurate personalized preferences of users; Wherein, the reliable hard negative sampling method includes: Step 1: Given a recommendation dataset based on implicit feedback, Dataset = {(u, p + )|u∈U,p + ∈P}, divide the data set into training set D train , test set D test and validation set D valid , where U represents the user set, P represents the product set, and the user purchase behavior data pair (u, p + ) represents the product p purchased by user u + ; Step 2: For any user purchase behavior data pair (u, p + )∈D train , randomly select M items that user u has not interacted with as candidate negative sample pool η u ={p1,p2,...,p M }, get user u, the product p that the user has purchased + And the vector representation e corresponding to the candidate negative sample pool η u , and Step 3: Vector of any candidate negative sample product Generated candidate virtual hard negative sample vector Get the candidate virtual hard negative sample vector set Step 4: Based on the inner product of the user and the negative sample, select the candidate virtual hard negative sample vector set In , a high-difficulty virtual hard negative sample is selected. The specific operation is shown in the following formula: Step 5: For any user vector e u , the positive sample vector corresponding to user u and the candidate negative sample item vector set of user u The hardest hard negative sample and the most realistic negative sample are selected from the candidate negative sample vector set by the inner integral score of the positive sample vector and the candidate negative sample item vector set; Step 6: Calculate the difference between the hardest hard negative sample and the most reliable negative sample to obtain the feature difference from the hard negative sample to the simple negative sample Step 7: In vector space, use The candidate virtual hard negative samples generated in step 4 Converted into a more reliable hard negative sample, the conversion process is shown as follows: Where β represents the degree of conversion of virtual hard negative samples.

2. The method according to claim 1, wherein: The following Bayesian PersonalizedRanking loss function is defined to train the collaborative filtering recommendation model: where σ(·) represents the sigmoid activation function.

3. The method according to claim 1, wherein: The collaborative filtering recommendation model F(·) based on graph neural network or matrix decomposition is used to obtain the user u and the items p that the user has purchased. + And the vector representation e corresponding to the candidate negative sample pool η u , and 4. The method according to claim 1, wherein: The generated candidate virtual hard negative samples The operation is shown below: Among them, q represents the degree of negative sample enhancement. The lower the q value, the stronger the virtual hard negative sample. The higher the positive sample information contained in , the more difficult it is for the model to distinguish the sample.

5. The method according to claim 1, wherein: The similarity between the user and the product is calculated by the inner product of the user and the product, and the expected risk requirement of minimizing the inner product is the expected loss J(θ * ) and the experience loss J(θ T ) satisfies the following formula: Among them l d (u|p) and l n (u|p) represents the estimated positive sample distribution and negative sample distribution respectively, T represents the number of node pairs, and K represents the number of negative samples corresponding to each user in the loss function.

6. The method according to claim 1, wherein: The way to obtain the most difficult hard negative sample vector is as follows: The way to obtain the most reliable negative sample vector is as follows:

7. The method according to claim 1, wherein: The Euclidean distance is used to calculate the difference between the hardest negative sample and the most reliable negative sample. The calculation formula is as follows:

Citation Information

Patent Citations

  • Knowledge graph recommendation method fusing GNN and ResNet

    CN115114528A

  • Single-layer enhanced negative sample generation algorithm for graph neural network training

    CN115858924A

  • Hybrid dynamic negative sampling method for knowledge graph recommendation model

    CN116340501A

  • Hybrid generation method and recommendation method and device for difficult-to-load samples, equipment and medium

    CN118277794A

  • Factor perception graph staged negative sampling representation learning personalized service method

    CN118377965A

Cited By

  • E-commerce platform sequence recommendation method based on sampling reconstruction contrast learning

    CN119477488A

  • A sequence recommendation method for e-commerce platforms based on sampling reconstruction contrastive learning

    CN119477488B