Product recommendation method and related device
By constructing a homogeneous node graph and integrating the characteristics of users and factors, combined with feedback and behavioral feedback information, the problem of failing to fully consider influencing factors and user feedback in the existing technology is solved, and more accurate product recommendations are achieved.
Patent Information
- Application Number
- CN202410834790.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-06-26
- Publication Date
- 2024-10-11
AI Technical Summary
Existing product recommendation methods fail to fully consider other factors that affect users' purchase of products, such as geographical location and industry, and fail to effectively utilize user feedback information, resulting in a need for improvement in recommendation accuracy.
By obtaining basic information from users' historical purchase data, we construct a homogeneous node graph, integrate the factor node characteristics that affect user purchases into user node characteristics, and use feedback and behavioral feedback information for feature extraction and fusion, using a self-attention mechanism. Perform feature analysis with the multi-head attention mechanism to obtain user preferences to make product recommendations.
The accuracy of product recommendations is improved. By considering multiple influencing factors and user feedback, more accurate user preferences are obtained, thereby improving the accuracy of recommendations.
Smart Images

Figure CN118761822A_ABST
Abstract
Description
Technical Field
[0001] The invention relates to a product recommendation method and related devices, belonging to the technical field of data mining. Background Art
[0002] Product recommendation has become an important part of various online services, such as e-commerce, social media, and advertising. Product recommendation is based on information such as user purchase records to determine user preferences, and then recommend highly relevant products to users. Currently, the commonly used product recommendation method is a graph-based recommendation method, which uses a graph structure to model the relationship between users and products. It does not consider other factors that affect users' purchase of products, such as geographic location, industry, etc., and also takes into account user feedback, such as usage feedback and behavior feedback. Therefore, the accuracy of existing product recommendation methods needs to be improved. Summary of the invention
[0003] The present invention provides a product recommendation method and related devices, which solve the problems disclosed in the background technology.
[0004] According to one aspect of the present disclosure, a product recommendation method is provided, comprising:
[0005] Obtain basic information from the user's historical purchase data; the basic information includes the user, factors that influence the user to purchase the product, user feedback information after using the product, and user behavior feedback information after purchasing the product;
[0006] Based on the basic information, a product recommendation model is used to obtain user preferences; in the product recommendation model, users and factors are used as nodes, and a homogeneous node graph is constructed according to the node type; the features of the nodes in the homogeneous node graph are extracted, and the features of the factor nodes are integrated into the features of the user nodes to obtain the basic features of the user; the usage feedback features are extracted based on the usage feedback information, and the behavior feedback features are extracted based on the behavior feedback information; the basic features of the user, the usage feedback features and the behavior feedback features are integrated to obtain the user's preferences;
[0007] Make product recommendations based on user preferences.
[0008] In some embodiments of the present disclosure, extracting features of nodes in a homogeneous node graph includes:
[0009] According to the node relationship type, the homogeneous node graph is divided into homogeneous graphs;
[0010] According to the homogeneous graph, the relationship importance analysis method based on the self-attention mechanism is adopted to obtain the features of the nodes in the homogeneous node graph.
[0011] In some embodiments of the present disclosure, according to the homogeneous graph, a relationship importance analysis method based on the self-attention mechanism is adopted to obtain the features of the nodes in the homogeneous node graph, and the formula is:
[0012] ;
[0013] ;
[0014] ;
[0015] ;
[0016] ;
[0017] ;
[0018] ;
[0019] ;
[0020] In the formula, the mth homogeneous node graph is divided into n homogeneous graphs, r 1 ~r n Respectively represent 1~n types of node relationships, is the feature vector of the node in the homogeneous graph under the i-th node relationship type, GCN is the graph convolution operation, is a homogeneous graph under the i-th node relationship type, R 1 ~R n Represents the relationship matrix in 1~n homogeneous graphs, M R is the matrix after the n relationship matrices are concatenated, || represents concatenation, M R The matrix after stretching transformation, W k , W q , W v They are three linear projection variables, Q, K, and V are query vectors, key vectors, and value vectors, respectively. The superscript T indicates transposition. k is the dimension of the key vector, α is the relational attention weight matrix, Softmax is the Softmax function, V j and α j V and The jth element in α, RA ho is the result of calculating the relational attention weight, σ represents the activation function, and h m is the feature vector of the node in the mth homogeneous node graph, and Linear represents a layer of fully connected neural network.
[0021] In some embodiments of the present disclosure, the features of the factor nodes are integrated into the features of the user nodes, and a multi-head attention mechanism is used to obtain the basic features of the user. The formula is:
[0022] ;
[0023] ;
[0024] ;
[0025] ;
[0026] ;
[0027] ;
[0028] ;
[0029] ;
[0030] Where W K , W Q , W V are three linear projection variables, Q1, K1, V1 are query vector, key vector and value vector respectively, h m and h m+1 are the feature vectors of the nodes in the mth and m+1th homogeneous node graphs, respectively. The nodes in the mth homogeneous node graph are users, and the nodes in the m+1th homogeneous node graph are factors. The superscript h represents the hth attention head in the multi-head attention. is the value of the i1th row and j1th column in the attention weight matrix corresponding to the hth attention head, is the function symbol, a i1 is the i1th value of Q1, b j1 is the j1th value of K1; represents the inner product, The attention weight calculated for the h-th attention head, are the transformation matrices of the h-th attention head query vector, key vector, and value vector, respectively. The attention weights calculated for H attention heads, is the result of multi-head attention calculation, It means that the vector is added by position, ReLU is the ReLU function, is the attention weight output by the ReLU function, W is the parameter of a fully connected layer, and r represents the relationship matrix between the mth and m+1th homogeneous node graphs. h m-1 Integration mThe result after h 0 is the basic characteristics of the user, The eigenvectors of M factors are integrated into h m The result after.
[0031] In some embodiments of the present disclosure, the usage feedback feature extraction is performed according to the usage feedback information, and the formula is:
[0032] ;
[0033] ;
[0034] In the formula, S (2) To use the feedback information sequence, k is the hole convolution kernel, * l represents one-dimensional dilated convolution, F is the description function, The feedback feature extraction results under L different void rates are shown in Figure 2. is the result of using feedback feature extraction under the void rate l, h 2 For S (2) Use feedback features.
[0035] In some embodiments of the present disclosure, behavior feedback feature extraction is performed based on behavior feedback information, and the formula is:
[0036] ;
[0037] ;
[0038] In the formula, is the behavior feedback information sequence S (1) Middle The subsequence corresponding to the behavior, for Behavioral feedback characteristics, is the total category of behavior, ,h 1 For S (1) The behavioral feedback features of GRU are gated recurrent units.
[0039] In some embodiments of the present disclosure, the user basic features, usage feedback features and behavior feedback features are integrated to obtain the user's preference, and the formula is:
[0040] S=[h 1 , h 2 ];
[0041] ;
[0042] H=GRU(hidden 0 ,S);
[0043] In the formula, GRU is the gated recurrent unit, S is h 1 and h 2 The new sequence, hidden t is the hidden layer output of the tth gated recurrent unit, h 0 is the basic feature of the user, h 1 is the behavior feedback feature of the behavior feedback information sequence, h 2 To use the feedback sequence ) The usage feedback feature, N h is the number of multi-head attentions, Cross-Attention represents the cross attention function, hidden 0 Initialize variables for the hidden layer, H is the user's preference.
[0044] According to another aspect of the present disclosure, there is provided a product recommendation device, comprising:
[0045] The basic information module obtains basic information from the user's historical purchase data; the basic information includes the user, factors that affect the user's purchase of the product, user feedback information after using the product, and user behavior feedback information after purchasing the product;
[0046] The user preference module uses a product recommendation model based on basic information to obtain user preferences. In the product recommendation model, users and factors are used as nodes, and a homogeneous node graph is constructed based on the node type. The features of the nodes in the homogeneous node graph are extracted, and the features of the factor nodes are integrated into the features of the user nodes to obtain the basic features of the user. The usage feedback features are extracted based on the usage feedback information, and the behavior feedback features are extracted based on the behavior feedback information. The basic features of the user, the usage feedback features, and the behavior feedback features are integrated to obtain the user's preferences.
[0047] The product recommendation module recommends products based on user preferences.
[0048] According to another aspect of the present disclosure, a computer-readable storage medium is provided, which stores one or more programs, wherein the one or more programs include instructions, and when the instructions are executed by a computing device, the computing device performs a product recommendation method.
[0049] According to another aspect of the present disclosure, a computer device is provided, comprising one or more processors and one or more memories, wherein one or more programs are stored in the one or more memories and are configured to be executed by the one or more processors, and the one or more programs include instructions for executing a product recommendation method.
[0050] The beneficial effects achieved by the present invention are as follows: the present invention obtains basic information from the user's historical purchase data, constructs a homogeneous node graph based on the basic information, integrates the node features of factors that affect the user's purchase of products into the features of the user node, obtains the user's basic features, and integrates the user's basic features, the usage feedback features extracted from the usage feedback information, and the behavior feedback features extracted from the behavior feedback information to obtain accurate user preferences, thereby making accurate product recommendations, which is more accurate than existing methods. BRIEF DESCRIPTION OF THE DRAWINGS
[0051] Figure 1 Flowchart of recommended methods for products;
[0052] Figure 2 Schematic diagram of the recommended model for the product;
[0053] Figure 3 A block diagram of the device for product recommendation. DETAILED DESCRIPTION
[0054] The following will be combined with the drawings in the embodiments of the present disclosure to clearly and completely describe the technical solutions in the embodiments of the present disclosure. It is obvious that the described embodiments are only part of the embodiments of the present disclosure, rather than all the embodiments. The following description of at least one exemplary embodiment is actually only illustrative and is by no means intended to limit the present disclosure and its application or use. Based on the embodiments in the present disclosure, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of the present disclosure.
[0055] Unless otherwise specified, the relative arrangement of components and steps, the numerical expressions and numerical values set forth in these embodiments do not limit the scope of the present disclosure.
[0056] At the same time, it should be understood that for the convenience of description, the sizes of the various parts shown in the drawings are not drawn according to the actual proportional relationship.
[0057] Technologies, methods, and equipment known to ordinary technicians in the relevant art may not be discussed in detail, but where appropriate, the technologies, methods, and equipment should be considered part of the specification.
[0058] In all examples shown and discussed herein, any specific values should be interpreted as merely exemplary and not as limiting. Therefore, other examples of the exemplary embodiments may have different values.
[0059] It should be noted that similar symbols and letters refer to similar items in the following figures, and therefore, once an item is defined in one figure, it does not require further discussion in subsequent figures.
[0060] In order to solve the problem that the accuracy of existing product recommendation methods needs to be improved, the present disclosure proposes a product recommendation method and related devices, which specifically consider other factors that affect users' purchase of products and user feedback, obtain multi-type fusion features, and thus obtain accurate user preferences, thereby making accurate product recommendations.
[0061] Figure 1 A schematic diagram of an embodiment of the product recommendation method disclosed herein, Figure 1 The embodiment may be executed by a product recommendation server.
[0062] like Figure 1 As shown, step 1 of the embodiment obtains basic information from the user's historical purchase data; wherein the basic information includes the user, factors that influence the user to purchase the product, user feedback information after using the product, and user behavior feedback information after purchasing the product.
[0063] It should be noted that the user's historical purchase data mainly includes historical contract data, order data, etc. For example, the user, the purchased product, the user's geographic location, the industry to which the user belongs, etc. can be obtained from the order data. Based on these data, user feedback data can be further obtained, that is, the user's usage feedback information after using the product and the user's behavioral feedback information after purchasing the product. These data are associated to form basic information.
[0064] return Figure 1 In step 2 of the embodiment, a product recommendation model is used to obtain user preferences based on basic information; in the product recommendation model, users and factors are used as nodes, and a homogeneous node graph is constructed according to the node types; the features of the nodes in the homogeneous node graph are extracted, and the features of the factor nodes are integrated into the features of the user nodes to obtain user basic features; usage feedback features are extracted based on usage feedback information, and behavior feedback features are extracted based on behavior feedback information; user basic features, usage feedback features, and behavior feedback features are integrated to obtain user preferences.
[0065] It should be noted that the basic information is mainly divided into three parts for processing. Among them, the user's geographical location and the industry to which the user belongs are factors that affect the user's purchase of products. A heterogeneous graph is constructed based on these factors and users, and user features are extracted based on the heterogeneous graph; the sequence composed of feedback information and the sequence composed of behavioral feedback information are separately extracted for features.
[0066] See Figure 2 ,Since the relationships in the heterogeneous graph are more complex, in order to facilitate feature ,extraction, the heterogeneous graph is converted into a homogeneous node graph. A homogeneous node graph contains one ,node type, but multiple node relationship types. Taking users, geographic ,locations and industries as examples, it can be converted into user node graph, ,geographical location node graph and industry node graph.
[0067] Since the homogeneous node graph contains multiple node relationship types, this is not conducive to efficient feature extraction. Therefore, in some embodiments, the homogeneous node graph can be further divided into homogeneous graphs according to the node relationship type. A homogeneous graph contains one node type and one node relationship type. According to the homogeneous graph, the relationship importance analysis based on the self-attention mechanism is adopted to obtain the features of the nodes in the homogeneous node graph.
[0068] In order to better aggregate different relations of the same node, a relational attention model within the graph (i.e., homogeneous node graph) is designed. The specific formula can be as follows:
[0069] Figure 2 In the above example, it is assumed that the mth homogeneous node graph is divided into n homogeneous graphs, each of which contains n types of node relationships, represented by r 1 ~r n , the homogeneous graph under the i-th node relationship type is represented as , after conventional graph convolution operation, the feature vector of the node in the homogeneous graph under the i-th node relationship type can be obtained. The formula can be as follows:
[0070] ;
[0071] In the formula, is the feature vector of the nodes in the homogeneous graph under the i-th node relationship type, and GCN is the graph convolution operation.
[0072] Assume that the relationship matrix in 1~n homogeneous graphs is represented by R 1 ~R n , then the matrix after concatenating n relationship matrices is:
[0073] ;
[0074] Where M R is the matrix after the splicing of n relationship matrices, || represents splicing, and each relationship matrix is a 1×N×N relationship matrix, then M R is an n×N×N matrix.
[0075] Through matrix stretching transformation, the three-dimensional relationship matrix M R Convert to a two-dimensional matrix , that is, converted to an n×(N×N) matrix and used as the input of the self-attention mechanism. There are n input data, and the dimension of each input data is N×N.
[0076] Use linear projection Projection is performed by using three linear projection variables to project it onto the query vector, key vector, and value vector, which can be expressed as follows:
[0077] ;
[0078] ;
[0079] ;
[0080] Where W k , W q , W v They are three linear projection variables, Q, K, and V are query vector, key vector, and value vector respectively.
[0081] The attention weight can be further defined as the dot product of the query vector and the key vector, and normalized with the softmax function, which can be expressed as:
[0082] ;
[0083] In the formula, the superscript T represents transposition, d k is the dimension of the key vector, , α is the relational attention weight matrix, and Softmax is the Softmax function. The relevance score, i.e., weight, is obtained by calculating the dot product of the query vector and all key vectors and dividing it by a scaling factor N.
[0084] Calculate the weighted sum of the value vectors, that is, calculate the final heterogeneous relationship of the homogeneous node graph, that is:
[0085] ;
[0086] Where V j and α j V and The jth element in α, RA ho is the result of calculating the relational attention weight, σ represents the activation function
[0087] Finally, according to RA ho and The obtained characteristic direction can be expressed as:
[0088] ;
[0089] In the formula, h m is the feature vector of the node in the mth homogeneous node graph, and Linear represents a layer of fully connected neural network.
[0090] Based on the intra-graph (i.e., homogeneous node graph) relational attention model, the feature vectors of all nodes in the homogeneous node graph can be obtained.
[0091] It should be noted that our goal is to learn user representation from the graph, that is, taking the user as the target node and other factor nodes as auxiliary nodes, and further integrating the features of the auxiliary nodes into the features of the user node, so as to obtain the basic features of the user considering other factors.
[0092] Similar to the above, in order to better integrate, a relational attention model between graphs (i.e., homogeneous node graphs) based on multi-head cross attention is designed. The specific formula can be as follows:
[0093] The linear projection method is used to calculate the multi-head cross attention weights, which can be expressed as:
[0094] ;
[0095] ;
[0096] ;
[0097] ;
[0098] Where W K , W Q , W V are three linear projection variables, Q1, K1, V1 are query vector, key vector and value vector respectively, h m and h m+1 are the feature vectors of the nodes in the mth and m+1th homogeneous node graphs, respectively. The nodes in the mth homogeneous node graph are users, and the nodes in the m+1th homogeneous node graph are factors. The superscript h represents the hth attention head in the multi-head attention. is the value of the i1th row and j1th column in the attention weight matrix corresponding to the hth attention head, Function symbol, which means the inner product behind, a i1 is the i1th value of Q1, b j1 is the j1th value of K1, represents the inner product, The attention weight calculated for the h-th attention head, are the transformation matrices of the h-th attention head query vector, key vector, and value vector, respectively.
[0099] Further combine each attention weight to get the final attention coefficient:
[0100] ;
[0101] In the formula, The attention weights calculated for H attention heads, is the result of multi-head attention calculation, Represents the addition of vector elements by position.
[0102] Add a standard residual connection to the model to preserve the representation in the original position:
[0103] ;
[0104] Where ReLU is the ReLU function, is the attention weight output by the ReLU function, and W is the parameter of a fully connected layer.
[0105] Assume that r represents the relationship matrix between the mth and m+1th homogeneous node graphs, then h m-1 Integration m It can be expressed as:
[0106] ;
[0107] In the formula, h m-1 Integration m The result after.
[0108] Finally, the fusion results are further spliced, which can be expressed as follows:
[0109]
[0110] In the formula, h 0 is the basic characteristics of the user, The eigenvectors of M factors are integrated into h m The result after.
[0111] It should be noted that in order to capture the user's product usage feedback features at different time granularities, multi-scale convolution is used to extract the user's usage feedback sequence features. Specifically, a multi-scale convolution module based on dilated convolution is designed to extract the user's usage feedback features, which can be expressed as follows:
[0112] Design a one-dimensional hole convolution applied to the sequence and define a description function F , the one-dimensional dilated convolution operation is defined as * l , the dilated convolution can be expressed as:
[0113] ;
[0114] In the formula, l is the hole rate, which is used to control the size of the receptive field, p, s, There is no special meaning, both represent position coordinates, p represents the p position of the data, s represents the s position of the data, Represents the dilated convolution kernel k Location.
[0115] Then the feature extraction can be expressed as:
[0116]
[0117]
[0118] In the formula, S (2) To use the feedback information sequence, The feedback feature extraction results under L different void rates are shown in Figure 2. is the result of using feedback feature extraction under the void rate l, h 2 For S (2) Use feedback features.
[0119] It should be noted that the feature extraction of different user behavior feedback can be obtained by aggregating different behavior features to obtain the overall user behavior feedback features. In order to capture the feature extraction of different user behavior feedback, the behavior sequence division method is adopted:
[0120] Assume that the length of the feedback information sequence is , that is, the number of user behavior interactions (total behavior category), which is specifically expressed by the formula:
[0121] ;
[0122] In the formula, S (1) is the behavior feedback information sequence, Representing behavior, product, and timestamp respectively, .
[0123] Then the first The subsequence corresponding to the behavior can be expressed as:
[0124] ;
[0125] In the formula, is the behavior feedback information sequence S (1) Middle The subsequence corresponding to the behavior.
[0126] So The behavioral feedback characteristics of can be expressed as:
[0127] ;
[0128] In the formula, for Behavioral feedback features, GRU is a gated recurrent unit, a neural network model that processes sequence data.
[0129] Further all To do splicing only:
[0130] ;
[0131] You can get S (1) Behavioral feedback characteristics h 1 .
[0132] It should be noted that when fusing user basic features, usage feedback features, and behavior feedback features, since user behavior and user usage have a clear sequence, the usage feedback features and behavior feedback features can be connected into a new sequence, namely:
[0133] S=[h 1 , h 2 ];
[0134] Where S is h 1 and h 2 The new sequence formed.
[0135] In order to better integrate sequence features with user basic features, a multi-head attention mechanism is added on this basis, using cross attention to output each hidden layer. Attention is calculated with the user's basic features, and the calculated hidden layer output is used as the next hidden layer input. The specific calculation formula is as follows:
[0136] ;
[0137] Where H is the user's preference, hidden t is the hidden layer output of the tth gated recurrent unit, h 0 is the basic feature of the user, h 1 is the behavior feedback feature of the behavior feedback information sequence, h 2 To use the feedback sequence ) The usage feedback feature, N h is the number of multi-head attentions, Cross-Attention represents the cross attention function, hidden 0 Initialize variables for the 0th hidden layer, which is the hidden layer.
[0138] Furthermore, the final user preference can be expressed as:
[0139] H=GRU(hidden 0 ,S);
[0140] Where H is the user's preference.
[0141] The above product recommendation model needs to be trained before use. Two tasks can be set to train the model: predicting the number of repeated purchases and predicting the probability of users purchasing products. For the task of predicting the number of purchased products, a mean square error loss function is designed, and for predicting the probability of users purchasing products, a ranking loss function is designed. The final loss function is the weighted sum of the above two loss functions.
[0142] The product recommendation model is a new feature extraction and fusion model used for feature extraction of users in heterogeneous environments. It can effectively capture user context and efficiently fuse user feedback features.
[0143] return Figure 1 , step 3 of the embodiment, makes product recommendations based on user preferences.
[0144] The above method obtains basic information from the user's historical purchase data, constructs a homogeneous node graph based on the basic information, integrates the node features of factors that affect the user's purchase of products into the features of the user nodes, obtains the user's basic features, and integrates the user's basic features, usage feedback features extracted from usage feedback information, and behavior feedback features extracted from behavior feedback information to obtain accurate user preferences, thereby making accurate product recommendations, which is more accurate than existing methods.
[0145] Figure 3 is a schematic diagram of an embodiment of the product recommendation device disclosed in the present invention. Figure 3 The embodiment is a virtual device that can be loaded and executed by a product recommendation server, including a basic information module, a user preference module and a product recommendation module.
[0146] The basic information module of the embodiment is configured to obtain basic information from the user's historical purchase data; wherein the basic information includes the user, factors that influence the user to purchase the product, user feedback information after using the product, and user behavior feedback information after purchasing the product.
[0147] The user preference module of the embodiment is configured to obtain user preferences based on basic information and a product recommendation model; wherein, in the product recommendation model, users and factors are used as nodes, and a homogeneous node graph is constructed according to the node types; the features of the nodes in the homogeneous node graph are extracted, and the features of the factor nodes are integrated into the features of the user nodes to obtain user basic features; usage feedback features are extracted based on usage feedback information, and behavior feedback features are extracted based on behavior feedback information; and user basic features, usage feedback features, and behavior feedback features are integrated to obtain user preferences.
[0148] The product recommendation module of the embodiment is configured to make product recommendations based on user preferences.
[0149] Similar to the above method, the above device obtains basic information from the user's historical purchase data, constructs a homogeneous node graph based on the basic information, integrates the node features of factors that affect the user's purchase of products into the features of the user nodes, obtains the user's basic features, and integrates the user's basic features, usage feedback features extracted from usage feedback information, and behavior feedback features extracted from behavior feedback information to obtain accurate user preferences, thereby making accurate product recommendations, which is more accurate than existing methods.
[0150] Based on the same technical solution, the present disclosure also relates to a computer-readable storage medium, which stores one or more programs, and the one or more programs include instructions. When the instructions are executed by a computing device, the computing device executes a product recommendation method.
[0151] Based on the same technical solution, the present disclosure also relates to a computer device, including one or more processors and one or more memories, one or more programs are stored in the one or more memories and are configured to be executed by one or more processors, and the one or more programs include instructions for executing a product recommendation method.
[0152] It will be appreciated by those skilled in the art that embodiments of the present invention may be provided as methods, systems, or computer program products. Therefore, the present invention may take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Furthermore, the present invention may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0153] The present invention is described with reference to flowcharts and / or block diagrams of methods, devices (systems), and computer program products according to embodiments of the present invention. It should be understood that each process and / or block in the flowchart and / or block diagram, as well as the combination of processes and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0154] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.
[0155] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.
[0156] The above are merely embodiments of the present invention and are not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present invention are included in the scope of the claims of the present invention to be approved.
Claims
1. A product recommendation method, characterized in that: include: Obtain basic information from the user's historical purchase data; the basic information includes the user, factors that influence the user to purchase the product, user feedback information after using the product, and user behavior feedback information after purchasing the product; Based on the basic information, a product recommendation model is used to obtain user preferences; in the product recommendation model, users and factors are used as nodes, and a homogeneous node graph is constructed according to the node type; the features of the nodes in the homogeneous node graph are extracted, and the features of the factor nodes are integrated into the features of the user nodes to obtain the basic features of the user; the usage feedback features are extracted based on the usage feedback information, and the behavior feedback features are extracted based on the behavior feedback information; the basic features of the user, the usage feedback features and the behavior feedback features are integrated to obtain the user's preferences; Make product recommendations based on user preferences.
2. The product recommendation method according to claim 1, characterized in that: Extract features of nodes in a homogeneous node graph, including: According to the node relationship type, the homogeneous node graph is divided into homogeneous graphs; According to the homogeneous graph, the relationship importance analysis method based on the self-attention mechanism is adopted to obtain the features of the nodes in the homogeneous node graph.
3. The product recommendation method according to claim 2, characterized in that: According to the homogeneous graph, the relationship importance analysis method based on the self-attention mechanism is used to obtain the characteristics of the nodes in the homogeneous node graph. The formula is: ; ; ; ; ; ; ; ; In the formula, the mth homogeneous node graph is divided into n homogeneous graphs, r1~r n Respectively represent 1~n types of node relationships, is the feature vector of the node in the homogeneous graph under the i-th node relationship type, GCN is the graph convolution operation, is a homogeneous graph under the i-th node relationship type, R1~R n Represents the relationship matrix in 1~n homogeneous graphs, M R is the matrix after the n relationship matrices are concatenated, || represents concatenation, M R The matrix after stretching transformation, W k , W q , W v They are three linear projection variables, Q, K, and V are query vectors, key vectors, and value vectors, respectively. The superscript T indicates transposition. k is the dimension of the key vector, α is the relational attention weight matrix, Softmax is the Softmax function, V j and α j are the jth elements in V and α respectively, RA ho is the result of calculating the relational attention weight, σ represents the activation function, and h m is the feature vector of the node in the mth homogeneous node graph, and Linear represents a layer of fully connected neural network.
4. The product recommendation method according to claim 1, characterized in that: The features of the factor nodes are integrated into the features of the user nodes, and the multi-head attention mechanism is used to obtain the basic features of the user. The formula is: ; ; ; ; ; ; ; ; Where W K , W Q , W V are three linear projection variables, Q1, K1, V1 are query vector, key vector and value vector respectively, h m and h m+1 are the feature vectors of the nodes in the mth and m+1th homogeneous node graphs, respectively. The nodes in the mth homogeneous node graph are users, and the nodes in the m+1th homogeneous node graph are factors. The superscript h represents the hth attention head in the multi-head attention. is the value of the i1th row and j1th column in the attention weight matrix corresponding to the hth attention head, is the function symbol, a i1 is the i1th value of Q1, b j1 is the j1th value of K1; represents the inner product, The attention weight calculated for the h-th attention head, are the transformation matrices of the h-th attention head query vector, key vector, and value vector, respectively. The attention weights calculated for H attention heads, is the result of multi-head attention calculation, It means that the vector is added by position, ReLU is the ReLU function, is the attention weight output by the ReLU function, W is the parameter of a fully connected layer, and r represents the relationship matrix between the mth and m+1th homogeneous node graphs. h m-1 Integration m The result after that, h0 is the basic feature of the user, The eigenvectors of M factors are integrated into h m The result after.
5. The product recommendation method according to claim 1, characterized in that: The usage feedback feature is extracted based on the usage feedback information. The formula is: ; ; In the formula, S (2) To use the feedback information sequence, k is the hole convolution kernel, * l represents one-dimensional dilated convolution, F is the description function, The feedback feature extraction results under L different void rates are shown in Figure 2. is the result of using feedback feature extraction under the void rate l, h2 is S (2) Use feedback features.
6. The product recommendation method according to claim 1, characterized in that: Behavior feedback features are extracted based on the behavior feedback information. The formula is: ; ; In the formula, is the behavior feedback information sequence S (1) Middle The subsequence corresponding to the behavior, for Behavioral feedback characteristics, is the total category of behavior, , h1 is S (1) The behavioral feedback features of GRU are gated recurrent units.
7. The product recommendation method according to claim 1, characterized in that: The user's basic features, usage feedback features, and behavior feedback features are integrated to obtain the user's preference. The formula is: S = [h1, h2]; ; H=GRU(hidden0,S); In the formula, GRU is a gated recurrent unit, S is a new sequence composed of h1 and h2, and hidden t is the hidden layer output of the tth gated recurrent unit, h0 is the user basic feature, h1 is the behavior feedback feature of the behavior feedback information sequence, and h2 is the usage feedback information sequence ) The usage feedback feature, N h is the number of multi-head attentions, Cross-Attention represents the cross attention function, hidden0 is the hidden layer initialization variable, and H is the user's preference.
8. A product recommendation device, characterized in that: include: The basic information module obtains basic information from the user's historical purchase data; the basic information includes the user, factors that affect the user's purchase of the product, user feedback information after using the product, and user behavior feedback information after purchasing the product; The user preference module uses a product recommendation model based on basic information to obtain user preferences. In the product recommendation model, users and factors are used as nodes, and a homogeneous node graph is constructed based on the node type. The features of the nodes in the homogeneous node graph are extracted, and the features of the factor nodes are integrated into the features of the user nodes to obtain the basic features of the user. The usage feedback features are extracted based on the usage feedback information, and the behavior feedback features are extracted based on the behavior feedback information. The basic features of the user, the usage feedback features, and the behavior feedback features are integrated to obtain the user's preferences. The product recommendation module recommends products based on user preferences.
9. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores one or more programs, and the one or more programs include instructions. When the instructions are executed by a computing device, the computing device executes any one of the methods of claims 1 to 7.
10. A computer device, characterized in that: include: One or more processors and one or more memories, one or more programs are stored in the one or more memories and are configured to be executed by the one or more processors, and the one or more programs include instructions for executing any of the methods described in claims 1 to 7.
Citation Information
Cited By
Key information demand product recommendation method and system based on GNN and sequence model
CN121304302A
