A Product Recommendation Method Based on Complex Spatial Information Aggregation

By constructing a knowledge graph and triplet ratings in a complex space, and optimizing the embedding vectors of users and products, the problems of data sparsity and interpretability are solved, and high-precision and high-transparency product recommendations are achieved.

CN120876044BActive Publication Date: 2026-01-30NANCHANG HANGKONG UNIVERSITY
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202511384841.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-09-26
Publication Date
2026-01-30
Estimated Expiration
2045-09-26

AI Technical Summary

Technical Problem

Existing product recommendation methods suffer from data sparsity and lack of interpretability, resulting in low recommendation accuracy and an inability to effectively capture users' potential preferences for products.

Method used

By constructing a knowledge graph, users and products are modeled as entities. Using complex space information aggregation and attention mechanisms, triples are assigned weights. By combining dot product scores and triple scores, the embedding vectors of users and products are optimized to recommend products.

Benefits of technology

It improves the accuracy and interpretability of product recommendations, captures users' potential preference information, reduces information loss, and enhances the accuracy and transparency of the recommendation system.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120876044B_ABST
    Figure CN120876044B_ABST
Patent Text Reader

Abstract

This invention discloses a product recommendation method based on complex space information aggregation, comprising: reading a user-product database and constructing a knowledge graph in the form of head entity-relation-tail entity triples; obtaining initial entity embedding vectors and initial relation embedding vectors through complex space mapping and random initialization; concatenating the initial entity embedding vectors and initial relation embedding vectors in the form of triples in the knowledge graph to obtain a triple vector, and then calculating the entity embedding vector after information aggregation; obtaining the final entity embedding vector and the final relation embedding vector based on the initial relation embedding vector and the entity embedding vector after information aggregation; finally calculating the product recommendation score and recommending products to users according to the recommendation score. This invention can alleviate data sparsity, capture users' potential preferences for products, and improve the accuracy of product recommendations.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of data processing, in particular to a commodity recommendation method based on complex space information aggregation. BACKGROUND

[0002] In the digital era, e-commerce platforms have become an indispensable part of human daily life. People browse commodity information and purchase interested commodities through e-commerce platforms. Commodity recommendation refers to analyzing user interest preferences through certain technology, accurately mining user's real interested commodities from massive commodities, thereby improving user's shopping experience and enhancing user's stickiness, increasing e-commerce platform sales, and promoting related enterprise economic development.

[0003] The existing commodity recommendation method usually maps users and items into vector space to obtain respective embedding vectors, then optimizes the embedding vectors through representation learning to capture the potential association between users and items, and finally uses the dot product of user embedding vectors and item embedding vectors for recommendation. Although the existing commodity recommendation method has made significant progress, there are still two problems. On the one hand, the data sparsity of commodity recommendation leads to low commodity recommendation accuracy. On the other hand, directly using the dot product of user embedding vectors and commodity embedding vectors as the basis for recommendation lacks interpretability and will lose the potential preference information of users for commodities, reducing the accuracy of commodity recommendation and leading to user loss.

[0004] Therefore, there is a need for a commodity recommendation method that can alleviate data sparsity, capture potential preference information of users for commodities, and has high accuracy. SUMMARY

[0005] In view of this, the present application provides a commodity recommendation method based on complex space information aggregation to alleviate data sparsity, capture potential preference information of users for commodities, and improve commodity recommendation accuracy.

[0006] A commodity recommendation method based on complex space information aggregation comprises:

[0007] Step S1, reading a user-commodity database to build a knowledge graph in the form of head entity-relation-tail entity triplets;

[0008] Step S2, obtaining initial entity embedding vectors and initial relation embedding vectors through complex space mapping and random initialization;

[0009] Step S3, the initial entity embedding vector and the initial relation embedding vector are spliced in the form of triples in the knowledge graph to obtain triple vectors; for each entity, an attention mechanism in a complex space is used to assign weights to all triple vectors related to the entity, and the triple vectors related to the entity are weighted and summed to obtain an updated entity embedding vector, and then combined with the initial entity embedding vector to obtain an entity embedding vector after aggregation of information;

