CN117688251A - Commodity retrieval method and system based on knowledge graph - Google Patents

Commodity retrieval method and system based on knowledge graph Download PDF

Info

Publication number
CN117688251A
CN117688251A CN202410155628.2A CN202410155628A CN117688251A CN 117688251 A CN117688251 A CN 117688251A CN 202410155628 A CN202410155628 A CN 202410155628A CN 117688251 A CN117688251 A CN 117688251A
Authority
CN
China
Prior art keywords
commodity
nodes
node
knowledge graph
recommendation
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN202410155628.2A
Other languages
Chinese (zh)
Other versions
CN117688251B (en
Inventor
文建平
陈欣
韩昱
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Aowei Cloud Network Big Data Technology Co ltd
Original Assignee
Beijing Aowei Cloud Network Big Data Technology Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Aowei Cloud Network Big Data Technology Co ltd filed Critical Beijing Aowei Cloud Network Big Data Technology Co ltd
Priority to CN202410155628.2A priority Critical patent/CN117688251B/en
Publication of CN117688251A publication Critical patent/CN117688251A/en
Application granted granted Critical
Publication of CN117688251B publication Critical patent/CN117688251B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02PCLIMATE CHANGE MITIGATION TECHNOLOGIES IN THE PRODUCTION OR PROCESSING OF GOODS
    • Y02P90/00Enabling technologies with a potential contribution to greenhouse gas [GHG] emissions mitigation
    • Y02P90/30Computing systems specially adapted for manufacturing

Landscapes

  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The application provides a commodity retrieval method and system based on a knowledge graph. Wherein, establishing a commodity knowledge graph; calculating commodity association values among a plurality of commodity nodes; searching commodity nodes matched with commodity information in a commodity knowledge graph to determine a first recommendation candidate set; extracting interest labels of users; according to the interest labels of the users, commodity nodes related to the interest labels are searched in the commodity knowledge graph to determine a second recommendation candidate set; and screening out target commodities from a recommendation candidate set formed by the first recommendation candidate set and the second recommendation candidate set, and recommending the target commodities to a user. The technical scheme provided by the embodiment of the application can improve the accuracy and individuation degree of commodity retrieval.

Description

Commodity retrieval method and system based on knowledge graph
Technical Field
The embodiment of the application relates to the technical field of commodity retrieval, in particular to a commodity retrieval method and system based on a knowledge graph.
Background
The commodity retrieval refers to searching and returning commodity results related to the requirements in a commodity library according to the requirements of users. The method is a process of matching the demands of users with commodity information, and aims to help users to quickly find commodities meeting the demands. In the commodity retrieval, the user can express the demands thereof by inputting keywords, describing commodity characteristics, selecting commodity attributes and the like. The retrieval system screens out the goods which are matched with the goods from the goods library according to the information provided by the user, and presents the goods to the user according to a certain ordering rule.
Currently, a conventional commodity search scheme includes a recommendation system for keyword-based search. However, keyword-based retrieval mainly relies on keywords input by users for matching, but is easily affected by diversity of word expressions and semantic ambiguity, resulting in low accuracy.
Disclosure of Invention
The embodiment of the application provides a commodity retrieval method and system based on a knowledge graph, which are used for solving the problem of poor accuracy of commodity retrieval results in the prior art.
In a first aspect, an embodiment of the present application provides a method for retrieving a commodity based on a knowledge graph, including:
establishing a commodity knowledge graph according to the acquired multiple commodities and the attributes corresponding to each commodity, taking the multiple commodities as commodity nodes in the commodity knowledge graph, wherein the commodity nodes comprise the commodities and the attributes corresponding to the commodities, and taking the relationship between the attributes corresponding to the multiple commodities as a relationship edge in the commodity knowledge graph;
calculating commodity correlation values among the commodity nodes in the commodity knowledge graph by using a preset calculation formula of commodity correlation values;
acquiring commodity information input by a user, searching commodity nodes matched with the commodity information in the commodity knowledge graph, acquiring commodity nodes associated with the commodity nodes based on commodity association degree values among the commodity nodes, and taking the commodity nodes, the commodity nodes associated with the commodity nodes and commodity nodes adjacent to the commodity nodes as a first recommendation candidate set;
Based on commodity information input by the user or analyzing user behavior data of the user, extracting interest tags of the user;
according to the interest labels of the users, commodity nodes related to the interest labels are found in the commodity knowledge graph, commodity nodes related to the commodity nodes are obtained based on commodity association degree values among the commodity nodes, and the commodity nodes, the commodity nodes related to the commodity nodes and commodity nodes adjacent to the commodity nodes are used as a second recommendation candidate set;
and screening target commodities from a recommendation candidate set formed by the first recommendation candidate set and the second recommendation candidate set through a preset recommendation algorithm, and recommending the target commodities to a user.
Optionally, the acquiring the commodity information input by the user, finding out a commodity node matched with the commodity information in the commodity knowledge graph, and acquiring the commodity node associated with the commodity node based on the commodity association degree value among the commodity nodes, and taking the commodity node, the commodity node associated with the commodity node, and the commodity node adjacent to the commodity node as a first recommendation candidate set, which includes:
Acquiring commodity information input by a user, and extracting commodity characteristics from the commodity information;
in the commodity knowledge graph, matching the commodity characteristics with attributes corresponding to a plurality of commodity nodes to determine the attributes matched with the commodity characteristics, and taking the commodity nodes corresponding to the attributes as commodity nodes matched with the commodity information; the matching method of the commodity characteristics and the attributes corresponding to the commodity nodes at least comprises the following steps: keyword matching and text similarity matching;
acquiring commodity nodes associated with the commodity nodes based on commodity association values among the commodity nodes;
in the commodity knowledge graph, commodity nodes adjacent to the commodity nodes are found out based on the relation edges;
and taking the commodity node, the commodity node associated with the commodity node and the commodity node adjacent to the commodity node as a first recommendation candidate set.
Optionally, the searching for the commodity node related to the interest label in the commodity knowledge graph according to the interest label of the user, and acquiring the commodity node associated with the commodity node based on the commodity association value between the plurality of commodity nodes, and taking the commodity node, the commodity node associated with the commodity node, and the commodity node adjacent to the commodity node as a second recommendation candidate set includes:
In the commodity knowledge graph, matching the interest labels with attributes corresponding to a plurality of commodity nodes to determine the attributes matched with the interest labels, and taking the commodity nodes corresponding to the attributes as commodity nodes matched with the interest labels; the method for matching the interest tag with the attributes corresponding to the commodity nodes at least comprises the following steps: keyword matching and text similarity matching;
acquiring commodity nodes associated with the commodity nodes based on commodity association values among the commodity nodes;
in the commodity knowledge graph, commodity nodes adjacent to the commodity nodes are found out based on the relation edges;
and taking the commodity node, the commodity node associated with the commodity node and the commodity node adjacent to the commodity node as a second recommendation candidate set.
Optionally, the calculating, using a preset calculation formula of the commodity correlation value, the commodity correlation value between the plurality of commodity nodes in the commodity knowledge graph includes:
through a preset calculation formula of a first intermediate association parameter:
calculating a first intermediate association parameter among the commodity nodes in the commodity knowledge graph, wherein the first intermediate association parameter is used for measuring the association degree among the commodity nodes;
Wherein,the importance level expressed as commodity node i; d is represented as a damping factor, a constant between 0 and 1; />Represented as being from commodity node->Weights to commodity node i, +.>;/>Represented as being from commodity node->The number of relationship edges for departure; />Represented as importance of commodity node j, +.>Contribution degree +.>Sum (S)/(S)>Expressed as a first intermediate association parameter between commodity node i and commodity node j, +.>Represented as weights from commodity node j to commodity node i;
and (3) through a preset calculation formula of a second intermediate parameter:calculating the historical click rate of the commodity node i;
wherein,historical click quantity expressed as commodity node, +.>Property denoted as commodity node j, +.>Represented as weights from commodity node j to commodity node i;
and (3) through a preset calculation formula of a third intermediate parameter:calculating the attribute of the commodity node i;
wherein,property denoted as commodity node i, +.>Represented as a historical click rate for commodity node j,represented as weights from commodity node i to commodity node j;
through a predefined relevance score vector, a calculation formula of a preset commodity relevance value is utilized: In the followingCalculating commodity association values among the commodity nodes according to the commodity knowledge graph;
wherein,the commodity correlation value is expressed as a commodity correlation value between a commodity node i and a commodity node j; />Expressed as damping factor; />The importance level expressed as commodity node i; />Historical click quantity expressed as commodity node i, +.>Represented as attributes of commodity node i.
Optionally, the screening, by a preset recommendation algorithm, the target commodity from a recommendation candidate set formed by the first recommendation candidate set and the second recommendation candidate set includes:
through a preset recommendation algorithm: recommendation score = a interest tag weight + β commodity correlation value, calculating a recommendation score for each candidate recommended commodity from the first and second recommendation candidate sets; wherein, alpha is a trade-off factor of the interest tag for balancing the importance of the interest tag, and beta is a trade-off factor of the commodity relevance value for balancing the importance of the commodity relevance value;
and screening target commodities from a recommendation candidate set formed by the first recommendation candidate set and the second recommendation candidate set based on the recommendation score of each candidate recommendation commodity.
Optionally, before the target commodity is screened out from the recommendation candidate set consisting of the first recommendation candidate set and the second recommendation candidate set by a preset recommendation algorithm, the method further includes:
calculating the weight of the interest tag according to the interest tag of the user;
the calculating the interest tag weight according to the interest tag of the user comprises the following steps:
extracting text information from user behavior data of the user, and taking a plurality of text information as a corpus;
word segmentation processing is carried out on each text message so as to split each text message into independent words;
calculating the occurrence frequency of each word in corresponding text information and the inverse document frequency of the corpus aiming at each word;
according to the occurrence frequency of the words in the corresponding text information and the inverse document frequency of the corpus, calculating the weight of the words;
and determining words contained in the interest labels of the users, and calculating the weight of the interest labels according to the weights of the contained words.
Optionally, calculating, for each of the terms, an inverse document frequency of each of the terms at the corpus, including:
Through a first preset formula:calculating the inverse document frequency of each word in the corpus;
where N represents the total number of text information in the corpus,a quantity of text information represented as containing the word t; />Expressed as the maximum frequency of occurrence of the word t in the corpus; />Expressed as the frequency of occurrence of the word t in the corresponding text information; />A length expressed as text information;
the calculating the weight of the word according to the occurrence frequency of the word in the corresponding text information and the inverse document frequency of the corpus comprises the following steps:
through a second preset formula:calculating the weight of the words;
wherein,weights expressed as words t ++>Expressed as the word frequency of the term t in the corresponding document information, determined by calculating the number of occurrences of the term t in the corresponding document information divided by the total number of words of the document,/>Expressed as an average word frequency of words in the whole corpus; />Expressed as the length of the text message, < >>Expressed as the average text length of a plurality of text messages, k is expressed as a positive number for smoothing TF values.
In a second aspect, an embodiment of the present application provides a commodity retrieval system based on a knowledge graph, including:
The building module is used for building a commodity knowledge graph according to the acquired multiple commodities and the attributes corresponding to each commodity, taking the multiple commodities as commodity nodes in the commodity knowledge graph, wherein the commodity nodes comprise the commodities and the attributes corresponding to the commodities, and taking the relationship among the attributes corresponding to the multiple commodities as a relationship edge in the commodity knowledge graph;
the calculation module is used for calculating commodity correlation values among the commodity nodes in the commodity knowledge graph by utilizing a preset calculation formula of commodity correlation values;
the processing module is used for acquiring commodity information input by a user, searching commodity nodes matched with the commodity information in the commodity knowledge graph, acquiring commodity nodes associated with the commodity nodes based on commodity association values among the commodity nodes, and taking the commodity nodes, the commodity nodes associated with the commodity nodes and commodity nodes adjacent to the commodity nodes as a first recommendation candidate set;
the extraction module is used for extracting the interest tag of the user based on commodity information input by the user or analyzing the user behavior data of the user;
The processing module is further configured to find out a commodity node related to the interest tag in the commodity knowledge graph according to the interest tag of the user, obtain a commodity node associated with the commodity node based on a commodity association value between the plurality of commodity nodes, and use the commodity node, the commodity node associated with the commodity node, and a commodity node adjacent to the commodity node as a second recommendation candidate set;
and the screening module is used for screening out target commodities from a recommendation candidate set formed by the first recommendation candidate set and the second recommendation candidate set through a preset recommendation algorithm, and recommending the target commodities to a user.
In a third aspect, embodiments of the present application provide a computing device comprising a processing component and a storage component; the storage component stores one or more computer instructions; the one or more computer instructions are configured to be invoked and executed by the processing component to implement the knowledge-graph-based commodity retrieval method according to the first aspect.
In a fourth aspect, an embodiment of the present application provides a computer storage medium, where a computer program is stored, where the computer program is executed by a computer to implement the method for retrieving a commodity based on a knowledge graph according to the first aspect.
In the embodiment of the application, a commodity knowledge graph is established according to a plurality of acquired commodities and the attribute corresponding to each commodity, the commodities are used as commodity nodes in the commodity knowledge graph, the commodity nodes comprise the commodities and the attribute corresponding to the commodities, and the relationship among the attributes corresponding to the commodities is used as a relationship edge in the commodity knowledge graph; calculating commodity correlation values among the commodity nodes in the commodity knowledge graph by using a preset calculation formula of commodity correlation values; acquiring commodity information input by a user, searching commodity nodes matched with the commodity information in the commodity knowledge graph, acquiring commodity nodes associated with the commodity nodes based on commodity association degree values among the commodity nodes, and taking the commodity nodes, the commodity nodes associated with the commodity nodes and commodity nodes adjacent to the commodity nodes as a first recommendation candidate set; based on commodity information input by the user or analyzing user behavior data of the user, extracting interest tags of the user; according to the interest labels of the users, commodity nodes related to the interest labels are found in the commodity knowledge graph, commodity nodes related to the commodity nodes are obtained based on commodity association degree values among the commodity nodes, and the commodity nodes, the commodity nodes related to the commodity nodes and commodity nodes adjacent to the commodity nodes are used as a second recommendation candidate set; and screening target commodities from a recommendation candidate set formed by the first recommendation candidate set and the second recommendation candidate set through a preset recommendation algorithm, and recommending the target commodities to a user.
The technical scheme of the embodiment of the application has the following beneficial effects:
the accuracy of commodity retrieval is improved: by establishing the commodity knowledge graph and expressing the commodity, the attribute thereof and the relation between the attributes as nodes and edges, the characteristics and the association of the commodity can be more comprehensively and accurately described. By calculating the relevance value between commodity nodes, the relevance between commodities can be quantified, so that the accuracy of commodity retrieval is improved.
Personalized recommendation: and searching commodity nodes related to the commodity knowledge graph based on commodity information and interest labels of the user, and calculating a relevance value of the commodity nodes. By using the related commodity nodes and the adjacent commodity nodes as recommendation candidate sets, personalized commodity recommendation can be provided for the user, and personalized requirements of the user are met.
Comprehensively considering commodity association degree and user interests: the method combines the commodity association value with the interest label of the user, and comprehensively considers the association between commodities and the interest of the user. Target commodities are screened from the candidate set through a preset recommendation algorithm, and requirements and interests of users can be matched better.
And the user experience is improved: by the commodity retrieval method based on the knowledge graph, more accurate and personalized commodity recommendation can be provided, so that shopping experience of a user is improved. The user can more quickly find the commodity meeting the own demand, and information overload and selection difficulty are reduced.
In summary, the commodity retrieval method based on the knowledge graph can improve accuracy and individuation degree of commodity retrieval, improve shopping experience of users, and provide better commodity recommendation service for the users.
These and other aspects of the present application will be more readily apparent from the following description of the embodiments.
Drawings
In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, a brief description will be given below of the drawings that are needed in the embodiments or the prior art descriptions, and it is obvious that the drawings in the following description are some embodiments of the present application, and that other drawings can be obtained according to these drawings without inventive effort for a person skilled in the art.
Fig. 1 is a flowchart of a commodity retrieval method based on a knowledge graph according to an embodiment of the present application;
fig. 2 is a schematic structural diagram of a commodity retrieval system based on a knowledge graph according to an embodiment of the present application;
fig. 3 is a schematic structural diagram of a computing device according to an embodiment of the present application.
Detailed Description
In order to enable those skilled in the art to better understand the present application, the following description will make clear and complete descriptions of the technical solutions in the embodiments of the present application with reference to the accompanying drawings in the embodiments of the present application.
In some of the flows described in the specification and claims of this application and in the foregoing figures, a number of operations are included that occur in a particular order, but it should be understood that the operations may be performed in other than the order in which they occur or in parallel, that the order of operations such as 101, 102, etc. is merely for distinguishing between the various operations, and that the order of execution is not by itself represented by any order of execution. In addition, the flows may include more or fewer operations, and the operations may be performed sequentially or in parallel. It should be noted that, the descriptions of "first" and "second" herein are used to distinguish different messages, devices, modules, etc., and do not represent a sequence, and are not limited to the "first" and the "second" being different types.
The commodity retrieval method of the knowledge graph can be applied to various electronic commerce platforms or commodity recommendation systems so as to provide more accurate and personalized commodity recommendation experience. The following are some applicable scenarios:
e-commerce platform commodity searching: when a user inputs commodity information on the electronic commerce platform to search, the method can search related commodity nodes in the commodity knowledge graph according to the commodity information and the attribute input by the user, and recommend the commodity nodes by combining the commodity association degree value. For example, the user searches for a "red dress," and the system may recommend other types, brands, or materials of merchandise associated with the red dress based on the nodes and edges of the merchandise in the merchandise knowledge graph.
Personalized commodity recommendation: based on interest labels and behavior data of users, the method can search commodity nodes related to the interest labels in a commodity knowledge graph according to the favorites and preferences of the users and recommend the commodity nodes. For example, users often purchase sports shoes and fitness related goods, and the system can search the goods nodes related to the sports shoes and the fitness in the goods knowledge graph according to the interest labels of the users and recommend related goods such as sports clothes, sports equipment and the like.
Commodity recommendation system: the method can be used as an independent commodity recommendation system, and commodity retrieval and recommendation can be carried out in a commodity knowledge graph according to the input of a user or the interest label. The system can provide diversified and personalized commodity recommendation according to the demands and interests of users. For example, the user can input keywords, select commodity attributes or provide own interest labels, and the system recommends commodities related to the demands and interests of the user according to commodity nodes and relationship sides in the commodity knowledge graph.
In a word, the commodity retrieval method based on the knowledge graph can be applied to various electronic commerce platforms or commodity recommendation systems, provides accurate and personalized commodity recommendation services for users, and improves shopping experience and satisfaction of the users.
The inventor researches and discovers that commodity searching refers to searching and returning commodity results related to requirements in a commodity library according to the requirements of users. The commodity retrieval method based on the knowledge graph is a retrieval method constructed based on the commodity knowledge graph, and a semantic association network of the commodity is established by expressing the commodity, the attribute thereof and the relation between the attributes as nodes and edges so as to improve the accuracy and individuation degree of commodity retrieval.
At present, common commodity retrieval schemes include keyword-based retrieval, tag-based retrieval, collaborative filtering-based recommendation systems and the like. Keyword-based retrieval mainly relies on keywords input by users for matching, but is easily affected by diversity of word expressions and semantic ambiguity, so that accuracy is low. The label-based retrieval adopts a user labeling mode to describe the commodity, but the quality and the quantity of the labels are problematic, and the retrieval accuracy and the coverage range are affected. The recommendation system based on collaborative filtering is based on the historical behaviors of the user and the behaviors of other users, and is lack of consideration of the characteristics of commodities, and the problem of recommendation deviation is easy to occur.
That is, the existing commodity retrieval schemes have the following drawbacks: the accuracy is not high: keyword-based retrieval is susceptible to diversity of word expressions and semantic ambiguity; (2) insufficient degree of personalization: the retrieval based on the labels is limited by the quality and the quantity of the labels, and the personalized requirements of users cannot be met; (3) recommended deviation problem: recommendation deviation is easy to occur for a recommendation system based on collaborative filtering, and commodity characteristics are ignored only by focusing on user behaviors.
Therefore, a new commodity retrieval method is needed to overcome the defects of the existing scheme and improve the accuracy, individuation degree and user experience of commodity retrieval. The commodity retrieval method based on the knowledge graph can effectively solve the problems, and has higher potential and application prospect.
In view of this, the present application provides a commodity retrieval method based on a knowledge graph, the method comprising: establishing a commodity knowledge graph according to the acquired multiple commodities and the attributes corresponding to each commodity, taking the multiple commodities as commodity nodes in the commodity knowledge graph, wherein the commodity nodes comprise the commodities and the attributes corresponding to the commodities, and taking the relationship between the attributes corresponding to the multiple commodities as a relationship edge in the commodity knowledge graph; calculating commodity correlation values among the commodity nodes in the commodity knowledge graph by using a preset calculation formula of commodity correlation values; acquiring commodity information input by a user, searching commodity nodes matched with the commodity information in the commodity knowledge graph, acquiring commodity nodes associated with the commodity nodes based on commodity association degree values among the commodity nodes, and taking the commodity nodes, the commodity nodes associated with the commodity nodes and commodity nodes adjacent to the commodity nodes as a first recommendation candidate set; based on commodity information input by the user or analyzing user behavior data of the user, extracting interest tags of the user; according to the interest labels of the users, commodity nodes related to the interest labels are found in the commodity knowledge graph, commodity nodes related to the commodity nodes are obtained based on commodity association degree values among the commodity nodes, and the commodity nodes, the commodity nodes related to the commodity nodes and commodity nodes adjacent to the commodity nodes are used as a second recommendation candidate set; and screening target commodities from a recommendation candidate set formed by the first recommendation candidate set and the second recommendation candidate set through a preset recommendation algorithm, and recommending the target commodities to a user.
The commodity retrieval method based on the application can improve accuracy and individuation degree of commodity retrieval, improves shopping experience of users, and provides better commodity recommendation service for the users.
The following description of the embodiments of the present application will be made clearly and fully with reference to the accompanying drawings, in which it is evident that the embodiments described are only some, but not all, of the embodiments of the present application. All other embodiments, which can be made by those skilled in the art based on the embodiments herein without making any inventive effort, are intended to be within the scope of the present application.
Fig. 1 is a flowchart of a commodity retrieval method based on a knowledge graph according to an embodiment of the present application, where, as shown in fig. 1, the method includes:
101. establishing a commodity knowledge graph according to the acquired multiple commodities and the attributes corresponding to each commodity, taking the multiple commodities as commodity nodes in the commodity knowledge graph, wherein the commodity nodes comprise the commodities and the attributes corresponding to the commodities, and taking the relationship between the attributes corresponding to the multiple commodities as a relationship edge in the commodity knowledge graph;
in the above steps, establishing the commodity knowledge graph means constructing a graphical data structure according to the acquired multiple commodities and their corresponding attributes, where the graphical data structure is used to represent the attributes of the commodities and the relationships among the multiple commodities. The commodity knowledge graph can be regarded as a network formed by commodity nodes and relation edges, wherein the commodity nodes comprise commodities and attributes corresponding to the commodities, and the relation edges represent the association between the attributes corresponding to different commodities.
Specific embodiments may be as follows:
suppose we have three items A, B and C, each of which has the following properties:
commodity A: color-red, size-medium, material-cotton cloth;
commodity B: color-blue, size-large, material-jean;
commodity C: color-red, size-small, material-cotton cloth;
based on these commodities and their attributes, a commodity knowledge graph can be established as follows:
the commodity knowledge graph comprises nodes and relation edges, wherein the nodes comprise three commodity nodes:
commodity a (color-red, size-medium, material-cotton);
commodity B (color-blue, size-large, material-jean);
commodity C (color-red, size-small, material-cotton);
wherein the relationship edges include the following relationship edges:
the relationship edges between commodity A and commodity C indicate that they have the same color attribute (red) and that they have the same material attribute (cotton);
the relationship edges between commodity a and commodity B indicate that they have different size attributes (medium and large);
through the commodity knowledge graph, the relationship and attribute information among commodities can be conveniently represented. In the commodity retrieval and recommendation process, the nodes and the relationship edges in the commodity knowledge graph can be utilized, so that the operations of commodity association degree value calculation, similarity matching and the like between commodities can be conveniently carried out later, and more accurate and personalized commodity recommendation service can be provided.
102. Calculating commodity correlation values among the commodity nodes in the commodity knowledge graph by using a preset calculation formula of commodity correlation values;
in the above step, calculating the commodity correlation value between the plurality of commodity nodes in the commodity knowledge graph may be implemented by a preset commodity correlation calculation formula. This calculation formula may be determined based on attribute information of the commodity, the relationship edges and other relevant factors, and specifically, see later embodiments of the present application, this step is not specifically developed.
The specific implementation steps are as follows:
defining a commodity association degree calculation formula: according to specific requirements and scenes, a calculation formula can be designed for calculating the association degree value between commodities. The formula can consider attribute similarity of commodity nodes, weights of relation edges and other factors, and is weighted and adjusted according to actual conditions.
Calculating commodity association value according to a calculation formula: and calculating each pair of commodity nodes according to a calculation formula to obtain a correlation value between the commodity nodes. The calculation process may be based on attribute similarity calculation of commodity nodes, weight calculation of relationship edges, and the like, which is not limited in this application.
Storing commodity association values: and storing the calculated commodity association value in a commodity knowledge graph so as to be used in the subsequent commodity retrieval and recommendation process. The association value may be stored as an attribute of the relationship edge or a data structure of the association value may be separately built.
Through the steps, commodity correlation values among a plurality of commodity nodes can be calculated in the commodity knowledge graph. These relevance values may be used in applications such as merchandise recommendation, similar merchandise inquiry, etc., to provide more accurate, personalized merchandise recommendation services.
103. Acquiring commodity information input by a user, searching commodity nodes matched with the commodity information in the commodity knowledge graph, acquiring commodity nodes associated with the commodity nodes based on commodity association degree values among the commodity nodes, and taking the commodity nodes, the commodity nodes associated with the commodity nodes and commodity nodes adjacent to the commodity nodes as a first recommendation candidate set;
in this step, we search the commodity knowledge graph for the nodes related to the commodity according to the commodity information input by the user. Then, based on the association degree value between commodity nodes, commodity nodes associated with the commodity nodes are acquired, and the nodes are used as a first recommendation candidate set.
The specific implementation steps are as follows:
acquiring commodity information input by a user: first, we need to acquire commodity information input by the user, such as names, attributes, features, etc. of commodities. This information can be used to match and recommend in the knowledge-graph of the commodity.
Searching matched commodity nodes in a commodity knowledge graph: according to commodity information input by a user, searching commodity nodes matched with the commodity knowledge graph in the commodity knowledge graph. The method and the device can be realized through attribute similarity matching, keyword matching and the like, are not limited, and after the matched commodity nodes are found, the commodity nodes are used as commodity nodes in the first recommendation candidate set.
Acquiring commodity nodes associated with commodity nodes: based on the commodity correlation value between commodity nodes, we can find the commodity node associated with the commodity node. This may be accomplished by looking up neighboring nodes of the commodity node and obtaining a commodity correlation value between them. These associated commodity nodes are also added to the first recommendation candidate set.
Acquiring commodity nodes adjacent to the commodity nodes: in addition to commodity nodes associated with commodity nodes, we can consider commodity nodes adjacent to commodity nodes as part of a recommendation candidate set. These adjacent commodity nodes may be nodes that have a common attribute or relationship with the commodity nodes. These neighboring commodity nodes are also added to the first recommendation candidate set.
Through the steps, the first recommendation candidate set can be obtained, wherein the first recommendation candidate set comprises commodity nodes input by a user, commodity nodes associated with the first recommendation candidate set and commodity nodes adjacent to the first recommendation candidate set. This candidate set may be used in subsequent recommendation algorithms and filters to generate final personalized good recommendations.
Specific examples:
assuming that the commodity information input by the user is 'sports shoes', we find the matched commodity nodes in the commodity knowledge graph, and find the commodity node A (attribute: sports shoes, brand: nike).
Then, based on the relevance values between commodity nodes, we find commodity node B (attribute: sports pants, brand: adidas) and commodity node C (attribute: sports socks, brand: puma) associated with node A.
Furthermore, we consider that commodity node D (attribute: sports wear, brand: underwire) adjacent to node A is also added to the first recommendation candidate set.
Thus, the first recommended candidate set includes commodity nodes a (athletic shoes), B (athletic pants), C (athletic socks), and D (athletic clothing). These commodity nodes can be used in subsequent recommendation algorithms and filters to generate final personalized commodity recommendation results.
104. Based on commodity information input by the user or analyzing user behavior data of the user, extracting interest tags of the user;
in this step, we can analyze and extract the user's interest tag based on the commodity information input by the user or the user behavior data of the user. These interest tags may be used to understand the user's preferences and interests for subsequent personalized recommendations and customized services.
The specific implementation steps are as follows:
extracting interest labels based on commodity information input by a user: if the user inputs merchandise information, such as the name, attribute, feature, etc. of the merchandise, we can extract the user's interest tag by analyzing the information. This may be achieved by keyword extraction, attribute matching, etc. For example, if the commodity entered by the user is "sports shoes," we can extract the interest tags "sports," "footwear," and so on.
Extracting interest tags based on user behavior data of a user: another approach is to extract interest tags based on user behavior data of the user. The user behavior data may include browsing records, purchasing records, favorites records, etc. of the user. By analyzing the data, the preference and the interest of the user can be found, so that the corresponding interest tag is extracted. For example, if a user frequently browses and purchases sports related merchandise, we can extract the interest tags "sports," "fitness," and the like.
Modeling and storing interest tags: the extracted interest tags may be modeled and stored for subsequent personalized recommendation and customization of the service. This may be accomplished by using a tag library, a tag system, or the like. Each user may have multiple interest tags that may be associated, weighted, etc. to more accurately describe the user's interests and preferences.
Specific examples:
given that users often purchase and browse sports related merchandise, we can extract interest tags from the user's purchase records and browse records. By analyzing these recordings, we have found that users show a high interest in articles of athletic footwear, pants, socks, and the like. Thus, we can take the keywords of these goods (e.g. "sports shoes", "sports pants", "sports socks") as interest tags for the user.
In addition, if the user inputs commodity information of "sports shoes", we can directly extract interest tags "sports" and "shoes" from the information.
These extracted interest tags may be modeled and stored, for example, in a profile that correlates them to the user, or in a user preference library. In this way, in the subsequent personalized recommendation, the product matching and recommendation can be performed according to the interest labels of the users so as to provide recommendation results which are more in line with the interests of the users.
105. According to the interest labels of the users, commodity nodes related to the interest labels are found in the commodity knowledge graph, commodity nodes related to the commodity nodes are obtained based on commodity association degree values among the commodity nodes, and the commodity nodes, the commodity nodes related to the commodity nodes and commodity nodes adjacent to the commodity nodes are used as a second recommendation candidate set;
in this step, we search the commodity knowledge graph for commodity nodes related to the interest labels according to the interest labels of the users. Then, commodity nodes associated with the commodity nodes are acquired based on commodity association values among the commodity nodes, and the nodes are used as a second recommendation candidate set.
The specific implementation steps are as follows:
searching related commodity nodes in the commodity knowledge graph according to the interest labels of the users: according to interest labels of users, commodity nodes related to the interest labels can be searched in a commodity knowledge graph. This may be accomplished by matching attributes, keywords, etc. of the commodity nodes. And after finding the related commodity node, taking the commodity node as a node in the second recommendation candidate set.
Acquiring commodity nodes associated with commodity nodes: based on commodity correlation values among a plurality of commodity nodes, we can find the commodity nodes associated with the commodity nodes. This may be accomplished by looking up neighboring nodes of the commodity node and obtaining a commodity correlation value between them. These associated commodity nodes are also added to the second recommendation candidate set.
Acquiring commodity nodes adjacent to the commodity nodes: in addition to commodity nodes associated with commodity nodes, we can consider commodity nodes adjacent to commodity nodes as part of a recommendation candidate set. These adjacent commodity nodes may be nodes that have a common attribute or relationship with the commodity nodes. These neighboring commodity nodes are also added to the second recommendation candidate set.
Through the steps, a second recommendation candidate set can be obtained, wherein the second recommendation candidate set comprises commodity nodes related to the user interest labels, commodity nodes related to the user interest labels and commodity nodes adjacent to the user interest labels. This candidate set may be used in subsequent recommendation algorithms and filters to generate final personalized good recommendations.
Specific examples:
assuming that the interest tags of the user are "sports" and "footwear", we look up the commodity knowledge graph for commodity nodes associated with these interest tags. Suppose we find commodity node a (attribute: sports shoes, brand: nike) and commodity node B (attribute: sports pants, brand: adidas).
Then, based on the commodity correlation value between commodity nodes, we find commodity node C (attribute: sports sock, brand: puma) and commodity node D (attribute: sports wear, brand: underwire) associated with commodity node A.
In addition, we consider that commodity node E (attribute: basketball shoes, brand: jordan) adjacent commodity node A is also added to the second recommendation candidate set.
Thus, in this step, we look up commodity nodes related to interest tags in the commodity knowledge graph according to the interest tags of the user. Then, commodity nodes associated with the commodity nodes are acquired based on commodity association values among the commodity nodes, and the nodes are used as a second recommendation candidate set.
The specific implementation steps are as follows:
searching related commodity nodes according to interest labels of users: according to interest labels of users, commodity nodes related to the interest labels are searched in a commodity knowledge graph. This may be accomplished by matching attributes, keywords, etc. of the commodity nodes. After finding these relevant commodity nodes, they are taken as nodes in the second recommendation candidate set.
Acquiring commodity nodes associated with commodity nodes: based on the commodity correlation values between commodity nodes, we can find the commodity nodes associated with these commodity nodes. This may be achieved by looking up neighboring nodes of the commodity node and obtaining a relevance value between them. These associated commodity nodes are also added to the second recommendation candidate set.
Acquiring commodity nodes adjacent to the commodity nodes: similar to the previous steps, we can consider commodity nodes adjacent to commodity nodes as part of the second recommendation candidate set in addition to commodity nodes associated with commodity nodes. These adjacent commodity nodes may be nodes that have a common attribute or relationship with the commodity nodes. These neighboring commodity nodes are also added to the second recommendation candidate set.
Through the steps, a second recommendation candidate set can be obtained, wherein the second recommendation candidate set comprises commodity nodes related to the user interest labels, commodity nodes related to the user interest labels and commodity nodes adjacent to the user interest labels. This candidate set may be used in subsequent recommendation algorithms and filters to generate more accurate personalized merchandise recommendations.
Specific examples:
Assuming that the interest tags of the user are "sports" and "footwear", we look up the commodity knowledge graph for commodity nodes associated with these interest tags. By matching the attributes or keywords of commodity nodes we have found commodity node A (attribute: sports shoes, brand: nike) and commodity node B (attribute: sports pants, brand: adidas).
Then, based on the commodity correlation value between commodity nodes, we find commodity node C (attribute: sports sock, brand: puma) and commodity node D (attribute: sports wear, brand: underwire) associated with node A and node B.
Furthermore, we also consider that commodity node E (attribute: sports accessory, brand: reebok) adjacent to node A and node B is also added to the second recommendation candidate set.
Thus, the second recommended candidate set includes commodity nodes a (athletic shoes), B (athletic pants), C (athletic socks), D (athletic clothing), and E (athletic accessories). These nodes can be used in subsequent recommendation algorithms and filters to generate more accurate personalized commodity recommendations.
106. And screening target commodities from a recommendation candidate set formed by the first recommendation candidate set and the second recommendation candidate set through a preset recommendation algorithm, and recommending the target commodities to a user.
In this step, we use a preset recommendation algorithm to screen out target items from the recommendation candidate set consisting of the first recommendation candidate set and the second recommendation candidate set, and recommend these target items to the user.
The specific implementation steps are as follows:
using a preset recommendation algorithm: depending on the specific needs and scenario, we can select the appropriate recommendation algorithm to screen the target commodity. Common recommendation algorithms include collaborative filtering, content filtering, rule-based recommendation, and the like. These algorithms may be recommended based on the user's interest tags, commodity relevance values, etc.
Screening target commodities: according to a preset recommendation algorithm, the recommendation candidate set is screened to find out target commodities meeting the requirements and preferences of users. This can be achieved by calculating the matching degree of the commodity and the user interest label, the commodity association degree value and other indexes. Based on the results of the algorithm, we can select the top-ranked item of the recommendation as the target item.
Recommending target commodities to a user: recommending the screened target commodity to a user. This may be accomplished by displaying the recommendation results, sending a recommendation mail or message, etc. at the user interface. Meanwhile, the recommendation algorithm can be continuously optimized according to feedback and behavior data of the user, and more accurate personalized recommendation is provided.
Specific examples:
assuming we have a collaborative filtering based recommendation algorithm, we can use this algorithm to screen target items.
First, we combine the first recommendation candidate set and the second recommendation candidate set into a recommendation candidate set. This candidate set includes commodity nodes related to the user's interests and commodity nodes associated therewith.
Then, a collaborative filtering algorithm is used for calculating the matching degree of each commodity node and the user according to the information such as interest labels, historical behaviors and the like of the user. According to the matching degree result, the recommended candidate sets can be ranked, and the goods ranked at the top are selected as target goods.
And finally, recommending the screened target commodity to the user. This may be accomplished by presenting the recommendation results in a user interface, such as displaying the recommended items in a list of items, or sending a recommendation mail or message.
Through the steps, the target commodities can be screened from the recommendation candidate set formed by the first recommendation candidate set and the second recommendation candidate set by using a preset recommendation algorithm, and the target commodities are recommended to the user.
Optionally, in the embodiment of the present application, step 103 may specifically include:
Step 1031, acquiring commodity information input by a user, and extracting commodity characteristics from the commodity information;
in this step we extract merchandise features, including but not limited to merchandise name, brand, price, color, for example, from merchandise information entered by the user.
Specific examples: suppose that the user enters merchandise information for a pair of basketball shoes, including the trade name "NikeAirJordan," brand "Nike," price $200, colors black and red, etc. From this information we extract commodity features such as commodity name, brand, price and color.
Step 1032, in the commodity knowledge graph, matching the commodity features with the attributes corresponding to the commodity nodes to determine the attributes matched with the commodity features, and using the commodity nodes corresponding to the attributes as commodity nodes matched with the commodity information; the matching method of the commodity characteristics and the attributes corresponding to the commodity nodes at least comprises the following steps: keyword matching and text similarity matching;
specific examples: assume that a plurality of commodity nodes exist in a commodity knowledge graph, wherein the attribute of one commodity node is a commodity name: "NikeAirJordan", brand: "Nike", price: $200, color: black and red. The commodity characteristics are matched with the attributes corresponding to the commodity nodes, for example, the commodity names, brands, prices and colors are matched with the attributes of the commodity nodes in a keyword or text similarity mode, so that the attributes matched with the commodity characteristics and the commodity nodes are determined.
Step 1033, acquiring commodity nodes associated with the commodity nodes based on commodity association values among the commodity nodes;
this means that we find other commodity nodes associated with a particular commodity node by the association between commodity nodes.
Specific examples: assuming that the commodity correlation value between commodity node A and commodity node B is greater than the set value in the commodity knowledge graph, it indicates that there is a certain correlation between them. If we have determined in step 1032 that commodity node a matches the commodity information entered by the user, then in step 1033 we can acquire commodity node B associated with commodity node a.
Step 1034, in the commodity knowledge graph, searching out commodity nodes adjacent to the commodity nodes based on the relation edges;
this means that we find other commodity nodes that are directly adjacent to a particular commodity node by the relationship edges between commodity nodes.
Specific examples: it is assumed that in the commodity knowledge graph, commodity node a and commodity node C are connected by a relationship edge, indicating that there is a certain relationship between them. If we have determined in step 1032 that commodity node a matches the commodity information entered by the user, then in step 1034 we can find commodity node C directly adjacent to commodity node a based on the relationship edge.
Step 1035, using the commodity node, the commodity node associated with the commodity node, and the commodity node adjacent to the commodity node as a first recommendation candidate set.
This means that we combine the commodity nodes obtained in steps 1032, 1033 and 1034 as a first recommendation candidate set.
Specific examples: assuming that a commodity node a matching commodity information input by the user is determined in step 1032, a commodity node B associated with the commodity node a is found in step 1033, and a commodity node C adjacent to the commodity node a is found in step 1034. We use commodity node a, node B and node C as the first recommendation candidate set for the subsequent recommendation algorithm and filter.
Optionally, in the embodiment of the present application, step 105 may specifically include:
1051. in the commodity knowledge graph, matching the interest labels with attributes corresponding to a plurality of commodity nodes to determine the attributes matched with the interest labels, and taking the commodity nodes corresponding to the attributes as commodity nodes matched with the interest labels; the method for matching the interest tag with the attributes corresponding to the commodity nodes at least comprises the following steps: keyword matching and text similarity matching;
Specific examples: assume that a plurality of commodity nodes exist in a commodity knowledge graph, wherein the attribute of one node is an interest tag: sports shoes and basketball. The interest labels are matched with the corresponding attributes of the commodity nodes, for example, keyword matching or text similarity matching is carried out on the interest labels and the attributes of the commodity nodes, so that the attributes matched with the interest labels and the commodity nodes are determined.
1052. Acquiring commodity nodes associated with the commodity nodes based on commodity association values among the commodity nodes;
specific examples: assuming that the commodity correlation value between commodity node A and commodity node B is greater than the set value in the commodity knowledge graph, it indicates that there is a certain correlation between them. If we have determined in step 1051 that commodity node A matches the interest tag, then in step 1052 we can acquire commodity node B associated with commodity node A.
1053. In the commodity knowledge graph, commodity nodes adjacent to the commodity nodes are found out based on the relation edges;
specific examples: it is assumed that in the commodity knowledge graph, commodity node a and commodity node C are connected by a relationship edge, indicating that there is a certain relationship between them. If we have determined in step 1051 that commodity node A matches the interest tag, then in step 1053 we can find commodity node C directly adjacent to commodity node A based on the relationship edge.
1054. And taking the commodity node, the commodity node associated with the commodity node and the commodity node adjacent to the commodity node as a second recommendation candidate set.
Specific examples: assuming that a commodity node a matching the interest tag is determined in step 1051, a commodity node B associated with the commodity node a is found in step 1052, and a commodity node C adjacent to the commodity node a is found in step 1053. We use commodity node a, node B and node C as a second recommendation candidate set for subsequent recommendation algorithms and filters.
Alternatively, in the embodiment of the present application, step 102 may include:
1021. through a preset calculation formula of a first intermediate association parameter:
calculating a first intermediate association parameter among the commodity nodes in the commodity knowledge graph, wherein the first intermediate association parameter is used for measuring the association degree among the commodity nodes;
wherein,the importance level expressed as commodity node i; d is represented as a damping factor, a constant between 0 and 1; />Represented as being from commodity node->Weights to commodity node i, +.>;/>Represented as being from commodity node->The number of relationship edges for departure; / >Represented as commodityImportance level of node j->Contribution degree +.>Sum (S)/(S)>Expressed as a first intermediate association parameter between commodity node i and commodity node j, +.>Represented as weights from commodity node j to commodity node i;
in this step, this formula uses parameters and variables such as the importance of commodity nodes, damping factors, weights from one node to another, the number of relationship edges from one node, etc.
Alternatively, regarding the determination of the weight from one node to another, different methods may be employed depending on the specific application scenario and data characteristics. The following are some common methods of determining weights:
based on user behavior data: the weights may be determined using behavioral data of the user, such as purchase records, click-through rates, and the like. For example, if the user purchases commodity j after often purchasing commodity i, the weight may be set to the frequency of purchasing commodity j after purchasing commodity i or the probability of purchasing commodity j after purchasing commodity i.
Based on the merchandise attributes and associations: the weights may be determined using attribute information and associations of the items. For example, if commodity i and commodity j have similar attributes or the frequency of simultaneous purchase by the user is high, the weight may be set to the degree of similarity or association between commodity i and commodity j.
Based on domain expert knowledge: the weights may be determined using knowledge and experience of a domain expert. For example, edges between commodity nodes are weighted according to subjective assessment of the degree of association between commodities by domain experts.
Based on a machine learning algorithm: the weights may be learned using a machine learning algorithm. A model may be trained to predict the degree of association between unknown items using a supervised learning algorithm, using known item association as a tag.
It should be noted that the method for determining the weight should be selected according to the specific application scenario and the data characteristics, and experiments and evaluations should be performed to verify the effect. Meanwhile, the determination of the weight can be a dynamic process, and the weight can be updated and adjusted according to the user behavior and data change.
Specific examples: assuming two commodity nodes a and B, a first intermediate correlation parameter between them can be obtained by a calculation formula. In this formula, the importance degree and the weight may be calculated according to the attribute, the historical click amount, etc. of the commodity nodes, and the number of the relationship sides may be determined according to the association relationship between the commodity nodes.
The following commodity network map is assumed:
The commodity node i has two relation edges which respectively point to the commodity node j 1 And commodity node j 2
Commodity node j 1 Only one relation edge points to the commodity node i;
commodity node j 2 Only one relation edge points to the commodity node i;
other commodity nodes are not connected with commodity node i and commodity node j 1 And commodity node j 2 Directly connected edges.
From the above map we can calculate the importance of each commodity node.
First, all commodity nodes are initialized to a degree of importance of 1. Then, according to the formula:and the formula:iterative calculation of commodity node i and commodity node j 1 And commodity node j 2 Up to a quotient of the importance degree of (2)Item node i, item node j 1 And commodity node j 2 To converge.
In each iteration, the formula is followed:calculating the degree of association between commodity node i and commodity node j>
The method comprises the following specific steps:
calculating commodity node j 1 Is of importance of (a):
calculating commodity node j 2 Is of importance of (a):
according to commodity node j 1 And commodity node j 2 Calculating the importance degree of commodity node i and commodity node j respectively 1 And commodity node j 2 Is of the degree of association of (a)And->。/>
Finally, obtaining commodity node i and commodity node j 1 、j 2 Degree of association between And->
By the method, the association degree between commodity nodes can be calculated, so that the tasks such as recommendation, similarity analysis and the like can be performed by utilizing the association degree in the commodity rapid case detection method and system. However, in order to further improve the accuracy of recommendation, the association degree is further used as a first intermediate association parameter, and the commodity association degree value is finally obtained by combining a second intermediate parameter and a third intermediate parameter which are calculated later.
1022. And (3) through a preset calculation formula of a second intermediate parameter:calculating the historical click rate of commodity nodes;
wherein,historical click quantity expressed as commodity node, +.>Property denoted as commodity node j, +.>Represented as weights from commodity node j to commodity node i;
in this step, this formula uses parameters and variables such as the properties of the commodity node, the weights from one node to another, etc.
Specific examples: assuming that a commodity node A is provided, the historical click rate of the commodity node A can be obtained through a calculation formula. In this formula, the historical click volume may be calculated from the properties of the commodity node and the association relationship with other nodes.
The following commodity network map is assumed:
The commodity node i has two relation edges which respectively point to the commodity node j 1 And commodity node j 2
Commodity node j 1 Only one relation edge points to the commodity node i;
commodity node j 2 Only one relation edge points to the commodity node i;
other commodity nodes are not connected with commodity node i and commodity node j 1 And commodity node j 2 Directly connected edges.
According to the map and the formula, the historical click rate of the commodity node i can be calculated.
First of all,setting an initial value A (j) 1 ) =1 and a (j 2 ) =1, representing commodity node j 1 And commodity node j 2 Is used to determine the initial click rate of the display.
Then, according to the formulaIterative calculation of historical click rate of commodity node iUntil convergence.
In each iteration, according to the formulaCalculating historical click rate of commodity node i>
The method comprises the following specific steps:
according to commodity node j 1 And commodity node j 2 Click quantity A (j) 1 ) And A (j) 2 ) Calculating historical click rate of commodity node i
According to the historical click rate of commodity node iUpdate commodity node j 1 And commodity node j 2 Click quantity A (j) 1 ) And A (j) 2 )。
Repeating the steps until the historical click rate of the commodity node iAnd (5) convergence.
Finally, the historical click rate of the commodity node i is obtained
By the method, the historical click rate of the commodity node i can be calculated according to the association relation and the click rate between commodity nodes, so that the method can be used for tasks such as recommendation systems, commodity ordering and the like. It should be noted that the specific weight calculation method and iterative process can be adjusted and optimized according to the actual requirements.
1023. And (3) through a preset calculation formula of a third intermediate parameter:calculating the attribute of the commodity node i;
wherein,property denoted as commodity node i, +.>Represented as a historical click rate for commodity node j,represented as weights from commodity node i to commodity node j;
in this step, this formula uses parameters and variables such as the historical click throughs of commodity nodes, weights from one node to another, etc.
Specific examples: assuming that a commodity node A is provided, the attribute of the commodity node A can be obtained through a calculation formula. In this formula, the attribute may be calculated from the historical click volume of the commodity node and the association relationship with other nodes.
The following commodity network map is assumed:
the commodity node i has two relation edges which respectively point to the commodity node j 1 And commodity node j 2
Commodity node j 1 Only one relation edge points to the commodity node i;
commodity node j 2 Only one relation edge points to the commodity node i;
other commodity nodes are not connected with commodity node i and commodity node j 1 And commodity node j 2 Directly connected edges.
According to the map and the formula, the attribute of the commodity node i can be calculated.
First, an initial value H (j) 1 ) =1 and H (j) 2 ) =1, representing the initial historical click volumes for commodity node j1 and commodity node j 2.
Then, according to the formulaIterative calculation of the property of the commodity node i>Until convergence.
In each iteration, according to the formulaCalculating the attribute of commodity node i
The method comprises the following specific steps:
according to node j 1 And node j 2 Historical click quantity H (j) 1 ) And H (j) 2 ) Calculating the attribute of commodity node i
According to the attribute of commodity node iUpdate node j 1 And node j 2 Historical click quantity H (j) 1 ) And H (j) 2 )。
Repeating the above steps until the attribute of commodity node iAnd (5) convergence.
Finally, obtaining the attribute of the commodity node i
By the method, the attribute of the commodity node i can be calculated according to the association relation and the historical click quantity between commodity nodes, so that the method can be used for tasks such as commodity recommendation and commodity classification. It should be noted that the specific weight calculation method and iterative process can be adjusted and optimized according to the actual requirements. Meanwhile, the attribute of the commodity node can be multidimensional, and the commodity node can be expanded and expanded according to actual conditions.
1024. Through a predefined relevance score vector, a calculation formula of a preset commodity relevance value is utilized: Calculating commodity association values among the commodity nodes in the commodity knowledge graph;
wherein,the commodity correlation value is expressed as a commodity correlation value between a commodity node i and a commodity node j; />Expressed as damping factor; />The importance level expressed as commodity node i; />Historical click quantity expressed as commodity node i, +.>Represented as attributes of commodity node i.
In this step, this formula uses parameters and variables such as damping factor, importance of commodity node, historical click volume, attributes, etc.
Specific examples: assuming that two commodity nodes A and B are provided, a commodity association value between the commodity nodes A and B can be obtained through a calculation formula. In this formula, the relevance value may be calculated according to the importance degree, the historical click amount, the attribute, etc. of the commodity node, and evaluated in combination with a predefined relevance score vector.
The following commodity network map is assumed:
a direct association relationship exists between the commodity node i and the commodity node j, and the relationship is expressed as an edge (i, j);
a direct association relationship exists between the commodity node i and the commodity node k, and the relationship is expressed as an edge (i, k);
a direct association relationship exists between the commodity node j and the commodity node k, and the relationship is expressed as an edge (j, k);
There is no direct association between other commodity nodes.
According to the map and the formula, commodity correlation values among commodity nodes i, j and k can be calculated.
First, initial values PR (i) =1, H (i) =1, a (i) =1, PR (j) =1, H (j) =1, a (j) =1, PR (k) =1, H (k) =1, a (k) =1 are set, representing initial association values, history click amounts, and attributes of the nodes i, j, and k.
Then, according to the formulaAnd calculating the association degree value of the commodity node i and the node j.
The method comprises the following specific steps:
calculating the relevance value of the commodity node i and the node j according to the relevance values PR (i) and PR (j), the historical click amounts H (i) and H (j), the attributes A (i) and A (j) and the similarity Sim (i, j)
And updating the association values PR (i) and PR (j) of the commodity node i and the node j according to the association value Score (i, j) of the commodity node i and the node j.
Repeating the steps until the association degree value Score (i, j) of the commodity node i and the node j is converged.
Next, the association value Score (i, k) between the commodity node i and the node k, the association value Score (j, k) between the commodity node j and the node k, and the association value between other commodity nodes may be calculated in the same step.
Finally, commodity association values among a plurality of commodity nodes are obtained.
By the method, the association degree value among the commodity nodes can be calculated according to the association relation, the historical click quantity, the attribute and the similarity among the commodity nodes, so that the method can be used for tasks such as commodity recommendation and commodity similarity calculation. It should be noted that the specific parameter setting and iterative process can be adjusted and optimized according to the actual requirements. Meanwhile, more factors such as user behaviors, commodity characteristics and the like can be considered in calculation of the commodity relevance value.
Alternatively, in an embodiment of the present application, step 106 may include:
1061. through a preset recommendation algorithm: recommendation score = a interest tag weight + β commodity correlation value, calculating a recommendation score for each candidate recommended commodity from the first and second recommendation candidate sets; wherein, alpha is a trade-off factor of the interest tag for balancing the importance of the interest tag, and beta is a trade-off factor of the commodity relevance value for balancing the importance of the commodity relevance value;
in this step, this formula balances the importance of the interest tag with the importance of the item association value.
The step of obtaining the trade-off factor α of the interest tag and the trade-off factor β of the commodity relevance value may be performed by:
Step 1: a training data set is determined.
A training data set is needed that contains information about the association between the user's interest tag and the merchandise. Such associated information may be a user's score for the item, click-through rate, purchase record, etc.
Step 2: an evaluation index is defined.
According to the specific application scene, the importance of the interest tag and the commodity association value can be evaluated by selecting a proper evaluation index. For example, indices such as accuracy, recall, F1 value, root mean square error, etc. may be used.
Step 3: the model is trained using the training dataset.
A model can be trained by using a machine learning algorithm or a statistical method, taking the interest labels and commodity relevance values in the training data set as inputs, and taking the evaluation indexes as outputs.
Step 4: and (5) adjusting parameters.
And adjusting the balance factor alpha of the interest tag and the balance factor beta of the commodity correlation value to ensure that the model achieves optimal performance on the evaluation index. Grid searching, cross-validation, etc. techniques may be used to find the optimal combination of parameters.
Step 5: model performance was evaluated.
The test dataset was used to evaluate the performance of the trained model on unseen data. The performance of the model may be measured using the previously defined evaluation index.
According to the steps, the weighing factor alpha of the interest tag and the weighing factor beta of the commodity relevance value can be obtained through training and adjusting parameters. These trade-off factors may be used in recommendation algorithms in the rapid commodity inspection method and system to balance the importance of interest tags with the importance of commodity relevance values.
Specific examples: assuming that a candidate recommended commodity is provided, its recommendation score can be calculated by a recommendation algorithm. In this formula, the interest tag weight may be calculated according to the interest tag of the user, and the commodity association value may be calculated according to the association degree between commodity nodes.
1062. And screening target commodities from a recommendation candidate set formed by the first recommendation candidate set and the second recommendation candidate set based on the recommendation score of each candidate recommendation commodity.
Specific examples: assume that there is one recommendation candidate set that includes a plurality of candidate recommended products. By comparing the recommendation scores of each candidate recommended commodity, the commodity with the highest recommendation score can be screened out as the target commodity.
Optionally, before step 1061, further includes: calculating the weight of the interest tag according to the interest tag of the user;
As a possible implementation, the calculating the weight of the interest tag according to the interest tag of the user includes: extracting text information from user behavior data of the user, and taking a plurality of text information as a corpus; word segmentation processing is carried out on each text message so as to split each text message into independent words; calculating the occurrence frequency of each word in corresponding text information and the inverse document frequency of the corpus aiming at each word; according to the occurrence frequency of the words in the corresponding text information and the inverse document frequency of the corpus, calculating the weight of the words; and determining words contained in the interest labels of the users, and calculating the weight of the interest labels according to the weights of the contained words.
Wherein the specific process of "calculating the inverse document frequency of each of the terms at the corpus" for each of the terms may include:
through a first preset formula:calculating the inverse document frequency of each word in the corpus;
where N represents the total number of text information in the corpus,a quantity of text information represented as containing the word t; / >Expressed as the maximum frequency of occurrence of the word t in the corpus; />Expressed as the frequency of occurrence of the word t in the corresponding text information; />A length expressed as text information;
through a second preset formula:calculating the weight of the words;
wherein,weights expressed as words t ++>Expressed as the word frequency of the term t in the corresponding document information, determined by calculating the number of occurrences of the term t in the corresponding document information divided by the total number of words of the document,/>Expressed as an average word frequency of words in the whole corpus; />Expressed as the length of the text message, < >>Expressed as the average text length of a plurality of text messages, k is expressed as a positive number for smoothing TF values. Specific examples:
assume that a corpus contains 10 text messages, including the words "commodity A" and "commodity B".
Step 1: extracting text information from user behavior data of the user, and taking a plurality of text information as a corpus;
step 2: word segmentation processing is carried out on each text message so as to split each text message into independent words;
step 3: calculating the occurrence frequency of each word in corresponding text information and the inverse document frequency of the corpus aiming at each word;
Assuming that the total number N of text information in the corpus is 10, the length len (t) of the current text is 100, the occurrence frequency of the commodity a in the corresponding text information is 2 times, the occurrence frequency of the commodity B in the corresponding text information is 1 time in the corpus, and the occurrence frequency of the commodity B in the corpus is 4 times.
Freq ("commodity a") =2 and df ("commodity a") =6; freq ("commodity B") =1, df ("commodity B") =4;
let the maximum word frequency max_freq be 2, i.e. "commodity a" has a maximum frequency of occurrence of 2 in some texts.
Then according to the formula:the inverse document frequencies of "commodity A" and "commodity B" are calculated.
Step 4: weights of the words are calculated.
Assume that "commodity a" in the current text appears 3 times, i.e., the frequency of appearance is 3, and "commodity B" appears 2 times, i.e., the frequency of appearance is 2.
Assume that the average word frequency tf_avg of words in the whole corpus is 1.5.
Assuming that the length len (t) of the current text is 100, the average length len (avg) of the text in the whole corpus is 80, and the parameter k takes 1.
According to the formula:the TF-IDF weights for "commodity a" and "commodity B" are calculated.
TF ("commodity a") =3, TF ("commodity B") =2;
then
Then
Thus, the TF-IDF weights for the words "commodity A" and "commodity B" are obtained. The weights can be used for calculating the weights of interest tags, and further used for a recommendation algorithm in a method and a system for rapidly checking the cases of the commodities.
And 5, calculating the weight of the interest tag.
And determining words contained in the interest labels of the users, and calculating the weight of the interest labels according to the weights of the contained words.
For example, the user's interest tag includes words "commodity a" and "commodity B", and based on the above steps, the TF-IDF weight of the word "commodity a" is 1.0755, and the TF-IDF weight of the word "commodity B" is 0.9721, then for the user's interest tag "commodity a" and "commodity B", the weights of the word "commodity a" and "commodity B" can be calculated as follows: interest tag weight = TF-IDF ("commodity a") + TF-IDF ("commodity B") = 1.0755+0.9721≡ 2.0476.
Thus, the weight of the user interest tag is obtained. Based on these weights, a quick review of the merchandise may be performed or interest tag trade-off factors used in a recommendation algorithm.
Fig. 2 is a schematic structural diagram of a commodity retrieval system based on a knowledge graph according to an embodiment of the present application, where, as shown in fig. 2, the system includes:
the establishing module 21 is configured to establish a commodity knowledge graph according to the acquired multiple commodities and the attributes corresponding to each commodity, and take the multiple commodities as commodity nodes in the commodity knowledge graph, wherein the commodity nodes include the commodities and the attributes corresponding to the commodities, and take the relationships between the attributes corresponding to the multiple commodities as relationship edges in the commodity knowledge graph;
A calculating module 22, configured to calculate a commodity correlation value between the plurality of commodity nodes in the commodity knowledge graph by using a calculation formula of a preset commodity correlation value;
the processing module 23 is configured to obtain commodity information input by a user, find out a commodity node matching with the commodity information in the commodity knowledge graph, and obtain a commodity node associated with the commodity node based on a commodity association value between the plurality of commodity nodes, and use the commodity node, a commodity node associated with the commodity node, and a commodity node adjacent to the commodity node as a first recommendation candidate set;
the extracting module 24 is configured to extract an interest tag of the user based on commodity information input by the user or analysis of user behavior data of the user;
the processing module 23 is further configured to find a commodity node related to the interest tag in the commodity knowledge graph according to the interest tag of the user, obtain a commodity node associated with the commodity node based on a commodity association value between the plurality of commodity nodes, and use the commodity node, the commodity node associated with the commodity node, and a commodity node adjacent to the commodity node as a second recommendation candidate set;
And the screening module 25 is configured to screen out target commodities from a recommendation candidate set formed by the first recommendation candidate set and the second recommendation candidate set through a preset recommendation algorithm, and recommend the target commodities to a user.
Optionally, in the embodiment of the present application, the processing module 23 is specifically configured to obtain commodity information input by a user, and extract commodity features from the commodity information; in the commodity knowledge graph, matching the commodity characteristics with attributes corresponding to a plurality of commodity nodes to determine the attributes matched with the commodity characteristics, and taking the commodity nodes corresponding to the attributes as commodity nodes matched with the commodity information; the matching method of the commodity characteristics and the attributes corresponding to the commodity nodes at least comprises the following steps: keyword matching and text similarity matching; acquiring commodity nodes associated with the commodity nodes based on commodity association values among the commodity nodes; in the commodity knowledge graph, commodity nodes adjacent to the commodity nodes are found out based on the relation edges; and taking the commodity node, the commodity node associated with the commodity node and the commodity node adjacent to the commodity node as a first recommendation candidate set.
Optionally, in the embodiment of the present application, the processing module 23 is specifically configured to match the interest tag with attributes corresponding to a plurality of commodity nodes in the commodity knowledge graph, so as to determine an attribute matched with the interest tag, and use the commodity node corresponding to the attribute as the commodity node matched with the interest tag; the method for matching the interest tag with the attributes corresponding to the commodity nodes at least comprises the following steps: keyword matching and text similarity matching; acquiring commodity nodes associated with the commodity nodes based on commodity association values among the commodity nodes; in the commodity knowledge graph, commodity nodes adjacent to the commodity nodes are found out based on the relation edges; and taking the commodity node, the commodity node associated with the commodity node and the commodity node adjacent to the commodity node as a second recommendation candidate set.
Optionally, in the embodiment of the present application, the calculating module 22 is specifically configured to calculate, by a preset first intermediate association parameter, a formula:
calculating a first intermediate association parameter among the commodity nodes in the commodity knowledge graph, wherein the first intermediate association parameter is used for measuring the association degree among the commodity nodes;
Wherein,the importance level expressed as commodity node i; d is represented as a damping factor, a constant between 0 and 1; />Represented as being from commodity node->Weights to commodity node i, +.>;/>Represented as being from commodity node->The number of relationship edges for departure; />Represented as commodity sectionImportance of point j->Contribution degree +.>Sum (S)/(S)>Expressed as a first intermediate association parameter between commodity node i and commodity node j, +.>Represented as weights from commodity node j to commodity node i; and (3) through a preset calculation formula of a second intermediate parameter: />Calculating the historical click rate of the commodity node i;
wherein,historical click quantity expressed as commodity node, +.>Property denoted as commodity node j, +.>Represented as weights from commodity node j to commodity node i;
and (3) through a preset calculation formula of a third intermediate parameter:calculating the attribute of the commodity node i; />
Wherein,property denoted as commodity node i, +.>Represented as a historical click rate for commodity node j,represented as weights from commodity node i to commodity node j;
through a predefined relevance score vector, a calculation formula of a preset commodity relevance value is utilized: Calculating commodity association values among the commodity nodes in the commodity knowledge graph;
wherein,the commodity correlation value is expressed as a commodity correlation value between a commodity node i and a commodity node j; />Expressed as damping factor; />The importance level expressed as commodity node i; />Historical click quantity expressed as commodity node i, +.>Represented as attributes of commodity node i.
Optionally, in this embodiment of the present application, the filtering module 25 is specifically configured to: recommendation score = a interest tag weight + β commodity correlation value, calculating a recommendation score for each candidate recommended commodity from the first and second recommendation candidate sets; wherein, alpha is a trade-off factor of the interest tag for balancing the importance of the interest tag, and beta is a trade-off factor of the commodity relevance value for balancing the importance of the commodity relevance value; and screening target commodities from a recommendation candidate set formed by the first recommendation candidate set and the second recommendation candidate set based on the recommendation score of each candidate recommendation commodity.
Optionally, in the embodiment of the present application, the calculating module 22 is further configured to calculate an interest tag weight according to the interest tag of the user;
The computing module 22 is specifically configured to extract text information from user behavior data of the user, and use a plurality of text information as a corpus; word segmentation processing is carried out on each text message so as to split each text message into independent words; calculating the occurrence frequency of each word in corresponding text information and the inverse document frequency of the corpus aiming at each word; according to the occurrence frequency of the words in the corresponding text information and the inverse document frequency of the corpus, calculating the weight of the words; and determining words contained in the interest labels of the users, and calculating the weight of the interest labels according to the weights of the contained words.
Optionally, in the embodiment of the present application, the calculating module 22 is specifically configured to pass through a first preset formula:
calculating the inverse document frequency of each word in the corpus;
where N represents the total number of text information in the corpus,a quantity of text information represented as containing the word t; />Expressed as the maximum frequency of occurrence of the word t in the corpus; />Expressed as the frequency of occurrence of the word t in the corresponding text information; / >A length expressed as text information; the word is calculated according to the occurrence frequency of the word in the corresponding text information and the inverse document frequency of the corpusComprises the following steps:
through a second preset formula:calculating the weight of the words;
wherein,weights expressed as words t ++>Expressed as the word frequency of the term t in the corresponding document information, determined by calculating the number of occurrences of the term t in the corresponding document information divided by the total number of words of the document,/>Expressed as an average word frequency of words in the whole corpus; />Expressed as the length of the text message, < >>Expressed as the average text length of a plurality of text messages, k is expressed as a positive number for smoothing TF values.
The commodity retrieval system based on the knowledge graph shown in fig. 2 may execute the commodity retrieval method based on the knowledge graph shown in the embodiment shown in fig. 1, and its implementation principle and technical effects are not repeated. The detailed manner in which the respective modules and units perform the operations in the knowledge-graph-based commodity retrieval system in the above embodiment has been described in detail in the embodiments related to the method, and will not be described in detail herein.
In one possible design, the knowledge-graph based commodity retrieval system of the embodiment of FIG. 2 may be implemented as a computing device, as shown in FIG. 3, that may include a storage component 301 and a processing component 302;
the storage component 301 stores one or more computer instructions for execution by the processing component 302.
The processing component 302 is configured to: establishing a commodity knowledge graph according to the acquired multiple commodities and the attributes corresponding to each commodity, taking the multiple commodities as commodity nodes in the commodity knowledge graph, wherein the commodity nodes comprise the commodities and the attributes corresponding to the commodities, and taking the relationship between the attributes corresponding to the multiple commodities as a relationship edge in the commodity knowledge graph; calculating commodity correlation values among the commodity nodes in the commodity knowledge graph by using a preset calculation formula of commodity correlation values; acquiring commodity information input by a user, searching commodity nodes matched with the commodity information in the commodity knowledge graph, acquiring commodity nodes associated with the commodity nodes based on commodity association degree values among the commodity nodes, and taking the commodity nodes, the commodity nodes associated with the commodity nodes and commodity nodes adjacent to the commodity nodes as a first recommendation candidate set; based on commodity information input by the user or analyzing user behavior data of the user, extracting interest tags of the user; according to the interest labels of the users, commodity nodes related to the interest labels are found in the commodity knowledge graph, commodity nodes related to the commodity nodes are obtained based on commodity association degree values among the commodity nodes, and the commodity nodes, the commodity nodes related to the commodity nodes and commodity nodes adjacent to the commodity nodes are used as a second recommendation candidate set; and screening target commodities from a recommendation candidate set formed by the first recommendation candidate set and the second recommendation candidate set through a preset recommendation algorithm, and recommending the target commodities to a user.
Wherein the processing component 302 may include one or more processors to execute computer instructions to perform all or part of the steps of the methods described above. Of course, the processing component may also be implemented as one or more Application Specific Integrated Circuits (ASICs), digital Signal Processors (DSPs), digital Signal Processing Devices (DSPDs), programmable Logic Devices (PLDs), field Programmable Gate Arrays (FPGAs), controllers, microcontrollers, microprocessors or other electronic elements for executing the methods described above.
The storage component 301 is configured to store various types of data to support operations at the terminal. The memory component may be implemented by any type or combination of volatile or nonvolatile memory devices such as Static Random Access Memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic or optical disk.
Of course, the computing device may necessarily include other components, such as input/output interfaces, communication components, and the like.
The input/output interface provides an interface between the processing component and a peripheral interface module, which may be an output device, an input device, etc.
The communication component is configured to facilitate wired or wireless communication between the computing device and other devices, and the like.
The computing device may be a physical device or an elastic computing host provided by the cloud computing platform, and at this time, the computing device may be a cloud server, and the processing component, the storage component, and the like may be a base server resource rented or purchased from the cloud computing platform.
The embodiment of the application also provides a computer storage medium, and a computer program is stored, and when the computer program is executed by a computer, the method for searching the commodity based on the knowledge graph in the embodiment shown in fig. 1 can be realized.
It will be clear to those skilled in the art that, for convenience and brevity of description, specific working procedures of the above-described systems, apparatuses and units may refer to corresponding procedures in the foregoing method embodiments, which are not repeated herein.
The apparatus embodiments described above are merely illustrative, wherein the elements illustrated as separate elements may or may not be physically separate, and the elements shown as elements may or may not be physical elements, may be located in one place, or may be distributed over a plurality of network elements. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of this embodiment. Those of ordinary skill in the art will understand and implement the present invention without undue burden.
From the above description of the embodiments, it will be apparent to those skilled in the art that the embodiments may be implemented by means of software plus necessary general hardware platforms, or of course may be implemented by means of hardware. Based on this understanding, the foregoing technical solution may be embodied essentially or in a part contributing to the prior art in the form of a software product, which may be stored in a computer readable storage medium, such as ROM/RAM, a magnetic disk, an optical disk, etc., including several instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) to execute the method described in the respective embodiments or some parts of the embodiments.
Finally, it should be noted that: the above embodiments are only for illustrating the technical solution of the present application, and are not limiting thereof; although the present application has been described in detail with reference to the foregoing embodiments, it should be understood by those of ordinary skill in the art that: the technical scheme described in the foregoing embodiments can be modified or some technical features thereof can be replaced by equivalents; such modifications and substitutions do not depart from the spirit and scope of the corresponding technical solutions.

