Method, apparatus, device and computer program product for recommendation
By using knowledge graphs to generate sub-graphs in the recommendation system, we can provide users with explanations for recommendations, thus solving the problem of lack of transparency in recommendation systems and improving the effectiveness of recommendations and user experience.
Patent Information
- Application Number
- CN202410942344.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-12
- Publication Date
- 2026-01-13
AI Technical Summary
Existing recommendation systems are typically black-box algorithms, meaning users cannot understand the process by which the recommendation results are generated, leading to poor recommendation performance and a lack of transparency and interpretability.
The system utilizes knowledge graphs to generate subgraphs of user interactions, uses these subgraphs to determine recommended objects for users, and returns recommendation results containing both the subgraphs and the objects to provide explanations for the recommendations.
It improves the effectiveness and accuracy of recommendations, enhances the transparency and interpretability of the recommendation system, and enables users to better understand and accept the recommendation results.
Smart Images

Figure CN121327221A_ABST
Abstract
Description
Technical Field
[0001] Embodiments of this disclosure relate to the field of computers, and more specifically, to recommended methods, apparatus, devices, and computer program products. Background Technology
[0002] Recommender systems are technologies that use algorithms and data analytics to predict content that a user might be interested in and present it to the user, thereby improving user satisfaction and experience. Recommender systems are widely used in various scenarios, including e-commerce, social media, content platforms, and music and video streaming services.
[0003] With the explosive growth of information and the ever-changing needs of users, recommender systems have become increasingly important in today's internet age. In this vast ocean of information, users often face the problem of information overload. Recommender systems, by analyzing user behavior and interests, provide personalized recommendations, helping users find information and products that match their needs and preferences more quickly. Summary of the Invention
[0004] Embodiments of this disclosure provide a recommended method, apparatus, device, computer program product, and computer-readable storage medium.
[0005] According to a first aspect of this disclosure, a method for recommendation is provided. The method includes acquiring a knowledge graph comprising a plurality of user nodes and a plurality of object nodes. The method further includes generating one or more sub-graphs based on the knowledge graph, wherein the sub-graphs include user nodes corresponding to a first user and associated object nodes from the plurality of user nodes. Furthermore, the method includes determining a recommendation result for the first user based on the one or more sub-graphs and the plurality of object nodes.
[0006] According to a second aspect of this disclosure, an apparatus for recommendation is provided. The apparatus includes a knowledge graph acquisition module configured to acquire a knowledge graph comprising a plurality of user nodes and a plurality of object nodes. The apparatus further includes a subgraph generation module configured to generate one or more subgraphs based on the knowledge graph, wherein the subgraphs include user nodes corresponding to a first user and associated object nodes from the plurality of user nodes. Furthermore, the apparatus includes a recommendation result determination module configured to determine a recommendation result for the first user based on the one or more subgraphs and the plurality of object nodes.
[0007] According to a third aspect of this disclosure, an electronic device is provided. The electronic device includes at least one processor; and a memory coupled to the at least one processor and having instructions stored thereon, which, when executed by the at least one processor, cause the device to perform the steps of the method of the first aspect of this disclosure.
[0008] According to a fourth aspect of this disclosure, a computer program product is provided. The computer program product is tangibly stored on a non-transitory computer-readable medium and includes computer-executable instructions that, when executed, cause a computer to perform the steps of the method of the first aspect of this disclosure.
[0009] According to a fifth aspect of this disclosure, a computer-readable storage medium is provided. The machine-readable storage medium stores machine-executable instructions, which are executed by a processor to implement the steps of the method of the first aspect of this disclosure.
[0010] The summary section is intended to present the chosen concepts in a simplified form, which will be further described in the detailed description below. The summary section is not intended to identify key or principal features of the claimed subject matter, nor is it intended to limit the scope of the claimed subject matter. Attached Figure Description
[0011] The above and other objects, features and advantages of this disclosure will become more apparent from the accompanying drawings, in which the same reference numerals generally represent the same parts.
[0012] Figure 1 A schematic diagram of an example environment in which the apparatus and / or methods according to embodiments of the present disclosure may be implemented is shown;
[0013] Figure 2 A flowchart of a recommended method according to an embodiment of the present disclosure is shown;
[0014] Figure 3 A flowchart illustrating a process for generating recommendation results including interpretable user interactions in cross-selling according to embodiments of the present disclosure;
[0015] Figure 4 A schematic diagram of an architecture for generating interpretable user action paths according to embodiments of the present disclosure is shown;
[0016] Figure 5 A schematic diagram of an exemplary atlas ontology according to an embodiment of the present disclosure is shown;
[0017] Figure 6A A schematic diagram of a user action path according to an embodiment of the present disclosure is shown;
[0018] Figure 6B A schematic diagram of a user action path according to an embodiment of the present disclosure is shown;
[0019] Figure 7A schematic diagram illustrating the recommended results according to embodiments of the present disclosure is shown.
[0020] Figure 8 A schematic diagram illustrating a recommended apparatus according to an embodiment of the present disclosure is shown; and
[0021] Figure 9 A schematic block diagram of an example device suitable for implementing embodiments of the present disclosure is shown.
[0022] In the various figures, the same or corresponding labels indicate the same or corresponding parts. Detailed Implementation
[0023] Embodiments of this disclosure will now be described in more detail with reference to the accompanying drawings. While some embodiments of this disclosure are shown in the drawings, it should be understood that this disclosure can be implemented in various forms and should not be construed as limited to the embodiments set forth herein. Rather, these embodiments are provided to provide a more thorough and complete understanding of this disclosure. It should be understood that the accompanying drawings and embodiments of this disclosure are for illustrative purposes only and are not intended to limit the scope of protection of this disclosure.
[0024] In the description of embodiments of this disclosure, the term "comprising" and similar terms should be understood as open-ended inclusion, i.e., "including but not limited to". The term "based on" should be understood as "at least partially based on". The term "one embodiment" or "the embodiment" should be understood as "at least one embodiment". The terms "first", "second", etc., may refer to different or the same objects unless explicitly stated. Other explicit and implicit definitions may also be included below.
[0025] As mentioned earlier, recommender systems are becoming increasingly important in today's internet age. However, the related technologies are often black-box algorithms, meaning users don't know how the recommendations are generated, leading to poor recommendation performance. When recommending a product to a user, providing an intuitive explanation of why the product is being recommended can greatly improve the effectiveness of the recommendations and increase the transparency of the recommender system.
[0026] To address this, embodiments of this disclosure propose a recommendation scheme that utilizes a knowledge graph including user nodes and object nodes for recommendation. The scheme generates a subgraph representing user interactions through the knowledge graph, and then uses the subgraph to determine the corresponding recommended objects for the user. The final recommendation result includes the subgraph and the object, and the user can understand the interpretation of the recommendation result based on the user interactions in the subgraph.
[0027] Therefore, the solution provided by the embodiments of this disclosure can utilize knowledge graphs to structurally represent user interactions and relationships between objects. When generating recommendation results, it can generate sub-graphs representing recommendation explanations, which not only improves the effectiveness and accuracy of recommendations, but also enhances the transparency and interpretability of the recommendation system, providing clear explanations for user behavior paths, enabling users to better understand and accept recommendation results, thereby improving the user experience of the recommendation system.
[0028] The following is for reference Figures 1 to 9 The present disclosure is provided to illustrate the basic principles and several exemplary implementations. It should be understood that these exemplary embodiments are given only to enable those skilled in the art to better understand and implement the embodiments of the present disclosure, and are not intended to limit the scope of the disclosure in any way.
[0029] Figure 1 An example environment 100 is shown, in which the devices and / or methods of embodiments of this disclosure may be implemented. (e.g.) Figure 1 As shown, example environment 100 includes, for example, Figure 1 As shown, the example environment 100 may include a computing device 110, which may be a user terminal, mobile device, computer, etc., or it may be a computing system, a single server, a distributed server, or a cloud-based server. The computing device 110 can acquire user 120 and generate corresponding recommendation results 160 for user 120. It should be understood that only one user is shown here as an example, and embodiments of this disclosure can provide recommendation services for multiple users. The recommendation system 130 can utilize a knowledge graph 140 for recommendations, which may include user nodes and object nodes. For example, the knowledge graph 140 may include user nodes corresponding to user 120. Furthermore, object nodes are objects in the recommendation system. For example, in a product recommendation system, object nodes represent products; in a video recommendation system, object nodes represent videos. Embodiments of this disclosure do not limit the recommended objects.
[0030] Recommendation system 130 can utilize knowledge graph 140 to generate (multiple) subgraphs 150 for user 120. For example, the user node corresponding to user 120 can be used as the initial node of subgraph 150, and knowledge graph 140 can be used to iteratively update subgraph 150. After generating subgraph 150, recommendation results 160 can be generated using subgraph 150 and object nodes. For example, recommendation system 130 can select subgraphs and object nodes with high relevance as recommendation results based on the relevance between subgraphs and object nodes.
[0031] It should be understood that the architecture and functionality in example environment 100 are described for illustrative purposes only and do not imply any limitation on the scope of this disclosure. Embodiments of this disclosure can also be applied to other environments with different structures and / or functionalities.
[0032] The following will combine Figures 2 to 9 The process according to embodiments of this disclosure is described in detail. For ease of understanding, the specific data mentioned in the following description are exemplary and not intended to limit the scope of this disclosure. It is understood that the embodiments described below may also include additional actions not shown and / or actions shown may be omitted, and the scope of this disclosure is not limited in this respect.
[0033] Figure 2 A flowchart of a recommendation method 200 according to an embodiment of the present disclosure is shown. At block 202, a knowledge graph including user nodes and object nodes can be obtained. For example, in conjunction with Figure 1 The recommendation system 130 can acquire a knowledge graph 140 that includes user nodes and object nodes. When an entity node in the knowledge graph is of the user type, the node can be called a user node; when an entity node in the knowledge graph is of the object type, the node can be called an object node, and the object node is the object to be recommended to the user.
[0034] At box 204, one or more sub-graphs representing user interactions can be generated based on the knowledge graph and user nodes, where user nodes are the initial nodes of one or more sub-graphs. For example, combining... Figure 1 The recommendation system 130 can generate one or more subgraphs 150 representing user interactions based on the knowledge graph 140 and user nodes. A subgraph is a partial graph extracted from the original knowledge graph, containing a subset of entity nodes and the connections between them (i.e., relationship nodes). Subgraphs can simplify the complexity of the original graph, enabling more efficient data processing and analysis.
[0035] At box 206, recommendations for the first user can be determined based on one or more sub-graphies and multiple object nodes. For example, combining... Figure 1 The recommendation system 130 can determine the recommendation result 160 for a first user based on one or more subgraphs 150 and multiple object nodes.
[0036] In some embodiments, the recommendation method further includes: determining an interpretation of the recommendation result 160, the interpretation including a sub-graph related to the recommendation result and an importance score of each node in the sub-graph to the recommendation result.
[0037] Therefore, the method 200 according to the embodiments of this disclosure can use knowledge graphs to structurally represent user interactions and relationships between objects. When generating recommendation results, it can generate sub-graphs representing recommendation explanations, which not only improves the effectiveness of recommendations but also enhances the transparency and interpretability of the recommendation system, enabling users to better understand and accept recommendation results, thereby improving the user experience of the recommendation system.
[0038] Figure 3 A flowchart illustrating a process 300 for generating recommendation results including interpretable user interactions in cross-selling according to embodiments of the present disclosure is shown. User interaction refers to a user's action path, such as viewing, clicking, obtaining, etc. Cross-selling indicates that user interactions can be cross-platform and cross-category. Today, businesses typically sell multiple products under different categories, and these products all use the same brand. For example, some brands sell power tools, automotive parts, and home appliances. Therefore, considering only a single category for recommendations is unreasonable. Simultaneously, with the rapid development of the internet, users are active on multiple channels, such as e-commerce platforms and social media platforms. Therefore, cross-category and cross-platform recommendations have become highly valuable and necessary. Consequently, businesses not only need to provide accurate recommendations for short-term sales conversions but also need to interpret user behavior paths to support long-term marketing strategies and attribution analysis.
[0039] Furthermore, businesses can use the interpretation of recommendation results to delve deeper into the user's decision-making process, thereby identifying user needs and preferences. This insight helps in user acquisition and the development of more precise marketing strategies, such as cross-platform or cross-category operational or marketing strategies. Additionally, the interpretation of recommendation results can provide businesses with sales leads. These leads include information such as users' potential needs, purchase intentions, and consumption habits.
[0040] like Figure 3 As shown, at box 302, source data can be loaded. For example, source data can include, but is not limited to, user data, product data, business data, and content data. User data can include, but is not limited to, user identifiers (IDs), acquisition information, and membership information. This data records user activities and behaviors across various channels, such as acquisition history, membership status, and other relevant information. Product data can include, but is not limited to, product names, product categories, and product descriptions. This data records the basic attributes and characteristics of the product. Business data can be channel data, including various channels from which the product originates, i.e., different platforms (e.g., e-commerce platforms). Channel data can include store information and membership information on different platforms, as well as relevant information from official accounts and mini-programs on the platform, such as push notifications, likes, product releases, and followed users. Content data can include text information such as comment content and push notification content.
[0041] In some embodiments, source data can be loaded from a Content Management System (CMS), a Consumer Data Platform (CDP), or a third-party data platform. A CMS is a software application or tool for managing digital content, allowing users to create, edit, organize, and publish various types of content, including text, images, audio, and video. CMS simplifies the management and publishing process of digital content, enabling individual users and organizations to manage digital content more efficiently. A CDP is a software system or tool that collects, integrates, and manages consumer data from multiple sources, enabling businesses to better understand and interact with users. A CDP can contain personal consumer information from various channels and data sources, such as online behavior, transaction history, social media activity, and customer service records. A third-party data platform is a data management and analytics solution provided by an independent entity or company. These platforms typically provide businesses with services such as data collection, integration, storage, analysis, and activation. Businesses can use third-party data platforms to enrich their internal data by leveraging external data resources. In some embodiments, source data can be loaded from data blocks of third-party cloud services.
[0042] At box 304, a knowledge graph can be constructed based on the source data and the graph ontology. Before constructing the knowledge graph, a graph ontology needs to be built to organize the information structure of the knowledge graph. A graph ontology is a collection of abstract concepts in the domain, capable of describing the common characteristics of entities and the relationships between entities. This will be discussed in the following section. Figure 5 Examples of knowledge graph ontology describing embodiments of this disclosure are provided. In some embodiments, the knowledge graph can be saved as multiple information files. First, information files for entity nodes can be saved. Entity nodes may include user nodes, object nodes, channel nodes, etc., where channel nodes may include business platform nodes and content nodes, etc. User nodes may represent users. Object nodes may represent objects recommended to users, such as products, articles, short videos, etc. Channel nodes represent the source or channel of object nodes. For example, if a product comes from an e-commerce platform, then the e-commerce platform is a channel node. Content nodes may represent content carriers such as tweets or videos that can record objects. For example, a tweet may record or promote a product. It should be understood that entity nodes in the knowledge graph represent entity information, while relationship nodes represent information about the relationships between entities.
[0043] For example, entity information from a knowledge graph can be saved as a file containing entity IDs, names, and descriptions. For instance, entity information could be represented as (1, Product: Screwdriver, a common tool used to tighten screws). Then, relationship information between entities can be saved as a file. For example, relationship information between entities in the knowledge graph can be saved as another file containing relationship IDs and names. For instance, relationship information could be represented as (0, Obtain). Finally, knowledge graph information can be saved as a file containing sets of triples. Each triple is represented as (Subject Node, Relationship Node, Object Node). For instance, a triple could be represented as (User A, Obtain, Product: Screwdriver). When knowledge graph extraction is needed, triples can be read from the saved knowledge graph information file, and entity nodes and relationship nodes can be replaced with their corresponding IDs. For instance, entity node names can be replaced with entity IDs, and relationship nodes can be replaced with relationship IDs, such as (Entity Node: 0, Relationship Node: 0, Entity Node: 1).
[0044] At box 306, the model can learn vector representations of entity nodes and relation nodes in the knowledge graph. In some embodiments, a pre-trained language model can be used to generate initial vector representations of entity nodes. For example, entity descriptions from entity information files can be passed as input to the language model to obtain semantic embeddings (i.e., vector representations) of the entities. A language model is a model that understands and generates natural language text; it can encode the input text into high-dimensional vector representations, capturing the semantic information of the text. After the language model processes the entity descriptions, it can generate semantic embeddings for the corresponding entities, which contain the semantic information of the entity descriptions and typically have high dimensionality to preserve more semantic details. Finally, the semantic embeddings can be used as initial embeddings for the entities, which will then be used as input to the graph neural network.
[0045] In some embodiments, vector representations of entity nodes and relation nodes in the knowledge graph can be generated by learning from the initial embeddings of entities and information files of the knowledge graph using a graph neural network model. For example, knowledge graph information and entity initialization vectors can be obtained. The knowledge graph information may include triple relationships between nodes, while the entity initialization vector contains the semantic information of the entity. Then, the knowledge graph information and entity initialization vectors are input into the graph neural network model to generate node vectors for entity nodes and relation nodes in the knowledge graph. A graph neural network model is a neural network model specifically designed for processing graph-structured data. It can effectively learn the structural relationships between nodes in a graph, performing computation and iteration through a multi-layered neural network structure to obtain the final vectors of the nodes. Node vectors capture the semantic and structural information of nodes in the knowledge graph, representing and understanding the nodes within the graph structure.
[0046] At box 308, a recommendation model can be trained based on the node vectors of entity nodes and relationship nodes in the knowledge graph. In some embodiments, a subgraph of interest to the user can be extracted from the knowledge graph based on the node vectors of entity nodes and relationship nodes. In some embodiments, the user interaction model is trained based on behavior cloning. For example, the user interaction model predicts the relevance between neighboring nodes and user nodes, i.e., the user's interest score, by learning from samples of user interactions, such as clicks and acquisitions. In some embodiments, user interaction data can be acquired, and the user interaction data node vectors include object data and channel business data related to the user, and then the user interaction model can be trained based on the interaction data. In some embodiments, the relevance score can be determined using the user interaction model based on the subgraph vector and the node vectors of the multiple neighboring nodes. For example, the user interaction model can determine the relevance score between the subgraph and neighboring nodes, and select neighboring nodes with high relevance to update the subgraph.
[0047] In some embodiments, a loss function can be used to optimize the user interaction model, enabling neighboring nodes that represent the proximity information of the current node to obtain high scores. In some embodiments, the knowledge graph can be pruned using the user's interest scores to obtain subgraphs representing the user's interests. For example, an initial subgraph can be obtained first, containing only user nodes. Then, the user interaction model can be used to calculate the user interest scores of neighboring nodes in the subgraph. These neighboring nodes can be other nodes related to the user, such as products, channels, etc. The user interaction model can calculate the relevance between neighboring nodes and user nodes based on the characteristics and relationships of neighboring nodes. Then, the subgraph can be iteratively updated, for example, by adding neighboring nodes with higher scores to the subgraph and performing multiple rounds of updates. Each round of updates considers the newly added nodes, recalculates the scores of neighboring nodes, and decides whether to add them to the subgraph. In some embodiments, the last node added to the subgraph can be used as a leaf node (i.e., the product to be recommended), and the similarity (i.e., relevance) between the leaf node and the subgraph can be used as the recommendation score for that product. For example, the recommendation score can be determined by the vector similarity between the vectors of the subgraph and the vectors of the leaf nodes. In some embodiments, a neural network can be used to encode the subgraph to generate a vector of the subgraph. For example, a graph neural network model can be selected to generate a vector of the subgraph based on the node vectors in the subgraph.
[0048] In some embodiments, multiple weights of multiple subgraphs connected to a leaf node can be obtained, and then the similarity between each subgraph and the leaf node can be determined. A final recommendation score is determined by weighting the multiple weights and their corresponding similarities. In some embodiments, the weights of the subgraphs can be the weights of the edges (i.e., relation nodes) between the subgraph and the leaf node, and the edge weights can be pre-configured. In other embodiments, the maximum similarity between the leaf node and each subgraph can be used as the final recommendation score.
[0049] At box 310, recommendation results can be obtained based on recommendation scores, and the corresponding subgraphs can be used as interpretable user action paths. For example, subgraphs of the top 10 ranked products can be obtained; these subgraphs are the most relevant to the user's interests. Leaf nodes (i.e., product nodes) of the subgraphs can be obtained, representing products that the user may be interested in. The subgraphs can be used as user action paths, recording the user's behavioral trajectory or decision path in the knowledge graph, from the initial node (user node) to the leaf node (product node). Users can understand the interpretation of the recommendation results through this path.
[0050] Figure 4 A schematic diagram of an architecture 400 for generating interpretable user action paths according to embodiments of the present disclosure is shown. The data source module 402 may include user data 404, product data 405, channel data 406, and content data 407. The knowledge graph module 412 may include an ontology construction module 414 and a graph generation module 416. The ontology construction module 414 can construct a graph ontology for organizing the information structure of the knowledge graph. The graph ontology is a collection of abstract concepts in the domain, capable of describing the common characteristics of entities and the relationships between entities. The graph generation module 416 can generate a knowledge graph based on the graph ontology and all data in the data source module 402. The knowledge graph includes entity nodes and relationship nodes. Entity nodes may include nodes such as users, products, and channels, and relationship nodes can represent the relationships between entity nodes, such as belonging, having, and obtaining.
[0051] Graph representation module 422 may include semantic information module 424 and structural information module 426. Graph representation module 422 can learn vector representations of entity nodes and relation nodes in the knowledge graph through a model. Semantic information module 424 can generate initial vector representations of entity nodes using a pre-trained language model. For example, entity descriptions from entity information files can be passed as input to the language model to obtain semantic embeddings (i.e., vector representations) of entities. The language model is a model that understands and generates natural language text; it can encode the input text into high-dimensional vector representations, capturing the semantic information of the text. Structural information module 426 can generate vector representations of entity nodes and relation nodes in the knowledge graph based on the initial embeddings of entities using a graph neural network model. The vector representation of a node captures the semantic and structural information of the node in the knowledge graph; it is a representation and understanding of the node in the graph structure. Thus, it is possible to obtain semantic relationships between nodes from the names and descriptions of text information, while simultaneously identifying logical and topological relationships within the knowledge graph. For example, the complementary relationship between household appliances and power tools can be discovered through the knowledge graph we construct.
[0052] The subgraph reasoning module 432 may include a subgraph learning and ranking module 434. The subgraph learning and ranking module 434 can extract subgraphs of interest to the user from the knowledge graph. For example, the subgraph learning and ranking module 434 can use a user interaction model to learn from samples of user behavior, such as clicks and acquisitions, to predict the relevance between adjacent nodes and user nodes, i.e., the user's interest score. The recommendation application module 442 may include a recommendation result module 444 and a recommendation action path module 446. The recommendation result module 444 in the recommendation application module 442 can generate multiple recommendation results (e.g., multiple products) and corresponding recommendation scores for the user. The recommendation action path module 446 can generate subgraphs of interest to the user as interpretable user action paths for the recommendation results, explaining why the corresponding products are recommended to the user.
[0053] Figure 5 A schematic diagram of an exemplary graph ontology 500 according to an embodiment of the present disclosure is shown. A graph ontology is a collection of abstract concepts in a domain, capable of describing the common characteristics of entities and the relationships between entities, such as... Figure 5As shown, circular nodes represent entity nodes, and rectangular nodes represent relationship nodes. The knowledge graph ontology defines the processes by which users obtain products through different channels and make decisions based on content generated in different stores. Through the knowledge graph ontology, the knowledge graph can describe the user action path connecting users, products, and channels. Entity nodes in the knowledge graph ontology can include user nodes, object nodes, and channel nodes. Object nodes are the objects that can be recommended in a recommendation system. For example, in a product recommendation system, an object node represents a product; in a video recommendation system, an object node represents a video. Here, the object node is a product node, but it should be understood that the embodiments of this disclosure do not limit the recommended objects. In some embodiments, entity nodes in the knowledge graph can include the following eight types of nodes: user nodes, product nodes, channel nodes (e.g., JD.com, Tmall, Douyin, and WeChat), category nodes, store nodes, official account nodes, and article nodes.
[0054] like Figure 5 As shown, described from left to right, user node 502 can be obtained from store node 512, and the relationship node 504 between user node 502 and store node 512 indicates "obtained from...". User node 502 can be a user and / or member of channel node 508, and relationship node 506 can indicate "a user and / or member of...". For example, channel node 508 can be an e-commerce platform, and users can be users and / or members of that e-commerce platform. Channel node 508 can include store node 512, and relationship node 510 can indicate "has". For example, an e-commerce platform can have a store. Store node 512 can contain product node 530, and relationship node 516 can indicate "contains", for example, a store can contain multiple products.
[0055] User node 502 can read content node 526, and relationship node 514 can indicate "read". For example, a user can read the content of an article. Channel node 518 can have a public account node 522, and relationship node 520 can indicate "has". For example, channel node 518 can be a social media platform with multiple public accounts. Public account node 522 can have content node 526, and relationship node 524 can indicate "has". For example, a public account can publish multiple articles, i.e., it has multiple article contents. User node 502 can follow public account node 522, and relationship node 528 can indicate "following".
[0056] Channel node 536 can have user node 540, and relationship node 538 can represent "having". For example, channel node 536 can be a short video platform, and user node 540 can be a user of that short video platform. User node 502 can follow user node 540, and relationship node 528 can represent "following". User node 540 can have content node 544, and relationship node 542 can represent "having". For example, a user of a short video platform can publish short video content. User node 502 can read content node 526, and relationship node 546 can represent "read". For example, a user can browse short video content.
[0057] User node 502 can be a user and / or member of channel node 552, and relationship node 550 can represent "a user and / or member of...". For example, channel node 552 can be another e-commerce platform different from channel node 508, and the user can be a user and / or member of this other e-commerce platform. Channel node 552 can include store node 556, and relationship node 554 can represent "has". For example, the e-commerce platform can have a store. Store node 556 can contain product node 530, and relationship node 558 can represent "contains", for example, a store can contain multiple products. User node 502 can obtain something from store node 556, and relationship node 560 can represent "obtained at...". For example, the user has previously obtained a product from the store. User node 502 can click and / or obtain product node 530, and relationship node 548 can represent "clicked and / or obtained". Product node 530 can belong to category node 534, and relationship node 532 can represent "belongs to". For example, a product belongs to the category of automobiles.
[0058] The ontology graph provided in the embodiments of this disclosure defines the process by which users obtain products through different channels and make decisions based on content generated in different stores. This enables a comprehensive description of user behavior paths and the integration of behaviors across channels and categories, thereby improving the recommendation effect and interpretability of the recommendation system.
[0059] Figure 6A A schematic diagram of a user action path 600A according to an embodiment of the present disclosure is shown. This user action path 600A can represent the action path of user 602 obtaining product 622. Product 622 can be a recommended product for user 602 and is the last entity node (also called a leaf node) added to the user action path. The portion of the user action path excluding the leaf nodes and their corresponding relational nodes is called the subgraph of interest to the user. Figure 6AAs shown, user 602 has acquired product 606, and relationship node 604 can be "acquired". For example, user 602 may have acquired product 606 (e.g., car air freshener). User 602 may follow public account 610, and relationship node 608 can be "followed". For example, public account 610 may be a car-related public account. Public account 610 may have content 614, and relationship node 612 can be "has". For example, the public account may publish articles. Content node 614 may contain product 606, and relationship node 616 can be "contains". For example, the article content may mention car air freshener. Furthermore, user 602 may read content 614, and relationship node 618 can be "read". For example, the user has previously read the public account's article content. Content 614 may contain product 622, and relationship node 620 can represent "contains". For example, the public account's article may introduce or promote car air filters. In this way, the user's action path can serve as a recommendation explanation for the recommended products, allowing users to understand the reason for the recommendation when the product is recommended. For example, a user might be recommended car air filter because they have previously purchased car air fresheners, followed car-related public accounts, and read articles containing information about car air filters—these are all part of the user's action path. Furthermore, embodiments of this disclosure can also utilize knowledge graphs to integrate user data, product data, sub-brand data, and platform data, thereby enabling the acquisition of comprehensive information from different data sources, particularly sub-brand data, which helps to provide more accurate and personalized recommendations.
[0060] Figure 6B A schematic diagram of a user action path 600B according to an embodiment of the present disclosure is shown. This user action path 600B can represent the action path of user 632 obtaining product 652. Product 652 can be a recommended product for user 632 and is the last entity node added to the user action path. Figure 6BAs shown, user 632 may have acquired product 636, and relationship node 634 can represent "acquired". For example, user 632 may have acquired product 606 (e.g., car wipers). User 632 may be a member of platform 640, and relationship node 638 can represent "belongs to a member". For example, platform 640 may be an e-commerce platform. Platform 640 may have store 644, and relationship node 642 can represent "has". For example, an e-commerce platform may have multiple stores. Store 644 may contain product 636, and relationship node 646 can represent "contains". For example, a store on an e-commerce platform (e.g., an auto parts flagship store) may include car wipers. Furthermore, user 632 may have acquired a product in store 644, and relationship node 648 can represent "purchased in". Store 644 may contain product 652, and relationship node 650 can represent "contains". For example, store 644 may include air filters. In this way, the user action path can serve as a recommendation explanation for recommended products, allowing users to understand the reason for the recommendation when the product is recommended. For example, a user might be recommended car air filter because they have previously purchased car wipers, are a member of an e-commerce platform, and have purchased products from the platform's car parts flagship store. As a result, the user might be recommended the store's car air filter.
[0061] Figure 7 A schematic diagram of a recommendation result 700 according to an embodiment of the present disclosure is shown. User 701 may have obtained a car wiper 712, where the relationship node 702 can represent "obtained," and the "0.4" in car wiper 712 indicates that the correlation score between car wiper 712 and user 701 is 0.4, which can be calculated by processing the node vectors of user 701, relationship node 702, and car wiper 712 through a user interaction model. Furthermore, user 701 may be a member of platform 714, where the relationship node 704 can represent "belongs to a member," and the correlation score between platform 714 and user 701 is 0.2. User 701 may have obtained a car battery 716, where the relationship node 706 can be "obtained," and the correlation score between car battery 716 and user 701 is 0.4. Furthermore, shop 732 can include car wiper 712 and car battery 716, with relationship nodes 722 and 726 representing "contains". Shop 732 can belong to platform 714, and relationship node 724 can represent "belongs to". The correlation score of the subgraph formed by shop 732 and user 701, car wiper 712, platform 714, car battery 716, and their corresponding relationship nodes is 0.4. Shop 732 can include car air filter 740, with relationship node 736 representing "contains". For example, shop 732 can sell car air filter 740. A similarity score can be calculated between car air filter 740 and the subgraph that includes shop 732.
[0062] Continue to refer to Figure 7 User 701 can obtain car battery 718; relationship node 708 can represent "obtained," and the correlation score between car battery 718 and user 701 is 0.7. User 701 can follow public account 720; relationship node 710 can represent "followed," and the correlation score between public account 720 and user 701 is 0.3. Furthermore, public account 720 can publish tweet 734; relationship node 734 can represent "published," and tweet 734 can introduce car battery 718; relationship node 728 can represent "introduced." The correlation score between tweet 734 and the subgraph formed by user 701, car battery 718, public account 720, and their corresponding relationship nodes is 0.6. Additionally, tweet 734 can introduce car air filter 740; relationship node 738 can represent "introduced." Air filter 740 also has a correlation score with another subgraph including tweet 734, for example, 0.5 (not shown).
[0063] The weights between the car air filter 740 and the subgraph containing the store 732, as well as the weights between the car air filter 740 and another subgraph containing the tweet 734, can be obtained. Then, the similarity between the car air filter 740 and these subgraphs is weighted using these weights to determine the final recommendation score. For example, the weight of the subgraph containing the store 732 could be the weight of relation node 736 (the weight of the edge between store 732 and air filter 740), and the weight of the other subgraph containing the tweet 734 could be the weight of relation node 738 (the weight of the edge between tweet 734 and air filter 740), and these weights can be pre-configured.
[0064] In other embodiments, the weight of each subgraph may be disregarded, and the maximum similarity score between the leaf node and each subgraph may be used as the final recommendation score. For example, if the calculated similarity score between the car air filter 740 and the subgraph including the shop 732 is 0.7 (not shown), and the calculated correlation score between the air filter 740 and another subgraph including the tweet 734 is 0.5 (not shown), then the recommendation score for the car air filter 740 is 0.7.
[0065] Figure 8A schematic diagram of a recommendation apparatus 800 according to an embodiment of the present disclosure is shown. Apparatus 800 includes a knowledge graph acquisition module 802 configured to acquire a knowledge graph including a plurality of user nodes and a plurality of object nodes. Apparatus 800 also includes a subgraph generation module 804 configured to generate one or more subgraphs based on the knowledge graph, wherein the subgraphs include user nodes corresponding to a first user and associated object nodes from the plurality of user nodes. Furthermore, apparatus 800 includes a recommendation result determination module 806 configured to determine a recommendation result for the first user based on the one or more subgraphs and the plurality of object nodes.
[0066] In some embodiments, the apparatus 800 further includes: a source data acquisition module configured to acquire source data for constructing the knowledge graph, the source data including at least user data, object data, and channel data, wherein the channel data represents the channels through which users and objects establish associations; a graph ontology acquisition module configured to use the graph ontology to define the types of entity nodes in the knowledge graph including user nodes, object nodes, and channel nodes; and a knowledge graph construction module configured to construct the knowledge graph based on the source data and the graph ontology.
[0067] In some embodiments, the knowledge graph construction module includes: a node file generation module configured to generate a first file for entity nodes, wherein the first file includes the identifier, name, and description of the entity nodes, wherein the entity nodes include the user nodes and the object nodes; a relationship information generation module configured to generate a second file for relationship nodes between entity nodes, wherein the second file includes the identifier and name of the relationship nodes; and a second knowledge graph construction module configured to construct the knowledge graph based on the entity nodes and the relationship nodes.
[0068] In some embodiments, the second knowledge graph construction module includes: a triple set determination module, configured to generate triples using the first file and the second file, including: determining a triple set based on the entity nodes in the first file and the relation nodes in the second file, wherein the triples in the triple set include a pair of entity nodes and a corresponding relation node; and a graph file generation module, configured to generate an information file of the knowledge graph based on the triple set.
[0069] In some embodiments, the second knowledge graph construction module further includes an identifier replacement module, configured to replace the entity nodes and relation nodes in the triple set in the information file of the knowledge graph with corresponding identifiers.
[0070] In some embodiments, the second knowledge graph construction module further includes: an initial embedding generation module configured to generate an initial embedding of the entity node using a pre-trained language model based on the description of the entity node; and a node vector generation module configured to generate node embeddings of the entity node and node embeddings of the relation node using a graph neural network based on the initial embeddings of the entity node and the information file of the knowledge graph, wherein the node embeddings indicate the semantic and structural information of the node in the knowledge graph.
[0071] In some embodiments, the sub-graph generation module includes: a sub-graph determination module configured to determine one or more initial sub-graphs, using the user node corresponding to the first user as the initial node of the one or more initial sub-graphs; a correlation score determination module configured to determine multiple correlation scores between the user node corresponding to the first user and multiple neighbor nodes; and a sub-graph update module configured to update the one or more initial sub-graphs based on the multiple correlation scores.
[0072] In some embodiments, the relevant score determination module includes: a subgraph vector generation module configured to generate a subgraph vector of the subgraph based on the node vectors in the initial subgraph; and a second relevant score determination module configured to determine the multiple relevant scores based on the subgraph vector and the node vectors of the multiple neighboring nodes using a trained user interaction model.
[0073] In some embodiments, the subgraph vector generation module includes: a graph information acquisition module configured to acquire a set of triples of the subgraph and a node vector of each node in the subgraph; and a second subgraph vector generation module configured to generate the subgraph vector based on the set of triples and the node vector of each node in the subgraph. In some embodiments, a neural network can be used to encode the subgraph to generate the subgraph vector. For example, a graph neural network model can be selected to generate the subgraph vector based on the node vectors in the subgraph.
[0074] In some embodiments, the system further includes: an interaction data acquisition module configured to acquire user interaction data, wherein the node vector includes at least object data and channel data related to the first user; and an interaction model training module, which generates the trained user interaction model based on the interaction data.
[0075] In some embodiments, the sub-graph update module includes: a neighbor node selection module, configured to select multiple related neighbor nodes from the multiple neighbor nodes based on the multiple related scores and a score threshold; and a sub-graph second update module, configured to update the multiple initial sub-graphs by adding the multiple related neighbor nodes to the multiple initial sub-graphs respectively.
[0076] In some embodiments, the recommendation result determination module includes: a recommendation score determination module, configured to determine multiple recommendation scores based on one or more sub-graph vectors and multiple node vectors of the multiple object nodes; and a recommendation result selection module, configured to select the recommendation result from the one or more sub-graphs and multiple object nodes based on the multiple recommendation scores.
[0077] Figure 9 A schematic block diagram of an example device 900 suitable for implementing embodiments of the present disclosure is illustrated. As shown, device 900 includes a processor 901 that can perform various appropriate actions and processes based on computer program instructions loaded into random access memory (RAM) 903 according to computer program instructions stored in read-only memory (ROM) 902. Various programs and data required for operation of device 900 may also be stored in RAM 903. The processor 901, ROM 902, and RAM 903 are interconnected via bus 904. Input / output (I / O) interface 905 is also connected to bus 904.
[0078] The various methods and processes described above can be executed by processor 901. For example, in some embodiments, the various methods and processes described above can be implemented as computer software programs tangibly contained in a machine-readable medium. In some embodiments, part or all of the computer program can be loaded and / or installed on device 900 via ROM 902. When the computer program is loaded into RAM 903 and executed by processor 901, one or more actions of the methods and processes described above can be performed.
[0079] This disclosure can be a method, apparatus, system, and / or computer program product. A computer program product may include a computer-readable storage medium having computer-readable program instructions loaded thereon for performing various aspects of this disclosure.
[0080] A computer-readable storage medium can be a tangible device capable of holding and storing instructions for use by an instruction execution device. A computer-readable storage medium can be, for example—but not limited to—an electrical storage device, a magnetic storage device, an optical storage device, an electromagnetic storage device, a semiconductor storage device, or any suitable combination thereof. More specific examples (a non-exhaustive list) of computer-readable storage media include: random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), static random access memory (SRAM), and any suitable combination thereof. The computer-readable storage medium as used herein is not to be construed as a transient signal itself, such as radio waves or other freely propagating electromagnetic waves, electromagnetic waves propagating through waveguides or other transmission media (e.g., light pulses through fiber optic cables), or electrical signals transmitted through wires.
[0081] The computer-readable program instructions described herein can be downloaded from computer-readable storage media to various computing / processing devices, or downloaded via a network, such as the Internet, local area network, wide area network, and / or wireless network, to an external computer or external storage device. The network may include copper transmission cables, fiber optic transmission, wireless transmission, routers, firewalls, switches, gateway computers, and / or edge servers. A network adapter card or network interface in each computing / processing device receives the computer-readable program instructions from the network and forwards them to the computer-readable storage media in the respective computing / processing device.
[0082] Computer program instructions used to perform the operations of this disclosure may be assembly instructions, instruction set architecture (ISA) instructions, machine instructions, machine-dependent instructions, microcode, firmware instructions, status setting data, or source code or object code written in any combination of one or more programming languages, including object-oriented programming languages such as Smalltalk, C++, etc., and conventional procedural programming languages such as the "C" language or similar programming languages. The computer-readable program instructions may execute entirely on the user's computer, partially on the user's computer, as a standalone software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving a remote computer, the remote computer may be connected to the user's computer via any type of network—including a local area network (LAN) or a wide area network (WAN)—or may be connected to an external computer (e.g., via the Internet using an Internet service provider). In some embodiments, electronic circuitry, such as programmable logic circuitry, field-programmable gate arrays (FPGAs), or programmable logic arrays (PLAs), is personalized by utilizing the status information of the computer-readable program instructions to implement various aspects of this disclosure.
[0083] Various aspects of this disclosure are described herein with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of this disclosure. It should be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer-readable program instructions.
[0084] These computer-readable program instructions can be provided to a processing unit of a general-purpose computer, a special-purpose computer, or other programmable data processing apparatus to produce a machine such that, when executed by the processing unit of the computer or other programmable data processing apparatus, they create means for implementing the functions / actions specified in one or more blocks of the flowchart and / or block diagram. These computer-readable program instructions can also be stored in a computer-readable storage medium that causes a computer, programmable data processing apparatus, and / or other device to operate in a particular manner. Thus, the computer-readable medium storing the instructions comprises an article of manufacture that includes instructions for implementing aspects of the functions / actions specified in one or more blocks of the flowchart and / or block diagram.
[0085] Computer-readable program instructions may also be loaded onto a computer, other programmable data processing apparatus, or other device to cause a series of operational steps to be performed on the computer, other programmable data processing apparatus, or other device to produce a computer-implemented process, thereby causing the instructions executed on the computer, other programmable data processing apparatus, or other device to perform the functions / actions specified in one or more boxes of a flowchart and / or block diagram.
[0086] The flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of systems, methods, and computer program products according to various embodiments of the present disclosure. In this regard, each block in a flowchart or block diagram may represent a module, segment, or portion of an instruction containing one or more executable instructions for implementing a specified logical function. In some alternative implementations, the functions marked in the blocks may occur in a different order than those shown in the drawings. For example, two consecutive blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in the block diagrams and / or flowcharts, and combinations of blocks in the block diagrams and / or flowcharts, may be implemented using a dedicated hardware-based system that performs the specified function or action, or using a combination of dedicated hardware and computer instructions.
[0087] The various embodiments of this disclosure have been described above. These descriptions are exemplary and not exhaustive, nor are they limited to the disclosed embodiments. Many modifications and variations will be apparent to those skilled in the art without departing from the scope and spirit of the described embodiments. The terminology used herein is chosen to best explain the principles, practical application, or improvement of the technology in the market, or to enable others skilled in the art to understand the embodiments disclosed herein.
Claims
1. A method for making recommendations, comprising: Obtain a knowledge graph that includes multiple user nodes and multiple object nodes; Based on the knowledge graph, one or more sub-graphs are generated, wherein the sub-graphs include user nodes corresponding to the first user and related object nodes among the plurality of user nodes; as well as Based on the one or more sub-graphies and the multiple object nodes, a recommendation result is determined for the first user.
2. The method according to claim 1, further comprising: Obtain source data for constructing the knowledge graph, the source data including at least user data, object data, and channel data, wherein the channel data represents the channels through which users and objects establish associations; Constructing a graph ontology, wherein the graph ontology is used to define the types of entity nodes in the knowledge graph, including user nodes, object nodes, and channel nodes; and The knowledge graph is constructed based on the source data and the graph ontology.
3. The method of claim 2, wherein the channel includes one or more of the following: platform, content, application, and store.
4. The method according to claim 3, further comprising: Based on the description of the entity node, the initial embedding of the entity node is generated using a pre-trained language model; as well as Based on the initial embedding of the entity node and the information file of the knowledge graph, a graph neural network is used to generate the node embedding of the entity node and the node embedding of the relation node. The node embedding indicates the semantic and structural information of the node in the knowledge graph.
5. The method of claim 1, wherein generating the one or more sub-maps comprises: Determine one or more initial subgraphs, and use the user node corresponding to the first user as the initial node of the one or more initial subgraphs; Determine multiple relevant scores of the user node corresponding to the first user and its multiple neighbor nodes; as well as Based on the multiple relevant scores, update the one or more initial sub-maps.
6. The method of claim 5, wherein determining the plurality of related scores between the user node corresponding to the first user and the plurality of neighboring nodes comprises: Based on the node vectors in the initial sub-graph, a sub-graph vector is generated for the sub-graph. as well as Based on the subgraph vector and the node vectors of the multiple neighboring nodes, the multiple relevant scores are determined using a user interaction model.
7. The method of claim 6, wherein generating the sub-map vector of the sub-map comprises: Obtain the set of triples of the subgraph and the node vector of each node in the subgraph; as well as The subgraph vector is generated based on the set of triples and the node vector of each node in the subgraph.
8. The method according to claim 6, further comprising: Acquire user interaction data, wherein the user interaction data includes at least object data and channel data related to the first user; as well as The user interaction model is generated based on the interaction data.
9. The method of claim 6, wherein updating the plurality of initial sub-maps comprises: Based on the multiple relevant scores and score thresholds, select multiple relevant neighbor nodes from the multiple neighbor nodes; as well as The multiple initial subgraphs are updated by adding the multiple relevant neighbor nodes to the multiple initial subgraphs respectively.
10. The method of claim 1, wherein determining the recommendation result for the first user comprises: Generate sub-map vectors for the one or more sub-maps; Multiple recommendation scores are determined based on one or more sub-graph vectors and multiple node vectors of the multiple object nodes; as well as Based on the multiple recommendation scores, the recommendation result is selected from the one or more sub-graphs and multiple object nodes.
11. The method of claim 10, wherein determining the plurality of recommendation scores includes: Determine the similarity score between the one or more sub-graph vectors and the multiple node vectors of the multiple object nodes; as well as The multiple recommendation scores are determined based on the similarity scores and the weights of the one or more sub-graphs.
12. The method of claim 1, wherein the user node corresponding to the first user among the plurality of user nodes is the initial node of the one or more sub-graphs.
13. The method according to claim 1, further comprising: Determine the interpretation of the recommendation results; The interpretation of the recommendation result includes: the sub-graph related to the recommendation result and the importance score of each node in the sub-graph to the recommendation result.
14. An apparatus for recommendation, comprising: The knowledge graph acquisition module is configured to acquire a knowledge graph that includes multiple user nodes and multiple object nodes. The subgraph generation module is configured to generate one or more subgraphs based on the knowledge graph, wherein the subgraphs include user nodes corresponding to the first user and related object nodes among the plurality of user nodes; as well as The recommendation result determination module is configured to determine the recommendation result for the first user based on the one or more sub-graphes and the multiple object nodes.
15. The apparatus according to claim 14, wherein: The subgraph generation module includes a subgraph reasoning module, which is configured to extract one or more user-associated subgraphs from the knowledge graph; and The recommendation result determination module includes a recommendation result generation module, which is configured to generate the recommendation result and a corresponding sub-graph of the user action path as the recommendation result.
16. The apparatus of claim 14, further comprising: The data source acquisition module is configured to acquire user data, product data, channel data, and content data. The knowledge graph construction module is configured to construct the graph ontology and the knowledge graph. as well as The knowledge graph representation module is configured to learn vector representations of entity nodes and relation nodes in the knowledge graph through a model.
17. An electronic device comprising: At least one processor; as well as A memory coupled to the at least one processor and having instructions stored thereon, which, when executed by the at least one processor, cause the device to perform the method according to any one of claims 1 to 13.
18. A computer program product tangibly stored on a non-transient computer-readable medium and comprising machine-executable instructions for performing the method according to any one of claims 1 to 13.