Method for recommending goods, computer program product and computing equipment

Through diffusion model and multi-level contrast learning combined with knowledge graphs, a semantic consistent enhanced view is generated, which solves the problems of data sparseness and cold start of recommendation systems, improves the accuracy and robustness of recommendation systems, and provides high quality Personalized recommendations.

CN118982398AInactive Publication Date: 2024-11-19北京牧国科技有限公司
View PDF 0 Cites 5 Cited by

Patent Information

Application Number
CN202410947316.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-07-15
Publication Date
2024-11-19
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

Existing recommendation system algorithms are not effective in the face of data sparsity and cold start problems, especially when processing noisy data, making it difficult to provide high-quality personalized recommendations.

Method used

Using diffusion model and multi-level contrast learning method combined with knowledge graphs to generate semantic consistent enhanced views, and optimizing the recommended task model and multi-level contrast learning task model through joint training paradigm, combining personalized ranking loss and multi-level contrast learning loss to improve Recommended system accuracy and robustness.

Benefits of technology

It effectively solves the problems of data sparseness and cold start, significantly improves the accuracy and diversity of the recommendation system, can provide high-quality personalized recommendations in a noisy environment, and improves user satisfaction and the robustness of the recommendation system.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118982398A_ABST
    Figure CN118982398A_ABST
Patent Text Reader

Abstract

The invention provides a method for recommending commodities, a computer program product and computing equipment. The method comprises the following steps: acquiring online shopping data of a user on an online shopping platform; constructing a corresponding knowledge graph according to the online shopping data, wherein the knowledge graph comprises users, commodities, commodity attributes and scores of the users on the commodities; generating an enhanced view of the knowledge graph by using a diffusion model; multi-level contrast learning is applied to the knowledge graph, so that the embedding quality of the knowledge graph is optimized, and the multi-level contrast learning comprises user-level contrast learning, entity-level contrast learning and user-commodity-level contrast learning; and optimizing the recommendation task model and the multi-level contrast learning task model by adopting a joint training normal form, wherein the recommendation task loss is combined with the personalized ranking loss and the multi-level contrast learning loss under the joint training normal form. According to the technical scheme, the cold start problem of an existing recommendation system algorithm can be solved, noise data can be processed, and recommendation accuracy can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of Internet technology, and in particular to a method for recommending commodities, a computer program product, and a computing device. Background Art

[0002] In the early days of e-commerce in China, e-commerce platforms mainly relied on simple rules and manual recommendations to attract users. Although these methods can meet basic needs, their effectiveness is limited. With the rapid increase in the number of users and the variety of goods, traditional methods are unable to cope with the needs of processing massive data and personalized recommendations.

[0003] Among them, beef cattle is a rapidly developing e-commerce commodity in China. How to use efficient recommendation algorithms to recommend ideal beef cattle products to users is very critical. In recent years, various e-commerce platforms have applied some emerging recommendation algorithms to recommend products to users, such as content-based recommendation systems, recommendation systems using collaborative filtering methods, recommendation systems based on matrix decomposition, and recommendation systems based on deep learning. Among them, content-based recommendation systems recommend products with similar characteristics to users by analyzing the characteristics of products that users have liked before. For example, if a user has watched a lot of science fiction movies on a video platform, the system may recommend other science fiction movies to this user. However, content-based recommendation systems require detailed feature extraction of products, which are sometimes difficult to define and extract, and for new users or new products, it is difficult to make effective recommendations due to insufficient historical data. Content-based recommendation systems tend to recommend products that are similar to users' known interests, resulting in insufficient diversity of recommended content. Collaborative filtering recommendation systems make recommendations based on user behavior data, such as ratings, clicks, purchases, etc. There are two main methods: user-based collaborative filtering, which finds other users with similar interests to the target user and recommends products that these users like; product-based collaborative filtering, which finds other products similar to the target product and recommends these similar products. However, when the user-product interaction data is scarce, the recommendation effect of the collaborative filtering recommendation system decreases, and for new users or new products, there is a lack of sufficient interaction data, and the recommendation effect is poor. The recommendation system based on matrix decomposition decomposes the user-product rating matrix to mine the potential characteristics of users and products and make recommendations. For example, latent semantic models such as singular value decomposition (SVD) are widely used in Netflix's recommendation system. Although matrix decomposition can handle sparse data, the effect of the model will still be affected when the data is too sparse. There is also a cold start problem for new users and new products, and it is necessary to solve the decomposition problem of large matrices, especially when the data scale is large, the computational complexity is high. The recommendation system based on deep learning uses a neural network model to combine various characteristics of users and products for recommendation. Deep learning models usually require a large amount of data and computing resources for training, which is time-consuming and requires a large amount of training data to achieve good results. They perform poorly for small data sets.

[0004] To this end, a technical solution is needed that can solve the data sparsity and cold start problems in existing recommendation system algorithms while also being able to process noisy data and improve the performance of recommendation algorithms. Summary of the invention

[0005] The present application aims to provide a method for recommending products, a computer program product, and a computing device, which can solve the data sparsity problem and the cold start problem in the existing recommendation system algorithm, and can also process noisy data and improve the performance of the recommendation algorithm.

[0006] According to one aspect of the present application, a method for recommending a product is provided, the method comprising:

[0007] Obtain users’ online shopping data on online shopping platforms;

[0008] Constructing a corresponding knowledge graph based on the online shopping data, wherein the knowledge graph includes users, commodities, commodity attributes, and user ratings of commodities;

[0009] generating an enhanced view of the knowledge graph using a diffusion model;

[0010] Applying multi-level contrastive learning to the knowledge graph to optimize the embedding quality of the knowledge graph, wherein the multi-level contrastive learning includes user-level contrastive learning, entity-level contrastive learning, and user-item-level contrastive learning;

[0011] A joint training paradigm is adopted to optimize the recommendation task model and the multi-level contrastive learning task model, under which the recommendation task loss is combined with the personalized ranking loss and the multi-level contrastive learning loss.

[0012] According to some embodiments, the online shopping data includes: user identity data, user page operation location data, and user behavior data.