[0010] Step S4, the initial relation embedding vector and the entity embedding vector after aggregation of information are combined in the form of existing triples in the knowledge graph, a rotation scoring function is used to score the combined triples, and a soft margin loss function is used to calculate the loss value to obtain the final entity embedding vector and the final relation embedding vector;

[0011] Step S5, the final entity embedding vector is split into a user embedding vector and a commodity embedding vector, and a purchase relation embedding vector is found from the final relation embedding vector; a dot product score of the commodity is obtained based on the commodity embedding vector and the target user embedding vector; the commodity embedding vector, the target user embedding vector and the purchase relation embedding vector are spliced to form a recommendation triple vector, an interaction score of the commodity is obtained based on the recommendation triple vector, a recommendation score of the commodity is obtained based on the dot product score and the interaction score, and the commodity is recommended to the user according to the recommendation score.

[0012] The commodity recommendation method based on complex space information aggregation provided by the application has the following beneficial effects:

[0013] (1) The application has small modeling information loss: the traditional method often maps the knowledge graph to the Euclidean space after converting the shopping network into the knowledge graph, which brings a large information loss, and the method maps the knowledge graph to the complex space, retains more information through the additional part of the complex number.

[0014] (2) The user embedding and commodity embedding of the application have high quality: due to the sparsity of data, the information contained in the commodity itself is less, which leads to low embedding quality. The application builds a knowledge graph to model the commodity and the user as entities in the knowledge graph, and uses a complex space attention mechanism to assign more accurate weights to the triples related to each entity, so as to capture higher quality triple information and learn more comprehensive user embedding and commodity embedding, which helps to alleviate the problem of low accuracy of commodity recommendation caused by data sparsity.

[0015] (3) The commodity recommendation precision of the application is high, and the interpretability is strong: the existing recommendation system usually maps the user and the item into a vector space to obtain respective embedding vectors, then optimizes the embedding vectors through representation learning, and finally performs recommendation by using the dot product of the user embedding vector and the item embedding vector. The pure dot product ignores the potential preference of the user for the commodity. The method adds the score of the user-purchase-commodity triplets as the basis for recommendation, captures the potential preference of the user for the commodity by fusing the dot product score and the triplet score, further improves the accuracy of commodity recommendation, and enhances the interpretability.

[0016] In summary, the application improves the quality of commodity embedding and user embedding by complex space information aggregation and adding triplet score as the basis for recommendation, captures the potential preference of the user for the commodity, improves the precision of commodity recommendation, enhances the interpretability of recommendation, and can provide more accurate commodity recommendation for the user. BRIEF DESCRIPTION OF DRAWINGS

[0017] Figure 1 The flowchart of the commodity recommendation method based on complex space information aggregation provided by the embodiment of the application is shown. DETAILED DESCRIPTION

[0018] The embodiments of the application are described in detail below, and examples of the embodiments are shown in the drawings, wherein the same or similar reference numerals represent the same or similar elements or elements having the same or similar functions throughout. The embodiments described below by referring to the drawings are exemplary and are intended to explain the embodiments of the application, and cannot be understood as a limitation of the application.

[0019] Referring to Figure 1 , the embodiment of the application provides a commodity recommendation method based on complex space information aggregation, comprising steps S1-S5:

[0020] Step S1, read the user-commodity database to construct a knowledge graph in the form of head entity-relation-tail entity triplets.

[0021] Specifically, the knowledge graph is constructed in the form of head entity-relation-tail entity triplets , , and are entity sets and relation sets, respectively; ; and represent entities, one of which is a user and the other is a commodity; , represent the relationship between entities, then divide the positive sample triplet set and the negative sample triplet set .​

[0022] Step S2, obtaining initial entity embedding vectors and initial relation embedding vectors through complex space mapping and random initialization.

