E-commerce recommendation method and system based on knowledge graph deep learning
Through knowledge graph deep learning technology, a recommendation system for textile e-commerce platform is built, which solves the problem of difficult extraction of the preference characteristics of unregistered customers, realizes personalized product recommendations, and improves browsing efficiency and recommendation accuracy.
Patent Information
- Application Number
- CN202310733112.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Priority Date
- 2022-11-09
- Filing Date
- 2023-06-19
- Publication Date
- 2025-01-07
- Estimated Expiration
- 2043-06-19
AI Technical Summary
In the textile e-commerce platform, customers are mainly unregistered tourists, and evaluation and transaction records are scarce, which makes it difficult for the recommendation system to accurately identify customer preference characteristics and provide efficient recommendations.
Using a recommendation method based on deep learning of knowledge graphs, we use browsing information to build a product relationship graph model, extract customer product interaction matrix, combine KGIN algorithm and graph aggregation operations to obtain customer and product intention characteristics, and make personalized recommendations.
It improves customers' efficiency in browsing products, improves the accuracy of the recommendation system and personalized recommendation capabilities, and is suitable for textile e-commerce platforms that lack registered users and transaction records.
Smart Images

Figure CN116757763B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of e-commerce technology, and in particular to an e-commerce recommendation method and system based on knowledge graph deep learning. Background Art
[0002] At present, textile e-commerce platforms belong to industry e-commerce platforms, and they mostly adopt a B2B e-commerce model that combines online exhibitions with offline transactions. They have a wide variety of products and a large number of customers. In order to improve customers' browsing efficiency and experience, it is necessary to develop a product recommendation system to actively recommend products to customers based on their preferences. Existing recommendation systems generally make combined recommendations based on registered users, but in textile e-commerce platforms, customers are mainly unregistered visitors, whose evaluations and transaction records are scarce, and their preferences are limited to browsing records. This brings challenges to the construction of recommendation systems, such as difficulty in identifying customers, difficulty in extracting preference features, and difficulty in ensuring recommendation performance. Therefore, designing a solution that can improve the accuracy of recommendations has become a technical problem that needs to be solved urgently by technicians in this field. Summary of the invention
[0003] In response to the above-mentioned defects, an embodiment of the present invention discloses an e-commerce recommendation method based on deep learning of knowledge graph, which can timely capture customers' preference characteristics for products, support personalized recommendations based on address information, and improve customers' browsing efficiency of products on e-commerce platforms.
[0004] The first aspect of the embodiment of the present invention discloses an e-commerce recommendation method based on knowledge graph deep learning, including:
[0005] Receive browsing information transmitted by the application interface end, wherein the browsing information is the operation content at the corresponding user e-commerce platform, wherein the browsing information includes product information and browsing logs; the browsing logs include browser IP address information; and determine customer information based on the browser IP address information;
[0006] The browsing information is sent to a pre-built commodity relationship graph model to extract entity relationships to obtain a customer commodity interaction matrix; a resource description framework is used in the commodity relationship graph model to describe commodity attribute relationships and commodity ownership relationships, wherein the commodity attribute relationships are expressed as a triple of commodity number, attribute relationship and attribute value number, and the commodity ownership relationship is expressed as a triple of commodity number, ownership and store number;
[0007] The browsing information, the customer-product interaction matrix and the product relationship graph model are transmitted to the recommendation algorithm model for recommendation identification to determine the product recommendation results for the corresponding customers.
[0008] As an optional implementation manner, in the first aspect of the embodiment of the present invention, after receiving the browsing information transmitted by the application interface end, the method further includes:
[0009] Performing a data cleaning operation on the browsing information to filter out non-product browsing records and browsing records with missing product fields in the browsing log;
[0010] The browsing information that has been filtered is judged for validity. When the number of times or the browsing time of a customer for the same product exceeds a first set value, it is determined that the product is valid for the customer. Otherwise, the corresponding browsing information is filtered.
[0011] As an optional implementation, in the first aspect of the embodiment of the present invention, the commodity relationship graph model is constructed by the following steps:
[0012] Obtain commodity attribute information from the corresponding e-commerce platform;
[0013] Extracting multiple commodity entities, commodity attributes, and store entities from the commodity attribute information, and determining relationships between the multiple commodity entities, between the commodity entity and the store entity, and between the commodity entity and the commodity attribute;
[0014] A product relationship graph model is constructed based on the relationships between multiple product entities, between product entities and store entities, and between product entities and product attributes.
[0015] As an optional implementation manner, in the first aspect of the embodiment of the present invention, after extracting multiple commodity entities, commodity attributes and store entities from the commodity attribute information, the method further includes:
[0016] Determining browsing adjacency relationships between commodities based on browsing relationships of commodities by customers from historical browsing information; the browsing adjacency relationships are that if multiple commodities are browsed in one session cycle, the multiple commodities are mutually browsed adjacency relationships;
[0017] When the number of mutual browsing adjacency relationships reaches a second set value, it is determined that there is a browsing adjacency relationship between the commodities.
[0018] As an optional implementation, in the first aspect of the embodiment of the present invention, the commodity relationship graph model further includes the following steps:
[0019] If the current product recommendation graph construction process is not the first product relationship graph model construction process, the multiple product entities and the relationships between the multiple product entities are integrated into the previous product relationship graph model to obtain the multiple product entities and the relationships between the multiple product entities of the current product relationship graph model.
[0020] As an optional implementation, in the first aspect of the embodiment of the present invention, the recommendation algorithm model includes a prediction function model, and the prediction function model is constructed by the following steps:
[0021] Based on the browsing log L, the customer-product interaction set (u, i) is divided into interaction positive sets and interaction negative set If there is a visit record of customer u to product i in the browsing log L, then determine otherwise Its formal representation is as follows:
[0022]
[0023]
[0024] The interaction is positively Interaction Negative Set The product browsing adjacency graph NG and the product knowledge graph KG are input into a pre-built prediction function formula to perform prediction to obtain corresponding prediction results; the prediction function formula is:
[0025]
[0026] in, express , f represents the prediction function, u represents the customer information, U represents the customer matrix, and U={u1,u2,…,um}, i represents the product information, I represents the product matrix, and I={i1,i2,…,in}.
[0027] As an optional implementation manner, in the first aspect of the embodiment of the present invention, after sending the browsing information to a pre-built product relationship graph model to extract entity relationships to obtain a customer product interaction matrix, the method further includes:
[0028] The browsing information is combined with the product relationship graph KG, and the KGIN algorithm is used to extract the intention of the customer-product interaction individual to obtain the corresponding individual intention features;
[0029] The access log L is combined with the product browsing adjacency graph NG, and the group intention of customer-product interaction is extracted by graph aggregation operation to obtain the corresponding group intention features.
[0030] The attention mechanism is used to fuse the individual intention features and the group intention features to form a fused feature, and the customer's interest score for the product is evaluated based on the fused feature.
[0031] As an optional implementation, in the first aspect of the embodiment of the present invention, the browsing information is combined with the product relationship graph model, and the KGIN algorithm is used to extract the intention of the customer-product interaction individual to obtain the corresponding individual intention set, including:
[0032] Decompose the acquired customer-product group (u, i) into an intention set C = {(u, p, i) | p∈P}; reorganize the original customer interaction records into an intention graph IG;
[0033] The KGIN algorithm is used to associate the intention with the product relationship graph KG, and the customer's intention p is defined as a nonlinear combination of different relationships in the knowledge graph. The embedded representation of the intention is:
[0034]
[0035] Among them, e r is the initial representation vector of relation r, and relation r is given an attention score α(r, p) to quantify its importance, w rp is the trainable weight of a specific relationship r and a specific intention p, is a d-dimensional randomly initialized vector, w r′p Indicates the weight of other intentions under the same relationship;
[0036] In the intent graph IG, use N u ={(p, i)|(u, p, i)∈C} to represent the intention perception history and first-order connectivity around customer u, and the customer’s embedding representation is integrated with the historical intention perception information through the embedding formula:
[0037]
[0038] In the formula, is the feature representation of the KGIN first-order path aggregation of customer u, ⊙ represents the dot product operation, β(u, p) is the weight for distinguishing the intentions of individual customers, and e p T Indicates e p The transposed vector of exp represents exponential operation, e p′ T represents the transpose of other intent vectors;
[0039] The KGIN algorithm uses a feature aggregation method based on relationships and nodes to obtain the feature aggregation of product i.
[0040]
[0041] Among them, N i is a set of triples associated with product i as the head entity, is the embedding representation of the tail entity v corresponding to product i,
[0042] Repeat the above steps to obtain a deeper information representation, and use multi-layer aggregation for each layer of information to obtain a wider receptive field. The final product and customer feature representation of KGIN is as follows:
[0043]
[0044]
[0045] In the formula, Q is the number of polymerization layers;
[0046] The access log L is combined with the product browsing adjacency graph NG, and a graph aggregation operation is used to extract the customer-product interaction group intention of the group to obtain the corresponding group intention feature.
[0047] Take the first-order aggregation to obtain the browsing adjacency relationship characteristics of customers and products. The browsing adjacency feature e of product i is i Nei It is expressed as follows:
[0048] Among them, N i Nei represents the set of all products that have a browsing adjacency relationship with product i, and j is N i Nei The products in e j is the initial representation vector of product j;
[0049] Describe customer preferences based on the customer-product interaction relationship to obtain customer browsing adjacency features. The browsing adjacency feature e of customer u is u Nei It is expressed as follows:
[0050]
[0051] Among them, N u It is the collection of browsed products of customer u.
[0052] As an optional implementation, in the first aspect of the embodiment of the present invention, the use of an attention mechanism to fuse the individual intention feature and the group intention feature to form a fused feature, and evaluating the customer's interest score for the product based on the fused feature, includes:
[0053] According to the concatenation formula, the browsing adjacency feature and the KGIN feature are concatenated in the same dimension to obtain a concatenated feature vector. The concatenation formula is:
[0054] e u concat =eu Nei ||e u KGIN
[0055] e i concat =e i Nei ||e i KGIN
[0056] Among them, e u concat and e i concat They represent the concatenated features of customer u and product i respectively, and || represents the vector concatenation operation;
[0057] The concatenated feature vector and the attention weight w att Multiply and normalize to select the weight key of the key feature weight ;
[0058] Use the same attention weight w for customer and product features att , according to key weight Perform dot multiplication with the concatenated features to obtain the fusion feature e u fusion and e i fusion ;
[0059] The fusion feature is input into the prediction formula to predict the customer's interest score for the product. The prediction formula is:
[0060] A second aspect of an embodiment of the present invention discloses an e-commerce recommendation system based on knowledge graph deep learning, including:
[0061] Receiving module: used to receive browsing information transmitted by the application interface end, wherein the browsing information is the operation content at the corresponding user's e-commerce platform, wherein the browsing information includes commodity information and browsing log; the browsing log includes browser IP address information; and determine customer information based on the browser IP address information;
[0062] Entity extraction module: used for sending the browsing information to a pre-built commodity relationship graph model to extract entity relationships to obtain a customer commodity interaction matrix; in the commodity relationship graph model, a resource description framework is used to describe commodity attribute relationships and commodity ownership relationships, wherein the commodity attribute relationships are expressed as a triple of commodity number, attribute relationship and attribute value number, and the commodity ownership relationship is expressed as a triple of commodity number, ownership and store number;
[0063] Recommendation module: used to transmit the browsing information and customer-product interaction matrix to the recommendation algorithm model for recommendation identification to determine the product recommendation results for the corresponding customers.
[0064] The third aspect of an embodiment of the present invention discloses an electronic device, comprising: a memory storing executable program code; a processor coupled to the memory; the processor calls the executable program code stored in the memory to execute the e-commerce recommendation method based on knowledge graph deep learning disclosed in the first aspect of the embodiment of the present invention.
[0065] The fourth aspect of an embodiment of the present invention discloses a computer-readable storage medium storing a computer program, wherein the computer program enables a computer to execute the e-commerce recommendation method based on knowledge graph deep learning disclosed in the first aspect of an embodiment of the present invention.
[0066] Compared with the prior art, the embodiments of the present invention have the following beneficial effects:
[0067] The e-commerce recommendation method based on deep learning of knowledge graph in the embodiment of the present invention outputs recommendation results reflecting customer browsing preferences by performing deep learning on knowledge graph and browsing logs; the application interface module accepts the retrieval of recommendation results by upper-level applications to realize the integration of recommendation applications; the recommendation method of this embodiment can capture the customer's preference characteristics for products, support personalized product recommendations, and improve the customer's browsing efficiency for products on the e-commerce platform. BRIEF DESCRIPTION OF THE DRAWINGS
[0068] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the drawings required for use in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0069] Figure 1 It is a flowchart of an e-commerce recommendation method based on knowledge graph deep learning disclosed in an embodiment of the present invention;
[0070] Figure 2 It is a schematic diagram of a flow chart of filtering browsing information disclosed in an embodiment of the present invention;
[0071] Figure 3 It is a schematic diagram of the process of constructing a commodity relationship graph model disclosed in an embodiment of the present invention;
[0072] Figure 4 It is a schematic diagram of the process of constructing the recommendation algorithm model disclosed in the embodiment of the present invention;
[0073] Figure 5 It is a technical framework diagram of the recommendation system disclosed in the embodiment of the present invention;
[0074] Figure 6 It is an ontology model diagram of the commodity knowledge graph disclosed in the embodiment of the present invention;
[0075] Figure 7 is a structural diagram of the KGCN model disclosed in an embodiment of the present invention;
[0076] Figure 8 is an information transfer diagram of the KGCN model disclosed in an embodiment of the present invention;
[0077] Fig. 9 It is a schematic diagram of the first-order aggregation process of the KGCN model disclosed in an embodiment of the present invention;
[0078] Fig.10 It is a schematic diagram of the recommended principle disclosed in the embodiment of the present invention;
[0079] Fig.11 is a deployment diagram of an e-commerce recommendation system disclosed in an embodiment of the present invention;
[0080] Fig.12 is an example diagram of the textile e-commerce knowledge graph disclosed in an embodiment of the present invention;
[0081] Fig.13 is a curve diagram showing how the accuracy of algorithm recommendation disclosed in an embodiment of the present invention changes with the number of learning iterations;
[0082] Fig.14 It is a comparison diagram of AUC with and without browsing adjacency relationship disclosed in an embodiment of the present invention;
[0083] Fig.15 It is a comparison diagram of whether or not the ACC disclosed in the embodiment of the present invention has a browsing adjacency relationship;
[0084] Fig.16 This is the KGIN-DF algorithm framework diagram disclosed in the embodiment of the present invention
[0085] Fig.17 is a schematic diagram of KGIN feature extraction disclosed in an embodiment of the present invention;
[0086] Fig.18 is a schematic diagram of browsing adjacency feature extraction disclosed in an embodiment of the present invention;
[0087] Fig.19 is a schematic diagram of attention feature fusion disclosed in an embodiment of the present invention;
[0088] Fig. 20 It is a structural diagram of an e-commerce recommendation system based on knowledge graph deep learning provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0089] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0090] It should be noted that the terms "first", "second", "third", "fourth", etc. in the specification and claims of the present invention are used to distinguish different objects rather than to describe a specific order. The terms "including" and "having" in the embodiments of the present invention and any variations thereof are intended to cover non-exclusive inclusions. For example, a process, method, system, product or device including a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.
[0091] Classic recommendation algorithms can be divided into three categories: content filtering, collaborative filtering, and model filtering. All three types of classic algorithms require explicit customer transaction rating records. For textile e-commerce platforms that lack rating records, it is necessary to convert browsing logs into rating records, such as converting according to the number of browsing times or duration. In fact, browsing reflects customer preferences much less than transaction and rating records. The conversion from browsing to rating will introduce a lot of noise and lead to poor recommendation performance. For textile e-commerce recommendations, the following problems still need to be solved: the identification problem of non-registered visitors; the construction problem of knowledge graphs suitable for deep learning; and the design problem of deep learning frameworks that support multiple algorithms. The embodiment of the present invention discloses an e-commerce recommendation method, system, electronic device, and storage medium based on knowledge graph deep learning. By deep learning the knowledge graph and browsing logs, the recommendation results reflecting the customer's browsing preferences are output; the application interface module accepts the retrieval of the recommendation results by the upper-level application to realize the integration of the recommendation application; the recommendation method of this embodiment can capture the customer's preference characteristics for the product, support personalized product recommendations, and improve the customer's browsing efficiency for the e-commerce platform.
[0092] The recommendation method based on knowledge graph in the embodiment of the present invention can not only make recommendations based on historical browsing logs, but also combine product relationships, which is the current development trend of recommendation technology. According to the technology, it can be divided into two types of recommendation algorithms: path coding-based and deep learning-based. The recommendation algorithm based on path coding relies on human experience. It sets the recommendation path based on the relationship between customers and products, and then takes the products visited by customers as the starting point, calculates the similarity of products along the recommendation path, and then makes recommendations based on the similarity. The recommendation method based on path coding is not generalizable enough because it relies on human experience.
[0093] The recommendation method based on deep learning takes the knowledge graph and customer interaction records as input, and predicts the browsing probability of unknown customers for products through deep learning, enriching the recommendation path from customers to products, and can alleviate the impact of missing rating records. It can be regarded as a hybrid algorithm based on content and collaborative filtering. At present, there are mainly three classic models: RippleNet, KGCN (Knowledge Graph Convolutional Networks) and KGAT (Knowledge Graph Attention Network) and their derivative series. RippleNet uses the multi-hop relationship of project connections to strengthen the embedded representation of nodes, KGCN achieves more accurate recommendations by weighting the graph relationship, and KGAT introduces the customer-product interaction matrix in the knowledge graph and weights the graph relationship to achieve recommendation. The CKAN (Collaborative Knowledge-aware Attentive Network) model is a new type of derivative knowledge graph recommendation algorithm. Compared with the above three classic models, it mainly improves the initial representation of customers. It uses the set of interacted products to express customers. In this way, as long as there is an interaction record between customers and products, recommendations can be made without re-learning, which improves the scope of application and reduces the frequency of learning.
[0094] The textile e-commerce platform belongs to the industry e-commerce platform, which mostly adopts the B2B e-commerce model that combines online exhibitions with offline transactions. It has a wide variety of products, a huge number of customers, and a strong demand for recommendations. However, customers are mainly unregistered visitors, lacking evaluation and transaction records, and their preference feature extraction can only rely on browsing records. The scarcity of customer preference association information leads to poor results of traditional recommendation algorithms such as customer collaborative filtering, product collaborative filtering, and singular value decomposition based on the customer-product evaluation matrix. The embodiment of the present invention provides a textile e-commerce recommendation system based on deep learning of knowledge graphs. According to the characteristics of the stability of the B2B e-commerce customer browsing terminal, the browsing terminal IP address is used to identify the customer, solving the problem of identifying unregistered customers;
[0095] The mutual association between products is established through product attributes and browsed features to make up for the lack of information on customer preference relationships; the recommendation performance is guaranteed by establishing a system framework that supports multiple knowledge graph deep learning recommendation algorithms. The system includes three modules: knowledge graph construction, deep learning, and application interface. The knowledge graph construction module is based on the product attributes, store attributes, and browsing logs of the textile e-commerce platform. After data extraction, conversion, and loading, it constructs a knowledge graph that reflects the entity relationships between products, stores, and customers. In particular, the browsing adjacency relationship between products is defined based on the browsing log, and the direct association between products is established. The deep learning module builds a unified deep learning data set and evaluation index system based on the knowledge graph relationship triples, and provides knowledge graph deep learning recommendation algorithms such as RippleNet, KGCN, KGAT, and CKAN. It performs deep learning based on knowledge graphs and browsing logs, and outputs recommendation results that reflect customer browsing preferences. The application interface module accepts the retrieval of recommendation results by upper-level applications to realize the integration of recommendation applications. This recommendation system can capture customer preference characteristics for products, support personalized product recommendations, and improve customer browsing efficiency for e-commerce platforms.
[0096] Embodiment 1
[0097] See also Figure 1 , Figure 1 It is a flow chart of the e-commerce recommendation method based on knowledge graph deep learning disclosed in the embodiment of the present invention. Among them, the execution subject of the method described in the embodiment of the present invention is an execution subject composed of software and / or hardware, and the execution subject can receive relevant information by wired or / and wireless means, and can send certain instructions. Of course, it can also have certain processing functions and storage functions. The execution subject can control multiple devices, such as a remote physical server or cloud server and related software, or it can be a local host or server and related software that performs related operations on a device placed somewhere. In some scenarios, multiple storage devices can also be controlled, and the storage devices can be placed in the same place or different places as the devices. For example Figure 1 As shown, the e-commerce recommendation method based on knowledge graph deep learning includes the following steps:
[0098] S101: receiving browsing information transmitted by the application interface end, wherein the browsing information is the operation content at the corresponding user e-commerce platform, wherein the browsing information includes product information and browsing logs; the browsing logs include browser IP address information; and determining customer information based on the browser IP address information;
[0099] The main purpose of this step is to obtain basic browsing data. Specifically, the application interface mainly provides recommendation function calls for applications in the form of http services. The service program retrieves offline recommended documents obtained by deep learning according to application requests, and responds to the retrieval results in Json format. The interface details are designed as follows: the interface protocol is http get; the request parameters are UserId (user ID), Model (model name), code (return code), Msg (return message) and data (return data), where the model is enumerated in {RippleNet, KGCN, KGAT, CKAN, ...}; return code: the same as http definition, such as 200 for success; return message: query success, or failure reason, such as customer does not exist; return data: (product ID, customer browsing probability) list, output as Json object.
[0100] More preferably, Figure 2 is a flow chart of filtering browsing information disclosed in an embodiment of the present invention, such as Figure 2 As shown, after the browsing information transmitted by the receiving application interface end is received, it also includes:
[0101] S1011: performing a data cleaning operation on the browsing information to filter out non-product browsing records and browsing records with missing product fields in the browsing log;
[0102] S1012: Validity judgment is performed on the browsing information that has been filtered. When the number of times or the browsing time of a customer for the same product exceeds a first set value, the product is determined to be valid for the customer. Otherwise, the corresponding browsing information is filtered.
[0103] The customer-product browsing relationship is mainly constructed based on the browsing log. Assuming that the browsing log contains information such as the browser IP address, browsing time, and browsed product ID, the browser IP address is used as the customer entity identifier, and the browsing relationship is expressed as (customer IP, browsing, product ID). In this way, the relationship between customers and products is constructed. The above method solves the problem of corresponding non-registered user information.
[0104] In order to enhance the effectiveness of browsing relationships, we add a valid browsing judgment here. Only when a customer browses a product more than twice, it is considered that the customer browses the product effectively. Otherwise, it is considered that the customer browses the product unintentionally, which is not very valuable for recommendation. First, we filter out invalid browsing in the browsing log, and then generate a triple (customer IP, browsing, product ID) for valid browsing. Through the above steps, we can achieve more accurate push operations for customers.
[0105] S102: Send the browsing information to a pre-built commodity relationship graph model to extract entity relationships to obtain a customer commodity interaction matrix; in the commodity relationship graph model, a resource description framework is used to describe commodity attribute relationships and commodity ownership relationships, wherein the commodity attribute relationships are expressed as a triple of commodity number, attribute relationship, and attribute value number, and the commodity ownership relationship is expressed as a triple of commodity number, ownership, and store number;
[0106] In the embodiment of the present invention, the textile e-commerce platform is conducted in the mode of online display and offline transactions. The registered customers are sparse, and the transaction data and rating data are scarce. Considering the availability of data, the recommendation system is mainly built on the basis of data such as stores, products, and browsing logs. The products and stores are in an affiliation relationship, and the products are related to each other through attribute entities, and there is no direct relationship between them.
[0107] This module first extracts data such as stores, products, and browsing logs from the textile e-commerce platform data interface, and then cleans the data to filter out non-product (exhibitions, stores, notifications, etc.) browsing records and browsing records with missing product ID fields in the browsing logs. Then, objects such as stores, products, and browsing are loaded into the program for entity conversion.
[0108] The entities in the knowledge graph mainly include: stores, goods, product attributes (such as ingredients, weaving methods, uses, etc.), customers, etc. Store and product objects are directly converted into store and product entities in the knowledge graph. For product attributes, each type of attribute is a type of entity, and each discrete value in the value range of this type of attribute can be converted into a product attribute entity. For example, for ingredient attributes, entities such as cotton, wool, mulberry silk, and denim can be extracted.
[0109] In particular, for the extraction of customer entities, since they are mainly unregistered visitors, information cannot be extracted from the customer membership registration form like in general e-commerce systems. Here, it is extracted indirectly from the browsing log. Due to the transaction characteristics of B2B, the customers of the textile e-commerce platform are mainly purchasers of clothing processing enterprises. A clothing processing enterprise may have multiple purchasers, but the purpose of browsing goods is to purchase materials for the enterprise, and they mainly access the e-commerce platform through the enterprise network. The browsing IP recorded in the browsing log is relatively stable. Here, the customer is defined as a group of purchasers of a clothing processing enterprise rather than a single purchaser, and the browsing IP in the browsing log is used for identification. One IP represents one customer entity.
[0110] More preferably, Figure 3 is a schematic diagram of the process of constructing the commodity relationship graph model disclosed in the embodiment of the present invention, such as Figure 3 As shown, the commodity relationship graph model is constructed through the following steps:
[0111] S1021: Acquire commodity attribute information from the corresponding e-commerce platform;
[0112] S1022: extracting multiple commodity entities, commodity attributes, and store entities from the commodity attribute information, and determining relationships between the multiple commodity entities, between the commodity entity and the store entity, and between the commodity entity and the commodity attribute;
[0113] S1023: Construct a product relationship graph model based on the relationships between multiple product entities, between product entities and store entities, and between product entities and product attributes.
[0114] The specific process of building product attribute relationships is as follows: products, stores, and product attribute values are regarded as entity objects. Starting from the loaded product information, product attribute relationships and the relationship between products and stores are built. Both products and stores use unique IDs as entity identifiers, and the representation of their relationships is described using the RDF standard. RDF (Resource Description Framework) is a resource description language that describes object relationships and attributes in the form of (head entity, relationship, tail entity) or (entity, attribute, attribute value).
[0115] For commodity attribute relationships, the commodity is the head entity and the relationship is the specific attribute. For example, the commodity attributes of textiles mainly include: product classification, composition, weaving method, use, color, elasticity, scope of application, manufacturing process, etc. Each attribute is a type of relationship, and the tail entity is the attribute value. Each attribute entity is assigned a unique ID. After processing, the commodity attribute relationship will be expressed as a triple of (commodity ID, attribute relationship, attribute value ID). The relationship between commodities and stores is a one-to-many relationship, that is, a store has multiple commodities, and a commodity belongs to only one store, which will be converted into a triple of (commodity ID, belonging to, store ID).
[0116] The process of constructing the customer-product browsing relationship is mainly based on the browsing log. Assuming that the browsing log contains information such as the browser IP address, browsing time, and browsed product ID, the browser IP address is used as the customer entity identifier, and the browsing relationship is expressed as (customer IP, browsing, product ID). In this way, the relationship between customers and products is constructed. In order to enhance the effectiveness of the browsing relationship, a valid browsing judgment is added here. Only when the customer browses the product more than twice, it is considered that the customer has browsed the product effectively. Otherwise, it is considered that the customer has browsed the product unintentionally, which is of little value for recommendation. First, invalid browsing is filtered out in the browsing log, and then a triple (customer IP, browsing, product ID) is generated for the valid browsing.
[0117] More preferably, after extracting a plurality of product entities, product attributes and store entities from the product attribute information, the method further includes:
[0118] S1021a: Determine browsing adjacency relationships between products based on browsing relationships of customer products in historical browsing information; the browsing adjacency relationship is that if multiple products are browsed in one session cycle, the multiple products are mutually browsed adjacency relationships;
[0119] S1021b: When the number of mutual browsing adjacency relationships reaches a second set value, it is determined that there is a browsing adjacency relationship between the products.
[0120] In order to enhance the direct connection between products, the browsing adjacency relationship between products is derived based on the customer-product browsing relationship. That is, if customer u browses three products va, vb, and vc within a session cycle (such as 60 minutes), then va, vb, and vc are mutually browsed adjacency relationships. In order to reduce occasional browsing adjacency relationships, filtering rules are further established, that is, the number of mutual browsing adjacency relationships reaches a certain threshold (such as 2 times) before it is determined that there is a browsing adjacency relationship between two products. The browsing adjacency relationship reflects the potential combination relationship between products. For example, if a customer has an order for jeans, he will repeatedly browse denim fabrics, copper buttons, leather accessories, etc. in the mall. The products he browsed once may very likely be combined into a batch of clothing, but there is no combination relationship between products in the available data, and this deficiency can be compensated by the derivation of browsing adjacency relationships. Based on the above relationship construction, the ontology model of the textile e-commerce knowledge graph can be summarized, such as Figure 6 shown.
[0121] The browsing adjacency relationship is a relationship between products that is expanded based on the browsing logs. It realizes the direct connection between products. The KGCN algorithm is used to compare the recommendation performance with and without the browsing adjacency relationship. The AUC and ACC indicators are as follows: Fig.14 and Fig.15 As shown in the figure. The with-browsing adjacency is marked as with no-consequence relationship, and the without-browsing adjacency is marked as without no-consequence relationship. Fig.14 and Fig.15 It can be seen that the AUC and ACC with browsing adjacency relationship are significantly better than those without browsing adjacency relationship, which can also verify the effectiveness of the browsing adjacency relationship proposed in the embodiment of the present invention.
[0122] More preferably, the commodity relationship graph model further includes the following steps:
[0123] If the current product recommendation graph construction process is not the first product relationship graph model construction process, the multiple product entities and the relationships between the multiple product entities are integrated into the previous product relationship graph model to obtain the multiple product entities and the relationships between the multiple product entities of the current product relationship graph model.
[0124] The above steps can be used to continuously update and optimize the product relationship graph model to build a more accurate graph relationship model for more accurate data recommendations.
[0125] S103: Transmitting the browsing information, the customer-product interaction matrix and the product relationship graph model to a recommendation algorithm model for recommendation identification to determine the product recommendation result for the corresponding customer.
[0126] like Figure 5 As shown, the deep learning module includes functional submodules such as deep learning data set construction, deep learning recommendation algorithm library configuration, deep learning task startup and recommendation result export. The solution of the embodiment of the present invention is based on the common characteristics of knowledge graph deep learning recommendation algorithms such as RippleNet, KGCN, KGAT, and CKAN, and further processes the content in the commodity relationship documents and browsing relationship documents to make them adapt to the training of deep learning algorithms.
[0127] First, the deep learning dataset is defined as follows:
[0128] (1) Customer-product interaction matrix Y: Assuming that the textile e-commerce recommendation scenario contains m customers U = {u1, u2, ..., um} and n products V = {v1, v2, ..., vn}, the customer-product interaction matrix Y∈R can be obtained based on the browsing relationship documents exported by the knowledge graph construction module: m×n ,for When there is a browsing relationship triple between u and v, then y uv =1, otherwise y uv = 0. It should be noted that y uv =0 does not mean that customer u is not interested in product v, perhaps it is because u failed to find v.
[0129] (2) Knowledge graph G: The customers, stores, commodities and their attribute values (such as specific merchants, product ingredients, uses, etc.) in the knowledge graph are collectively referred to as entity set E, and the commodity attribute relationship and customer-commodity browsing relationship system are referred to as relationship set R. Then the knowledge graph can be represented as G = {(h,,r,t)|h,t∈E,r∈R}. (h,r,t) is a relationship triple, such as {knitted jacquard houndstooth, merchant, Terylon} indicates that the merchant of the commodity "knitted jacquard houndstooth" is "Teylon". Because there are duplications in the commodity and merchant names, in the actual triple expression, entities are all identified by id. Through the commodity knowledge graph, the paths between commodities are reachable. For example, another type of commodity "Caiyunsha" of "Teylon" forms a path reachable with "knitted jacquard houndstooth" through {Caiyunsha, merchant, Terylon}. Note that in the process of graph traversal, the edges composed of relationships are regarded as bidirectional edges.
[0130] The deep learning dataset construction module mainly converts the browsing relationship document content into the customer-product interaction matrix Y according to the dataset definition, and converts the browsing relationship document and product relationship document content into the product knowledge graph G.
[0131] Based on the above data set, the customer-product recommendation problem can be abstracted into the prediction problem of customer-product interaction relationship, that is, given Y and G, and u∈U, v∈V, predict y uv The task of the recommendation algorithm is to build a prediction function model as shown in formula (1).
[0132]
[0133] In the formula, That is, the predicted value of the interaction relationship (i.e., browsing) between u and v, and Θ is the parameter set of the function f.
[0134] Deep learning recommendation algorithm library configuration,RippleNet, KGCN, KGAT, CKAN and other knowledge graph deep learning recommendation algorithms are,generators of the function f in formula (1). They are composed of neural networks with,parameter sets Θ. Each algorithm has a specific neural network structure,and obtains the parameter set Θ through deep learning.
[0135] This module is mainly responsible for the unified configuration of the context parameters required for the operation of these algorithms. Including: training data path, that is, the access path of product relationship documents and browsing relationship documents; training result output path; hyperparameters of each algorithm, including: learning rate, number of neural network layers, number of neuron nodes in each layer, etc., as well as personalized parameters of each algorithm. Deep learning task initiation and recommendation result export, start the deep learning task according to a certain scheduling strategy (such as once a week) as needed. After the learning task is completed, a new customer-product browsing probability prediction function f is generated. Based on this function, the browsing probability of any (u, v) pair in Y can be calculated. The larger the value, the greater the potential interest of customer u in product v. For each customer u, according to Sort the products v and filter out y uv = 1, the first K products can be regarded as the recommended product set of u.
[0136] Because the number of customers and products is large, the number of their combinations will exceed 1 billion, and online computing will have a significant delay, so offline computing is used for recommendation. That is, background calculation is performed according to function f to generate a list of offline recommended products for all customers at one time, and the result is stored as a text file with the following content format:
[0137] Customer 1: Item 11, Item 12, Item 13, …, Item 1K;
[0138] Customer 2: Item 21, Item 22, Item 23, …, Item 2K;
[0139] Customer 3: Item 31, Item 32, Item 33, ..., Item 3K;
[0140] More preferably, the recommendation algorithm model includes a prediction function model, wherein the prediction function model is:
[0141] Where u is customer information, U is the customer matrix, and U = {u1,u2,…,um}, v is product information, V is the product matrix, and V = {v1,v2,…,,vn}, Θ is the parameter set of function f, is the browsing prediction value of u and v;
[0142] Figure 4 is a flow chart of the construction of the recommendation algorithm model disclosed in the embodiment of the present invention, such as Figure 4 As shown, the recommendation algorithm model is constructed through the following steps:
[0143] S1031: Representing entities and relationships in the product relationship graph model as d-dimensional embedding vectors by using a random initialization vector or a Trans embedding representation algorithm;
[0144] S1032: Modify the embedding vectors of entities and relationships through domain information propagation and aggregator to obtain the final domain representation vu; wherein the linear combination of neighbor information is used to characterize the domain information of the product;
[0145] S1033: Based on the customer information u and the final domain representation vu, a browsing probability prediction function is defined, and a model calculation is performed through a cross entropy function until the set conditions are met to complete the construction of the recommendation algorithm model. The cross entropy function is:
[0146] Among them, yi represents the actual browsing relationship between (u,v) pairs in the customer-product interaction matrix Y, is the predicted browsing probability of (u,v) pair, u is the customer information, and v is the product information.
[0147] In an embodiment of the present invention, in order to further illustrate the working mechanism of the deep learning algorithm in the system framework, the KGCN (Knowledge Graph Convolutional Networks) deep learning algorithm is taken as an example to illustrate the calculation process of the recommendation algorithm based on knowledge graph deep learning.
[0148] In the embodiment of the present invention, the customer-product interaction matrix Y and the knowledge graph G of the data set required for KGCN deep learning have been constructed. The basic idea of KGCN is: using random initialization vectors or Trans series graph embedding representation algorithms, the entities (including all entities such as customers, products, stores, product attributes, etc.) and relationships in G are represented as d-dimensional embedding vectors (d is set manually), and then the embedding vectors of entities and relationships are corrected through neighborhood information propagation and aggregation. Unless otherwise specified below, the entity and relationship symbols involved in the calculation are their embedding vectors. The above algorithm has the following two main features: by aggregating neighbor information, the local neighborhood structure can be better captured and stored in each entity; the aggregation weight between neighbor entities depends on the specific customer u and relationship r, which not only represents the semantic information of G but also reflects the customer's personalized interest in the relationship.
[0149] The algorithm structure is as follows Figure 7 As shown in formula (1), the input of the forward calculation process of KGCN is a customer-product pair (u, v), as well as the customer-product interaction matrix Y, the knowledge graph G and the algorithm parameter set Θ, and the output is the browsing probability of customer u for product v
[0150] Specifically, we first define the preference score function of customer u and relationship r, as shown in formula (2), which is used to characterize the degree of customer preference for commodity relationships. For example, in the textile e-commerce platform, some customers prefer materials, while others prefer uses. The specific preference formula is as follows:
[0151]
[0152] In the formula, It represents the preference score of u to r, g is the preference function, and the inner product function is generally selected, that is, the inner product of the embedded vectors of u and r is calculated. The more similar the two are, the larger the inner product value is and the higher the preference score is.
[0153] Then, the linear combination of neighbor information is used to characterize the neighborhood information of product v, which is defined as formula (3):
[0154]
[0155] Where r ve Represents the relationship between product v and customer entity e. The entities in entity G here include the product itself, as well as stores, customers, product attribute entities, etc. N(v) represents the set of all entities directly connected to v. for The normalized representation of is calculated as shown in formula (4);
[0156]
[0157] In order to avoid excessive pressure on neighborhood information calculation due to too many neighbors for a certain node v, a hyperparameter K can be added to the input parameters. If the number of neighbors of v exceeds K, only K neighbors are selected for calculation instead of all its neighbors, so that the calculation mode of each batch remains stable.
[0158] At this time, the neighborhood of v is represented by And it satisfies the conditions shown in formula (5).
[0159] s(v)→{e|e∈N(p)}, |S(p)|≤K (5)
[0160] The last step of the KGCN layer is to aggregate the vector representation of the product node v and its neighborhood representation into a single vector. The vector of v here is the vector generated in the previous round of iterative updates. You can choose one of the following three aggregators to perform the calculation.
[0161] Sum aggregation (sum), add the two representation vectors, and then perform nonlinear transformation, as shown in formula (6),
[0162]
[0163] Concatenation aggregation (concat), concatenate two representation vectors, such as two vectors with dimensions of d, the dimension after concatenation is 2d, and then perform nonlinear transformation, such as formula (7):
[0164]
[0165] Neighbor aggregation (neighbor), the neighborhood of product v is represented as After nonlinear transformation, the output is as follows:
[0166]
[0167] In the above formula, σ() is a nonlinear activation function, such as Relu, Sigmoid, W is the linear transformation matrix, b is the bias term, which is the basic element of a fully connected layer of GCN and a component of the algorithm parameter set Θ, which needs to be acquired through learning.
[0168] For the above calculation process, Figure 8 Example shown.
[0169] In the figure above, it is assumed that K = 2. In the KGCN model, the relations in the knowledge graph G are all represented by undirected edges. The blue node in the figure is the commodity entity v, h = 1 is its first-order neighbor, h = 2 is its second-order neighbor, and the blue arrow is the direction of information transmission. The training process is the process of commodity v continuously aggregating the information of its h-order neighbors. Its first-order aggregation is as follows: Fig. 9 shown.
[0170] Assume K = 4, the green circle is the neighborhood representation, and the blue circle is the aggregated representation. In the iterative process, for example, for the h+1th iteration, the vector representation of entity e obtained in the hth iteration is used as the initial value, and then the neighborhood representation of the current product v is updated and calculated, and then aggregated with the hth neighborhood representation to obtain the h+1th neighborhood representation of v. In the following, it is assumed that the final neighborhood representation of v is the vector v u Finally, based on u and v u Define the browsing probability prediction function. Here, the sigmoid function is used as the prediction function, as shown in formula (9):
[0171]
[0172] In model learning, the loss function is defined as the cross entropy function, as shown in formula (10):
[0173]
[0174] In the formula, y i Indicates the actual browsing relationship between (u,v) in the interaction matrix Y, where 1 is true and 0 is false. is the predicted browsing probability of (u,v) pair, and log is the logarithmic function.
[0175] More preferably, the recommendation algorithm model is any one of the RippleNet recommendation model, the KGCN recommendation model, the KGAT recommendation model, and the CKAN recommendation model; and each recommendation model stores corresponding neural network parameters;
[0176] and / or, the aggregator is any one of sum aggregation, concatenation aggregation and neighbor aggregation;
[0177] And / or, the recommendation method uses an offline calculation method to perform the recommendation operation, performs background calculations based on a pre-built knowledge graph and a recommendation algorithm model, generates an offline recommendation list for all customers at one time, and stores the result as a text file;
[0178] And / or, in the recommendation method, the product relationship graph model and the recommendation algorithm model are both deployed in a GPU deep learning server, and the application interface is deployed in a Web server. The above three modules, namely, knowledge graph construction, deep learning, and application interface, can be independently deployed on different servers. According to the computing characteristics, it is recommended that the first two modules be deployed in a GPU deep learning server, and the application interface be deployed in a Web server. Fig.11 shown.
[0179] like Fig.10 As shown in the figure, customer u1 browsed three products, i1, i2, and i3; u2 browsed two products, i3 and i4; and u3 only browsed one product, i5. If the collaborative filtering recommendation algorithm is used, then product i4 will be recommended to u1, while i5 will not be recommended. From the blue dotted box in the figure, we can see that the relationship r3 between i3 browsed by u1 and i5 not browsed by u1 both points to e2. From the recommendation perspective, i5 should have a certain recommendation value. However, due to the lack of knowledge graph embedding, the baseline algorithm ignores a lot of auxiliary information, and the recommendation effect is not reasonable.
[0180] The KGCN model combines the auxiliary characteristics of the knowledge graph and has a good effect on personalized recommendations. The model assigns a weight based on the customer's attention to each relationship, and it will perform neighbor aggregation in a biased manner based on this weight. As shown in the figure above, since u1 browsed the three products i1, i2, and i3, the first two products have a common relationship (r2), and the third product has a single relationship (r3), it can be considered that u1 cares more about the main purpose of the product, so it is entirely possible to recommend some products with e1 as the attribute to customers, such as product i4 in the figure, which has a high recommendation probability. Customers may not care so much about the two relationships r3 and r4 of the product, so product i5 as shown in the figure will be recommended, but the recommendation strength will be smaller. For a complete knowledge graph, the relationships between products are rich, the calculation process of the prediction score will be more complicated, and the final recommended products will be more diverse.
[0181] Because the stores, products, and browsing logs in the textile e-commerce platform are dynamically updated, in order to ensure the effectiveness of the recommendation, a data update strategy is established to regularly synchronize customers, products, and browsing logs, and conduct regular learning, such as once a week, to update the customer offline recommended product list.
[0182] Based on the data of a textile e-commerce website, the knowledge graph construction module was run to realize the construction of product attribute relationships and customer-product relationships, and the entity relationship RDF triple file was exported. In order to realize the visualization of the knowledge graph, the RDF triples were imported into the Neo4j graph database instance using tools, and then the Neo4j graph display tool was used to browse the knowledge graph. For example, Fig.12 shown.
[0183] RippleNet, KGCN, KGAT, CKAN and other knowledge graph deep learning algorithms are deployed in the deep learning server. They are run according to the logic of data set construction, recommendation algorithm library configuration, task startup and recommendation result export. Finally, the recommendation results are obtained and the performance of each algorithm is calculated. Table 1 shows the final recommendation performance of each algorithm. Fig.13 The curves showing the change of recommendation accuracy (ACC) of each algorithm with the number of learning iterations (Epoch) are shown.
[0184] algorithm AUC F1 ACC CKAN 0.8629 0.8090 0.7657 KGAT 0.8766 0.8159 0.8241 KGCN 0.8575 0.8100 0.7782 Ripplenet 0.8464 0.8011 0.8004
[0185] Table 1 Recommended performance of deep learning algorithms
[0186] From Table 1, we can see that the overall performance of the deep algorithms is different. For example, the ACC of the KGAT algorithm is 0.0584 higher than that of the CKAN algorithm, which shows that it is necessary to use multiple recommendation algorithms. The convergence speed of each algorithm can be seen from the curve. Although KGAT converges slowly, it can get good results.
[0187] User collaborative filtering (User-CF), item collaborative filtering (Item-CF) and singular matrix decomposition model (BiasSVD) are used to learn with the customer-item interaction matrix Y as input. The obtained ACC indicators are shown in Table 2.
[0188] algorithm User-CF Item-CF BiasSVD ACC 0.32% 0.07% 10.52%
[0189] Table 2 Recommended performance of traditional algorithms
[0190] As can be seen from the table, the recommendation accuracy of the three traditional algorithms is very low, and there is a huge gap with the deep learning algorithm. This shows that relying solely on browsing logs with sparse information cannot achieve effective recommendations, and building product information associations through knowledge graphs and conducting deep learning based on them is an effective way to solve the problem of sparse information recommendations.
[0191] The e-commerce recommendation method based on deep learning of knowledge graph in the embodiment of the present invention outputs recommendation results reflecting customer browsing preferences by performing deep learning on knowledge graph and browsing logs; the application interface module accepts the retrieval of recommendation results by upper-level applications to realize the integration of recommendation applications; the recommendation method of this embodiment can capture the customer's preference characteristics for products, support personalized product recommendations, and improve the customer's browsing efficiency for products on the e-commerce platform.
[0192] Embodiment 2
[0193] In addition to the method adopted in the first embodiment, feature extraction modeling can be further performed. Unlike algorithms such as KGCN, KGAT, and CKAN, which directly extract product features based on node relationships in the knowledge graph, the KGIN algorithm has two improvements: (1) Define the customer's interactive intention for the product based on the relationship combination of the knowledge graph to obtain better model capacity and interpretability. (2) Consider the customer-product relationship with a more fine-grained relationship path and long-term semantics. Due to the scarcity of customer-product interaction information, customers' browsing of different products has a strong correlation. This application will further improve the KGIN algorithm and propose a KGIN (KGNI with dual feature fusion, KGIN-DF) deep learning model with dual feature fusion. The main ideas are as follows: Fig.16 As shown in the figure; the dotted box in the figure represents two basic feature extraction models, the upper left is the KGIN model, and the lower left is the browsing adjacency relationship model. The obtained features are processed into the final customer and product feature vectors through the attention feature fusion mechanism. Represents a splicing operation, represents the inner product operation, represents matrix bitwise multiplication, represents the softmax operation, Represents the dot product operation.
[0194] The algorithm first randomly initializes the entities and relations in the product knowledge graph KG, as well as the customers, into a high-dimensional real-valued initial representation vector generated by the xavier_uniform algorithm. In the following calculations, ei, eu, ev,er are used to represent the initial representation vectors of product i, customer u, product attribute entity v, and relationship r, respectively, and the vector dimension is d. Then, the initial representation vectors eu and ei of the (u,i) pair are used as input, and the interaction positive set of the (u,i) pair is The attribution score is used as the output, and the embedded feature vectors of u and i are extracted through deep learning. The main idea of the proposed KGIN-DF algorithm can be described in three parts:
[0195] (1) Combine the access log L with the product knowledge graph KG and use the existing KGIN algorithm to extract the customer-product interaction graph intention;
[0196] (2) The access log L is combined with the product browsing adjacency graph NG, and graph aggregation operation is used to extract the group intention of customer-product interaction.
[0197] (3) The two intent features obtained in (1) and (2) are fused using the attention mechanism to form a fused feature and then evaluate the customer-product interest score. Part (1) reuses the basic KGIN algorithm, while parts (2) and (3) are the extended parts proposed in this application.
[0198] Based on the product knowledge graph and product browsing adjacency graph, the interaction intention between customers and products is captured respectively, so as to provide more accurate product recommendations. It is expected that the multi-granularity intention extraction of (u, i) can be achieved through dual feature fusion, so as to improve the accuracy of recommendations.
[0199] KGIN is one of the recommendation algorithms based on knowledge graph perception. KGIN consists of two key parts: (1) customer intent modeling, which uses multiple potential intents to describe customer-product relationships and defines each intent as a fine-grained combination of relationships, while encouraging different intents to be independent of each other; (2) relationship path-aware aggregation, which emphasizes relationship dependencies in remote connectivity, thereby maintaining the overall semantics of relationship paths. The reason why this application chooses KGIN is that its relationship intent modeling is consistent with the behavior of customers who pay attention to the natural attribute relationship of textiles. For example, a customer who buys a certain fabric pays more attention to its composition attributes, while another customer pays attention to factors such as weaving and color. Figure 17 shows the general process of KGIN.
[0200] In the figure, nodes p1, p2, ... represent customer intention preferences, and nodes i1, i2, ... represent interaction positive sets. The nodes v1, v2, ... are nodes in the knowledge graph, i.e., attribute entities of the products. KGIN splits each customer-product interaction record into multiple intention relationships, thereby extracting customer features based on different intentions. The dotted boxes represent the customer and product feature extraction formulas respectively.
[0201] KGIN defines intent as the reason why customers choose products, which reflects the commonality of all customer behaviors. Assuming P is a set of intents shared by all customers, KGIN divides a unified customer-product relationship into |P| (|.| represents the number of elements contained in the set, the same below) intentions, and decomposes each (u, i) pair into C = {(u, p, i)|p∈P}. The original customer interaction records are reorganized into a new heterogeneous graph, called the intent graph IG. However, it is difficult to identify the semantics of intent, so KGIN associates intent with knowledge graph relationships and defines the customer's intent p as a nonlinear combination of different relationships in the knowledge graph, and its embedding representation e p As shown below:
[0202]
[0203] In the formula, e r is the initial representation vector of relation r, and relation r is assigned an attention score α(r, p) to quantify its importance. rp is the trainable weight of a specific relationship r and a specific intention p, is a d-dimensional randomly initialized vector, w r′p It indicates the weight of other intentions under the same relationship. It should be noted that the attention score α(r, p) is used to model the unified intention of the entire customer. Of course, the intentions of the entire customer are independent of each other, so an independent modeling module is introduced to distinguish the intentions of each customer. Commonly used methods include mutual information, cosine distance, etc.
[0204] In the intention graph IG, use N u = {(p, i)|(u, p, i)∈C} to represent the intention perception history and first-order connectivity around customer u. Technically, the customer’s embedded representation is represented by integrating historical intention perception information.
[0205]
[0206] In the formula, is the feature representation of the KGIN first-order path aggregation of customer u, ⊙ represents the dot product operation, and β(u, p) is the weight for distinguishing the intentions of individual customers, as shown in the following formula:
[0207]
[0208] where e p T Indicates e p The transposed vector of exp represents exponential operation, e p, T Represents the transpose of other intent vectors. KGIN uses a feature aggregation method based on relationships and nodes. Specifically, the feature aggregation of product i is shown in the following formula:
[0209]
[0210] Among them, N i is a set of triples associated with product i as the head entity, is the embedding representation of the tail entity v corresponding to i,
[0211] After obtaining the customer intention representation and product feature representation of the first layer of convolution, the above steps can be repeated to obtain a deeper information representation. Each layer of information can be aggregated using multiple layers to obtain a wider receptive field. The final product and customer feature representation of KGIN is shown in the following formula.
[0212]
[0213]
[0214] In the formula, Q is the number of aggregation layers. After obtaining the neighbor relationship graph NG, a simple first-order aggregation is used to obtain the browsing adjacency relationship features of customers and products, that is, the product features that have direct edge connections with the products are summed up. The calculation is as follows: Fig.18 As shown in the figure, nodes i1, i2, ... represent products in the browsing adjacency graph NG, and nodes u1, u2, ... represent customers. The edges are the browsing adjacency relations between products and the access relations between customers and products. The dotted box represents the customer and product feature extraction formula.
[0215] The first-order convolution is adopted because the first-order (direct edge) directly represents the browsing adjacency of the product. Therefore, the browsing adjacency feature e of product i is i Nei It is expressed as follows:
[0216]
[0217] Where N i Nei represents the set of all products that have a browsing adjacency relationship with product i, and j is N i Nei The products in e j is the initial representation vector of product j. The browsing adjacency feature of the customer describes the customer preference based on the customer-product interaction relationship. The browsing adjacency feature e of customer u is u Nei As shown below:
[0218]
[0219] Where N u is the set of browsed products of customer u. In the early stage, we obtained the KGIN features representing the individual intentions of customer-product interaction and and browsing adjacency features that represent customer-product interaction group intentions and This part combines the two features to form and Compared with browsing adjacency features, KGIN features have a larger receptive field and contain more information because they have undergone multi-intention and multi-level aggregation operations. However, when the amount of information is too large, noise will be introduced, which will weaken the effect of graph aggregation. Therefore, the attention feature fusion mechanism is introduced, such as Fig.19 shown.
[0220] First, define a learnable attention weight w att The parameter vector, technically, concatenates the browse adjacency features and KGIN features in the same dimension, as shown in the following formula:
[0221] e u concat =e u Nei ||e u KGIN
[0222] e i concat =e i Nei ||e i KGIN
[0223] In the formula, e u concat and e i concat Respectively represent the concatenated features of customer u and product i, and || represents the vector concatenation operation. It should be noted that the same attention weight applies to different sources in this section, that is, the same attention weight is used for the fusion of product and customer features. The concatenated feature vector e concat With w att Multiply and normalize to select the weight key of the key feature weight , as shown in the formula:
[0224]
[0225] In the formula, Represents the bitwise multiplication of the matrix and the vector. Note that the same attention weight w is used for customer and product features att Finally, according to the key weight Perform dot multiplication with the concatenated features to obtain the fused features, as shown in the following formula:
[0226] e u fusion =key weight,1 ⊙e u Nei +key weight,2 ⊙e u KGIN
[0227] ei fusion =key weight,1 ⊙e i Nei +key weight,2 ⊙e i KGIN
[0228] The key weight,1 Indicates key weight The vector consisting of the first d-dimensional elements, key weight,2 Then it belongs to the vector composed of the last d-dimensional elements. After obtaining the attention fusion features, the inner product similarity is used for prediction, as shown in the following formula.
[0229]
[0230] In the formula, * represents the convolution operation of the vector. During training, the general BPR loss training model is adopted, as shown in the following formula:
[0231]
[0232] in The interaction set and interaction negative set The training set consists of , σ(·) is the sigmoid function, combined with regularization to prevent model overfitting and gradient disappearance, the final loss function is shown in the following formula.
[0233]
[0234] where Θ is the set of parameters of the model, such as w rp and w att , λ is a hyperparameter that controls L2 regularization to prevent overfitting.
[0235] This study mainly compares KGIN-R with the following algorithms that also use knowledge graphs for recommendation: MF matrix decomposition, a classic collaborative filtering method, which performs matrix decomposition on the customer-product interaction matrix to reduce the dimension to fit the large matrix, thereby obtaining the feature representations of customers and products respectively. (2) Basic KGIN recommendation algorithm. The product knowledge graph KG is used to construct customer intent, and the customer-product access log L is used for deep learning to extract intent features. The product browsing adjacency graph NG is not involved in the algorithm model.
[0236] The recommendation adopts a full ranking strategy. Specifically, for each customer in the data set, the products that the customer has effectively browsed are grouped into a positive set, and the rest are grouped into a negative set. The recommendation algorithm will score each (u, i) pair. For a customer u, the K products with the highest scores are selected to form a recommendation list, and then the Top-K recommendation performance is calculated. This study uses widely used evaluation indicators, including: Recall, Normalized Discounted Cumulative Gain (NDCG), and Hit Ratio (HR). Recall represents the hit rate of products in the recommended test set, and HR can be considered as the customer hit rate. It represents the overall hit rate of recommended products, that is, as long as the recommended products are in the positive set, the model is considered to have the ability to recommend preferred products to customers. NDCG considers the attractiveness of the ranking position of the recommended list products to customers. For the same Recall, the higher the ranking of the test set products, the higher the NDCG score. Here, K is set to 1, 2, 10, and 20 respectively, and the average of all customer evaluation indicators is taken as the final evaluation indicator.
[0237] The "improvement" in the algorithm column in the table indicates the improvement percentage of the KGIN-DF algorithm relative to the KGIN algorithm. The best result in each evaluation indicator is marked in bold, and the suboptimal result is marked with an underline. It can be seen that the KGIN-DF model has achieved the best indicators except for the Recall indicator when K=1, while the MF model has the worst indicators and is significantly lower than the KGIN-DF and KGIN models.
[0238] The performance advantage of KGIN-DF over KGIN can be attributed to: (1) customer group intention feature extraction based on browsing adjacency relationship and (2) dual feature fusion based on attention mechanism. Browsing adjacency relationship uses the idea of customer collaborative filtering to summarize the direct connection between products from customer-product browsing logs, so as to perceive the individual intention of customers in advance according to the customer group intention of product access, and provide customers with a more effective recommendation list. From the NDCG index, it can be seen that KGIN-DF has achieved a significant improvement of 14.03% to 23.56% compared with KGIN. This index is for the ranking score of recommended products and can more comprehensively reflect the effectiveness of the recommendation list. Because the KGIN model does not have the collaborative feature extraction of browsing adjacency graph, the recommendation is biased towards the individual interaction intention portrayed by the product knowledge graph, which makes the ranking result worse than KGIN-DF. This further verifies the effectiveness of the collaborative extraction and fusion of KG and NG dual features proposed in this application in improving recommendation performance.
[0239] MF performed poorly in the experiment because the matrix decomposition model failed to fully utilize the relationship of the knowledge graph to optimize the feature representation of the product, and only relied on the access log L to build the product features. When the customer-product interaction information is sparse, the extracted customer features are incomplete, and the recommendation list is difficult to meet the customer's intention. This also verifies the effectiveness of the product knowledge graph KG in recommendation.
[0240] Based on the above analysis, we can conclude that: (1) The product knowledge graph KG constructed in this application combined with the KGIN algorithm can effectively extract the customer access intention characteristics of the B2B textile e-commerce platform; (2) The product browsing adjacency graph NG constructed in this application, combined with the proposed improved algorithm KGIN-DF, can further improve the recommendation performance of the B2B textile e-commerce platform.
[0241] Embodiment 3
[0242] See also Fig. 20 , Fig. 20 Schematic diagram of the structure of the e-commerce recommendation system based on knowledge graph deep learning disclosed in the embodiment of the present invention. Fig. 20 As shown, the e-commerce recommendation system based on knowledge graph deep learning may include:
[0243] Receiving module 21: used to receive browsing information transmitted by the application interface end, wherein the browsing information is the operation content at the corresponding user e-commerce platform, wherein the browsing information includes product information and browsing log; the browsing log includes browser IP address information; and determine customer information based on the browser IP address information;
[0244] Entity extraction module 22: used for sending the browsing information to a pre-built commodity relationship graph model to extract entity relationships to obtain a customer commodity interaction matrix; in the commodity relationship graph model, a resource description framework is used to describe commodity attribute relationships and commodity ownership relationships, wherein the commodity attribute relationships are expressed as a triple of commodity number, attribute relationship and attribute value number, and the commodity ownership relationship is expressed as a triple of commodity number, ownership and store number;
[0245] Recommendation module 23: used for transmitting the browsing information and the customer-product interaction matrix to the recommendation algorithm model for recommendation identification to determine the product recommendation result for the corresponding customer.
[0246] The e-commerce recommendation method based on deep learning of knowledge graph in the embodiment of the present invention outputs recommendation results reflecting customer browsing preferences by performing deep learning on knowledge graph and browsing logs; the application interface module accepts the retrieval of recommendation results by upper-level applications to realize the integration of recommendation applications; the recommendation method of this embodiment can capture the customer's preference characteristics for products, support personalized product recommendations, and improve the customer's browsing efficiency for products on the e-commerce platform.
[0247] The above is a detailed introduction to the e-commerce recommendation method, system, electronic device and storage medium based on knowledge graph deep learning disclosed in the embodiments of the present invention. Specific examples are used in this article to illustrate the principles and implementation methods of the present invention. The description of the above embodiments is only used to help understand the method of the present invention and its core idea; at the same time, for general technical personnel in this field, according to the ideas of the present invention, there will be changes in the specific implementation methods and application scopes. In summary, the content of this specification should not be understood as a limitation on the present invention.
Claims
1. An e-commerce recommendation method based on knowledge graph deep learning, characterized in that: include: Receive browsing information transmitted by the application interface end, wherein the browsing information is the operation content at the corresponding user e-commerce platform, wherein the browsing information includes product information and browsing logs; the browsing logs include browser IP address information; and determine customer information based on the browser IP address information; determine the customer entity through the browsing logs; Performing a data cleaning operation on the browsing information to filter out non-product browsing records and browsing records with missing product fields in the browsing log; performing validity judgment on the browsing information after the filtering operation, when the number of browsing times and browsing time of a customer for the same product exceeds a first set value, determining that the product is valid for the customer, otherwise filtering the corresponding browsing information; The browsing information is sent to a pre-built commodity relationship graph model to extract entity relationships to obtain a customer commodity interaction matrix; a resource description framework is used in the commodity relationship graph model to describe commodity attribute relationships and commodity ownership relationships, wherein the commodity attribute relationships are expressed as a triple of commodity number, attribute relationship and attribute value number, and the commodity ownership relationship is expressed as a triple of commodity number, belonging to and store number; the commodity relationship graph model is constructed by the following steps: Obtain commodity attribute information from the corresponding e-commerce platform; Extracting multiple commodity entities, commodity attributes, and store entities from the commodity attribute information, and determining relationships between the multiple commodity entities, between the commodity entity and the store entity, and between the commodity entity and the commodity attribute; Determining browsing adjacency relationships between commodities based on browsing relationships of commodities by customers from historical browsing information; the browsing adjacency relationships are that if multiple commodities are browsed in one session cycle, the multiple commodities are mutually browsed adjacency relationships; When the number of mutual browsing adjacency relationships reaches a second set value, it is determined that there is a browsing adjacency relationship between the commodities; Construct a product relationship graph model based on the relationships between multiple product entities, between product entities and store entities, and between product entities and product attributes; The browsing information is combined with the product relationship graph KG, and the KGIN algorithm is used to extract the intention of the customer-product interaction individual to obtain the corresponding individual intention features; The access log L is combined with the product browsing adjacency graph NG, and the group intention of customer-product interaction of the group is extracted by graph aggregation operation to obtain the corresponding group intention feature; The access log L is combined with the product browsing adjacency graph NG, and the group intention of customer-product interaction of the group is extracted by graph aggregation operation to obtain the corresponding group intention feature: Take the first-order aggregation to obtain the browsing adjacency relationship characteristics of customers and products. The browsing adjacency feature e of product i is i Nei It is expressed as follows: Among them, N i Nei represents the set of all products that have a browsing adjacency relationship with product i, and j is N i Nei The products in e j is the initial representation vector of product j; e i Represents the initial representation vector of product i; Describe customer preferences based on the customer-product interaction relationship to obtain customer browsing adjacency features. The browsing adjacency feature e of customer u is u Nei It is expressed as follows: Among them, N u is the set of browsed products of customer u; e u represents the initial representation vector of customer u; The individual intention feature and the group intention feature are integrated by using an attention mechanism to form an integrated feature, and the customer's interest score for the product is evaluated based on the integrated feature; The individual intention feature and the group intention feature are integrated by using an attention mechanism to form an integrated feature, and the customer's interest score for the product is evaluated based on the integrated feature, including: According to the concatenation formula, the browsing adjacency feature and the KGIN feature are concatenated in the same dimension to obtain a concatenated feature vector. The concatenation formula is: And u concat =and u Nei ||and u KGIN And i concat =and i Nei ||and i KGIN Among them, e u concat and e i concat They represent the concatenated features of customer u and product i respectively, and || represents the vector concatenation operation; The concatenated feature vector and the attention weight w att Multiply and normalize to select the weight key of the key feature weight ; Use the same attention weight w for customer and product features att , according to key weight Perform dot multiplication with the concatenated features to obtain the fusion feature e u fusion and e i fusion ; The fusion feature is input into the prediction formula to predict the customer's interest score for the product. The prediction formula is: The browsing information, the customer-product interaction matrix and the product relationship graph model are transmitted to the recommendation algorithm model for recommendation identification to determine the product recommendation results for the corresponding customers.
2. The e-commerce recommendation method based on knowledge graph deep learning as claimed in claim 1, characterized in that: The recommendation algorithm model includes a prediction function model, and the prediction function model is constructed by the following steps: Based on the browsing log L, the customer-product interaction set (u, i) is divided into interaction positive sets and interaction negative set If there is a visit record of customer u to product i in the browsing log L, then determine otherwise Its formal representation is as follows: The interaction is positively Interaction Negative Set The product browsing adjacency graph NG and the product knowledge graph KG are input into a pre-built prediction function formula to perform prediction to obtain corresponding prediction results; the prediction function formula is: in, express , f represents the prediction function, u represents customer information, U represents customer matrix, and U={u1,u2,…,um}, i represents product information, I represents product matrix, and I={i1,i 2,…,in}.
3. The e-commerce recommendation method based on knowledge graph deep learning as claimed in claim 1, characterized in that: The browsing information is combined with the commodity relationship graph model, and the KGIN algorithm is used to extract the intention of the customer-commodity interaction individual to obtain the corresponding individual intention set, including: Decompose the acquired customer-product group (u, i) into an intention set C = {(u, p, i) | p∈P}; reorganize the original customer interaction records into an intention graph IG; The KGIN algorithm is used to associate the intention with the product relationship graph KG, and the customer's intention p is defined as a nonlinear combination of different relationships in the knowledge graph. The embedded representation of the intention is: Among them, e r is the initial representation vector of relation r, and the relation r is given an attention score α(r,p) to quantify its importance, w rp is the trainable weight for a specific relation r and a specific intent p, w r′p Indicates the weight of other intentions under the same relationship; In the intent graph IG, use N u ={(p,i)|(u,p,i)∈C} to represent the intention perception history and first-order connectivity around customer u, and the embedding formula is used to integrate the historical intention perception information to represent the customer’s embedding representation: In the formula, is the feature representation of the KGIN first-order path aggregation of customer u, ⊙ represents the dot product operation, β(u,p) is the weight for distinguishing the intentions of individual customers, and e p T Indicates e p The transposed vector of exp represents exponential operation, e p′ T represents the transpose of other intent vectors; The KGIN algorithm uses a feature aggregation method based on relationships and nodes to obtain the feature aggregation of product i. Among them, N i is a set of triples associated with product i as the head entity, is the embedding representation of the tail entity v corresponding to product i, Repeat the above steps to obtain a deeper information representation, and use multi-layer aggregation for each layer of information to obtain a wider receptive field. The final product and customer feature representation of KGIN is as follows: Where Q is the number of polymerization layers.
4. An e-commerce recommendation system based on knowledge graph deep learning, characterized in that: include: Receiving module: used to receive browsing information transmitted by the application interface end, wherein the browsing information is the operation content at the corresponding user e-commerce platform, wherein the browsing information includes commodity information and browsing log; the browsing log includes browser IP address information; and determine customer information based on the browser IP address information; determine the customer entity through the browsing log; Performing a data cleaning operation on the browsing information to filter out non-product browsing records and browsing records with missing product fields in the browsing log; performing validity judgment on the browsing information after the filtering operation, when the number of browsing times and browsing time of a customer for the same product exceeds a first set value, determining that the product is valid for the customer, otherwise filtering the corresponding browsing information; Entity extraction module: used to send the browsing information to a pre-built commodity relationship graph model to extract entity relationships to obtain a customer commodity interaction matrix; in the commodity relationship graph model, a resource description framework is used to describe commodity attribute relationships and commodity ownership relationships, wherein the commodity attribute relationships are expressed as a triple of commodity number, attribute relationship and attribute value number, and the commodity ownership relationship is expressed as a triple of commodity number, ownership and store number; the commodity relationship graph model is constructed by the following steps: Obtain commodity attribute information from the corresponding e-commerce platform; Extracting multiple commodity entities, commodity attributes, and store entities from the commodity attribute information, and determining relationships between the multiple commodity entities, between the commodity entity and the store entity, and between the commodity entity and the commodity attribute; Determining browsing adjacency relationships between commodities based on browsing relationships of commodities by customers from historical browsing information; the browsing adjacency relationships are that if multiple commodities are browsed in one session cycle, the multiple commodities are mutually browsed adjacency relationships; When the number of mutual browsing adjacency relationships reaches a second set value, it is determined that there is a browsing adjacency relationship between the commodities; Construct a product relationship graph model based on the relationships between multiple product entities, between product entities and store entities, and between product entities and product attributes; The browsing information is combined with the product relationship graph KG, and the KGIN algorithm is used to extract the intention of the customer-product interaction individual to obtain the corresponding individual intention features; The access log L is combined with the product browsing adjacency graph NG, and the group intention of customer-product interaction of the group is extracted by graph aggregation operation to obtain the corresponding group intention feature; The access log L is combined with the product browsing adjacency graph NG, and the group intention of customer-product interaction of the group is extracted by graph aggregation operation to obtain the corresponding group intention feature: Take the first-order aggregation to obtain the browsing adjacency relationship characteristics of customers and products. The browsing adjacency feature e of product i is i Nei It is expressed as follows: Among them, N i Nei represents the set of all products that have a browsing adjacency relationship with product i, and j is N i Nei The products in e j is the initial representation vector of product j; e i Represents the initial representation vector of product i; Describe customer preferences based on the customer-product interaction relationship to obtain customer browsing adjacency features. The browsing adjacency feature e of customer u is u Nei It is expressed as follows: Among them, N u is the set of browsed products of customer u; e u represents the initial representation vector of customer u; The individual intention feature and the group intention feature are integrated by using an attention mechanism to form an integrated feature, and the customer's interest score for the product is evaluated based on the integrated feature; The individual intention feature and the group intention feature are integrated by using an attention mechanism to form an integrated feature, and the customer's interest score for the product is evaluated based on the integrated feature, including: According to the concatenation formula, the browsing adjacency feature and the KGIN feature are concatenated in the same dimension to obtain a concatenated feature vector. The concatenation formula is: And u concat =and u Nei ||and u KGIN And i concat =and i Nei ||and i KGIN Among them, e u concat and e i concat They represent the concatenated features of customer u and product i respectively, and || represents the vector concatenation operation; The concatenated feature vector and the attention weight w att Multiply and normalize to select the weight key of the key feature weight ; Use the same attention weight w for customer and product features att , according to key weigjt Perform dot multiplication with the concatenated features to obtain the fusion feature e u fusion and e i fusion ; The fusion feature is input into the prediction formula to predict the customer's interest score for the product. The prediction formula is: Recommendation module: used to transmit the browsing information and customer-product interaction matrix to the recommendation algorithm model for recommendation identification to determine the product recommendation results for the corresponding customers.
5. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, wherein the computer program enables a computer to execute the e-commerce recommendation method based on knowledge graph deep learning as described in any one of claims 1 to 3.
Citation Information
Patent Citations
Information recommendation method and device
CN112989176A