[0013] According to some embodiments, the user behavior data includes: user browsing information, user purchasing information, browsing information on recommended products, and information on product categories of interest to similar users.

[0014] According to some embodiments, generating an enhanced view of the knowledge graph using a diffusion model includes:

[0015] Obtaining interaction data and relationships between users and products in the knowledge graph;

[0016] Adding Gaussian noise to the interaction data and the relationship step by step;

[0017] A denoising process transforms the noisy view into a semantically consistent enhanced view, thereby reconstructing a cleaner version of the knowledge graph.

[0018] According to some embodiments, Gaussian noise is added to the interaction data and the relationship in stages, including defining a conditional probability for introducing noise to represent forward propagation in the noise diffusion process:

[0019]

[0020] Among them, t and t-1denote the noise states in the data structure at time steps t and t-1 respectively, and the normal distribution N denotes the probability distribution of the current state ζt. t-1 , whose mean is Parameter β t Control the noise level at each step, β t I is the covariance matrix, β t is the variance.

[0021] According to some embodiments, the noisy view is transformed into a semantically consistent enhanced view through a denoising process, including modeling the probability distribution of the time step t-1 state using a normal distribution, and the reverse denoising process is modeled as:

[0022] p θ (ζ t |ζ t-1 )=Ν(ζ t ;μ θ (ζ t , t), ∑ θ (ζ t , t))

[0023] Among them, t-1 represents the target at time step t-1 from the current noise state ζ t The restored state, function μ θ (ζ t , t) is the mean function of the neural network output, ∑ θ (ζ t , t) is a covariance function output by the neural network. The covariance matrix describes ζ t-1 The reliability of each dimension in the prediction.

[0024] According to some embodiments, the multi-level contrastive learning loss is:

[0025] L cl =L user-level +L entity-level +L user-item-level ,

[0026] Among them, L user-level is the user-level contrastive learning loss, L entity-level is the entity-level contrastive learning loss, L user-item-level is the user-item level contrastive learning loss.

[0027] According to some embodiments, the loss at each level is defined by:

[0028]

[0029] Among them, B represents a set of samples, z i and is a positive sample pair, representing a user, entity, or user-item pair that is related or similar at the same level, z j ' is a negative sample, representing an irrelevant user, entity or user-item pair, sim is a similarity function, and τ is a temperature parameter that controls the scale of similarity calculation.

[0030] According to another aspect of the present application, a computer program product is provided, comprising: a computer program, wherein when the computer program is executed by a processor, the computer program implements any of the above methods.

[0031] According to another aspect of the present application, there is provided a computing device, comprising:

[0032] Processor; and

[0033] A memory storing a computer program, which, when executed by the processor, enables the processor to execute any of the methods described above.

[0034] According to another aspect of the present application, a non-transitory computer-readable storage medium is provided, on which computer-readable instructions are stored. When the instructions are executed by a processor, the processor executes any of the above methods.

[0035] According to the embodiments of the present application, the present invention effectively solves the shortcomings of traditional recommendation algorithms in data sparsity, cold start, noise processing, etc. by introducing a diffusion model and a multi-level contrastive learning method to combine with knowledge graphs. Its core innovation is to combine the rich semantic information of the knowledge graph with the semantically consistent enhanced view generated by the diffusion model, which significantly improves the accuracy and robustness of the recommendation system.

[0036] It should be understood that the foregoing general description and the following detailed description are exemplary only and are not restrictive of the present application. BRIEF DESCRIPTION OF THE DRAWINGS

[0037] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for describing the embodiments are briefly introduced below.

[0038] Figure 1 A schematic diagram of the architecture of a knowledge graph comparative learning framework according to an example embodiment is shown.

[0039] Figure 2 A flow chart of a method for recommending merchandise according to an example embodiment is shown.

[0040] Figure 3 A flow chart of a method for recommending merchandise according to another embodiment is shown.

[0041] Figure 4 A block diagram of a computing device is shown according to an exemplary embodiment. DETAILED DESCRIPTION

[0042] Example embodiments will now be described more fully with reference to the accompanying drawings. However, example embodiments can be implemented in many forms and should not be construed as limited to the embodiments set forth herein; rather, these embodiments are provided so that this application will be comprehensive and complete and will fully convey the concepts of the example embodiments to those skilled in the art. The same reference numerals in the figures represent the same or similar parts, and thus their repeated description will be omitted.

[0043] In addition, described feature, structure or characteristic can be combined in one or more embodiments in any suitable manner. In the following description, many specific details are provided to provide a full understanding of the embodiments of the present application. However, those skilled in the art will appreciate that the technical scheme of the present application can be put into practice without one or more of the specific details, or other methods, components, devices, steps, etc. can be adopted. In other cases, known methods, devices, realizations or operations are not shown or described in detail to avoid blurring the various aspects of the application.

[0044] The block diagrams shown in the accompanying drawings are merely functional entities and do not necessarily correspond to physically independent entities. That is, these functional entities may be implemented in software form, or in one or more hardware modules or integrated circuits, or in different networks and / or processor devices and / or microcontroller devices.

[0045] The flowcharts shown in the accompanying drawings are only exemplary and do not necessarily include all the contents and operations / steps, nor must they be executed in the order described. For example, some operations / steps can be decomposed, and some operations / steps can be combined or partially combined, so the actual execution order may change according to actual conditions.

[0046] It should be understood that although the terms first, second, third, etc. may be used herein to describe various components, these components should not be limited by these terms. These terms are used to distinguish one component from another component. Therefore, the first component discussed below can be referred to as the second component without departing from the teachings of the concepts of the present application. As used herein, the term "and / or" includes any one of the associated listed items and all combinations of one or more.

[0047] The user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of relevant data must comply with the relevant laws, regulations and standards of relevant countries and regions, and provide corresponding operation entrances for users to choose to authorize or refuse.

[0048] Those skilled in the art will appreciate that the drawings are merely schematic diagrams of example embodiments, and the modules or processes in the drawings are not necessarily necessary for implementing the present application, and therefore cannot be used to limit the scope of protection of the present application.