Claims (10)

1. The commodity retrieval method based on the knowledge graph is characterized by comprising the following steps of:
establishing a commodity knowledge graph according to the acquired multiple commodities and the attributes corresponding to each commodity, taking the multiple commodities as commodity nodes in the commodity knowledge graph, wherein the commodity nodes comprise the commodities and the attributes corresponding to the commodities, and taking the relationship between the attributes corresponding to the multiple commodities as a relationship edge in the commodity knowledge graph;
calculating commodity correlation values among the commodity nodes in the commodity knowledge graph by using a preset calculation formula of commodity correlation values;
acquiring commodity information input by a user, searching commodity nodes matched with the commodity information in the commodity knowledge graph, acquiring commodity nodes associated with the commodity nodes based on commodity association degree values among the commodity nodes, and taking the commodity nodes, the commodity nodes associated with the commodity nodes and commodity nodes adjacent to the commodity nodes as a first recommendation candidate set;
based on commodity information input by the user or analyzing user behavior data of the user, extracting interest tags of the user;
According to the interest labels of the users, commodity nodes related to the interest labels are found in the commodity knowledge graph, commodity nodes related to the commodity nodes are obtained based on commodity association degree values among the commodity nodes, and the commodity nodes, the commodity nodes related to the commodity nodes and commodity nodes adjacent to the commodity nodes are used as a second recommendation candidate set;
and screening target commodities from a recommendation candidate set formed by the first recommendation candidate set and the second recommendation candidate set through a preset recommendation algorithm, and recommending the target commodities to a user.
2. The method according to claim 1, wherein the acquiring commodity information input by a user, finding out commodity nodes matching the commodity information in the commodity knowledge graph, and acquiring commodity nodes associated with the commodity nodes based on commodity association values among the plurality of commodity nodes, and taking the commodity nodes, commodity nodes associated with the commodity nodes, and commodity nodes adjacent to the commodity nodes as a first recommendation candidate set, comprises:
Acquiring commodity information input by a user, and extracting commodity characteristics from the commodity information;
in the commodity knowledge graph, matching the commodity characteristics with attributes corresponding to a plurality of commodity nodes to determine the attributes matched with the commodity characteristics, and taking the commodity nodes corresponding to the attributes as commodity nodes matched with the commodity information; the matching method of the commodity characteristics and the attributes corresponding to the commodity nodes at least comprises the following steps: keyword matching and text similarity matching;
acquiring commodity nodes associated with the commodity nodes based on commodity association values among the commodity nodes;
in the commodity knowledge graph, commodity nodes adjacent to the commodity nodes are found out based on the relation edges;
and taking the commodity node, the commodity node associated with the commodity node and the commodity node adjacent to the commodity node as a first recommendation candidate set.
3. The method according to claim 1, wherein the searching the commodity knowledge graph for the commodity node related to the interest label according to the interest label of the user, and obtaining the commodity node associated with the commodity node based on the commodity association value between the commodity nodes, and taking the commodity node, the commodity node associated with the commodity node, and the commodity node adjacent to the commodity node as the second recommendation candidate set includes:
In the commodity knowledge graph, matching the interest labels with attributes corresponding to a plurality of commodity nodes to determine the attributes matched with the interest labels, and taking the commodity nodes corresponding to the attributes as commodity nodes matched with the interest labels; the method for matching the interest tag with the attributes corresponding to the commodity nodes at least comprises the following steps: keyword matching and text similarity matching;
acquiring commodity nodes associated with the commodity nodes based on commodity association values among the commodity nodes;
in the commodity knowledge graph, commodity nodes adjacent to the commodity nodes are found out based on the relation edges;
and taking the commodity node, the commodity node associated with the commodity node and the commodity node adjacent to the commodity node as a second recommendation candidate set.
4. The method according to claim 1, wherein calculating the commodity correlation value between the plurality of commodity nodes in the commodity knowledge graph using a calculation formula of a preset commodity correlation value includes:
through a preset calculation formula of a first intermediate association parameter:
;
Calculating a first intermediate association parameter among the commodity nodes in the commodity knowledge graph, wherein the first intermediate association parameter is used for measuring the association degree among the commodity nodes;
wherein,the importance level expressed as commodity node i; d is represented as a damping factor, a constant between 0 and 1; />Represented as being from commodity node->Weights to commodity node i, +.>;/>Represented as slave nodesThe number of relationship edges for departure; />Represented as importance of commodity node j, +.>Contribution degree +.>Sum (S)/(S)>Expressed as a first intermediate association parameter between commodity node i and commodity node j, +.>Represented as weights from commodity node j to commodity node i;
and (3) through a preset calculation formula of a second intermediate parameter:calculating the historical click rate of the commodity node i;
wherein,historical click quantity expressed as commodity node, +.>Property denoted as commodity node j, +.>Represented as weights from commodity node j to commodity node i;
and (3) through a preset calculation formula of a third intermediate parameter:calculating the attribute of the commodity node i;
wherein,property denoted as commodity node i, +. >Historical click quantity expressed as commodity node j, +.>Represented as weights from commodity node i to commodity node j;
through a predefined relevance score vector, a calculation formula of a preset commodity relevance value is utilized:calculating commodity association values among the commodity nodes in the commodity knowledge graph;
wherein,the commodity correlation value is expressed as a commodity correlation value between a commodity node i and a commodity node j; />Expressed as damping factor; />The importance level expressed as commodity node i; />Historical click quantity expressed as commodity node i, +.>Represented as attributes of commodity node i.
5. The method of claim 1, wherein the screening target commodities from a recommendation candidate set consisting of the first recommendation candidate set and the second recommendation candidate set by a preset recommendation algorithm includes:
through a preset recommendation algorithm: recommendation score = a interest tag weight + β commodity correlation value, calculating a recommendation score for each candidate recommended commodity from the first and second recommendation candidate sets; wherein, alpha is a trade-off factor of the interest tag for balancing the importance of the interest tag, and beta is a trade-off factor of the commodity relevance value for balancing the importance of the commodity relevance value;
And screening target commodities from a recommendation candidate set formed by the first recommendation candidate set and the second recommendation candidate set based on the recommendation score of each candidate recommendation commodity.
6. The method of claim 5, further comprising, prior to said screening out target items from a recommendation candidate set consisting of said first recommendation candidate set and said second recommendation candidate set by a preset recommendation algorithm:
calculating the weight of the interest tag according to the interest tag of the user;
the calculating the interest tag weight according to the interest tag of the user comprises the following steps:
extracting text information from user behavior data of the user, and taking a plurality of text information as a corpus;
word segmentation processing is carried out on each text message so as to split each text message into independent words;
calculating the occurrence frequency of each word in corresponding text information and the inverse document frequency of the corpus aiming at each word;
according to the occurrence frequency of the words in the corresponding text information and the inverse document frequency of the corpus, calculating the weight of the words;
And determining words contained in the interest labels of the users, and calculating the weight of the interest labels according to the weights of the contained words.
7. The method of claim 6, wherein calculating, for each of the terms, an inverse document frequency for each of the terms at the corpus, comprises:
through a first preset formula:calculating the inverse document frequency of each word in the corpus;
where N represents the total number of text information in the corpus,a quantity of text information represented as containing the word t;expressed as the maximum frequency of occurrence of the word t in the corpus; />Expressed as the frequency of occurrence of the word t in the corresponding text information; />A length expressed as text information;
the calculating the weight of the word according to the occurrence frequency of the word in the corresponding text information and the inverse document frequency of the corpus comprises the following steps:
through a second preset formula:calculating the weight of the words;
wherein,weights expressed as words t ++>Expressed as term t in pairsWord frequency in the corresponding document information is determined by calculating the number of occurrences of term t in the corresponding document information divided by the total number of words of the document,/ >Expressed as an average word frequency of words in the whole corpus; />Expressed as the length of the text message, < >>Expressed as the average text length of a plurality of text messages, k is expressed as a positive number for smoothing TF values.
8. A knowledge-graph-based commodity retrieval system, comprising:
the building module is used for building a commodity knowledge graph according to the acquired multiple commodities and the attributes corresponding to each commodity, taking the multiple commodities as commodity nodes in the commodity knowledge graph, wherein the commodity nodes comprise the commodities and the attributes corresponding to the commodities, and taking the relationship among the attributes corresponding to the multiple commodities as a relationship edge in the commodity knowledge graph;
the calculation module is used for calculating commodity correlation values among the commodity nodes in the commodity knowledge graph by utilizing a preset calculation formula of commodity correlation values;
the processing module is used for acquiring commodity information input by a user, searching commodity nodes matched with the commodity information in the commodity knowledge graph, acquiring commodity nodes associated with the commodity nodes based on commodity association values among the commodity nodes, and taking the commodity nodes, the commodity nodes associated with the commodity nodes and commodity nodes adjacent to the commodity nodes as a first recommendation candidate set;
The extraction module is used for extracting the interest tag of the user based on commodity information input by the user or analyzing the user behavior data of the user;
the processing module is further configured to find out a commodity node related to the interest tag in the commodity knowledge graph according to the interest tag of the user, obtain a commodity node associated with the commodity node based on a commodity association value between the plurality of commodity nodes, and use the commodity node, the commodity node associated with the commodity node, and a commodity node adjacent to the commodity node as a second recommendation candidate set;
and the screening module is used for screening out target commodities from a recommendation candidate set formed by the first recommendation candidate set and the second recommendation candidate set through a preset recommendation algorithm, and recommending the target commodities to a user.
9. A computing device comprising a processing component and a storage component; the storage component stores one or more computer instructions; the one or more computer instructions are configured to be invoked and executed by the processing component to implement the knowledge-graph-based commodity retrieval method according to any one of claims 1-7.
10. A computer storage medium storing a computer program which, when executed by a computer, implements the knowledge-graph-based commodity retrieval method according to any one of claims 1 to 7.
CN202410155628.2A 2024-02-04 2024-02-04 Commodity retrieval method and system based on knowledge graph Active CN117688251B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202410155628.2A CN117688251B (en) 2024-02-04 2024-02-04 Commodity retrieval method and system based on knowledge graph

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202410155628.2A CN117688251B (en) 2024-02-04 2024-02-04 Commodity retrieval method and system based on knowledge graph