[0023] In step S2, the following steps are included:

[0024] Step S21, setting the real part dimension and the imaginary part dimension of the entity embedding vector, and obtaining the initial entity embedding vector through random initialization;

[0025] Step S22, setting the real part dimension and the imaginary part dimension of the relation embedding vector, and applying a modulus length constraint to each dimension to limit the modulus length of each dimension of the relation embedding vector to 1, and obtaining the initial relation embedding vector through random initialization, wherein the real part of each dimension of the initial relation embedding vector is , and the imaginary part of each dimension is , is a randomly generated angle value.

[0026] Step S3, concatenating the initial entity embedding vector and the initial relation embedding vector in the form of a triple in the knowledge graph, then learning the features therein to obtain a triple vector; for each entity, using an attention mechanism in the complex space to assign weights to all triple vectors related to the entity, and performing weighted summation on the triple vectors related to the entity to obtain an updated entity embedding vector, and then performing residual connection between the updated entity embedding vector and the initial entity embedding vector to obtain an entity embedding vector after aggregation of information.

[0027] In step S3, the following steps are included:

[0028] Step S31, concatenating the initial entity embedding vector and the initial relation embedding vector in the form of an existing triple in the knowledge graph, and then multiplying by a parameter matrix to obtain a triple vector, the expression being:

[0029]

[0030] wherein, represents a triple vector composed of the embedding vector of the head entity , the embedding vector of the relation , and the embedding vector of the tail entity , , , , , and represent the real part and the imaginary part of the corresponding vector or matrix, respectively; represents a first learnable parameter matrix used to learn the information existing in the triple; represents a vector concatenation operation;

[0031] Step S32, according to the obtained triple vector, the relative attention weight of the triple is obtained by performing complex multiplication on the triple vector and the parameter matrix and taking the real part, and then normalizing the weight, the expression is:

[0032]

[0033]

[0034] wherein, is the relative attention weight of the triple vector related to the entity, is the embedding vector of the entity, is the absolute attention weight of the triple vector related to the entity, denotes the normalization operation on all weights related to the entity; is an activation function, used to increase the non-linear characteristics of the neural network; denotes the second learnable parameter matrix, by performing complex multiplication operation with the triple vector, the triple vector is assigned a corresponding attention weight; Step S33, the relative attention weight obtained is used to weight and sum the triple vectors related to the entity, to obtain the updated entity embedding vector, the expression is:

[0035]

[0036]

[0037] wherein, denotes the updated entity embedding vector, is a sigmoid activation function, used to increase the non-linear characteristics of the neural network;

[0038] Step S34, the initial entity embedding vector is multiplied by a parameter matrix, and then added to the updated entity embedding vector, to perform residual connection, and obtain the entity embedding vector after aggregation information, the expression is:

[0039]

[0040] wherein, denotes the entity embedding vector after aggregation information, is the third learnable parameter matrix, used to learn the information in the initial entity embedding vector.

[0041] ​​​​​Step S4: Combine the initial relation embedding vector and the entity embedding vector after information aggregation according to the existing triplet form in the knowledge graph. Use the rotation scoring function to score the combined triplet and use the soft boundary loss function to calculate the loss value to obtain the final entity embedding vector and the final relation embedding vector.

[0042] Specifically, step S4 includes:

[0043] Step S41: Combine the initial relation embedding vector and the entity embedding vector after aggregation information according to the existing triplet form in the knowledge graph, use a rotation scoring function for scoring, and learn relation pattern information. The relation pattern information is represented in the relation embedding vector, and the expression is:

[0044]

[0045] in, This represents the encoder's scoring function. Represents the Hadamard product. Represents the L1 norm;

[0046] Step S42: Define a loss function for the scoring function, update the learnable parameters by minimizing the loss function, and obtain the final entity embedding vector and the final relation embedding vector after training. The loss function is as follows:

[0047]