[0049] In recent years, it has been widely used and developed rapidly in China's e-commerce platforms, which mainly rely on simple rules and manual recommendations to attract users. Chinese e-commerce platforms widely use recommendation systems in multiple scenarios. First, on the homepage and product details page, the recommendation system generates personalized recommendation lists in real time based on the user's historical behavior and current browsing content to improve user stickiness and conversion rate. Secondly, in the search function, the recommendation system analyzes the user's search keywords and behaviors, recommends related popular products and search results, and improves the search experience. Finally, on marketing activities and promotion pages, the recommendation system pushes personalized promotional information and coupons based on the user's interests and preferences to increase user participation and purchase desire.

[0050] Although the recommendation system of China's e-commerce platforms has achieved remarkable results, it still faces challenges. The technical requirements for processing massive data and real-time recommendations are constantly increasing, requiring more powerful computing power and algorithm optimization. Among them, beef cattle are currently in great demand in China, and how to use efficient recommendation algorithms to recommend ideal beef cattle products to users is very critical.

[0051] Among the existing technical methods, collaborative filtering methods are an important milestone in the development of recommendation system technology. Platforms such as Taobao and JD.com have begun to adopt collaborative filtering algorithms based on user behavior data to analyze users' browsing, purchasing, searching and other behaviors, and find similar users or products for recommendation. For example, when user A buys a beef cattle of a specific breed, the system will recommend the same or similar breed of beef cattle to user B with similar purchase history. The introduction of matrix decomposition technology has further improved the performance of the recommendation system. By decomposing the user-product rating matrix, the platform can extract the potential characteristics of users and products and make more accurate recommendations. These technologies are widely used in Alibaba's recommendation algorithms, which greatly improves the accuracy and diversity of recommendations. For example, the platform uses matrix decomposition technology to recommend other high-quality related breeds to users who have purchased high-quality beef cattle.

[0052] In recent years, the rapid development of deep learning has brought new opportunities for recommendation systems. Deep neural networks (such as RNN, CNN, etc.) can capture complex nonlinear relationships and high-dimensional features, significantly improving the recommendation effect. E-commerce platforms have begun to use deep learning models to process users' long-term behavior data and make personalized recommendations. For example, JD.com uses deep learning models to analyze users' browsing and purchasing behaviors of beef cattle, providing users with more accurate beef cattle product recommendations.

[0053] To this end, the present application proposes a method for recommending products, a computer program product, and a computing device, which can solve the data sparsity problem and cold start problem in the existing recommendation system algorithm, and can also process noise data and improve the performance of the recommendation algorithm. According to the embodiment, the present invention effectively solves the shortcomings of traditional recommendation algorithms in data sparsity, cold start, noise processing, etc. by introducing a diffusion model and a multi-level contrastive learning method to combine the recommendation method of the knowledge graph (DICES: Diffus ion-Based Contrast ive Learning with Knowledge Graphs for Recommendation). Its core innovation lies in combining the rich semantic information of the knowledge graph and the semantically consistent enhanced view generated by the diffusion model, which significantly improves the accuracy and robustness of the recommendation system.

[0054] The exemplary embodiments of the present application are described below in conjunction with the accompanying drawings.

[0055] Figure 1 A schematic diagram of the architecture of a knowledge graph comparative learning framework according to an example embodiment is shown.

[0056] See also Figure 1 , the knowledge graph contrastive learning framework according to the example embodiment includes: a diffusion model, multi-level contrastive learning, a knowledge graph, and a joint training framework.

[0057] According to some embodiments, the knowledge graph comparative learning framework adopts a combination of diffusion model, multi-level comparative learning and knowledge graph comparative learning framework, which can significantly improve the accuracy of recommendations and user satisfaction. The application of the diffusion model in the system is mainly to generate a semantically consistent enhanced view. Through the diffusion model, the system can generate more potential beef cattle commodity instances that meet user interests based on existing commodity information and user preferences. These instances can be variants of existing commodities, or new commodity concepts inferred based on entity relationships in the knowledge graph comparative learning framework. For example, if the system learns that a user has a preference for a specific breed of beef cattle, the diffusion model can generate a recommendation list of other high-quality beef cattle commodities associated with that breed.

[0058] The knowledge graph contrastive learning framework is a method that combines contrastive learning (CL) and diffusion models to generate higher quality enhanced views, thereby improving knowledge graph completion and prediction tasks. Traditionally, random data augmentation techniques are widely used in contrastive learning, but they may introduce unnecessary noise and affect model performance. Diffusion models provide a more controllable way to simulate the noise introduction process of data, making the generated enhanced views more relevant and useful.

[0059] Introducing the diffusion model into the knowledge graph for data enhancement requires the introduction of noise first. Here, a conditional probability needs to be defined to represent the forward propagation step in the noise diffusion process.

[0060]

[0061] Here t and t-1 denote the noise states in the data structure at time steps t and t-1 respectively. The normal distribution Ν denotes the probability distribution of the current state ζt, given the previous ∫ t-1 , whose mean is This average is calculated by taking the previous state ∫ t-1 Multiply by 1-β t To calculate, where the parameter β t The influence of the previous state is reduced, simulating the incremental introduction of noise. The parameter β t Controls the noise level at each step, β t The larger the value, the more noise will be introduced, thus adding more uncertainty to the current state. t I indicates that the disturbances to the variables are independent and their variance is β t Equation (1) defines the state transition in the noise diffusion simulation in the data structure from one time step to the next, preparing for the subsequent denoising process by gradually introducing controlled noise.

[0062] After the introduction of noise, the diffusion model uses a reverse denoising process, using a neural network to predict the relationship between the previous clean state and the current noisy state, effectively learning to reverse the increase in noise.

[0063] The reverse denoising process is modeled as:

[0064] p θ (ζ t |ζ t-1 )=Ν(ζ t ;μ θ (ζ t , t), ∑ θ (ζ t , t)) (2)