Publications (2)

Publication Number Publication Date
CN117688251A true CN117688251A (en) 2024-03-12
CN117688251B CN117688251B (en) 2024-04-26

Family

ID=90137568

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202410155628.2A Active CN117688251B (en) 2024-02-04 2024-02-04 Commodity retrieval method and system based on knowledge graph

Country Status (1)

Country Link
CN (1) CN117688251B (en)

Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110222160A (en) * 2019-05-06 2019-09-10 平安科技(深圳)有限公司 Intelligent semantic document recommendation method, device and computer readable storage medium
CN112148889A (en) * 2020-09-23 2020-12-29 平安直通咨询有限公司上海分公司 Recommendation list generation method and device
CN112561581A (en) * 2020-12-14 2021-03-26 珠海格力电器股份有限公司 Recommendation method and device, electronic equipment and storage medium
WO2022142027A1 (en) * 2020-12-31 2022-07-07 平安科技(深圳)有限公司 Knowledge graph-based fuzzy matching method and apparatus, computer device, and storage medium
CN114723528A (en) * 2022-04-11 2022-07-08 青岛文达通科技股份有限公司 Commodity personalized recommendation method and system based on knowledge graph
CN115905472A (en) * 2022-12-07 2023-04-04 广州市南方人力资源评价中心有限公司 Business opportunity service processing method, business opportunity service processing device, business opportunity service processing server and computer readable storage medium
CN115936805A (en) * 2022-11-29 2023-04-07 广州欢聚时代信息科技有限公司 Commodity recommendation method, commodity recommendation device, commodity recommendation equipment and commodity recommendation medium
CN116187760A (en) * 2023-02-21 2023-05-30 浙江浙里信征信有限公司 Enterprise association influence measurement and risk identification method and device based on graph reconstruction
CN116304308A (en) * 2023-02-16 2023-06-23 西南交通大学 Research and development partner recommendation method based on technical innovation knowledge situation super network
CN116777550A (en) * 2023-05-26 2023-09-19 上海固瑞捷工业科技有限公司 Commodity recommendation method and device based on commodity relevance