[0048] in, Let be the loss function of the encoder. This represents a positive sample triple. It is by Negative sample triples obtained by replacing the head or tail entity. Indicates boundary value hyperparameters, In knowledge graph The set of positive sample triples divided from the sample, In knowledge graph The set of negative sample triples divided from the data. This indicates taking the maximum value.

[0049] Step S5: The final entity embedding vector is split into user embedding vector and product embedding vector, and the purchase relationship embedding vector is found from the final relationship embedding vector; the product embedding vector and the target user embedding vector are multiplied by a dot product to obtain the product's dot product score; the product embedding vector is concatenated with the target user embedding vector and the purchase relationship embedding vector to form a recommendation triple vector, and the interaction score of the product is obtained by scoring the recommendation triple vector through a scoring function. The dot product score and the interaction score are weighted and fused to obtain the product's recommendation score, and the product is recommended to the user based on the recommendation score.

[0050] Specifically, step S5 includes:

[0051] Step S51: Split the final entity embedding vector into user embedding vector and product embedding vector, and find the purchase relationship embedding vector from the final relationship embedding vector.

[0052] Step S52: Perform a complex dot product between the product embedding vector and the target user embedding vector to obtain the product's dot product score, expressed as:

[0053]

[0054] in, For goods The dot product score, For goods The product embedding vector, Embed vectors for target users, The complex dot product refers to multiplying two vectors and taking the real part of each dimension as the dot product score. Through the complex dot product, we can further capture the interaction information between users and items.

[0055] Step S53, sequentially arrange the goods Product embedding vector Embedded vectors of target users Purchase relationship embedding vector Concatenating the vectors yields the recommended triplet vector. ,pass A one-dimensional complex convolution kernel is used to recommend triple vectors. Perform complex convolution operations to obtain the product images from various viewpoints. The triplet feature vectors are obtained, and then the triplet feature vectors from each perspective are concatenated to obtain the total triplet feature vector. The expression is:

[0056]

[0057]

[0058] in, represents the first convolution kernel, , , , represents the first, second, third , and fourth viewpoint-based triplet feature vectors, is an integer between 1 and , represents a complex convolution operation;

[0059] Step S54, complex matrix multiplication is performed between the triplet feature total vector and the parameter matrix, and the real part is taken to obtain the interaction score of the commodity , and the expression is as follows:

[0060]

[0061] wherein, represents the fourth learnable parameter matrix, which is used to evaluate the rationality of the recommended triplet;

[0062] Step S55, the dot product score and the interaction score of the commodity are weighted and fused to obtain the recommendation score of the commodity , and the expression is as follows:

[0063]

[0064] wherein, represents the weight value of the dot product score, represents the weight value of the interaction score;

[0065] Step S56, the commodity is recommended to the user according to the recommendation score.

[0066] wherein, the step S56 specifically includes:

[0067] all commodities are sorted in descending order of the recommendation score, the first N commodities with the highest recommendation score are selected, and the user is pushed.

[0068] In summary, the commodity recommendation method based on complex space information aggregation according to the above embodiment has the following beneficial effects:

[0069] (1) The present application has smaller modeling information loss: the traditional method is often mapped to the Euclidean space after the shopping network is converted into a knowledge graph, which brings a larger information loss, the present application maps the knowledge graph to the complex space, and more information is retained through the additional part of the complex number.

[0070] (2) The user embedding and commodity embedding quality of the present application is higher: due to the sparsity of data, the information contained in the commodity itself is less, resulting in lower embedding quality. The present application models the commodity and user as an entity in the knowledge graph, and uses the complex space attention mechanism to more accurately assign weights to the triples related to each entity, thereby capturing higher quality triple information and learning more comprehensive user embedding representation and commodity embedding representation, which helps to alleviate the problem of low accuracy of commodity recommendation caused by data sparsity.