[0065] This formula models the probability distribution of the state at time step t-1 using a normal (Gaussian) distribution. Here, ζ t-1 represents the state at time step t-1. This is the goal of the present invention. From the current noise state ζ t The restored state. Function μ θ (ζ t , t) is the mean function of the neural network output, based on the current noise state ζt and time step t prediction ζ t-1 The expected value of represents the most likely clean state derived from the noisy state. θ (ζ t , t) is also output by the neural network and is a covariance function used to determine the uncertainty and bias range in the prediction, where the covariance matrix describes ζ t-1 The reliability of each dimension in the prediction, with larger covariance indicating greater uncertainty. This model helps understand and reconstruct the structure of the original data, even if it is distorted by noise.

[0066] A diffusion model is used to generate a knowledge graph. During the denoising process, a cleaner version of the knowledge graph is reconstructed from the noise-corrupted state. The probabilities from the final denoised state are used to selectively enhance true and relevant relationships, effectively removing spurious connections introduced by noise.

[0067] In the contrastive learning part, contrastive learning is divided into three levels: user-level contrastive learning, entity-level contrastive learning, and user-item-level contrastive learning. The performance of the recommendation system is improved through optimization at these three levels. This strategy is implemented through a carefully designed contrastive loss (CL loss), which is expressed as follows:

[0068] L cl =L user-level +L entity-level +L user-item-level (3)

[0069] The core of contrast loss is to encourage consistency between positive sample pairs while minimizing the consistency between negative sample pairs. The loss of each level is defined as follows:

[0070]

[0071] Among them, B represents a set of samples. i and is a positive sample pair, representing a user, entity, or user-item pair that is related or similar at the same level. j are negative samples, representing irrelevant users, entities, or user-item pairs. sim is a similarity function, usually using dot product or cosine similarity. τ is a temperature parameter that controls the scale of similarity calculation.

[0072] According to some embodiments, by learning the distance between users and products through user-level contrastive learning and widening the gap between users with different interests, the system can better capture subtle user preferences, thereby improving the accuracy of recommendations. Applying entity-level contrastive learning increases the differences between various entities, making the distribution of entity nodes more even in the embedding space, effectively alleviating the long-tail problem of entities, and ensuring that rare entities are also fully considered. User-product-level contrastive learning, that is, entity comparison within the knowledge graph contrastive learning framework, is used to optimize the distance between users and their interactive products, enhance the similarity between products that users are really interested in and products that users have interacted with, and help the system accurately tap into users' true interests and avoid only recommending highly exposed products.

[0073] The knowledge graph comparative learning framework also includes applying a joint training framework to optimize the overall effect of the recommendation algorithm and multi-level comparative learning.

[0074] In the knowledge graph contrastive learning framework, the present invention adopts a joint training paradigm to optimize the recommendation system task and the multi-level contrastive learning task. In the joint training process, the present invention designs an integrated optimization framework that includes the recommendation task loss. The recommendation task loss combines the Bayesian personalized ranking (BPR) loss and the multi-level contrastive learning loss to more accurately adjust the embedding of users and items. Specifically, the BPR loss Lbpr aims to optimize the embedding distance between users and their interactive items, which is defined as follows:

[0075] L bpr =∑ (u , i , j)∈O -logσ(y ui -y uj ) (5)

[0076] Among them, σ is the activation function, y ui is the predicted interaction probability between user u and item i, and y uj is the predicted interaction probability between user u and non-interactive item j. Here, O represents all observed user-item positive and negative pairs in the training dataset.

[0077] In order to integrate these losses, this paper introduces a regularization term ||θ|| 2 To control the complexity of the model and prevent overfitting. The total loss function L is defined as:

[0078] L = L bpr +λ1L c1 +λ2||θ|| 2 (6)

[0079] Among them, λ1 and λ2 are hyperparameters used to balance the loss components.

[0080] According to some embodiments, the framework also includes a knowledge edge graph (KG) diffusion task loss.

[0081] Through this method, the DICES model according to the present invention not only improves the accuracy of recommendations, but also deepens the model's understanding of the KG structure through contrastive learning, making the recommendation system more effective and accurate in processing complex user behaviors and product features.

[0082] According to some embodiments, the joint training framework is used to optimize the overall effect of the recommendation algorithm and multi-level contrastive learning. Traditional training methods may optimize the recommendation algorithm and the contrastive learning model separately, resulting in inconsistencies in the optimization objectives between the two, which in turn affects the overall recommendation quality. The joint training framework regards the recommendation algorithm and the multi-level contrastive learning as a whole, and by designing a unified loss function or objective function, ensures that the two modules can co-evolve during the training process, and jointly improve the recommendation accuracy and personalization level. Under the joint training framework, the entity and relationship information in the knowledge graph can be used to understand the user's preferences and the attributes of the product, so as to make more personalized recommendations. Combining the recommendation algorithm with multi-level contrastive learning, the overall optimization can be achieved through the joint training framework. Specifically, by using the joint training framework, the recommendation algorithm and the multi-level contrastive learning model can share the underlying entity and relationship representations, so that the high-quality embedding learned from the knowledge graph can be directly used. In this way, when the parameters of either model are updated, the other model can also benefit, promoting mutual learning and optimization between the two parties, thereby achieving more efficient resource utilization and faster convergence speed. Through joint training, the system can better capture the diversity and dynamics of user interests and the richness of product features. The enhanced generalization ability helps the system make high-quality recommendations when facing new users or new products, reducing the impact of cold start problems.

[0083] According to some embodiments, during the joint framework training process, the recommendation prediction error and contrastive learning loss can be minimized at the same time, and the knowledge graph embedding can also be optimized, and the balance between the recommendation system and the knowledge graph representation learning can be ensured by adjusting the hyperparameters and training strategies. In this way, the recommendation algorithm can benefit from the rich semantic information in the knowledge graph, and the knowledge graph embedding can also obtain additional training signals from the recommendation task, thereby achieving a positive cycle and synergy between the two.

