Recommendation method, device, equipment and computer-readable medium based on knowledge graph
By building a knowledge graph and using a bidirectional recurrent neural network model to extract user preference characteristics, the accuracy and interpretability problems of the recommendation system in cold startup are solved, and more accurate user preference mining and recommendation results are achieved.
Patent Information
- Application Number
- CN202010878404.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2020-08-27
- Publication Date
- 2025-01-14
- Estimated Expiration
- 2040-08-27
AI Technical Summary
The recommendation results of the existing recommendation system are inaccurate and insufficiently interpretable under cold startup, and cannot effectively explore the deep preferences of users, resulting in inaccurate recommendation results.
By obtaining the historical behavior data of the target object, generating the target data set, building a knowledge graph, extracting user preference characteristics, and using the bidirectional recurrent neural network model to determine the propagation path of the preference characteristics in the knowledge graph, superimposing the path nodes to recommend the target product, and enhancing the enhancement Recommended accuracy and interpretability.
The knowledge graph-based method can more accurately tap user preferences, provide multiple relationships, expand user preferences from multiple angles, improve the accuracy and interpretability of recommended results, and solve the problems of cold start and data sparseness.
Smart Images

Figure CN112100513B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of knowledge graph technology, and in particular to a recommendation method, device, equipment and computer-readable medium based on knowledge graph. Background Art
[0002] With the advent of the information age of information explosion, the amount of information people face is growing exponentially. For personalized content recommendation and display platforms such as e-commerce, social platforms, and video media, how to accurately select information that is valuable and interesting to users from massive amounts of information has become a crucial issue. Therefore, building an efficient recommendation system has become an indispensable part of modern Internet application scenarios.
[0003] Knowledge graphs can be used to represent relationships between entities, such as the relationships between items, users, and users in a recommendation system. Using knowledge graphs to construct information between users and items, and between items can be used as external knowledge. Introducing this external knowledge into the recommendation system can partially solve the problems of data sparsity and cold start faced by the recommendation system.
[0004] At present, in the related technologies, recommendation systems mainly include recommendation systems based on collaborative filtering, recommendation systems based on content, hybrid recommendation systems, etc. The collaborative filtering algorithm used by the recommendation system based on collaborative filtering is based on similarity measurement, and the similarity between items or users is considered for recommendation. The content-based recommendation system needs to model user preferences and item characteristics. Compared with collaborative filtering, the content-based recommendation model will consider the characteristics of items when recommending. The collaborative filtering-based method is prone to cold start or data sparsity problems. The content-based recommendation method requires a thorough content analysis and requires the feature content to have a good structure. There is a user cold start problem. Since only products with similar content are recommended, it cannot bring surprises to users. The hybrid recommendation system can use the user and item information in the content-based recommendation system to alleviate this problem of the collaborative filtering algorithm. However, the related technology still has technical problems such as inaccurate recommendation results and poor interpretability in cold start conditions.
[0005] To address the above-mentioned problems, no effective solution has been proposed yet. Summary of the invention
[0006] The present application provides a recommendation method, apparatus, device and computer-readable medium based on a knowledge graph to solve the above-mentioned technical problem of "inaccurate recommendation results".
[0007] According to one aspect of an embodiment of the present application, the present application provides a recommendation method based on a knowledge graph, including: obtaining historical behavior data of a target object, the historical behavior data is generated by the operations of the target object on an Internet platform; using the historical behavior data to generate a target data set, the data in the target data set is used to indicate entities and the associations between entities, and the entities are collected from multiple platforms; using the target data set as sample data, constructing a knowledge graph based on entities and associations; and recommending to the target object a target product determined using the knowledge graph.
[0008] Optionally, before recommending the target product determined by the knowledge graph to the target object, the method also includes determining the target product in the following manner: extracting the preference features of the target object based on the knowledge graph; inputting the preference features of the target object into a bidirectional recurrent neural network model to determine multiple propagation paths of the preference features in the knowledge graph; superimposing each propagation path to determine each node on the propagation path; taking the node through which the most paths pass as the target node; and taking the product entity corresponding to the target node as the target product.
[0009] Optionally, extracting preference features of a target object based on a knowledge graph includes: converting text data into a feature vector, where the target data set includes text data; training the feature vector to obtain a first preference feature and a second preference feature of the target object, where the first preference feature is obtained for an entity directly associated with the target object, and the second preference feature is obtained for an entity indirectly associated with the target object.
[0010] Optionally, before extracting the preference features of the target object based on the knowledge graph, the method also includes processing the knowledge graph in the following manner: embedding the knowledge graph to obtain vector data; extracting multiple first vectors indicating entities in the vector data; calculating the cosine distance between each first vector to obtain the similarity between the first vectors; and using the similarity to determine the common features between entities.
[0011] Optionally, recommending a target product determined using the knowledge graph to a target object also includes: when a transaction record of the target product is queried in historical behavior data within a preset time range, taking the node associated with the target node and passed by the most paths as an associated target node; taking the product entity corresponding to the associated target node as an associated target product; and recommending the associated target product to the target object.
[0012] Optionally, taking the target data set as sample data, constructing a knowledge graph based on entities and association relationships includes: taking each entity as a node in the knowledge graph; extracting feature information of all nodes; constructing an association edge between any two nodes when the same feature information exists between the two nodes; and taking the number of the same feature information of the two nodes as the association strength of the association edge.
[0013] Optionally, generating a target data set using historical behavior data includes: extracting feature data of multiple first entities in the historical behavior data, the first entity being an entity associated with the target object; obtaining reference data matching each feature data, the reference data being used to indicate a second entity having common features with the first entity; and using the historical behavior data and the reference data as the target data set.
[0014] According to another aspect of an embodiment of the present application, the present application provides a recommendation device based on a knowledge graph, including: a data acquisition module, used to acquire historical behavior data of a target object, where the historical behavior data is generated by the operations of the target object on an Internet platform; a data set generation module, used to generate a target data set using the historical behavior data, where the data in the target data set is used to indicate entities and the relationships between entities, and the entities are collected from multiple platforms; a knowledge graph construction module, used to use the target data set as sample data to construct a knowledge graph based on entities and relationships; and a product recommendation module, used to recommend target products determined using the knowledge graph to the target object.
[0015] According to another aspect of an embodiment of the present application, the present application provides a computer device, including a memory and a processor, wherein the memory stores a computer program executable on the processor, and the processor implements the steps of the above method when executing the computer program.
[0016] According to another aspect of an embodiment of the present application, the present application also provides a computer-readable medium having a non-volatile program code executable by a processor, and the program code enables the processor to execute the above method.
[0017] The above technical solution provided by the embodiment of the present application has the following advantages compared with the related art:
[0018] The technical solution of this application is to obtain the historical behavior data of the target object, which is generated by the operations of the target object on the Internet platform; generate a target data set using the historical behavior data, and the data in the target data set is used to indicate entities and the associations between entities, and the entities are collected from multiple platforms; use the target data set as sample data, build a knowledge graph based on entities and associations; and recommend target products determined by the knowledge graph to the target object. This application can mine users' deeper preferences based on the knowledge graph, and can provide multiple types of associations, thereby expanding users' possible preferences from multiple angles, making the recommendation results more accurate and enhancing the interpretability of the recommendation results. BRIEF DESCRIPTION OF THE DRAWINGS
[0019] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present application and, together with the description, serve to explain the principles of the present application.
[0020] In order to more clearly illustrate the technical solutions in the embodiments of the present application or the related technologies, the drawings required for use in the embodiments or the related technical descriptions are briefly introduced below. Obviously, for ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative labor.
[0021] Figure 1 A schematic diagram of a hardware environment for an optional knowledge graph-based recommendation method provided according to an embodiment of the present application;
[0022] Figure 2 A flowchart of an optional knowledge graph-based recommendation method provided according to an embodiment of the present application;
[0023] Figure 3 A flowchart of an optional knowledge graph-based recommendation method provided according to an embodiment of the present application;
[0024] Figure 4 A block diagram of an optional knowledge graph-based recommendation device provided according to an embodiment of the present application. DETAILED DESCRIPTION
[0025] In order to make the purpose, technical solution and advantages of the embodiments of the present application clearer, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of this application.
[0026] In the subsequent description, the suffixes such as "module", "component" or "unit" used to represent elements are only used to facilitate the description of the present application and have no specific meaning. Therefore, "module" and "component" can be used interchangeably.
[0027] First, some nouns or terms that appear in the description of the embodiments of the present application are subject to the following interpretation:
[0028] Knowledge graph is a graph-based data structure consisting of nodes and edges. Each node represents an "entity" and each edge is a "relationship" between entities. Knowledge graph is essentially a semantic network. Entities can refer to things in the real world, such as people, places, companies, telephones, animals, etc.; relationships are used to express a certain connection between different entities.
[0029] In the related technology, the recommendation system mainly includes recommendation systems based on collaborative filtering, recommendation systems based on content, hybrid recommendation systems, etc. The collaborative filtering algorithm used by the recommendation system based on collaborative filtering is based on similarity measurement, and makes recommendations based on the similarity between items or users. The content-based recommendation system needs to model user preferences and item characteristics. Compared with collaborative filtering, the content-based recommendation model will consider the characteristics of items when making recommendations. The collaborative filtering-based method is prone to cold start or data sparsity problems. The content-based recommendation method requires a thorough content analysis and requires the feature content to have a good structure. There is a user cold start problem. Since it only recommends products with similar content, it cannot bring surprises to users. The hybrid recommendation system can use the user and item information in the content-based recommendation system to alleviate this problem of the collaborative filtering algorithm.
[0030] In order to solve the problems mentioned in the background technology, according to one aspect of an embodiment of the present application, an embodiment of a recommendation method based on a knowledge graph is provided.
[0031] Optionally, in the embodiment of the present application, the above-mentioned recommendation method based on knowledge graph can be applied to Figure 1 In the hardware environment composed of the terminal 101 and the server 103 shown in FIG. Figure 1 As shown, the server 103 is connected to the terminal 101 via a network, and can be used to provide services for the terminal or a client installed on the terminal. A database 105 can be set on the server or independently of the server to provide data storage services for the server 103. The above-mentioned network includes but is not limited to: a wide area network, a metropolitan area network or a local area network, and the terminal 101 includes but is not limited to a PC, a mobile phone, a tablet computer, etc.
[0032] In the embodiment of the present application, a recommendation method based on a knowledge graph can be executed by the server 103, or can be executed jointly by the server 103 and the terminal 101, such as Figure 2 As shown, the method may include the following steps:
[0033] Step S202, obtaining historical behavior data of the target object, where the historical behavior data is generated by the operations of the target object on the Internet platform.
[0034] In an embodiment of the present application, the above-mentioned Internet platform may be a social media platform, an e-commerce shopping platform, etc., the above-mentioned target object is a user, and the historical behavior data may be data generated by a series of operations of the user on the social media platform or the e-commerce shopping platform, for example, data generated by operations such as liking advertisements recommended in the circle of friends, browsing products on the e-commerce shopping platform, collecting, deleting, purchasing, returning or exchanging products, purchasing movie tickets, evaluating and scoring movies, etc.
[0035] Step S204, using the historical behavior data to generate a target data set, the data in the target data set is used to indicate entities and the relationship between entities, and the entities are collected from multiple platforms.
[0036] In an embodiment of the present application, when there is only a small amount of historical behavior data for the user, in order to more comprehensively analyze the user's preferences, the small amount of historical behavior data can be used to expand the data and generate a more comprehensive data set to analyze the user's preferences.
[0037] Taking movie recommendation as an example, when the user's movie-watching record is obtained, the movies watched by the user can be used as positive samples, that is, the historical behavior data of the user's movie-watching, and the movies associated with the above-mentioned movies can be found through the starring, director, screenwriter, type and other information of the watched movies, but the movies that the user has not watched can be used as negative samples. The number of negative samples can be collected according to a certain ratio of the positive samples, for example, the positive-negative sample ratio is 1:100. The data set composed of positive samples and negative samples is the target data set. Alternatively, movies that the user has not watched can be randomly collected as negative samples. In the embodiment of the present application, movies, directors, starring actors, screenwriters, movie types, and users can all be used as entities. Users who have watched movies, have not watched movies, and common directors, common starring actors, common screenwriters, and the same movie types between movies can all be used as associations between entities. The above information can be collected from multiple platforms, such as movie information related platforms, character information related platforms, etc.
[0038] Step S206, using the target data set as sample data, constructing a knowledge graph based on entities and association relationships.
[0039] In the embodiment of the present application, the data type format of the knowledge graph can be represented by a triple. Taking the user and the movie as entities and the interaction between the user and the movie as the association relationship, the triple can be represented as (user, interaction behavior, movie). For example, (user A, like, movie B) can represent that the association relationship between the entity user A and the entity movie B is like. User A can be used as the head entity and movie B can be used as the tail entity. According to the association relationship of "like", an association edge can be constructed from the head entity user A to the tail entity movie B. The direction of the association edge is the direction from the head entity to the tail entity.
[0040] By constructing a knowledge graph, we can obtain the association between the user and each movie, and between movies and other movies. Based on this, if there are multiple users, we can analyze the association between users and users, users and movies, and movies and movies in a more fine-grained manner.
[0041] Step S208: recommending the target product determined by using the knowledge graph to the target object.
[0042] In an embodiment of the present application, the user's preference characteristics can be extracted based on the knowledge graph, and products that the user is likely to like can be found in the propagation path in the knowledge graph according to the user's preference characteristics, and then recommended to the user.
[0043] Taking movie recommendations as an example, if we know that users like to watch comedy movies, then in the propagation path of the knowledge graph, it can be propagated to the nodes of other comedy movies with a higher probability, and propagated to other types of movies such as tragedy with a lower probability.
[0044] In the field of recommendation systems, people often focus on the connection between users and items, but lack consideration of the connections between users, items, etc. The recommendation system based on knowledge graphs connects users, users and items, and items and items, and enhances the semantic information of the data to further improve the accuracy of recommendations, which has important research significance and practical value.
[0045] By adopting the technical solution of the present application, it is possible to mine users' deeper preferences based on the knowledge graph, provide multiple types of association relationships, and further expand users' possible preferences from multiple angles, making the recommendation results more accurate and enhancing the interpretability of the recommendation results.
[0046] This application provides a method for determining a target product to recommend to a target user through a knowledge graph, such as Figure 3 As shown below, combined Figure 2 The steps shown are explained in detail.
[0047] Optionally, before step S208 recommends the target product determined by using the knowledge graph to the target object, the method further includes determining the target product in the following manner:
[0048] Step S302: extracting preference features of the target object based on the knowledge graph.
[0049] In the embodiments of the present application, the user's preference characteristics can be extracted by extracting the entities and associations in the knowledge graph, and the user's preference characteristics can also be obtained by embedding and training the data in the target data set.
[0050] Optionally, extracting the preference features of the target object based on the knowledge graph may include the following steps:
[0051] Step 1, converting text data into feature vectors, the target data set includes text data;
[0052] Step 2, training the feature vector to obtain the first preference feature and the second preference feature of the target object, the first preference feature is obtained from the entity directly associated with the target object, and the second preference feature is obtained from the entity indirectly associated with the target object.
[0053] In an embodiment of the present application, the data in the above-mentioned target data set may include text data. Taking movie-related recommendations as an example, the text data may be the name of the movie, the director, the name of the leading actor, etc. The above-mentioned first preference feature may refer to the user's display preference, which indicates the user preference feature that can be directly determined through the information and data filled in by the user. The above-mentioned second preference feature may refer to the user's implicit preference, which indicates the user preference feature that can be obtained by analyzing the user's operation information on various platforms. Since the user's interests may change over time, the closer the historical behavior data is to the current time, the more accurate the user's preference features obtained through training, and thus the recommendation results will be more accurate when making recommendations.
[0054] By adopting the technical solution of the present application, it is possible to mine users' deeper preferences based on the knowledge graph, making the recommendation results more accurate.
[0055] Optionally, before extracting the preference features of the target object based on the knowledge graph, the method further includes processing the knowledge graph in the following manner:
[0056] Step 1: embed the knowledge graph to obtain vector data;
[0057] Step 2, extracting a plurality of first vectors indicating entities from the vector data;
[0058] Step 3, calculating the cosine distance between each pair of first vectors to obtain the similarity between the first vectors;
[0059] Step 4: Use similarity to determine the common features between entities.
[0060] In an embodiment of the present application, vectors corresponding to the required entities can be obtained through entity extraction, and the extracted entities can be classified through entity alignment. For example, the similarity between vectors can be calculated by calculating the cosine distance between the vectors, and entity alignment can be performed based on the similarity between the vectors. The same entities can be fused, thereby improving the accuracy of extracting user preference features and modeling the propagation paths of preference features.
[0061] In the embodiment of the present application, the above-mentioned text data is converted into feature vectors and knowledge graph embeddings, which can adopt onehot-embedding, label embedding, word embedding and the like.
[0062] Step S304: input the preference features of the target object into the bidirectional recurrent neural network model to determine multiple propagation paths of the preference features in the knowledge graph.
[0063] In an embodiment of the present application, a bidirectional recurrent neural network model can be used to model the association paths (propagation paths) of user preference characteristics in the knowledge graph, because of its characteristics of both long and short-term memory and fast convergence speed.
[0064] Optionally, a bidirectional long short-term memory neural network model may also be used.
[0065] Step S306: superimpose each propagation path to determine each node on the propagation path.
[0066] Step S308: taking the node through which most paths pass as the target node.
[0067] Step S310: taking the product entity corresponding to the target node as the target product.
[0068] In the embodiment of the present application, the nodes through which the propagation path of the preference feature passes have the same features, indicating that the user has a higher probability of liking these movies. For example, it is obtained that the user likes Movie C and Movie D, and Movie C and Movie D have the same director and starring actors, then Movie E with the same director and starring actors may have two paths passing through, and Movie F not only has the same director and starring actors, but also has the same movie type (subject matter) as Movie C and / or Movie D, then Movie F may have three paths passing through, thereby determining that the probability of the user liking Movie F is greater than the probability of liking Movie E, so Movie F can be determined as a recommended movie (target product). Movie E and Movie F can also be recommended to the user at the same time, so that the user's choices can be diversified.
[0069] In an embodiment of the present application, information about users browsing travel, mountaineering, etc. can be collected on a social media platform, and then travel supplies and mountaineering equipment can be found on an e-commerce shopping platform and recommended to the users, thereby achieving cross-platform and cross-field recommendations.
[0070] Optionally, recommending a target product determined by using a knowledge graph to a target object may further include the following steps:
[0071] Step 1: When the transaction record of the target product is found in the historical behavior data within a preset time range, the node associated with the target node and passed by the most paths is used as the associated target node;
[0072] Step 2: Use the product entity corresponding to the associated target node as the associated target product;
[0073] Step 3: Recommend related target products to the target object.
[0074] In the embodiment of the present application, it is also possible to avoid recommending products that the user has already purchased to the user, and instead recommend related products of the products that the user has already purchased to the user, thereby achieving scenario-based recommendations. For example, if the user's historical behavior data shows that the user has recently purchased a mobile phone, the user should not be recommended to purchase the mobile phone, but mobile phone accessories that match the mobile phone purchased by the user, such as mobile phone cases, tempered glass films, etc., can be recommended to the user.
[0075] Optionally, taking the target data set as sample data, constructing a knowledge graph based on entities and association relationships may include the following steps:
[0076] Step 1: Treat each entity as a node in the knowledge graph;
[0077] Step 2, extract feature information of all nodes;
[0078] Step 3: When any two nodes have the same feature information, a correlation edge is constructed between the two nodes;
[0079] Step 4: The number of identical feature information of the two nodes is used as the correlation strength of the correlation edge.
[0080] In an embodiment of the present application, according to the data structure of the knowledge graph, entities such as movies, directors, leading actors, subject types, and users can be used as nodes that constitute the knowledge graph, and the association edges between the nodes can be constructed according to the association relationship between them. The association strength can be used to calculate the probability that the user's preference characteristics will choose this path when propagating. When the user's preference characteristics are consistent or similar to the association relationship, the greater the association strength, the greater the probability of choosing this path for propagation, and vice versa. When the user's preference characteristics are different from or even opposite to the association relationship, the greater the association strength, the smaller the probability of choosing this path for propagation, and vice versa.
[0081] Optionally, generating a target data set using historical behavior data may include the following steps:
[0082] Step 1, extracting feature data of multiple first entities in the historical behavior data, where the first entity is an entity associated with the target object;
[0083] Step 2, obtaining reference data matching each feature data, the reference data being used to indicate a second entity having a common feature with the first entity;
[0084] Step 3: Use historical behavior data and reference data as target data sets.
[0085] In the embodiment of the present application, the problem of insufficient data volume and data sparsity in the cold start scenario can also be avoided. Taking movie recommendation as an example, when the user's viewing record is obtained, the movie watched by the user can be used as a positive sample, that is, the historical behavior data of the user's viewing, and the movie associated with the above-mentioned watched movie can be found through the information such as the starring actor, director, screenwriter, and type of the watched movie, but the movie that the user has not watched is used as a negative sample, and the number of negative samples can be collected according to a certain ratio of the positive sample, for example, the positive and negative sample ratio is 1:100. The data set composed of positive samples and negative samples is the target data set. Alternatively, movies that the user has not watched can be randomly collected as negative samples. In the embodiment of the present application, movies, directors, starring actors, screenwriters, movie types, and users can all be used as entities, and users who have watched movies, have not watched movies, and common directors, common starring actors, common screenwriters, and the same movie types between movies can all be used as associations between entities. The above information can be collected from multiple platforms, such as movie information related platforms, character information related platforms, etc.
[0086] Optionally, the recommendation method based on knowledge graph provided by the present application can also be applied to travel recommendations. A user profile can be constructed based on registration information to calculate the user's interest and confidence, and then recommendations can be made for the user based on interaction behavior combined with interest and confidence. Finally, the recommendation list can be updated in real time in combination with the positioning system, that is, the recommended content can be displayed in a map-based manner.
[0087] Optionally, the recommendation method based on knowledge graph provided in this application can also be applied to job recommendation. The recommendation method based on knowledge graph generates job recommendations for job seekers based on their own circumstances, so that users can quickly locate their desired positions and help users save time.
[0088] The technical solution of this application is to obtain the historical behavior data of the target object, which is generated by the operations of the target object on the Internet platform; generate a target data set using the historical behavior data, and the data in the target data set is used to indicate entities and the associations between entities, and the entities are collected from multiple platforms; use the target data set as sample data, build a knowledge graph based on entities and associations; and recommend target products determined by the knowledge graph to the target object. This application can mine users' deeper preferences based on the knowledge graph, and can provide multiple types of associations, thereby expanding users' possible preferences from multiple angles, making the recommendation results more accurate and enhancing the interpretability of the recommendation results.
[0089] According to another aspect of the embodiment of the present application, Figure 4As shown, a recommendation device based on a knowledge graph is provided, including: a data acquisition module 401, used to acquire historical behavior data of a target object, where the historical behavior data is generated by the target object's operations on an Internet platform; a data set generation module 403, used to generate a target data set using the historical behavior data, where the data in the target data set is used to indicate entities and the relationships between entities, and the entities are collected from multiple platforms; a knowledge graph construction module 405, used to construct a knowledge graph based on entities and relationships using the target data set as sample data; and a product recommendation module 407, used to recommend target products determined using the knowledge graph to the target object.
[0090] It should be noted that the data acquisition module 401 in this embodiment can be used to execute step S202 in the embodiment of the present application, the data set generation module 403 in this embodiment can be used to execute step S204 in the embodiment of the present application, the knowledge graph construction module 405 in this embodiment can be used to execute step S206 in the embodiment of the present application, and the product recommendation module 407 in this embodiment can be used to execute step S208 in the embodiment of the present application.
[0091] It should be noted that the examples and application scenarios implemented by the above modules and corresponding steps are the same, but are not limited to the contents disclosed in the above embodiments. It should be noted that the above modules as part of the device can be run in Figure 1 In the hardware environment shown, it can be implemented by software or by hardware.
[0092] Optionally, the knowledge graph-based recommendation device also includes: a first extraction module, used to extract preference features of the target object based on the knowledge graph; a propagation path determination module, used to input the preference features of the target object into a bidirectional recurrent neural network model to determine multiple propagation paths of the preference features in the knowledge graph; a path superposition module, used to superimpose each propagation path to determine each node on the propagation path; a node determination module, used to take the node through which the most paths pass as the target node; and a product determination module, used to take the product entity corresponding to the target node as the target product.
[0093] Optionally, the knowledge graph-based recommendation device also includes: a first embedding module, used to convert text data into a feature vector, the target data set includes text data; a feature training module, used to train the feature vector to obtain a first preference feature and a second preference feature of the target object, the first preference feature is obtained for an entity directly associated with the target object, and the second preference feature is obtained for an entity indirectly associated with the target object.
[0094] Optionally, the knowledge graph-based recommendation device also includes: a second embedding module, used to embed the knowledge graph to obtain vector data; an entity extraction module, used to extract multiple first vectors indicating entities in the vector data; a similarity calculation module, used to calculate the cosine distance between each first vector to obtain the similarity between the first vectors; and a feature determination module, used to use the similarity to determine the common features between entities.
[0095] Optionally, the recommendation device based on the knowledge graph also includes: an associated node determination module, which is used to, when the transaction record of the target product is queried in the historical behavior data within a preset time range, use the node associated with the target node and passed by the most paths as the associated target node; an associated product determination module, which is used to use the product entity corresponding to the associated target node as the associated target product; and an associated product recommendation module, which is used to recommend associated target products to the target object.
[0096] Optionally, the knowledge graph construction module is also used to: treat each entity as a node in the knowledge graph; extract feature information of all nodes; construct an association edge between any two nodes when the same feature information exists between the two nodes; and use the number of the same feature information of the two nodes as the association strength of the association edge.
[0097] Optionally, the data set generation module is also used to: extract feature data of multiple first entities in the historical behavior data, the first entity is an entity associated with the target object; obtain reference data matching each feature data, the reference data is used to indicate a second entity having common features with the first entity; and use the historical behavior data and the reference data as the target data set.
[0098] According to another aspect of the embodiments of the present application, a computer device is provided, including a memory and a processor, wherein the memory stores a computer program that can be run on the processor, and the above steps are implemented when the processor executes the computer program.
[0099] The memory and processor in the above-mentioned computer device communicate through a communication bus and a communication interface. The communication bus can be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus, etc. The communication bus can be divided into an address bus, a data bus, a control bus, etc.
[0100] The memory may include a random access memory (RAM) or a non-volatile memory, such as at least one disk memory. Optionally, the memory may also be at least one storage device located away from the aforementioned processor.
[0101] The above-mentioned processor can be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc.; it can also be a digital signal processor (DSP), an application specific integrated circuit (ASIC), a field programmable gate array (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components.
[0102] According to another aspect of the embodiments of the present application, a computer-readable medium having a non-volatile program code executable by a processor is provided.
[0103] Optionally, in an embodiment of the present application, the computer-readable medium is configured to store program codes for the processor to perform the following steps:
[0104] Obtain the historical behavior data of the target object, which is generated by the target object's operations on the Internet platform;
[0105] Generate a target data set using historical behavior data. The data in the target data set is used to indicate entities and the relationships between entities. The entities are collected from multiple platforms.
[0106] Using the target dataset as sample data, a knowledge graph is constructed based on entities and relationships;
[0107] The target product determined by using the knowledge graph is recommended to the target object.
[0108] Optionally, the specific examples in this embodiment may refer to the examples described in the above embodiments, and this embodiment will not be described in detail here.
[0109] When the embodiments of the present application are specifically implemented, reference may be made to the above-mentioned embodiments, which have corresponding technical effects.
[0110] It is understood that the embodiments described herein may be implemented in hardware, software, firmware, middleware, microcode, or a combination thereof. For hardware implementation, the processing unit may be implemented in one or more application specific integrated circuits (ASIC), digital signal processors (DSP), digital signal processing devices (DSPD), programmable logic devices (PLD), field programmable gate arrays (FPGA), general purpose processors, controllers, microcontrollers, microprocessors, other electronic units for performing the functions described in the present application, or a combination thereof.
[0111] For software implementation, the technology described herein can be implemented by a unit that performs the functions described herein. The software code can be stored in a memory and executed by a processor. The memory can be implemented in the processor or outside the processor.
[0112] Those of ordinary skill in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.
[0113] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the systems, devices and units described above can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.
[0114] In the embodiments provided in the present application, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of the modules is only a logical function division. There may be other division methods in actual implementation, such as multiple modules 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 an indirect coupling or communication connection through some interfaces, devices or units, which can be electrical, mechanical or other forms.
[0115] 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.
[0116] 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.
[0117] If the function 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 storage medium. Based on such an understanding, the technical solution of the embodiment of the present application is essentially or the part that contributes to the prior art or the part of the technical solution can be embodied in the form of a software product, which is stored in a storage medium, including several instructions to make a computer device (which can be a personal computer, a server, or a network device, etc.) perform all or part of the steps of the method described in each embodiment of the present application. The aforementioned storage medium includes: various media that can store program codes, such as a USB flash drive, a mobile hard disk, a ROM, a RAM, a magnetic disk or an optical disk. It should be noted that, in this article, relational terms such as "first" and "second" are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply that there is any such actual relationship or order between these entities or operations. Moreover, the term "include", "include" or any other variant thereof is intended to cover non-exclusive inclusion, so that the process, method, article or device including a series of elements includes not only those elements, but also includes other elements that are not explicitly listed, or also includes elements inherent to such a process, method, article or device. Without more constraints, an element defined by the phrase "comprising a..." does not exclude the existence of other identical elements in the process, method, article or apparatus comprising the element.
[0118] The above description is only a specific implementation of the present application, so that those skilled in the art can understand or implement the present application. Various modifications to these embodiments will be apparent to those skilled in the art, and the general principles defined herein can be implemented in other embodiments without departing from the spirit or scope of the present application. Therefore, the present application will not be limited to the embodiments shown herein, but will conform to the widest range consistent with the principles and novel features applied for herein.
Claims
1. A recommendation method based on knowledge graph, characterized in that: include: Acquire historical behavior data of the target object, wherein the historical behavior data is generated by the operations of the target object on the Internet platform; Generate a target data set using the historical behavior data, wherein the data in the target data set is used to indicate entities and associations between the entities, and the entities are collected from multiple platforms; Taking the target data set as sample data, constructing a knowledge graph according to the entities and the association relationships; Recommending a target product determined by using the knowledge graph to the target object; Before recommending the target product determined by the knowledge graph to the target object, the method also includes determining the target product in the following manner: extracting the preference features of the target object based on the knowledge graph; inputting the preference features of the target object into a bidirectional recurrent neural network model to determine multiple propagation paths of the preference features in the knowledge graph; superimposing each of the propagation paths to determine each node on the propagation path; taking the node through which the most paths pass as the target node; and taking the product entity corresponding to the target node as the target product.
2. The method according to claim 1, characterized in that Extracting the preference features of the target object based on the knowledge graph includes: Converting text data into a feature vector, wherein the target data set includes the text data; The feature vector is trained to obtain a first preference feature and a second preference feature of the target object, wherein the first preference feature is obtained from an entity directly associated with the target object, and the second preference feature is obtained from an entity indirectly associated with the target object.
3. The method according to claim 2, characterized in that Before extracting the preference features of the target object based on the knowledge graph, the method further includes processing the knowledge graph in the following manner: Embedding the knowledge graph to obtain vector data; Extracting a plurality of first vectors indicating entities from the vector data; Calculate the cosine distance between each of the first vectors to obtain the similarity between the first vectors; The similarities are used to determine common features between the entities.
4. The method according to claim 1, characterized in that: Recommending the target product determined by using the knowledge graph to the target object also includes: When the transaction record of the target product is found in the historical behavior data within a preset time range, the node associated with the target node and through which the most paths pass is used as the associated target node; Taking the product entity corresponding to the associated target node as the associated target product; The associated target product is recommended to the target object.
5. The method according to claim 1, characterized in that Taking the target data set as sample data, constructing a knowledge graph according to the entities and the association relationships includes: Taking each of the entities as a node in the knowledge graph; Extract feature information of all nodes; When any two nodes have the same feature information, construct an associated edge between the two nodes; The number of the same feature information of the two nodes is used as the association strength of the association edge.
6. The method according to any one of claims 1 to 5, characterized in that: Generating a target data set using the historical behavior data includes: Extracting feature data of a plurality of first entities from the historical behavior data, wherein the first entities are entities associated with the target object; Acquire reference data matching each of the feature data, wherein the reference data is used to indicate a second entity having a common feature with the first entity; The historical behavior data and the reference data are used as the target data set.
7. A recommendation device based on knowledge graph, characterized in that: include: A data acquisition module, used to acquire historical behavior data of a target object, wherein the historical behavior data is generated by operations of the target object on an Internet platform; A data set generation module, used to generate a target data set using the historical behavior data, wherein the data in the target data set is used to indicate entities and associations between the entities, and the entities are collected from multiple platforms; A knowledge graph construction module, used to construct a knowledge graph based on the entities and the association relationships using the target data set as sample data; A product recommendation module, used to recommend a target product determined by using the knowledge graph to the target object; The first extraction module is used to extract the preference features of the target object based on the knowledge graph; A propagation path determination module is used to input the preference features of the target object into a bidirectional recurrent neural network model to determine multiple propagation paths of the preference features in the knowledge graph; A path superposition module is used to superimpose various propagation paths to determine various nodes on the propagation paths; A node determination module is used to take the node that most paths pass through as the target node; The product determination module is used to take the product entity corresponding to the target node as the target product.
8. A computer device comprising a memory and a processor, wherein the memory stores a computer program that can be run on the processor, characterized in that: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 6 are implemented.
9. A computer-readable medium having a non-volatile program code executable by a processor, characterized in that: The program code enables the processor to execute the method according to any one of claims 1 to 6.
Citation Information
Patent Citations
Online shopping mall commodity recommendation method based on knowledge graph
CN111507796A