[0071] (3) The present application has high commodity recommendation accuracy and strong interpretability: existing recommendation systems usually map users and items to vector space to obtain respective embedding vectors, then optimize the embedding vectors through representation learning, and finally recommend by using the dot product of user embedding vectors and item embedding vectors. The simple dot product ignores the potential preference of the user for the commodity. The present application adds the rating of the user-purchase-commodity triple as the basis for recommendation, and captures the potential preference of the user for the commodity by fusing the dot product score and the triple score, thereby further improving the accuracy of commodity recommendation and enhancing the interpretability.

[0072] In summary, the present application improves the quality of commodity embedding and user embedding by complex space information aggregation and adding triple score as the basis for recommendation, captures the potential preference of the user for the commodity, not only improves the accuracy of commodity recommendation, but also enhances the interpretability of the recommendation, and can provide more accurate commodity recommendation for the user.

[0073] The above-described embodiments only express several embodiments of the present application, and the description is more specific and detailed, but it should not be understood as limiting the scope of the patent. It should be noted that for ordinary skilled persons in the art, without departing from the concept of the present application, a number of modifications and improvements can be made, which are within the scope of the present application. Therefore, the protection scope of the present application patent should be subject to the appended claims.

Claims

1. A commodity recommendation method based on complex space information aggregation, characterized in that, The method comprises the following steps: Step S1, reading a user-goods database to build a knowledge graph in the form of head entity-relation-tail entity triples; Step S2, obtaining initial entity embedding vectors and initial relation embedding vectors through complex space mapping and random initialization; Step S3, splicing the initial entity embedding vectors and the initial relation embedding vectors in the form of triples in the knowledge graph to obtain triple vectors; for each entity, using an attention mechanism in the complex space to assign weights to all triple vectors related to the entity, and then performing weighted summation on the triple vectors related to the entity to obtain updated entity embedding vectors, and then combining the initial entity embedding vectors to obtain aggregated information entity embedding vectors; Step S4, combining the initial relation embedding vectors and the aggregated information entity embedding vectors in the form of existing triples in the knowledge graph, scoring the combined triples using a rotation scoring function, and calculating a loss value using a soft margin loss function to obtain final entity embedding vectors and final relation embedding vectors; Step S5, splitting the final entity embedding vectors into user embedding vectors and goods embedding vectors, and finding a purchase relation embedding vector from the final relation embedding vectors; obtaining a dot product score of the goods based on the goods embedding vectors and the target user embedding vectors; Splicing the goods embedding vectors, the target user embedding vectors and the purchase relation embedding vector to obtain a recommendation triple vector, obtaining an interaction score of the goods based on the recommendation triple vector, obtaining a recommendation score of the goods based on the dot product score and the interaction score, and recommending the goods to the user according to the recommendation score; Step S5 specifically comprises: Step S51, splitting the final entity embedding vectors into user embedding vectors and goods embedding vectors, and finding a purchase relation embedding vector from the final relation embedding vectors; Step S52, performing complex dot product on the goods embedding vectors and the target user embedding vectors to obtain a dot product score of the goods, and the expression is: wherein, is a dot product score, of the item, is an item embedding vector, of the item, is a target user embedding vector, denotes a complex dot product; Step S53, sequentially embedding the goods The goods embedding vector The target user embedding vector And the purchase relationship embedding vector Spliced to get the recommendation triple vector , through One-dimensional complex convolution kernel on the recommendation triple vector Perform complex convolution operation to obtain the triple feature vector of the goods Under each perspective, then splice the triple feature vectors under each perspective to obtain the total triple feature vector , the expression is: ; ; wherein, represents the i-th convolution kernel, , , , , represents the i-th, i-th, i-th, and i-th view angle under the ternary feature vector, , , is an integer between 1 and , represents a complex convolution operation; Step S54, the ternary tuple feature total vector with the parameter matrix, and take the real part, get the interaction score of the commodity , the expression is:​ ; wherein, denotes a fourth learnable parameter matrix, and denotes the real and imaginary parts of the corresponding vector or matrix, respectively; Step S55, place the goods dot product score and interaction rating By performing weighted fusion, the product is obtained. Recommended score The expression is: wherein, represents a weight value for a dot product score, represents a weight value for an interaction score; Step S56, recommending the goods to the user according to the recommendation score. 2.The commodity recommendation method based on complex space information aggregation according to claim 1, characterized in that, Step S1 specifically comprises: reading a user-item database to construct a knowledge graph in the form of head entity-relation-tail entity triples , , and are entity sets and relation sets, respectively; ; and represent entities, one of which is a user and the other is an item; , represent the relationship between entities.​ 3.The commodity recommendation method based on complex space information aggregation according to claim 2, characterized in that, Step S2 specifically comprises: Step S21, setting the real part dimension and the imaginary part dimension of the entity embedding vectors, and obtaining the initial entity embedding vectors through random initialization; Step S22, set the real part dimension and the imaginary part dimension of the relationship embedding vector, and apply a modulus length constraint to each dimension, limit the modulus length of each dimension of the relationship embedding vector to 1, obtain an initial relationship embedding vector by random initialization, the real part of each dimension of the initial relationship embedding vector is , and the imaginary part of each dimension is , is a randomly generated angle value. 4.The commodity recommendation method based on complex space information aggregation according to claim 2, characterized in that, Step S3 specifically comprises: Step S31, splicing the initial entity embedding vectors and the initial relation embedding vectors in the form of existing triples in the knowledge graph, and then multiplying the spliced vectors by a parameter matrix to obtain triple vectors, and the expression is: ; wherein, denotes a triple vector consisting of the embedding vector of the head entity the embedding vector of the relation and the embedding vector of the tail entity and denote the real and imaginary parts of the corresponding vector or matrix, respectively, represents the first learnable parameter matrix, denotes a concatenation operation of vectors;​​​​ Step S32, according to the obtained triple vectors, performing complex multiplication on the triple vectors and a parameter matrix to obtain relative attention weights of the triple vectors, and then normalizing the weights to obtain relative attention weights of the triples, and the expression is: wherein, is a relative attention weight of the triple vector related to , is an embedding vector of the entity , is an absolute attention weight of the triple vector related to , denotes a normalization operation on all weights related to , is an activation function, denotes a second learnable parameter matrix; Step S33, using the obtained relative attention weights to perform weighted summation on the triple vectors related to the entity to obtain updated entity embedding vectors, and the expression is: wherein, denotes the updated entity embedding vector, is a sigmoid activation function; Step S34, multiplying the initial entity embedding vectors by a parameter matrix, and then adding the multiplied vectors to the updated entity embedding vectors to perform residual connection to obtain aggregated information entity embedding vectors, and the expression is: wherein, denotes the aggregated information of the entity embedding vector, is a third learnable parameter matrix. 5.The commodity recommendation method based on complex space information aggregation according to claim 4, characterized in that, Step S4 specifically comprises: Step S41, the initial relation embedding vector and the entity embedding vector after the aggregation information are combined in the form of the existing triplets in the knowledge graph, a rotation scoring function is used for scoring and learning relation pattern information, the relation pattern information is represented in the relation embedding vector, and the expression is as follows: ; wherein, represents a scoring function of an encoder, represents a Hadamard product, represents an L1 norm; Step S42, a loss function is defined for the scoring function, and the learnable parameters are updated by minimizing the loss function, and the final entity embedding vector and the final relation embedding vector are obtained after training, and the loss function is as follows: wherein, is a loss function of the encoder, represents a positive sample triple, is obtained by replacing the head entity or the tail entity, represents a boundary value hyperparameter, represents a positive sample triple set divided in the knowledge graph , represents a negative sample triple set divided in the knowledge graph , represents taking the maximum value. 6.The commodity recommendation method based on complex space information aggregation according to claim 5, characterized in that, Step S56 specifically includes: All goods are sorted in descending order of recommendation scores, the top N goods with the highest recommendation scores are selected, and the user is pushed.

Citation Information

Patent Citations

  • Personalized recommendation method based on collaborative knowledge graph

    CN112149004A