[0084] According to some embodiments, the knowledge graph stores rich semantic information about beef cattle commodities and their related entities (such as breed, origin, feeding method, etc.). By combining the knowledge graph with the diffusion model and multi-level contrastive learning, the system can use the entity relationships in the knowledge graph contrastive learning framework to supplement commodity information, especially when data is sparse. Generate semantically consistent commodity recommendations based on the relationships between entities, even if the user's historical behavior data is limited. Provide more in-depth commodity explanations and recommendation reasons to enhance users' trust in recommendations.

[0085] According to some embodiments, the semantically consistent enhanced view generated by the diffusion model, the optimized feature representation obtained by multi-level contrastive learning, and the semantic information in the knowledge graph contrastive learning framework are finally combined by applying a joint training framework. The joint training framework integrates the diffusion model, multi-level contrastive learning, and the knowledge graph contrastive learning framework so that these model components work together under a unified optimization goal to jointly improve the quality of recommendations.

[0086] According to some embodiments, the joint training framework allows the system to dynamically adjust the learning strategy during the training process, such as automatically adjusting the learning rate according to changes in data distribution, or introducing regularization terms to avoid overfitting. This flexibility and adaptability are critical to handling changing market trends and user preferences.

[0087] According to some embodiments, the knowledge graph comparison learning framework will continue to learn and adjust to adapt to market trends, changes in user preferences, and new product information to ensure the accuracy and timeliness of recommendations. The system can not only solve the data sparsity and cold start problems of traditional recommendation algorithms, but also improve the diversity, novelty, and robustness of recommendations, providing users with a more satisfying and intimate shopping experience.

[0088] For the sake of diversity, this paper uses four public datasets for experiments: ML-1M, Amazon-book, Yelp2018, and MIND. Table 1 shows the detailed statistics of the four datasets and their corresponding knowledge graph comparison learning frameworks.

[0089] Table 1 Statistics of experimental datasets

[0090]

[0091]

[0092] For performance evaluation, the present invention uses two commonly used representative indicators: Recall@K and NDCG@K as top-K recommended indicators. By default, the present invention uses K=20, and the specific data is shown in the following table.

[0093] Table 2. Comparison of performance of various models on different datasets

[0094]

[0095] The stripping study in this section aims to evaluate the effectiveness of the key modules in the knowledge graph contrastive learning framework. Two different model variants are designed, where "w / o DIDA" is a control model with the diffusion-based data augmentation module removed. "w / o MLCL" is a control model that replaces multi-level contrastive learning with contrastive learning. As can be seen from Table 3, the knowledge graph contrastive learning framework of the present invention performs better in all cases.

[0096] Table 3. Stripped-down study of key modules of the knowledge graph comparative learning framework

[0097] Model ML-1M Amazon-Book DICES 0.2140 0.1866 DICES w / o DIDA 0.2103 0.1832 DICES w / o MLCL 0.2088 0.1815

[0098] Figure 2 A flow chart of a method for recommending merchandise according to an example embodiment is shown.

[0099] See also Figure 2 , in S201, the online shopping data of the user on the online shopping platform is obtained.

[0100] According to some embodiments, the online shopping data may include user identity data, user page operation location data, and user behavior data. For example, the corresponding user identity data may be obtained based on user registration information; location data may be obtained based on the application operation data of the user entering the e-commerce platform; user behavior data may be obtained based on user behavior, such as browsing a product page, searching for products, adding products to a shopping cart, and checking out of a shopping cart.

[0101] In S203, a corresponding knowledge graph is constructed based on the online shopping data, where the knowledge graph includes users, products, product attributes, and user ratings of the products.

[0102] Knowledge graph technology is a structured semantic knowledge base that aims to store relationships between entities (such as people, places, and things) and represents these entities and relationships through edges and nodes. The core of the knowledge graph is to represent and understand complex data relationships through a graph structure. It is often used to improve the quality of search engine results and the capabilities of expert systems. The knowledge graph has flexible scalability and can continuously add new entities and relationships as needed to continuously expand the knowledge base. Taking the beef cattle recommendation system as an example, entities can include beef cattle commodities and attributes such as the birthplace, age, and breed of the cattle.

[0103] In S205, an enhanced view of the knowledge graph is generated using a diffusion model.

[0104] The enhanced view of the knowledge graph obtained by the diffusion model refers to the use of the diffusion model to perform data enhancement on the knowledge graph to generate a new graph that has some structural or semantic changes but maintains a certain consistency with the original knowledge graph. These enhanced views can be used to train more robust graph representation learning models, especially in the contrastive learning framework. The diffusion model is a generative model that generates new data samples by learning the data distribution and gradually adding noise and then gradually denoising. In the context of the knowledge graph, the diffusion model can be used to generate new entities and relationships, or change the state of existing entities and relationships, thereby creating an enhanced view of the knowledge graph.

[0105] According to some embodiments, as described above, the interaction data and relationships between users and products in the knowledge graph can be obtained, and then Gaussian noise can be gradually added to the interaction data and relationships in stages, and then the noisy view can be transformed into a semantically consistent enhanced view through a denoising process, thereby reconstructing a cleaner version of the knowledge graph.

[0106] In S207, multi-level contrastive learning is applied to the knowledge graph to optimize the embedding quality of the knowledge graph. The multi-level contrastive learning may include user-level contrastive learning, entity-level contrastive learning, and user-item-level contrastive learning.

[0107] As mentioned earlier, knowledge graph contrastive learning is a machine learning method that combines knowledge graph embedding technology and contrastive learning framework, aiming to improve the quality of knowledge graphs and the performance of related tasks by learning vector representations of entities and relations. The core idea of ​​this method is to learn feature representations / characteristics that distinguish positive examples (correct entity-relationship pairs) from negative examples (incorrect entity-relationship pairs) by comparing them. In knowledge graph contrastive learning, the goal of the model is to maximize the similarity between positive examples while minimizing the similarity between negative examples.

[0108] In S209, a joint training paradigm is adopted to optimize the recommendation task model and the multi-level contrastive learning task model. Under the joint training paradigm, the recommendation task loss is combined with the personalized ranking loss and the multi-level contrastive learning loss.