Patent Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110222160A (en) * 2019-05-06 2019-09-10 平安科技(深圳)有限公司 Intelligent semantic document recommendation method, device and computer readable storage medium
CN112148889A (en) * 2020-09-23 2020-12-29 平安直通咨询有限公司上海分公司 Recommendation list generation method and device
CN112561581A (en) * 2020-12-14 2021-03-26 珠海格力电器股份有限公司 Recommendation method and device, electronic equipment and storage medium
WO2022142027A1 (en) * 2020-12-31 2022-07-07 平安科技(深圳)有限公司 Knowledge graph-based fuzzy matching method and apparatus, computer device, and storage medium
CN114723528A (en) * 2022-04-11 2022-07-08 青岛文达通科技股份有限公司 Commodity personalized recommendation method and system based on knowledge graph
CN115936805A (en) * 2022-11-29 2023-04-07 广州欢聚时代信息科技有限公司 Commodity recommendation method, commodity recommendation device, commodity recommendation equipment and commodity recommendation medium
CN115905472A (en) * 2022-12-07 2023-04-04 广州市南方人力资源评价中心有限公司 Business opportunity service processing method, business opportunity service processing device, business opportunity service processing server and computer readable storage medium
CN116304308A (en) * 2023-02-16 2023-06-23 西南交通大学 Research and development partner recommendation method based on technical innovation knowledge situation super network
CN116187760A (en) * 2023-02-21 2023-05-30 浙江浙里信征信有限公司 Enterprise association influence measurement and risk identification method and device based on graph reconstruction
CN116777550A (en) * 2023-05-26 2023-09-19 上海固瑞捷工业科技有限公司 Commodity recommendation method and device based on commodity relevance

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
艾宪仓;岳铁军;: "基于深度学习的小目标检测区域数据推荐算法", 信息技术, no. 05, 21 May 2020 (2020-05-21) *
韩慧;: "基于知识图谱的商品推荐系统", 信息通信, no. 06, 15 June 2020 (2020-06-15) *

