A product recommendation method and a product recommendation model training method
The product recommendation model that combines autoencoders and graph convolutional neural networks solves the problems of insufficient recommendation accuracy and efficiency in existing technologies, and achieves efficient and accurate product recommendations.
Patent Information
- Application Number
- CN202411695765.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-25
- Publication Date
- 2025-10-10
- Estimated Expiration
- 2044-11-25
AI Technical Summary
The product recommendation methods in the existing technology have shortcomings in recommendation accuracy and efficiency. Especially in the case of large data sets, the computational complexity is high, making it difficult to accurately recommend suitable products.
A product recommendation model that combines autoencoders and graph convolutional neural networks is used to extract high-quality attribute information features of target users through autoencoders, and graph convolutional neural networks are used to mine high-order correlations between users and candidate products to determine the recommendation results.
It improves the accuracy and efficiency of product recommendations, reduces time complexity, and improves user satisfaction.
Smart Images

Figure CN119558935B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the field of artificial intelligence, and in particular to a product recommendation method and a product recommendation model training method. BACKGROUND
[0002] With the continuous development of economy, various products emerge in endlessly, including financial products and application products. How to accurately recommend suitable products for users and better provide personalized services for users has become a problem that product providers focus on. The product recommendation method in the prior art includes an individualized recommendation method based on a matrix decomposition algorithm and a collaborative filtering algorithm, but these methods only consider direct relationships in the recommendation process, and the recommendation accuracy is poor. In addition, since the classic recommendation algorithm such as matrix decomposition splits the interaction matrix into two feature matrices of users and products, the time complexity of the splitting is too high in the case of a large data set, and the calculation efficiency is very low. SUMMARY
[0003] The embodiments of the present application provide a product recommendation method and a product recommendation model training method, which can improve the recommendation accuracy and efficiency when recommending products to users.
[0004] In a first aspect, the embodiments of the present application provide a product recommendation method, comprising:
[0005] obtaining a target user feature matrix based on attribute feature data of a target user;
[0006] inputting the target user feature matrix into a pre-trained product recommendation model, the product recommendation model comprising a self-encoder and a graph convolutional neural network;
[0007] obtaining attribute features of the target user based on the target user feature matrix through the self-encoder; and
[0008] determining whether to recommend a candidate product to the target user based on the attribute features of the target user through the graph convolutional neural network to obtain a recommendation product determination result.
[0009] In a second aspect, the embodiments of the present application provide a product recommendation model training method, comprising:
[0010] obtaining a sample user feature matrix based on attribute feature data of a sample user, and obtaining a sample product feature matrix based on attribute feature data of a sample product, the sample product being a historical selection product of the sample user;
[0011] establishing a sample user product interaction graph based on selection records of the sample user selecting the sample product, and obtaining a sample adjacency matrix corresponding to the sample user product interaction graph;
[0012] input the sample user feature matrix, the sample product feature matrix and the sample adjacency matrix to a product recommendation model to be trained, the product recommendation model comprising a self-encoder and a graph convolutional neural network;
[0013] attribute features of the sample user and the sample product are correspondingly acquired based on the sample user feature matrix and the sample product feature matrix by the self-encoder, to obtain sample user attribute features and sample product attribute features;
[0014] based on the sample user attribute features, the sample product attribute features and the sample adjacency matrix, a sample product recommendation result corresponding to the sample user is determined by the graph convolutional neural network; and
[0015] a function value of a training loss function is determined based on the sample product recommendation result corresponding to the sample user, and model parameters in the product recommendation model are adjusted according to the function value of the training loss function.
[0016] In a third aspect, an electronic device is provided, which includes a memory, a processor, and a computer program stored in the memory and executable on the processor, and the processor implements the product recommendation method or the product recommendation model training method according to any of the embodiments of the present application when executing the program.
[0017] In a fourth aspect, a computer readable storage medium is provided, which stores a computer program executable on a processor, and the program implements the product recommendation method or the product recommendation model training method according to any of the embodiments of the present application when executed on the processor.
[0018] The product recommendation method provided by the embodiments of the present application can acquire high-quality attribute information features of a target user by using a self-encoder having an advantage in extracting attribute information features, then pass the high-quality user attribute information features to a graph convolutional neural network having an advantage in extracting structure information, and determine whether to recommend a candidate product to the target user based on the high-quality attribute information features by using the graph convolutional neural network, so as to combine the high-quality attribute information features and high-quality structure information features extracted by the graph convolutional neural network, fully mine high-order correlation between the target user and the candidate product, and thus improve recommendation accuracy when recommending products to the target user and improve user satisfaction. In addition, the product recommendation method provided by the embodiments of the present application does not need to perform interactive matrix splitting, has low time complexity, and thus has high recommendation efficiency.
[0019] The product recommendation model training method provided by the embodiment of the present application further comprises the following steps: obtaining high-quality attribute information features of sample users and sample products by using the auto-encoder which has the advantage of attribute information feature extraction, and transmitting the high-quality attribute information features to the graph convolutional neural network; then obtaining sample product recommendation results combined with the high-quality attribute information features and high-quality structure information features by using the graph convolutional neural network; and adjusting model parameters of the product recommendation model based on the sample product recommendation results, so that the product recommendation model with higher recommendation efficiency and higher recommendation accuracy can be trained. BRIEF DESCRIPTION OF DRAWINGS
[0020] In order to more clearly illustrate the technical solutions of the present application, the following will briefly introduce the drawings needed to be used in the embodiments. It should be understood that the following drawings only show some embodiments of the present application, and therefore should not be regarded as a limitation on the scope. For those skilled in the art, other related drawings can also be obtained without creative labor.
[0021] Figure 1 is a flowchart of a product recommendation method provided by an embodiment of the present application;
[0022] Figure 2 is a flowchart of a product recommendation method provided by an embodiment of the present application;
[0023] Figure 3 is another flowchart of a product recommendation method provided by an embodiment of the present application;
[0024] Figure 4 is another flowchart of a product recommendation method provided by an embodiment of the present application;
[0025] Figure 5 is another flowchart of a product recommendation method provided by an embodiment of the present application;
[0026] Figure 6 is another flowchart of a product recommendation method provided by an embodiment of the present application;
[0027] Figure 7 is another flowchart of a product recommendation method provided by an embodiment of the present application;
[0028] Figure 8 is a flowchart of a product recommendation model training method provided by an embodiment of the present application;
[0029] Figure 9 is a structural diagram of a product recommendation device provided by an embodiment of the present application;
[0030] Figure 10 is a structural diagram of a product recommendation model training device provided by an embodiment of the present application;
[0031] Figure 11 is a structural schematic diagram of an electronic device provided by an embodiment of the present application. DETAILED DESCRIPTION
[0032] In order for those skilled in the art to better understand the present application, the technical solutions in the embodiments of the present application will be described clearly and completely below with reference to the drawings in the embodiments of the present application. Obviously, the described embodiments are only a part of the embodiments of the present application, rather than all the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without creative labor should fall within the scope of protection of the present application.
[0033] It should be noted that the terms "first", "second", and the like in the specification and claims of the present application and the above-described drawings are used to distinguish similar objects, and do not necessarily indicate a specific order or a chronological sequence. It should be understood that the data thus used can be interchanged under appropriate circumstances, so that the embodiments of the present application described herein can be implemented in an order other than that illustrated or described herein. In addition, the terms "include" and "have" and any variations thereof are intended to cover non-exclusive inclusion, for example, a process, method, system, product or device that includes a series of steps or units does not necessarily have to be limited to those steps or units clearly listed, but can include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.
[0034] Figure 1 A flowchart of a product recommendation method provided by an embodiment of the present application is provided, which can be executed by a product recommendation device provided by an embodiment of the present application. The device can be realized in the form of software and / or hardware. In a specific embodiment, the device can be integrated in an electronic device, such as a computer, a server, etc. The following embodiments will be described by taking the device integrated in an electronic device as an example. Referring to Figure 1 The method can specifically include the following steps:
[0035] Step 101, obtaining a target user feature matrix based on attribute feature data of a target user. This step can facilitate inputting the target user features into a pre-trained product recommendation model, and then facilitating extracting attribute information features of the target user feature matrix by the auto-encoder of the product recommendation model.
[0036] Specifically, the target user can be a user of a financial product. Specifically, the target user can include an old user, a new user, and / or a potential user.
[0037] Specifically, the attribute feature data of the target user includes pre-collected user information, which can specifically include information such as number, gender, age, occupation, education, annual income, and / or deposit amount.
[0038] It should be noted that the collected user information is information and data authorized by the user or authorized by all parties, and the collection, storage, use, processing, transmission, provision, disclosure, and application of related data comply with relevant laws, regulations, and standards of relevant countries and regions, take necessary security measures, do not violate public order and good customs, and provide corresponding operation portals for users to choose authorization or refusal.
[0039] Optionally, the process of obtaining the target user feature matrix based on the attribute feature data of the target user includes: performing dimensionless processing on continuous information such as age, annual income, and deposit amount, and further performing binning processing or binary processing to obtain continuous information features; performing one-hot encoding on discrete information such as education and gender to obtain discrete information features; and splicing the continuous information features and the discrete information features to obtain the target user feature matrix.
[0040] In step 102, the target user feature matrix is input into a pre-trained product recommendation model, and the product recommendation model includes a self-encoder and a graph convolutional neural network. This step can facilitate the extraction of high-quality attribute information features of the target user by the self-encoder which has an advantage in attribute information extraction.
[0041] Specifically, the self-encoder can include a multi-layer encoder and a multi-layer decoder, and the parameters of the multi-layer encoder and the multi-layer decoder are the same. The graph convolutional neural network can specifically include a multi-layer graph convolutional network.
[0042] Specifically, the number of layers of the multi-layer encoder and the multi-layer graph convolutional network can be the same or different.
[0043] In step 103, the attribute features of the target user are obtained based on the target user feature matrix by the self-encoder to obtain the target user attribute features. This step can fully utilize the advantage of the self-encoder in extracting attribute information features, extract high-quality attribute information features of the target user, and facilitate the transmission of the high-quality attribute information features of the target user to the graph convolutional neural network to make up for the deficiency of the graph convolutional neural network in extracting attribute information features.
[0044] Optionally, the process of obtaining the attribute features of the target user based on the target user feature matrix by the self-encoder to obtain the target user attribute features includes: extracting the attribute feature information of the target user feature matrix by the multi-layer encoder of the self-encoder.
[0045] Specifically, the attribute information of the target user feature matrix can also be extracted by the multi-layer encoder and the multi-layer decoder of the self-encoder.
[0046] Specifically, the number of the target user attribute features can be one or more.
[0047] Optionally, as shown in Figure 2 The target user attribute information related features output by each layer of the encoder when the multi-layer encoder extracts the attribute features of the target user layer by layer with the output of the previous layer as the input.
[0048] Specifically, the attribute features of the target user can be extracted by each layer of the encoder based on the following formula:
[0049]
[0050] wherein, σ(·) represents an activation function, and Relu can be used as the activation function; and are the trainable weight matrix and the bias of the Nth layer of the encoder, respectively; and are the inputs of the N-1th layer and the Nth layer of the encoder, respectively, and H e (0) is set as the target user feature matrix.
[0051] Specifically, the target user attribute information related features output by each layer of the encoder when the multi-layer encoder extracts the attribute features of the target user layer by layer with the output of the previous layer as the input.
[0052] Specifically, the target user attribute information related features output by each layer of the encoder when the multi-layer encoder extracts the attribute features of the target user layer by layer with the output of the previous layer as the input.
[0053] In step 104, whether to recommend the candidate product to the target user is determined based on the target user attribute feature through the graph convolutional neural network to obtain a recommendation product determination result. Based on steps 101 to 103, the high-quality attribute information feature of the target user is obtained by using the autoencoder with the attribute information feature extraction advantage, and then the high-quality user attribute information feature is transmitted to the graph convolutional neural network with the structure information extraction advantage. Whether to recommend the candidate product to the target user is determined based on the high-quality attribute information feature through the graph convolutional neural network. The high-quality attribute information feature and the high-quality structure information feature extracted by the graph convolutional neural network are combined to fully mine the high-order correlation between the target user and the candidate product, thereby improving the recommendation accuracy when recommending the product to the target user and improving the user satisfaction. In addition, the product recommendation method provided by the embodiment of the application does not need to perform the interaction matrix splitting, has low time complexity, and is high in recommendation efficiency.
[0054] It can be understood that the graph convolutional neural network can extract the structure information of the target user attribute feature data. Based on the target user attribute feature and the structure information of the target user attribute feature data extracted by the graph convolutional neural network, the feature of the combination of the attribute feature and the structure feature of the target user can be obtained.
[0055] Specifically, the candidate product includes one product that can be recommended, or includes multiple products that can be recommended.
[0056] Optionally, the process of determining whether to recommend the candidate product to the target user based on the target user attribute feature through the graph convolutional neural network to obtain the recommendation product determination result includes:
[0057] The recommendation product determination result is determined based on the adjacency matrix corresponding to the interaction relationship between the target user and the candidate product and the target user attribute feature through the graph convolutional neural network.
[0058] Optionally, when the target user does not have an interaction record with the candidate product, each element of the adjacency matrix of the interaction relationship between the target user and the candidate product is determined as 0.
[0059] Optionally, the process of determining whether to recommend the candidate product to the target user based on the target user attribute feature through the graph convolutional neural network to obtain the recommendation product determination result includes:
[0060] Based on the target user attribute feature, the feature of the combination of the attribute feature and the structure feature of the target user is determined through the graph convolutional neural network to obtain a target user comprehensive feature. The recommendation product determination result is determined based on the target user comprehensive feature and the candidate product comprehensive feature.
[0061] Specifically, the candidate products may all be old products or include new products, and the comprehensive features of the candidate products may be obtained in advance or before step 104 .
[0062] Specifically, when all the candidate products are old products, the comprehensive characteristics of the candidate products may be acquired in advance; when the candidate products include new products, the comprehensive characteristics of the candidate products may be acquired before step 104 .
[0063] The product recommendation method provided by the embodiment of the present invention is further described below. Figure 3 As shown, the following steps may be included:
[0064] Step 301: Acquire a target user feature matrix based on the attribute feature data of the target user.
[0065] Step 302: Input the target user feature matrix into a pre-trained product recommendation model, which includes an autoencoder and a graph convolutional neural network.
[0066] Step 303: Obtain the target user's attribute features based on the target user feature matrix through an autoencoder to obtain the target user's attribute features.
[0067] Step 304 : establishing a target user-product interaction graph based on the target user's selection record of the candidate products, and obtaining a target adjacency matrix corresponding to the target user-product interaction graph.
[0068] Optionally, the above process of establishing a target user-product interaction graph based on the target user's selection record of the candidate product includes: taking the target user as the source node, taking the candidate product as the target node, and constructing a connection line between the source node and the target node, from the source node to the target node.
[0069] In step 305, based on the target user attribute characteristics and the target adjacency matrix, a graph convolutional neural network is used to determine whether to recommend a candidate product to the target user to obtain a recommended product determination result.
[0070] Specifically, step 304 may be executed at any time before step 305 , for example, before step 301 or while step 301 is being executed.
[0071] Optionally, the process of determining whether to recommend a candidate product to the target user based on the target user attribute characteristics and the target adjacency matrix by using a graph convolutional neural network to obtain a recommended product determination result includes:
[0072] obtaining a self-loop adjacency matrix corresponding to the target adjacency matrix and a degree matrix of the self-loop adjacency matrix; and determining, based on the target user attribute feature, the self-loop adjacency matrix, and the degree matrix, whether to recommend the candidate product to the target user by using the graph convolutional neural network to obtain a recommendation product determination result.
[0073] Optionally, the process of obtaining the self-loop adjacency matrix corresponding to the target adjacency matrix comprises: adding a unit matrix to the target adjacency matrix to obtain the informationized adjacency matrix, and the process can be specifically performed based on the following formula:
[0074] A = A + I
[0075] wherein, A represents the self-loop adjacency matrix, A represents the target adjacency matrix, and I represents the unit matrix.
[0076] It can be understood that, by adding the unit matrix to the adjacency matrix, the proportion of the self information can be prevented from being too small due to excessive integration of field information in the process of transmitting the feature to the subsequent graph convolutional network layer, so that the structural features of the nodes can be better extracted.
[0077] It can be understood that the embodiments of the present application can be applied to recommend products to old users, and the target adjacency matrix corresponding to the selection record of the target user and the candidate product is established, and then the graph convolutional neural network is used to mine more high-order correlation between the users and the candidate products based on the target adjacency matrix, so that the accuracy of recommending the candidate product to the target user is further improved.
[0078] The product recommendation method provided by the embodiments of the present application will be further introduced below, as shown in Figure 4 The product recommendation method can comprise the following steps:
[0079] In step 401, a target user feature matrix is obtained based on attribute feature data of a target user.
[0080] In step 402, the target user feature matrix is input into a pre-trained product recommendation model, and the product recommendation model comprises a self-encoder and a graph convolutional neural network.
[0081] In step 403, the attribute feature of the target user is obtained by the self-encoder based on the target user feature matrix.
[0082] In step 404, a candidate product feature matrix is obtained based on attribute feature data of a candidate product, the candidate product feature matrix is input into the product recommendation model, and the attribute information feature of the candidate product is obtained by the self-encoder based on the candidate product feature matrix.
[0083] Specifically, when the candidate product is a financial product, the attribute feature data of the candidate product includes a series of characteristics of the financial product, such as an issuer, a term, a price, a yield, a risk, and / or liquidity.
[0084] Optionally, as shown in Figure 2 The candidate product attribute features include: through the multi-layer encoder, the candidate product feature matrix is taken as the initial input, and then the attribute features of the candidate product are extracted layer by layer with the output of the previous layer as the input. The attribute information related features of the candidate product output by each layer of the encoder are the output target user features of each encoder.
[0085] In step 405, based on the target user attribute features, the candidate product attribute features, and the target adjacency matrix, whether to recommend the candidate product to the target user is determined by the graph convolutional neural network to obtain a recommendation product determination result.
[0086] Specifically, step 404 can be executed at any time before step 405, for example, before step 401 or while steps 401 to 403 are being executed.
[0087] It can be understood that the embodiment of the present application can be applied to the scenario of newly added candidate products in the candidate products recommended to the user. By using the auto-encoder to extract high-quality attribute features of the candidate product and passing the high-quality attribute features to the graph convolutional neural network, the high-order correlation between the newly added candidate product and the user can be obtained, thereby improving the accuracy of recommending the candidate product to the user.
[0088] The product recommendation method provided by the embodiment of the present application will be further introduced below, as shown in Figure 5 That is, Figure 4 Step 405 in the above embodiment can include the following steps:
[0089] In step 4051, based on the target user attribute features and the target adjacency matrix, the attribute features and the structural features of the target user are combined to obtain target user comprehensive features.
[0090] In step 4052, based on the candidate product attribute features and the target adjacency matrix, the attribute features and the structural features of the candidate product are combined to obtain candidate product comprehensive features.
[0091] Specifically, step 4051 can be executed before step 4052, or after step 4052, or while step 4051 is being executed.
[0092] In step 4053, a recommendation score of recommending the candidate product to the target user is determined based on the target user comprehensive features and the candidate product comprehensive features, and a recommendation product determination result is determined based on the recommendation score.
[0093] Optionally, the process of determining the recommendation score of the candidate product recommended to the target user based on the target user comprehensive feature and the candidate product comprehensive feature comprises: calculating the recommendation score of the candidate product recommended to the target user based on the target user comprehensive feature and the candidate product comprehensive feature by using a sigmoid function.
[0094] Optionally, the process of determining the recommendation product determination result based on the recommendation score comprises: determining whether to recommend the candidate product to the target user based on whether the recommendation score is greater than a preset recommendation score threshold.
[0095] Specifically, the candidate product can be determined as a recommendable product when the recommendation score is greater than the recommendation score threshold, and the candidate product can be determined as a non-recommendable product when the recommendation score is not greater than the recommendation score threshold.
[0096] Optionally, the process of determining the recommendation product determination result based on the recommendation score comprises:
[0097] The first preset number of candidate products with the largest recommendation score among the plurality of candidate products are obtained, and the corresponding candidate products are determined as recommendable products.
[0098] Specifically, the recommendable candidate products can be directly recommended to the user after the recommendable products are determined.
[0099] Optionally, the graph convolutional neural network comprises an L-layer graph convolutional network, L is an integer, and 2≤L.
[0100] Optionally, as shown in Figure 2 and Figure 6 , step 4051 in Figure 5 may comprise the following steps:
[0101] Step 4051A, the target user feature matrix is taken as the input target user feature of the first layer graph convolutional network, and the output target user feature of the first layer graph convolutional network is obtained by the first layer graph convolutional network based on the input target user feature of the first layer graph convolutional network and the target adjacency matrix; and
[0102] Specifically, the input target user feature of the graph convolutional network can be understood as the input feature of each layer of the graph convolutional network used for extracting the target user comprehensive feature, and the output target user feature of the graph convolutional network can be understood as the target user attribute feature output by each layer of the graph convolutional network based on the input target user feature.
[0103] Specifically, the input target user feature of the first layer graph convolutional network can also be determined based on the target user feature matrix and the target user attribute feature.
[0104] Step 4051B, obtaining target user comprehensive features based on the output target user features of the first layer graph convolutional network, the target adjacency matrix and the target user attribute features.
[0105] Optionally, as shown in Figure 2 and Figure 6 , step 4052 in Figure 5 may include the following steps:
[0106] Step 4052A, taking the candidate product feature matrix as the input candidate product features of the first layer graph convolutional network, and obtaining the output candidate product features of the first layer graph convolutional network based on the input candidate product features of the first layer graph convolutional network and the target adjacency matrix.
[0107] Specifically, the input candidate product features of the above-mentioned graph convolutional network can be understood as the input features of each layer of the graph convolutional network for extracting candidate product comprehensive features, and the output candidate product features of the above-mentioned graph convolutional network can be understood as the candidate product attribute features output by each layer of the graph convolutional network based on the input candidate product features.
[0108] Specifically, the input candidate product features of the above-mentioned first layer graph convolutional network can also be determined based on the candidate product feature matrix and the candidate product attribute features.
[0109] Step 4052B, obtaining candidate product comprehensive features based on the output candidate product features of the first layer graph convolutional network, the target adjacency matrix and the candidate product attribute features.
[0110] The embodiment of the application provides a specific method for determining a recommendation product determination result through a graph convolutional neural network, and can accurately recommend candidate products to a target user.
[0111] The product recommendation method provided by the embodiment of the application is further introduced below.
[0112] Optionally, the autoencoder includes an L-layer encoder, and the target user attribute features include output target user features of each layer of the first L-1 layers of the encoder; and the candidate product attribute features include output candidate product features of each layer of the first L-1 layers of the encoder.
[0113] Optionally, as shown in Figure 7 and Figure 2 , step 4051B in Figure 6 may include:
[0114] Step 4051B1, determining the input target user features of the Nth layer of the graph convolutional network based on the output target user features of the N-1th layer of the encoder, the output target user features of the N-1th layer of the graph convolutional network and the target adjacency matrix, wherein N is an integer, and 2≤N≤L.
[0115] Step 4051B2, obtaining the output target user feature of the Nth layer graph convolution network based on the input target user feature of the Nth layer graph convolution network.
[0116] Step 4051B3, obtaining the output target user feature of the Lth layer graph convolution network to obtain the target user comprehensive feature.
[0117] Optionally, as shown in Figure 7 and Figure 2 , step 4052B in Figure 6 may include:
[0118] Step 4052B1, determining the input candidate product feature of the Nth layer graph convolution network based on the output candidate product feature of the N-1th layer encoder, the output candidate product feature of the N-1th layer graph convolution network and the target adjacency matrix.
[0119] Step 4052B2, obtaining the output candidate product feature of the Nth layer graph convolution network based on the input candidate product feature of the Nth layer graph convolution network.
[0120] Step 4052B3, obtaining the output candidate product feature of the Lth layer graph convolution network to obtain the candidate product comprehensive feature.
[0121] Optionally, the process of determining the input target user feature of the Nth layer graph convolution network based on the output target user feature of the N-1th layer encoder, the output target user feature of the N-1th layer graph convolution network and the target adjacency matrix includes: determining the input target user feature of the Nth layer graph convolution network based on the output target user feature of the N-1th layer encoder, the output target user feature of the N-1th layer graph convolution network, the self-loop adjacency matrix and the degree matrix.
[0122] Optionally, the process of determining the input candidate product feature of the Nth layer graph convolution network based on the output candidate product feature of the N-1th layer encoder, the output candidate product feature of the N-1th layer graph convolution network and the target adjacency matrix includes: determining the input candidate product feature of the Nth layer graph convolution network based on the output candidate product feature of the N-1th layer encoder, the output candidate product feature of the N-1th layer graph convolution network, the self-loop adjacency matrix and the degree matrix.
[0123] Optionally, the input target user feature of the Nth layer graph convolution network, or the input candidate product feature of the Nth layer graph convolution network can be represented as
[0124]
[0125] wherein, Z (N-1)represents the output target user feature or the output candidate product feature of the Nth-layer graph convolution network; A represents a self-loop adjacency matrix; D represents a degree matrix, that is W (N-1) represents a weight matrix of the Nth-layer graph convolution network. represents the output user product feature or the output candidate product feature of the N-1th-layer encoder; p represents a transition parameter, which is used to balance the proportion between the output user product feature or the output candidate product feature of the N-1th-layer encoder and the output user product feature or the output candidate product feature of the N-1th-layer graph convolution network.
[0126] Specifically, the transition parameter p can be determined based on empirical data or through experiments, and can be set to 0.5.
[0127] Optionally, the process of obtaining the output target user feature of the Nth-layer graph convolution network based on the input target user feature of the Nth-layer graph convolution network, or obtaining the output candidate product feature of the Nth-layer graph convolution network based on the input candidate product feature of the Nth-layer graph convolution network, can be based on the following formula:
[0128]
[0129] wherein σ(·) represents an activation function.
[0130] Optionally, the process of obtaining the output target user feature of the first-layer graph convolution network based on the input target user feature of the first-layer graph convolution network and the target adjacency matrix, or obtaining the output candidate product feature of the first-layer graph convolution network based on the input candidate product feature of the first-layer graph convolution network and the target adjacency matrix, can be based on the following formula:
[0131]
[0132] Optionally, the process of determining the recommendation score of the candidate product to the target user based on the target user comprehensive feature and the candidate product comprehensive feature can be based on the following formula:
[0133]
[0134] wherein σ(·) represents a sigmoid function, represents the comprehensive feature of the target user i, represents the comprehensive feature of the candidate product j.
[0135] Specifically, the embodiment of the present application delivers the attribute features of the target user or the candidate product of the output of the N-1 layer encoder to the N layer graph convolution network, which can deliver different attribute information output by different encoder layers to the graph convolution network, increase the diversity of attribute information, and further increase the richness of the corresponding attribute information in the comprehensive features of the target user or the candidate product, so as to improve the accuracy of recommending the candidate product to the user.
[0136] Figure 8 A flowchart of a product recommendation model training method provided by an embodiment of the present application is shown in FIG. 8. The method can be performed by a product recommendation model training device provided by an embodiment of the present application. The device can be implemented in software and / or hardware. In a specific embodiment, the device can be integrated in an electronic device, such as a computer, a server, etc. The following embodiments will be described by taking the device integrated in an electronic device as an example. Referring to FIG. 8, the method can include the following steps: Figure 8
[0137] Step 801: obtaining a sample user feature matrix based on attribute feature data of a sample user, and obtaining a sample product feature matrix based on attribute feature data of a sample product, the sample product being a historical selection product of the sample user.
[0138] Step 802: establishing a sample user product interaction graph based on selection records of the sample user selecting the sample product, and obtaining a sample adjacency matrix corresponding to the sample user product interaction graph.
[0139] Step 803: inputting the sample user feature matrix, the sample product feature matrix, and the sample adjacency matrix to a product recommendation model to be trained, the product recommendation model including an autoencoder and a graph convolution neural network.
[0140] Step 804: obtaining attribute features of a sample user and a sample product respectively based on the sample user feature matrix and the sample product feature matrix by the autoencoder, to obtain sample user attribute features and sample product attribute features.
[0141] Step 805: determining a sample product recommendation result corresponding to the sample user based on the sample user attribute features, the sample product attribute features, and the sample adjacency matrix by the graph convolution neural network.
[0142] Optionally, the graph convolution neural network includes an L layer graph convolution network, L being an integer and 2≤L.
[0143] Optionally, the autoencoder includes an L layer encoder, the sample user attribute features including output sample user features of each layer encoder in the first L-1 layer encoder, and the sample product attribute features including output sample product features of each layer encoder in the first L-1 layer encoder.
[0144] Optionally, the process of determining the sample product recommendation result corresponding to the sample user based on the sample user attribute feature, the sample product attribute feature and the sample adjacency matrix comprises:
[0145] obtaining a sample user comprehensive feature based on the sample user attribute feature and the target adjacency matrix, and obtaining a sample product comprehensive feature based on the sample product attribute feature and the target adjacency matrix; and determining a recommendation score of the sample product recommended by the sample user based on the sample user comprehensive feature and the sample product comprehensive feature, and determining the sample product recommendation result corresponding to the sample user from the candidate sample products based on the recommendation score.
[0146] Optionally, the process of obtaining the sample user comprehensive feature based on the sample user attribute feature and the target adjacency matrix comprises:
[0147] inputting the sample user feature matrix as a first-layer graph convolution network input sample user feature, and obtaining a first-layer graph convolution network output sample user feature based on the first-layer graph convolution network input sample user feature and the target adjacency matrix; and obtaining the sample user comprehensive feature based on the first-layer graph convolution network output sample user feature, the target adjacency matrix and the sample user attribute feature.
[0148] Optionally, the process of obtaining the sample user comprehensive feature based on the first-layer graph convolution network output sample user feature, the target adjacency matrix and the sample user attribute feature comprises:
[0149] determining an Nth-layer graph convolution network input sample user feature based on an (N-1)th-layer encoder output sample user feature, an (N-1)th-layer graph convolution network output sample user feature and the target adjacency matrix, wherein N is an integer and 2≤N≤L; obtaining an Nth-layer graph convolution network output sample user feature based on the Nth-layer graph convolution network input sample user feature; and obtaining the sample user comprehensive feature based on the Lth-layer graph convolution network output sample user feature.
[0150] Optionally, the process of obtaining the sample product comprehensive feature based on the sample product attribute feature and the target adjacency matrix comprises:
[0151] Using the sample product feature matrix as the input sample product features of the first-layer graph convolutional network, and obtaining the output sample product features of the first-layer graph convolutional network through the first-layer graph convolutional network based on the input sample product features of the first-layer graph convolutional network and the target adjacency matrix; and
[0152] Based on the output sample product features, target adjacency matrix and sample product attribute features of the first-layer graph convolutional network, the comprehensive features of the sample products are obtained.
[0153] Optionally, the process of obtaining comprehensive features of the sample products based on the output sample product features, target adjacency matrix, and sample product attribute features of the first-layer graph convolutional network includes:
[0154] Determine the input sample product features of the N-th layer graph convolutional network based on the output sample product features of the N-1th layer encoder, the output sample product features of the N-1th layer graph convolutional network, and the target adjacency matrix, where N is an integer and 2≤N≤L;
[0155] Obtaining output sample product features of the N-th layer graph convolutional network through the N-th layer graph convolutional network based on the input sample product features of the N-th layer graph convolutional network; and
[0156] The output sample product features of the L-th layer graph convolutional network are obtained to obtain the comprehensive features of the sample products.
[0157] Step 806 : Determine the function value of the training loss function based on the sample product recommendation results corresponding to the sample users, and adjust the model parameters in the product recommendation model according to the function value of the training loss function.
[0158] Optionally, the above training loss function is a combination of the reconstruction loss of the autoencoder and the cross entropy loss of the graph convolutional neural network, which can be specifically expressed as:
[0159] L=αL sup +βL AE
[0160] Among them, α and β represent weighting coefficients, L sup represents the cross entropy loss of graph convolutional neural network, L AE represents the reconstruction loss of the autoencoder.
[0161] It can be understood that by optimizing the model parameters of the product recommendation model based on the loss function obtained by combining the reconstruction loss of the autoencoder and the cross-entropy loss of the graph convolutional neural network, the best product recommendation model can be obtained.
[0162] The product recommendation model training method provided by the embodiment of the present application further comprises the following steps: obtaining high-quality attribute information features of a sample user and a sample product by using the autoencoder which has the advantage of extracting attribute information features, and transmitting the high-quality attribute information features to the graph convolutional neural network; then obtaining a sample product recommendation result combined with the high-quality attribute information features and high-quality structure information features by using the graph convolutional neural network; and adjusting model parameters of the product recommendation model based on the sample product recommendation result, so that a product recommendation model with higher recommendation efficiency and higher recommendation accuracy can be trained.
[0163] Figure 9 is a structural diagram of a product recommendation device provided by an embodiment of the present application, and the device is suitable for executing the product recommendation method provided by the embodiment of the present application. As shown in Figure 9 , the device can specifically comprise the following components:
[0164] The recommendation feature matrix acquisition module 901 is configured to acquire a target user feature matrix based on attribute feature data of a target user.
[0165] The recommendation input module 902 is configured to input the target user feature matrix to a pre-trained product recommendation model, and the product recommendation model comprises an autoencoder and a graph convolutional neural network.
[0166] The recommendation attribute feature acquisition module 903 is configured to acquire attribute features of the target user based on the target user feature matrix by using the autoencoder to obtain target user attribute features.
[0167] The recommendation result acquisition module 904 is configured to determine whether to recommend a candidate product to the target user based on the target user attribute features by using the graph convolutional neural network to obtain a recommendation product determination result.
[0168] The product recommendation device provided by the embodiment of the present application can obtain high-quality attribute information features of a target user by using the autoencoder which has the advantage of extracting attribute information features, then transmit the high-quality user attribute information features to the graph convolutional neural network which has the advantage of extracting structure information, and determine whether to recommend a candidate product to the target user based on the high-quality attribute information features by using the graph convolutional neural network, so that the high-order correlation between the target user and the candidate product can be fully mined by combining the high-quality attribute information features and the high-quality structure information features extracted by the graph convolutional neural network, and the recommendation accuracy when recommending products to the target user is improved, and the user satisfaction is improved. In addition, since the product recommendation method provided by the embodiment of the present application does not need to perform interaction matrix splitting, the time complexity is low, and therefore the recommendation efficiency is high.
[0169] Figure 10 is a structural diagram of a product recommendation model training device provided by an embodiment of the present application, and the device is suitable for executing the product recommendation model training method provided by the embodiment of the present application. As shown in Figure 10 , the device can specifically comprise the following components:
[0170] The sample feature matrix acquisition module 1001 is configured to acquire a sample user feature matrix based on attribute feature data of a sample user, and acquire a sample product feature matrix based on attribute feature data of a sample product, the sample product being a historical selection product of the sample user.
[0171] The sample adjacency matrix acquisition module 1002 is configured to establish a sample user product interaction graph based on selection records of the sample user selecting the sample product, and acquire a sample adjacency matrix corresponding to the sample user product interaction graph.
[0172] The sample input module 1003 is configured to input the sample user feature matrix, the sample product feature matrix and the sample adjacency matrix to a product recommendation model to be trained, the product recommendation model comprising a self-encoder and a graph convolutional neural network.
[0173] The sample attribute feature extraction module 1004 is configured to correspondingly acquire attribute features of the sample user and the sample product based on the sample user feature matrix and the sample product feature matrix respectively by the self-encoder, to obtain sample user attribute features and sample product attribute features.
[0174] The sample product recommendation result acquisition module 1005 is configured to determine a sample product recommendation result corresponding to the sample user based on the sample user attribute features, the sample product attribute features and the sample adjacency matrix by the graph convolutional neural network.
[0175] The parameter adjustment module 1006 is configured to determine a function value of a training loss function based on the sample product recommendation result corresponding to the sample user, and adjust model parameters in the product recommendation model according to the function value of the training loss function.
[0176] The product recommendation model training device provided by the embodiment of the application can acquire high-quality attribute information features of the sample user and the sample product by using the self-encoder having the advantage of attribute information feature extraction, and deliver the high-quality attribute information features to the graph convolutional neural network, then acquire the sample product recommendation result combining the high-quality attribute information features and high-quality structure information features by the graph convolutional neural network, and adjust the model parameters of the product recommendation model based on the sample product recommendation result, so that a product recommendation model with higher recommendation efficiency and higher recommendation accuracy can be trained.
[0177] Those skilled in the art can clearly understand that, for the convenience and brevity of description, only the division of the above functional modules is taken as an example for illustration, and in actual application, the above functions can be completed by different functional modules according to needs, that is, the internal structure of the device is divided into different functional modules to complete all or part of the functions described above. The specific working process of the above-described functional modules can refer to the corresponding process in the foregoing method embodiments.
[0178] In addition, the product recommendation device provided by the embodiments of the present application can execute the product recommendation method provided by any of the embodiments of the present application, and the product recommendation model training device provided by the embodiments of the present application can execute the product recommendation model training method provided by any of the embodiments of the present application, which will not be described herein.
[0179] The embodiments of the present application further provide an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, and the processor executes the program to implement the product recommendation method or the product recommendation model training method provided by any of the embodiments of the present application.
[0180] The embodiments of the present application further provide a computer readable medium, which stores a computer program, and the program is executed by a processor to implement the product recommendation method or the product recommendation model training method provided by any of the embodiments of the present application.
[0181] The embodiments of the present application further provide a computer program product, including a computer program, and the computer program is executed by a processor to implement the product recommendation method or the product recommendation model training method provided by any of the embodiments of the present application.
[0182] Reference will be made to the following description Figure 11 which shows a structural schematic diagram of a computer system 1100 of an electronic device suitable for implementing the embodiments of the present application. Figure 11 The electronic device shown is only an example, and should not bring any limitation to the functions and use range of the embodiments of the present application.
[0183] As shown in Figure 11 , the computer system 1100 includes a central processing unit (CPU) 1101, which can perform various appropriate actions and processes according to programs stored in a read-only memory (ROM) 1102 or programs loaded from a storage portion 1108 to a random access memory (RAM) 1103. In the RAM 1103, various programs and data required for the operation of the system 1100 are also stored. The CPU 1101, the ROM 1102, and the RAM 1103 are connected to each other through a bus 1104. An input / output (I / O) interface 1105 is also connected to the bus 1104.
[0184] The following components are connected to the I / O interface 1105: an input part 1106 including a keyboard, a mouse, etc.; an output part 1107 including a display such as a cathode ray tube (CRT), a liquid crystal display (LCD), etc., and a speaker, etc.; a storage part 1108 including a hard disk, etc.; and a communication part 1109 including a network interface card such as a LAN card, a modem, etc. The communication part 1109 performs communication processing via a network such as the Internet. A drive 1110 is also connected to the I / O interface 1105 as necessary. A removable media 1111 such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, etc. is attached to the drive 1110 as necessary, so that a computer program read out therefrom is installed in the storage part 1108 as necessary.
[0185] In particular, the processes described above with reference to the flowcharts can be implemented as a computer software program according to embodiments of the present disclosure. For example, embodiments of the present disclosure include a computer program product comprising a computer program carried on a computer readable medium, the computer program containing program code for executing the methods illustrated by the flowcharts. In such embodiments, the computer program can be downloaded and installed from a network by the communication part 1109, and / or installed from the removable media 1111. When the computer program is executed by the central processing unit (CPU) 1101, the above-described functions defined in the system of the present disclosure are executed.
[0186] It should be noted that the computer-readable medium shown in the present application can be a computer-readable signal medium or a computer-readable storage medium or any combination of the above two. The computer-readable storage medium may, for example, but is not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or component, or any combination of the above. More specific examples of computer-readable storage media can include, but are not limited to, an electrical connection having one or more wires, a portable computer diskette, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In the present application, the computer-readable storage medium can be any tangible medium containing or storing a program that can be used by or in conjunction with an instruction execution system, device or component. In the present application, the computer-readable signal medium can include a data signal carried in a baseband or as a part of a carrier wave, which carries computer-readable program code. Such a propagated data signal can take various forms, including but not limited to an electromagnetic signal, an optical signal or any suitable combination of the above. The computer-readable signal medium can also be any computer-readable medium other than the computer-readable storage medium, which can send, propagate or transmit a program for use by or in conjunction with an instruction execution system, device or component. The program code contained on the computer-readable medium can be transmitted by any suitable medium, including but not limited to wireless, wire, optical cable, RF, etc., or any suitable combination of the above.
[0187] The flowcharts and block diagrams in the drawings illustrate the possible implementation architectures, functions and operations of the systems, methods and computer program products according to various embodiments of the present application. In this regard, each block in the flowcharts or block diagrams can represent a module, a program segment or a part of code containing one or more executable instructions for implementing the specified logical functions. It should also be noted that in some alternative implementations, the functions noted in the blocks can occur in different order than that shown in the drawings. For example, two blocks that are shown in succession can actually be executed substantially in parallel, and sometimes in reverse order, depending on the functions involved. It should also be noted that each block in the block diagrams or flowcharts, and the combination of blocks in the block diagrams or flowcharts, can be implemented by a dedicated hardware-based system that performs the specified functions or operations, or can be implemented by a combination of dedicated hardware and computer instructions.
[0188] The modules and / or units involved in the embodiments of the present invention may be implemented in software or hardware. The modules and / or units described may also be provided in a processor. For example, they may be described as follows: a processor including a recommendation feature matrix acquisition module, a recommendation input module, a recommendation attribute feature acquisition module, and a recommendation result acquisition module; or, they may be described as follows: a processor including a sample feature matrix acquisition module, a sample adjacency matrix acquisition module, a sample input module, and a sample attribute feature extraction module. The names of these modules do not, in some cases, limit the modules themselves.
[0189] As another aspect, the present invention further provides a computer-readable medium, which may be included in the device described in the above embodiment; or may exist independently and not be assembled into the device. The above computer-readable medium carries one or more programs, and when the above one or more programs are executed by a device, the device implements: obtaining a target user feature matrix based on the attribute feature data of the target user; inputting the target user feature matrix into a pre-trained product recommendation model, the product recommendation model including an autoencoder and a graph convolutional neural network; obtaining the attribute features of the target user based on the target user feature matrix through the autoencoder to obtain the target user attribute features; and determining whether to recommend a candidate product to the target user based on the target user attribute features through the graph convolutional neural network to obtain a recommended product determination result.
[0190] The above specific embodiments do not limit the scope of protection of the present invention. Those skilled in the art will appreciate that various modifications, combinations, sub-combinations, and substitutions may occur depending on design requirements and other factors. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of the present invention are intended to be included within the scope of protection of the present invention.
Claims
1. A product recommendation method, characterized in that: include: Obtaining a target user feature matrix based on the target user's attribute feature data; Inputting the target user feature matrix into a pre-trained product recommendation model, wherein the product recommendation model includes an autoencoder and a graph convolutional neural network; Obtaining the attribute features of the target user based on the target user feature matrix by the autoencoder to obtain the target user attribute features; Obtaining a candidate product feature matrix based on the attribute feature data of the candidate products, inputting the candidate product feature matrix into the product recommendation model, and obtaining the attribute information features of the candidate products based on the candidate product feature matrix through the autoencoder to obtain the candidate product attribute features; Establishing a target user-product interaction graph based on the target user's selection record of the candidate product, and obtaining a target adjacency matrix corresponding to the target user-product interaction graph; as well as Based on the target user attribute features, the candidate product attribute features, and the target adjacency matrix, determining whether to recommend the candidate product to the target user by the graph convolutional neural network to obtain a recommended product determination result, which includes: Based on the target user attribute characteristics and the target adjacency matrix, a combination of the target user attribute characteristics and the structural characteristics is obtained to obtain a comprehensive characteristic of the target user; Based on the attribute characteristics of the candidate products and the target adjacency matrix, obtaining a combination of the attribute characteristics and the structural characteristics of the candidate products to obtain comprehensive characteristics of the candidate products; and A recommendation score for recommending the candidate product to the target user is determined based on the comprehensive characteristics of the target user and the comprehensive characteristics of the candidate product, and the recommended product determination result is determined based on the recommendation score.
2. The product recommendation method according to claim 1, characterized in that: The graph convolutional neural network includes an L-layer graph convolutional network, where L is an integer and 2≤L; The step of obtaining a combination of the attribute characteristics and the structural characteristics of the target user based on the target user attribute characteristics and the target adjacency matrix to obtain the target user comprehensive characteristics includes: Using the target user feature matrix as an input target user feature of the first-layer graph convolutional network, and obtaining an output target user feature of the first-layer graph convolutional network through the first-layer graph convolutional network based on the input target user feature of the first-layer graph convolutional network and the target adjacency matrix; and Obtaining the target user comprehensive features based on the output target user features of the first layer of graph convolutional network, the target adjacency matrix, and the target user attribute features; The step of obtaining a combination of the attribute characteristics and the structural characteristics of the candidate product based on the attribute characteristics of the candidate product and the target adjacency matrix to obtain comprehensive characteristics of the candidate product includes: Using the candidate product feature matrix as input candidate product features of the first-layer graph convolutional network, and obtaining output candidate product features of the first-layer graph convolutional network through the first-layer graph convolutional network based on the input candidate product features of the first-layer graph convolutional network and the target adjacency matrix; and Based on the output candidate product features of the first-layer graph convolutional network, the target adjacency matrix and the candidate product attribute features, the comprehensive features of the candidate product are obtained.
3. The product recommendation method according to claim 2, characterized in that: The autoencoder includes L layers of encoders, the target user attribute features include target user features output by encoders in the first L-1 layers of encoders; the candidate product attribute features include candidate product features output by encoders in the first L-1 layers of encoders; The output target user features, the target adjacency matrix, and the target user attribute features based on the first layer of the graph convolutional network are used to obtain the target user comprehensive features, including: Determining the input target user features of the N-th layer graph convolutional network based on the output target user features of the N-1th layer encoder, the output target user features of the N-1th layer graph convolutional network, and the target adjacency matrix, where N is an integer and 2≤N≤L; Based on the input target user features of the N-th layer graph convolutional network, the output target user features of the N-th layer graph convolutional network are obtained through the N-th layer graph convolutional network; Obtaining the output target user features of the L-th layer graph convolutional network to obtain the target user comprehensive features; The output candidate product features based on the first layer graph convolutional network, the target adjacency matrix and the candidate product attribute features, to obtain the candidate product comprehensive features, includes: Determining input candidate product features of the Nth layer graph convolutional network based on the output candidate product features of the N-1th layer encoder, the output candidate product features of the N-1th layer graph convolutional network, and the target adjacency matrix, where N is an integer and 2≤N≤L; Based on the input candidate product features of the N-th layer graph convolutional network, the output candidate product features of the N-th layer graph convolutional network are obtained through the N-th layer graph convolutional network; The output candidate product features of the L-th layer graph convolutional network are obtained to obtain the comprehensive features of the candidate products.
4. A product recommendation model training method, characterized in that: include: Acquire a sample user feature matrix based on attribute feature data of sample users, and acquire a sample product feature matrix based on attribute feature data of sample products, wherein the sample products are historically selected products of the sample users; Establishing a sample user-product interaction graph based on the selection records of the sample users selecting the sample products, and obtaining a sample adjacency matrix corresponding to the sample user-product interaction graph; Inputting the sample user feature matrix, the sample product feature matrix, and the sample adjacency matrix into a product recommendation model to be trained, wherein the product recommendation model includes an autoencoder and a graph convolutional neural network; Obtaining attribute features of the sample users and the sample products based on the sample user feature matrix and the sample product feature matrix respectively by the autoencoder to obtain sample user attribute features and sample product attribute features; Based on the sample user attribute features, the sample product attribute features and the sample adjacency matrix, determining the sample product recommendation results corresponding to the sample user through the graph convolutional neural network; as well as The function value of the training loss function is determined based on the sample product recommendation results corresponding to the sample users, and the model parameters in the product recommendation model are adjusted according to the function value of the training loss function.
5. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein: When the processor executes the program, it implements the product recommendation method according to any one of claims 1 to 3 or the product recommendation model training method according to claim 4.
6. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, it implements the product recommendation method according to any one of claims 1 to 3 or the product recommendation model training method according to claim 4.
Citation Information
Patent Citations
5G message chat robot recommendation method and device, equipment and storage medium
CN114374660A
Transaction product recommendation processing method and device, equipment and storage medium
CN118247061A