[0109] As mentioned earlier, training optimization through the joint training paradigm can more accurately adjust the embedding of users and products, deepen the model's understanding of the knowledge graph structure, and make the recommendation system more efficient and accurate when processing complex user behaviors and product characteristics.

[0110] According to some embodiments, the recommendation task model can be used to recommend products to users at different stages of their visit to the online shopping platform. For example, the recommendation task model includes a collaborative filtering model, a matrix decomposition model, a deep learning model, etc., and generates a recommendation list by combining the user's interaction history and the information in the knowledge graph.

[0111] Figure 3 A flow chart of a method for recommending merchandise according to another embodiment is shown.

[0112] See also Figure 3 , in S301, user information and behavior data are obtained.

[0113] According to some embodiments, the system first collects data from the user's activities on the platform, including but not limited to user information (such as name, age, occupation, etc.) and behavioral data such as search history, browsing history, purchase history, evaluation feedback, etc., which constitute the basis of user behavior.

[0114] According to some embodiments, when a user logs in to the e-commerce platform for the first time, the back-end server obtains corresponding user information, such as identity information, based on the user registration information; or when the user enters the e-commerce platform, the back-end server obtains necessary user application operation data, such as location information; when the user browses a product page, searches for products, puts products into a shopping cart, checks out of the shopping cart, and completes shopping, the back-end server obtains corresponding data on the user's behavior, such as searched product information, browsed product information, product information in the shopping cart, purchased product information, etc.

[0115] In S303, based on the user information and behavior data, a knowledge graph comparative learning framework is applied to perform user behavior analysis.

[0116] According to some embodiments, the user behavior data includes user browsing information, user purchase information, browsing information of recommended products, and information on product categories of interest to similar users. According to some embodiments, a knowledge graph is constructed based on user information and corresponding behavior data to analyze user behavior. If a user frequently browses a certain type of product, it is considered that the user is interested in that type of product; if a user purchases a certain product, it is considered that the user is interested in that type of product; if a user does not click to browse a certain type of product recommended on the homepage, it is considered that the user is not interested in that type of product, etc.; if other users similar to the user are interested in a certain type of product, it is considered that the user is also interested in that type of product, etc.

[0117] According to some embodiments, the collected user information and behavior data are input into a knowledge graph contrastive learning framework, which is a structured database that can represent entities and their relationships. The knowledge graph contrastive learning framework can integrate and understand the inherent connections of user data and build a user behavior data model, which contains a complex network of user interests and preferences.

[0118] In S305, a recommendation algorithm is applied to recommend products to the user at different stages according to the product categories that the user is interested in.

[0119] According to some embodiments, a recommendation algorithm is used to generate a personalized recommendation list based on the user's interest product categories obtained from the previous analysis. These recommendations will be displayed to the user on different interfaces of the platform, such as the homepage, search results page, personal center, etc.

[0120] According to some embodiments, a corresponding knowledge graph is constructed by obtaining user information and behavior data. The knowledge graph mainly includes users and commodities, as well as user ratings of each commodity. The diffusion model generates an enhanced view based on the existing knowledge graph. The diffusion model obtains the interaction data and relationships between users and commodities in the knowledge graph, and then adds Gaussian noise (making the data more diverse and simulating the uncertainty of the relationship) and denoises (converting the noise view into a semantically consistent view through denoising) to these data, and finally obtains a semantically consistent enhanced view. The knowledge graph comparative learning framework provides a user behavior data model as a structured representation of user interests, which specifically includes which product attributes, brands, and categories they may be interested in, as well as the correlation between these interests, so that the system can understand deeper user needs, not just superficial behavior data. The diffusion model helps to understand how user interests evolve over time and how they are affected by the behavior of other users. The system can predict users' potential points of interest through the diffusion model, even if these interests are not yet clearly reflected in their behavior data. Combining the two, the system creates a "semantically consistent enhanced view" that takes into account users' personal interests, behavior patterns, and possible interest change trends when displaying products. Therefore, when users visit different pages of the platform, the recommended products they see are not only based on past purchases or browsing history, but are also dynamically adjusted according to their current possible interests, which not only improves the relevance and attractiveness of the recommendations, but also significantly improves the user experience. Because the appearance of irrelevant recommendations is reduced, and the opportunity to discover new products is increased, these products may not have been encountered by users before, but are likely to meet their tastes and needs. Such personalized and forward-looking recommendation methods can greatly improve user engagement and satisfaction.

[0121] The knowledge graph contrastive learning framework adds a diffusion model for data enhancement and uses a multi-level contrastive learning model to improve the embedding quality of the knowledge graph.

[0122] According to some embodiments, the knowledge graph contrastive learning framework combines a diffusion model for data augmentation and uses a multi-level contrastive learning model to improve the quality of knowledge graph embedding.

[0123] According to some embodiments, the diffusion model gradually converts random noise into meaningful data through a series of denoising steps. In the field of knowledge graphs, this model can be used to generate new triple instances, i.e., entities and the relationships between them. Specifically, the diffusion model can start from existing triples and generate new, reasonable but not seen triples in the training set by adding or modifying entities or relationships. These newly generated triples can increase the diversity and richness of the training set, thereby helping the model to better generalize to unseen data. The data sparsity problem of beef cattle as a commodity in the e-commerce platform is solved, so that even if the beef cattle commodity is currently small, it can still be recommended to users with high quality.

[0124] According to some embodiments, contrastive learning is an unsupervised or semi-supervised learning method that enables the model to learn the intrinsic structure and pattern of the data by comparing the feature representations of similar samples and dissimilar samples. In the knowledge graph contrastive learning framework described in the present invention, the multi-level contrastive learning model can learn more refined and robust knowledge graph embeddings through contrastive learning at different levels. The new data generated by the diffusion model can increase the diversity of contrastive learning, enabling the model to learn a wider range of knowledge graph structures. At the same time, multi-level contrastive learning ensures that the learned representations not only reflect the intrinsic characteristics of entities and relationships, but also can handle complex semantic relationships, ultimately improving the quality of the entire knowledge graph embedding.

[0125] According to some embodiments, combining the diffusion model with data enhancement and the multi-level contrastive learning model can solve the cold start problem of beef cattle as a commodity in the e-commerce platform. Whether it is a new user who comes to buy beef cattle products or a merchant has newly put a new variety of beef cattle products on the shelves, personalized and suitable beef cattle products can be recommended to users.

[0126] According to some embodiments, a recommendation algorithm may be applied to recommend products to users on different interfaces of the platform based on the product categories of interest to the user. For example, when a user enters the platform, a personalized homepage display is generated based on the user's historical behavior data or the behavior data of similar users.

[0127] According to some embodiments, when a user logs in to the platform for the first time, the recommendation system will analyze the user's historical behavior data, such as browsing history, purchase history (including purchase frequency and preferences), search history or keywords that the user has searched, clicks and interactions (user click behavior and participation on the platform, such as likes, favorites), etc. In addition, the system will also consider the behavior data of similar user groups, and find user groups with similar interests and purchasing habits through cluster analysis, so as to provide users with more accurate recommendations. For example, if a user often browses sports equipment and has purchased running shoes, the homepage will give priority to displaying new products and promotional information in the sports equipment category.

[0128] According to some embodiments, when a user browses a product page or searches, similar products to the current product are displayed at the bottom of the product details page, or other users who purchased the product also purchased other products, or popular products or new products related to the current product are recommended. For example, suppose a user browses a beef cattle product on an e-commerce platform and purchases it. When the user browses a beef cattle product on the browsing page, the system will recommend related products (beef, feed, ear tags) and other beef cattle products of similar brands at the bottom of the page. For another example, when a user searches for "beef cattle", the recommendation system recommends popular beef cattle products and related promotions at the top of the search results.

[0129] According to some embodiments, when a user adds an item to a shopping cart or enters the checkout page, the shopping cart page recommends related or supplementary items based on the items in the shopping cart, or displays additional items or value-added services that other users often purchase when checking out similar items on the checkout page. Similarly, assuming that a user browses a beef product on an e-commerce platform and adds the beef product to a shopping cart, then on the shopping cart page, the system will recommend the user to purchase related categories of products such as seasonings; or after the user purchases the product, on the checkout page, the system recommends fast delivery options or other beef of similar quality.

[0130] According to some embodiments, during the user's after-sales and repurchase process, a recommendation email or in-app push notification is sent to the user to recommend products or promotions related to the purchased products. In order to attract user attention and promote sales, the system can also recommend popular products or new products related to the current products. For example, if the user is viewing another category of meat products or the user completes the purchase of beef products, the recommendation system sends an email or in-app push notification to recommend related services (such as applications that can share recipes and cooking, such as short video platforms or forums) and subsequent purchased products (such as other similar beef products). Such a strategy takes advantage of the user's curiosity about new things, and can also help users understand market trends and product innovations.

[0131] According to some embodiments, the solution of the present invention can be applied to a method for recommending products. The product recommendation system includes the method described above, which can solve the cold start problem of some categories of products in the e-commerce platform and can recommend personalized and suitable products to users.

[0132] According to some embodiments, the solution of the present invention may be applied to the design of a computer program product, and when the computer program is executed by a processor, the method described above is implemented.

[0133] According to some embodiments, the system described in the solution of the present invention combines diffusion models, multi-level contrastive learning, knowledge graphs and other technologies to solve the data sparsity problem of beef cattle as commodities in e-commerce platforms, so that high-quality user recommendations can be made even when there are currently fewer beef cattle commodities.

[0134] According to some embodiments, the system described in the solution of the present invention can solve the cold start problem of beef cattle as a commodity in the e-commerce platform. Whether it is a new user who comes to purchase beef cattle products or a merchant has newly put a new variety of beef cattle products on the shelves, it can well recommend personalized and suitable beef cattle products to users.

[0135] According to some embodiments, the system in the solution of the present invention adopts a noise diffusion process and enhances the robustness of the model during the denoising process, so that accurate recommendations can be provided even in a data environment with more noise.

[0136] Figure 4 A block diagram of a computing device according to an example embodiment of the present application is shown.

[0137] like Figure 4 As shown, computing device 30 includes processor 12 and memory 14. Computing device 30 may also include bus 22, network interface 16, and I / O interface 18. Processor 12, memory 14, network interface 16, and I / O interface 18 may communicate with each other via bus 22.

[0138] The processor 12 may include one or more general-purpose CPUs (Central Processing Units, processors), microprocessors, or application-specific integrated circuits, etc., for executing relevant program instructions. According to some embodiments, the computing device 30 may also include a high-performance graphics card (GPU) 20 for accelerating the processor 12.

[0139] The memory 14 may include a machine system readable medium in the form of a volatile memory, such as a random access memory (RAM), a read-only memory (ROM), and / or a cache memory. The memory 14 is used to store one or more programs including instructions and data. The processor 12 may read the instructions stored in the memory 14 to execute the above-mentioned method according to the embodiment of the present application.

[0140] The computing device 30 may also communicate with one or more networks via the network interface 16. The network interface 16 may be a wireless network interface.

[0141] The bus 22 may include an address bus, a data bus, a control bus, etc. The bus 22 provides a path for exchanging information between components.

[0142] It should be noted that, in the specific implementation process, the computing device 30 may also include other components necessary for normal operation. In addition, those skilled in the art may understand that the above device may only include components necessary for implementing the embodiments of this specification, and need not include all components shown in the figure.

[0143] The present application also provides a computer-readable storage medium having a computer program stored thereon, which implements the steps of the above method when executed by a processor. The computer-readable storage medium may include, but is not limited to, any type of disk, including a floppy disk, an optical disk, a DVD, a CD-ROM, a microdrive, and a magneto-optical disk, a ROM, a RAM, an EPROM, an EEPROM, a DRAM, a VRAM, a flash memory device, a magnetic card or an optical card, a nanosystem (including a molecular memory IC), a network storage device, a cloud storage device, or any type of medium or device suitable for storing instructions and / or data.

[0144] An embodiment of the present application also provides a computer program product, which includes a non-transitory computer-readable storage medium storing a computer program, and the computer program is operable to cause a computer to execute part or all of the steps of any one of the methods recorded in the above method embodiments.

[0145] Those skilled in the art can clearly understand that the technical solution of the present application can be implemented with the help of software and / or hardware. The "unit" and "module" in this specification refer to software and / or hardware that can independently complete or cooperate with other components to complete specific functions, where the hardware can be, for example, a field programmable gate array, an integrated circuit, etc.

[0146] It should be noted that, for the aforementioned method embodiments, for the sake of simplicity, they are all expressed as a series of action combinations, but those skilled in the art should be aware that the present application is not limited by the described order of actions, because according to the present application, certain steps can be performed in other orders or simultaneously. Secondly, those skilled in the art should also be aware that the embodiments described in the specification are all preferred embodiments, and the actions and modules involved are not necessarily required by the present application.

[0147] In the above embodiments, the description of each embodiment has its own emphasis. For parts that are not described in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.

[0148] In the several embodiments provided in the present application, it should be understood that the disclosed devices can be implemented in other ways. For example, the device embodiments described above are only schematic, such as the division of units, which is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some service interfaces, and the indirect coupling or communication connection of devices or units can be electrical or other forms.

[0149] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0150] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.

[0151] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable memory. Based on this understanding, the technical solution of the present application, or the part that contributes to the prior art, or all or part of the technical solution can be embodied in the form of a software product, which is stored in a memory and includes several instructions for a computer device (which can be a personal computer, server or network device, etc.) to execute all or part of the steps of the methods of each embodiment of the present application.

[0152] In the above embodiments, the description of each embodiment has its own emphasis. For parts that are not described in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.

[0153] The exemplary embodiments of the present application are specifically shown and described above. It should be understood that the present application is not limited to the detailed structures, configurations or implementations described herein; on the contrary, the present application is intended to cover various modifications and equivalent configurations included in the spirit and scope of the appended clauses.

Claims

1. A method for recommending products. It is characterized in that The method comprises: Obtain users’ online shopping data on online shopping platforms; Constructing a corresponding knowledge graph based on the online shopping data, wherein the knowledge graph includes users, commodities, commodity attributes, and user ratings of commodities; generating an enhanced view of the knowledge graph using a diffusion model; Applying multi-level contrastive learning to the knowledge graph to optimize the embedding quality of the knowledge graph, wherein the multi-level contrastive learning includes user-level contrastive learning, entity-level contrastive learning, and user-item-level contrastive learning; A joint training paradigm is adopted to optimize the recommendation task model and the multi-level contrastive learning task model, under which the recommendation task loss is combined with the personalized ranking loss and the multi-level contrastive learning loss.

2. The method according to claim 1, It is characterized in that The online shopping data includes: user identity data, user page operation location data, and user behavior data.

3. The method according to claim 2, It is characterized in that The user behavior data includes: user browsing information, user purchase information, browsing information on recommended products, and information on product categories of interest to similar users.

4. The method according to claim 1, It is characterized in that An enhanced view of the knowledge graph is generated using a diffusion model, including: Obtaining interaction data and relationships between users and products in the knowledge graph; Adding Gaussian noise to the interaction data and the relationship step by step; A denoising process transforms the noisy view into a semantically consistent enhanced view, thereby reconstructing a cleaner version of the knowledge graph.

5. The method according to claim 4, It is characterized in that Gaussian noise is added to the interaction data and relationships in stages, including defining a conditional probability for the introduction of noise to represent the forward propagation during the noise diffusion process: Among them, t and t-1 denote the noise states in the data structure at time steps t and t-1 respectively, and the normal distribution N denotes the probability distribution of the current state ζt. t-1 , whose mean is Parameter β t Control the noise level at each step, β t I is the covariance matrix, β t is the variance.

6. The method according to claim 4, It is characterized in that The noisy view is transformed into a semantically consistent enhanced view through the denoising process, including modeling the probability distribution of the time step t-1 state using a normal distribution. The reverse denoising process is modeled as: p θ (g) t |g t-1 )=N(ζ t ;m θ (g) t ,t),∑ θ (g) t ,t)) Among them, t-1 represents the target at time step t-1 from the current noise state ζ t The restored state, function μ θ (ζ t , t) is the mean function of the neural network output, ∑ θ (ζ t , t) is a covariance function output by the neural network. The covariance matrix describes ζ t-1 The reliability of each dimension in the prediction.

7. The method according to claim 1, It is characterized in that The multi-level contrastive learning loss is: L cl =L user-level +L entity-level +L user-item-level , Among them, L user-level is the user-level contrastive learning loss, L entity-level is the entity-level contrastive learning loss, L user-item-level is the user-item level contrastive learning loss.

8. The method according to claim 7, It is characterized in that The loss at each level is defined as follows: Among them, B represents a set of samples, z i and is a positive sample pair, representing a user, entity, or user-item pair that is related or similar at the same level, z j ' is a negative sample, representing an irrelevant user, entity or user-item pair, sim is a similarity function, and τ is a temperature parameter that controls the scale of similarity calculation.

9. A computer program product, It is characterized in that include: A computer program, wherein when the computer program is executed by a processor, the method according to any one of claims 1 to 8 is implemented.

10. A computing device, It is characterized in that include: processor; as well as A memory storing a computer program, which, when executed by the processor, enables the processor to perform the method according to any one of claims 1 to 8.

Citation Information

Cited By

  • E-commerce scene cold start recommendation method combining meta-learning and causal inference

    CN119741096A

  • Emergency field multi-dimensional inference knowledge graph construction and real-time response method

    CN120851167A

  • Cold start recommendation method and system based on hybrid expert model

    CN122527412A

  • Cold start recommendation method and system based on hybrid expert model

    CN122527412B

  • User cross-city interest point recommendation method based on knowledge graph and diffusion model

    CN122594605A