Also Published As

Publication number Publication date
CN117688251B (en) 2024-04-26

Similar Documents

Publication Publication Date Title
CN109191240B (en) Method and device for recommending commodities
Guo et al. Application of an improved Apriori algorithm in a mobile e-commerce recommendation system
US8510298B2 (en) Method for relevancy ranking of products in online shopping
CN108960719B (en) Method and device for selecting products and computer readable storage medium
US8577753B1 (en) Community-based shopping profiles
CN109146626B (en) Fashionable garment matching recommendation method based on user dynamic interest analysis
US10664888B2 (en) Method and system for attribute extraction from product titles using sequence labeling algorithms
CN108665333A (en) Method of Commodity Recommendation, device, electronic equipment and storage medium
CN109840796B (en) Decision factor analysis device and decision factor analysis method
CA2655196A1 (en) System and method for generating a display of tags
JP2012529122A (en) System and method for learning user genre and style and matching products to user preferences
CN109460519B (en) Browsing object recommendation method and device, storage medium and server
KR102284148B1 (en) Method and System of recommending fashion based on vector based deep learning
US20230093756A1 (en) Systems and methods for generating recommendations
US20210217053A1 (en) Methods and apparatuses for selecting advertisements using semantic matching
KR101707660B1 (en) An e-commerce system based on interest category using related keywords
US20210090105A1 (en) Technology opportunity mapping
CN113077317A (en) Item recommendation method, device and equipment based on user data and storage medium
CN105931082B (en) Commodity category keyword extraction method and device
CN113032668A (en) Product recommendation method, device and equipment based on user portrait and storage medium
CN109446402B (en) Searching method and device
Wu et al. Discovery of associated consumer demands: Construction of a co-demanded product network with community detection
KR20220151574A (en) Method, server and computer program for uploading product sale contents using website crawling based on artificial intelligence
US20230005051A1 (en) Context-based personalization of user interfaces
CN111340566B (en) Commodity classification method and device, electronic equipment and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant