Product Recommendation Method, Device, Computer Equipment and Storage Medium
Through the product recommendation method of multi-layer propagation vector and feature interaction processing, the problem of low accuracy of product recommendation in the prior art is solved, and more efficient and personalized product recommendation is achieved.
Patent Information
- Application Number
- CN202210921434.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-08-02
- Publication Date
- 2025-07-29
- Estimated Expiration
- 2042-08-02
AI Technical Summary
The accuracy of the product recommendation model in the prior art is low, mainly due to inaccurate user portrait portrayals.
By obtaining the multi-layer propagation vector set of users and products, using graph convolution networks for information propagation, combining feature interaction processing, generating product recommendation results, and maintaining the personalized characteristics of vectors at different propagation levels.
It improves the accuracy and efficiency of product recommendations, avoids excessive similarity between vectors at different propagation levels, and enhances the personalized effect of recommendations.
Smart Images

Figure CN115222489B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of relational network analysis, and particularly to a commodity recommendation method, device, computer device and storage medium. Background Art
[0002] With the development of science and technology, extracting feature data related to users from big data and then making recommendations to users based on the extracted feature data have been gradually applied in different fields. For example, in the fields of insurance product recommendation, commodity recommendation or drug recommendation, etc.
[0003] The recommendation models proposed in the prior art often make relevant recommendations based on a single user profile. However, it is very difficult to collect user-related information on some platforms, resulting in low accuracy of user profile characterization, and thus low accuracy of the recommendation models. Summary of the Invention
[0004] Embodiments of the present invention provide a commodity recommendation method, device, computer device and storage medium to solve the problem of low accuracy of commodity recommendation by the recommendation model in the prior art.
[0005] A commodity recommendation method includes:
[0006] Receiving a commodity recommendation instruction; the commodity recommendation instruction includes user basic information corresponding to a target user and commodity basic information corresponding to a target commodity;
[0007] Obtaining a user propagation vector set corresponding to the user basic information and a commodity propagation vector set corresponding to the commodity basic information; the user propagation vector set includes an initial user vector and multiple propagation user vectors sorted by propagation levels; the commodity propagation vector set includes an initial commodity vector and multiple propagation commodity vectors sorted by propagation levels;
[0008] Obtaining user feature vectors and commodity feature vectors at each propagation level; the user feature vectors are generated according to the user feature vectors at the previous propagation level, the initial user vector and the propagation user vectors at the current propagation level; the commodity feature vectors are generated according to the commodity feature vectors at the previous propagation level, the initial commodity vector and the propagation commodity vectors at the current propagation level;
[0009] Performing feature interaction processing on the user feature vectors and commodity feature vectors at all propagation levels to obtain a commodity recommendation result; the commodity recommendation result includes recommendation values corresponding to all the target commodities for different target users;
[0010] Sort the target products according to all the recommended values for the same target user, generate a product recommendation sequence corresponding to the target user, and push the product recommendation sequences corresponding to all the target users to the client.
[0011] A product recommendation device, comprising:
[0012] An instruction receiving module, configured to receive a product recommendation instruction; the product recommendation instruction includes user basic information corresponding to a target user and product basic information corresponding to a target product;
[0013] A propagation vector obtaining module, configured to obtain a user propagation vector set corresponding to the user basic information and a product propagation vector set corresponding to the product basic information; the user propagation vector set includes an initial user vector and multiple propagation user vectors sorted according to the propagation level; the product propagation vector set includes an initial product vector and multiple propagation product vectors sorted according to the propagation level;
[0014] A feature extraction module, configured to obtain a user feature vector and a product feature vector for each propagation level; the user feature vector is generated according to the user feature vector of the previous propagation level, the initial user vector, and the propagation user vector of the current propagation level; the product feature vector is generated according to the product feature vector of the previous propagation level, the initial product vector, and the propagation product vector of the current propagation level;
[0015] A feature interaction module, configured to perform feature interaction processing on the user feature vectors and product feature vectors of all propagation levels to obtain a product recommendation result; the product recommendation result includes recommended values corresponding to all the target products when different target users are involved;
[0016] A product recommendation module, configured to sort the target products according to all the recommended values for the same target user, generate a product recommendation sequence corresponding to the target user, and push the product recommendation sequences corresponding to all the target users to the client.
[0017] A computer device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, where the processor implements the above product recommendation method when executing the computer program.
[0018] A computer-readable storage medium stores a computer program, and the computer program implements the above product recommendation method when executed by a processor.
[0019] The above-mentioned product recommendation method, device, computer device and storage medium. The product recommendation method enables the user propagation vector set and the product propagation vector set to have more characteristic information by performing multi-layer propagation on the basic user information and the basic product information. Furthermore, during the feature extraction process, the vectors at different propagation levels maintain their connection with the initial user vector (or the initial product vector), and the generation of the vectors at each propagation level depends on different vectors (the user feature vector or the user-product vector corresponding to the previous propagation level). In this way, it is possible to avoid the vector representations at different propagation levels from being too similar, improving the individuality of the vector representations at different propagation levels. Consequently, the accuracy of product recommendation is improved. BRIEF DESCRIPTION OF THE DRAWINGS
[0020] To more clearly illustrate the technical solutions of the embodiments of the present invention, the following will briefly introduce the drawings required for the description of the embodiments of the present invention. Obviously, the drawings in the following description are only some embodiments of the present invention, and those of ordinary skill in the art can obtain other drawings based on these drawings without creative efforts.
[0021] Figure 1 is a schematic diagram of an application environment of the product recommendation method in an embodiment of the present invention;
[0022] Figure 2 is a flowchart of the product recommendation method in an embodiment of the present invention;
[0023] Figure 3 is a schematic block diagram of the product recommendation device in an embodiment of the present invention;
[0024] Figure 4 is a schematic diagram of a computer device in an embodiment of the present invention. DETAILED DESCRIPTION OF THE EMBODIMENTS
[0025] The following will clearly and completely describe the technical solutions in the embodiments of the present invention with reference to the drawings in the embodiments of the present invention. Obviously, the described embodiments are some, but not all, of the embodiments of the present invention. All other embodiments obtained by those of ordinary skill in the art based on the embodiments of the present invention without creative efforts fall within the scope of protection of the present invention.
[0026] The product recommendation method provided by the embodiments of the present invention can be applied in the Figure 1 application environment as shown. Specifically, the product recommendation method is applied in a product recommendation system, and the product recommendation system includes as Figure 1The client and server shown, where the client communicates with the server via a network, are used to solve the problem of low accuracy in product recommendation by the recommendation model in the prior art. Among them, the client, also known as the user side, refers to a program that provides local services for clients corresponding to the server. The client can be installed on, but not limited to, various personal computers, laptops, smartphones, tablets, and portable wearable devices. The server can be implemented by an independent server or a server cluster composed of multiple servers. Among them, the server can be an independent server or a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, Content Delivery Network (CDN), and big data and artificial intelligence platforms.
[0027] In one embodiment, as Figure 2 shown, a product recommendation method is provided. Taking the method applied to the Figure 1 server as an example, it includes the following steps:
[0028] S10: Receive a product recommendation instruction; the product recommendation instruction includes the user basic information corresponding to the target user and the product basic information corresponding to the target product.
[0029] It can be understood that the product recommendation instruction can be sent by the client after collecting the user basic information and the product basic information, or can be automatically generated after the client sends the user basic information and the product basic information to the server. The target user is the user waiting for product recommendation. The user basic information can be the personal information of the target user (such as gender, personality, or personal preferences, etc.). The target product is the product to be recommended to the target user. The product basic information can be the product type of the target product, the applicable population of the product, or the product function information, etc. Exemplarily, assuming this embodiment is applied to the insurance product recommendation scenario, the target product can be different types of insurance products. The product basic information can be the applicable population of the insurance product, the insurance type, or the insurance cost, etc.
[0030] Furthermore, the target user set in this embodiment can be one or more. One target user corresponds to one piece of user basic information. There are multiple target products set in this embodiment. One target product corresponds to one piece of product basic information.
[0031] S20: Obtain the user propagation vector set corresponding to the user basic information and the product propagation vector set corresponding to the product basic information; the user propagation vector set includes an initial user vector and multiple propagation user vectors sorted by propagation levels; the product propagation vector set includes an initial product vector and multiple propagation product vectors sorted by propagation levels.
[0032] Understandably, in this embodiment, in order to perceive more features in the user basic information and the product basic information, a preset product recommendation model is used to perform information propagation on the user basic information and the product basic information, so as to obtain the user propagation vector set corresponding to the user basic information and the product propagation vector set corresponding to the product basic information. Among them, the preset product recommendation model is constructed based on a graph convolutional network.
[0033] Furthermore, the user propagation vector set includes an initial user vector and multiple propagation user vectors sorted by propagation levels. Among them, the initial user vector is the vector representation corresponding to the user basic information. When the preset product recommendation model performs information propagation on the user basic information to the l-th step, it means that there are l propagation levels of propagation user vectors. The initial product vector is the vector representation corresponding to the product basic information. When the preset product recommendation model performs information propagation on the product basic information to the l-th step, it means that there are l propagation levels of propagation product vectors.
[0034] Furthermore, there are different features between the propagation user vectors and the propagation product vectors at different propagation levels, and different features contribute differently to product recommendation. In this way, more features in the user basic information and the product basic information can be perceived through information propagation.
[0035] S30: Obtain the user feature vector and the product feature vector at each propagation level; the user feature vector is generated according to the user feature vector at the previous propagation level, the initial user vector, and the propagation user vector at the current propagation level; the product feature vector is generated according to the product feature vector at the previous propagation level, the initial product vector, and the propagation product vector at the current propagation level.
[0036] Understandably, during the process of disseminating user basic information or product basic information in step S20, although more features in the user basic information or product basic information can be obtained, if product recommendations are directly made based on the vectors obtained at each dissemination level, the gap between the vectors of the high dissemination level and the low dissemination level will be small. That is, the transition between the vectors of different dissemination levels is smooth, thereby resulting in a low product recommendation efficiency. Therefore, in this embodiment, a feature extraction process is introduced after step S20. Moreover, the feature extraction in this embodiment, in addition to being based on the disseminated user vector or disseminated product vector of the current dissemination level, also needs to be associated with the vector of the root node (i.e., the initial user vector or initial product vector), as well as the output of the previous dissemination level (i.e., the user feature vector or product feature vector output by the previous dissemination level). In this way, the similarity between the vectors of the high dissemination level and the low dissemination level can be made low, avoiding the smooth transition between the vectors of different dissemination levels, and thereby improving the accuracy of product recommendations.
[0037] S40: Perform feature interaction processing on the user feature vectors and product feature vectors of all dissemination levels to obtain a product recommendation result; the product recommendation result includes the recommendation values corresponding to all the target products for different target users.
[0038] Understandably, the feature interaction processing of the user feature vectors and product feature vectors can be implemented using a convolutional network or an inner product function. For example, the feature interaction relationship between the high dissemination level and the low dissemination level between the user feature vector and the product feature vector is extracted through the inner product function, so as to determine the recommendation values corresponding to all the target products for the target user. That is, for each target user, the recommendation value of each target product for this target user will be output.
[0039] Specifically, after obtaining the user feature vectors and product feature vectors of each dissemination level, perform feature interaction processing on the user feature vectors and product feature vectors of all dissemination levels through a convolutional network or an inner product function. Thereby, the feature interaction relationship between the user feature vector and the product feature vector is determined, and then the recommendation value of the target product for the target user is determined based on this feature interaction relationship. Thereby, a product recommendation result is generated based on the recommendation values corresponding to all the target products for the same target user.
[0040] S50: Sort the target products according to all the recommendation values for the same target user to generate a product recommendation sequence corresponding to the target user, and push the product recommendation sequences corresponding to all the target users to the client.
[0041] Specifically, after performing feature interaction processing on the user feature vectors and product feature vectors at all propagation levels to obtain product recommendation results, the target products can be sorted according to all the recommendation values for the same target user, generating a product recommendation sequence corresponding to the target user. That is, all the target products corresponding to the same target user are inserted into the product recommendation sequence corresponding to the target user in descending order of the recommendation values. Then, the product recommendation sequence containing the target products arranged in descending order of the recommendation values is sent to the client. Among them, the client can be the intelligent terminal of the target user (such as a smart phone, a computer, or other devices with information sending and receiving functions). The client can also be a third-party platform, so as to push all the product recommendation sequences of the target users to this third-party platform. Then, this third-party platform pushes the product recommendation sequence to the corresponding target users.
[0042] In this embodiment, first, through multi-layer propagation of the user basic information and the product basic information, the user propagation vector set and the product propagation vector set have more feature information. Then, in the feature extraction process, the vectors at different propagation levels maintain the connection with the initial user vector (or the initial product vector), and the generation of the vectors at each propagation level depends on different vectors (the user feature vector or the user-product vector corresponding to the previous propagation level). In this way, it is possible to avoid the vector representations at different propagation levels being too similar, improving the individuality degree of the vector representations at different propagation levels. Furthermore, the accuracy of product recommendation is improved.
[0043] In one embodiment, before step S20, that is, before obtaining the user propagation vector set corresponding to the user basic information and the product propagation vector set corresponding to the product basic information, it further includes:
[0044] (1) Performing vector conversion on the user basic information to obtain an initial user vector; performing vector conversion on the product basic information to obtain an initial product vector.
[0045] Specifically, after receiving the product recommendation instruction, vector embedding processing can be performed on the user basic information and the product basic information to obtain the initial user vector corresponding to the user basic information and the initial product vector corresponding to the product basic information. Among them, the vector embedding processing of the user basic information and the product basic information can be implemented through a model constructed by a neural network. Or, after performing word segmentation processing on the user basic information and the product basic information, the vector representations corresponding to the user basic information and the product basic information after word segmentation processing are determined based on the word vector dictionary.
[0046] (2) Input the initial user vector and the initial product vector into a preset product recommendation model, and perform information propagation on the initial user vector and the initial product vector through the preset product recommendation model to obtain the propagated user vectors corresponding to different propagation levels and the propagated product vectors corresponding to different propagation levels.
[0047] It can be understood that the preset product recommendation model in this embodiment is constructed based on a graph convolutional network. And a lightweight graph convolutional network is selected in this implementation. In this way, during the process of information propagation for the initial user vector and the initial product vector, the information propagation speed can be accelerated, thereby improving the efficiency of product recommendation.
[0048] Specifically, after performing vector conversion on the basic user information to obtain the initial user vector, and performing vector conversion on the basic product information to obtain the initial product vector, the initial user vector and the initial product vector are input into the preset product recommendation model, and the preset product recommendation model performs information propagation processing with multiple propagation levels on the initial user vector and the initial product vector. Furthermore, the propagated user vectors corresponding to the initial user vector obtained during the process of multi-level information propagation processing output by the preset product recommendation model, and the propagated product vectors corresponding to the initial product vector obtained during the process of multi-level information propagation processing are obtained.
[0049] In one embodiment, the performing information propagation on the initial user vector and the initial product vector through the preset product recommendation model to obtain the propagated user vectors corresponding to different propagation levels and the propagated product vectors corresponding to different propagation levels includes:
[0050] (1) Set the initial user vector as a user node, set the initial product vector as a product node, and construct a target bipartite graph according to all the user nodes and all the product nodes.
[0051] It can be understood that in the above description, it is pointed out that there may be one or more target users, and there are multiple target products. Therefore, when there is exactly one target user, there is only one initial user vector. When there are multiple target users, there are multiple initial user vectors. Since there are multiple target products, there are multiple corresponding initial product vectors. Furthermore, one initial user vector is set as one user node, and one initial product vector is set as one product node. Thus, a target bipartite graph is constructed according to all the user nodes and all the product nodes.
[0052] Furthermore, in this embodiment, the target bipartite graph is defined as G=(V, A), where V is the set of all user nodes and product nodes. A is the neighbor matrix. Furthermore, it can be determined whether there is a direct interaction relationship between the user node and the product node through this target bipartite graph.
[0053] (2) Determine the number of first neighbor nodes corresponding to the user nodes and the number of second neighbor nodes corresponding to the commodity nodes from the target bipartite graph.
[0054] It can be understood that in the above description, it is pointed out that the direct interaction relationship between user nodes and commodity nodes can be determined through the target bipartite graph. Therefore, the commodity nodes having a direct interaction relationship with the user nodes can be determined as the neighbor nodes of the user nodes. Furthermore, the number of neighbor nodes corresponding to each user node can be detected, which is the number of first neighbor nodes. Similarly, the user nodes having a direct interaction relationship with the commodity nodes can be determined as the neighbor nodes of the commodity nodes. Furthermore, the number of neighbor nodes corresponding to each commodity node can be detected, which is the number of second neighbor nodes.
[0055] (3) Determine the propagation user vector and the propagation commodity vector of the current propagation level according to the number of first neighbor nodes, the number of second neighbor nodes, the propagation user vector of the previous propagation level, and the propagation commodity vector of the previous propagation level.
[0056] Specifically, after determining the number of first neighbor nodes corresponding to the user nodes and the number of second neighbor nodes corresponding to the commodity nodes from the target bipartite graph, the propagation user vector and the propagation commodity vector of the current propagation level can be determined according to the number of first neighbor nodes, the number of second neighbor nodes, the propagation user vector of the previous propagation level, and the propagation commodity vector of the previous propagation level.
[0057] Furthermore, assume that the information propagation of the initial user vector and the initial commodity vector by the preset commodity recommendation model reaches layer l. Then, the propagation user vector and the propagation commodity vector are expressed as follows:
[0058]
[0059]
[0060] where is the propagation user vector corresponding to layer l (u represents the target user); is the propagation commodity vector corresponding to layer l (i represents the target commodity); is the propagation user vector corresponding to layer l - 1 (i.e., the propagation user vector of the previous propagation level); is the propagation commodity vector corresponding to layer l - 1 (i.e., the propagation commodity vector of the previous propagation level); Nu is the number of first neighbor nodes; Ni is the number of second neighbor nodes.
[0061] In one embodiment, in step S30, that is, the obtaining of the user feature vector and the commodity feature vector of each propagation level includes:
[0062] (1) Obtain a first vector matrix and a second vector matrix corresponding to the current propagation level.
[0063] Understandably, the first vector matrix and the second vector matrix are parameter matrices shared by user feature vectors and commodity feature vectors at the same propagation level. However, it should be noted that at different propagation levels, the parameters in the first vector matrix and the second vector matrix may be different. That is, in order to avoid the assimilation of vector representations at high propagation levels, the first vector matrix or the second vector matrix can be adjusted according to the dimensions of vectors such as propagation user vectors or propagation commodity vectors at different propagation levels, so that there are significant differences between the user feature vectors and commodity feature vectors obtained at different propagation levels. In this way, when the data characteristics of vectors at some propagation levels (such as the above-mentioned propagation user vectors or propagation commodity vectors) are relatively simple, the vector dimension can be reduced by adjusting the first vector matrix or the second vector matrix, thereby improving the efficiency of commodity recommendation.
[0064] (2) Determine the user feature vector of the current propagation level according to the user feature vector of the previous propagation level, the initial user vector, the propagation user vector of the current propagation level, the first vector matrix, and the second vector matrix.
[0065] Specifically, after obtaining the first vector matrix and the second vector matrix corresponding to the current propagation level, the vector activation process can be performed on the user feature vector of the previous propagation level, the initial user vector, and the first vector matrix through an activation function to obtain a first activation vector; the vector activation process is performed on the propagation user vector of the current propagation level and the second vector matrix to obtain a second activation vector; the user feature vector of the current propagation level is determined according to the first activation vector and the second activation vector.
[0066] Furthermore, the user feature vector of the current propagation level can be determined through the following expression:
[0067]
[0068] where is the user feature vector of the current propagation level \(l\). \(\sigma()\) is the activation function. is the initial user vector. is the user feature vector of the previous propagation level \(l - 1\). is the first vector matrix corresponding to the current propagation level \(l\). is the second vector matrix corresponding to the current propagation level \(l\).
[0069] Further, it should be noted that when determining the user feature vector of the first propagation level, there are no other propagation levels before the first propagation level. Therefore, for the user feature vector of the first propagation level, the user feature vector of the previous propagation level can be set to 0. That is, the user feature vector of the first propagation level can be determined based on the user feature vector corresponding to the initial user vector, the initial user vector, the propagation user vector of the first propagation level, the first vector matrix and the second vector matrix corresponding to the first propagation level.
[0070] (3) Determine the commodity feature vector of the current propagation level according to the commodity feature vector of the previous propagation level, the initial commodity vector, the propagation commodity vector of the current propagation level, the first vector matrix and the second vector matrix.
[0071] Specifically, after obtaining the first vector matrix and the second vector matrix corresponding to the current propagation level, the vector activation process can be performed on the commodity feature vector of the previous propagation level, the initial commodity vector and the first vector matrix through the activation function to obtain the third activation vector; the vector activation process is performed on the propagation commodity vector of the current propagation level and the second vector matrix to obtain the fourth activation vector; according to the third activation vector and the fourth activation vector, the commodity feature vector of the current propagation level is determined.
[0072] Further, the user feature vector of the current propagation level can be determined through the following expression:
[0073]
[0074] where is the commodity feature vector of the current propagation level l. σ() is the activation function. is the initial commodity vector. is the commodity feature vector of the previous propagation level l-1. is the first vector matrix corresponding to the current propagation level l. is the second vector matrix corresponding to the current propagation level l.
[0075] Further, it should be noted that when determining the commodity feature vector of the first propagation level, there are no other propagation levels before the first propagation level. Therefore, for the commodity feature vector of the first propagation level, the commodity feature vector of the previous propagation level can be set to 0. That is, the commodity feature vector of the first propagation level can be determined based on the commodity feature vector corresponding to the initial commodity vector, the initial commodity vector, the propagation commodity vector of the first propagation level, the first vector matrix and the second vector matrix corresponding to the first propagation level.
[0076] In one embodiment, in step S40, that is, performing feature interaction processing on the user feature vectors and commodity feature vectors of all propagation levels to obtain a commodity recommendation result, including:
[0077] (1) Inputting the user feature vectors and commodity feature vectors of all the propagation levels into a preset convolutional network model to obtain a first recommendation result.
[0078] It can be understood that the preset convolutional network model is a model constructed based on a convolutional neural network. Specifically, after determining the user feature vectors and commodity feature vectors of all propagation levels, the user feature vectors and commodity feature vectors of all propagation levels can be input into the preset convolutional network model to perform outer product cross processing on the user feature vectors and commodity feature vectors of all propagation levels, and then perform interaction feature extraction on the user feature vectors and commodity feature vectors of all propagation levels after the outer product cross processing, so as to obtain a first recommendation result. Among them, the first recommendation result is the recommended value corresponding to all target commodities for different target users through the preset convolutional network model.
[0079] (2) Performing feature interaction processing on the user feature vectors and commodity feature vectors of all the propagation levels through an inner product function to obtain a second recommendation result.
[0080] Specifically, after determining the user feature vectors and commodity feature vectors of all propagation levels, the user feature vectors and commodity feature vectors of all the propagation levels can be subjected to feature interaction processing through the inner product function, so as to extract the interaction relationship between the user feature vectors and commodity feature vectors of all propagation levels and obtain a second recommendation result. Among them, the second recommendation result is the recommended value corresponding to all target commodities for different target users through the inner product function.
[0081] (3) Determining the commodity recommendation result according to the first recommendation result and the second recommendation result.
[0082] It can be understood that in the above description, it is pointed out that: the first recommendation result is the recommended value corresponding to all target commodities for different target users through the preset convolutional network model, and the second recommendation result is the recommended value corresponding to all target commodities for different target users through the inner product function. Therefore, the average value of the sum of the recommended value in the first recommendation result and the recommended value in the second recommendation result for the same target commodity for the same target user can be used as the recommended value of the target commodity in the commodity recommendation result for the target user.
[0083] It should be understood that the magnitudes of the sequence numbers of the steps in the above embodiments do not mean the order of execution. The order of execution of each process should be determined according to its function and internal logic, and should not constitute any limitation to the implementation process of the embodiments of the present invention.
[0084] In one embodiment, a product recommendation device is provided, which corresponds one-to-one with the product recommendation method in the above embodiment. As Figure 3 shown, the product recommendation device includes an instruction receiving module 10, a propagation vector obtaining module 20, a feature extraction module 30, a feature interaction module 40, and a product recommendation module 50. The detailed description of each functional module is as follows:
[0085] The instruction receiving module 10 is configured to receive a product recommendation instruction; the product recommendation instruction includes user basic information corresponding to a target user and product basic information corresponding to a target product;
[0086] The propagation vector obtaining module 20 is configured to obtain a user propagation vector set corresponding to the user basic information and a product propagation vector set corresponding to the product basic information; the user propagation vector set includes an initial user vector and multiple propagation user vectors sorted according to the propagation level; the product propagation vector set includes an initial product vector and multiple propagation product vectors sorted according to the propagation level;
[0087] The feature extraction module 30 is configured to obtain a user feature vector and a product feature vector for each propagation level; the user feature vector is generated according to the user feature vector of the previous propagation level, the initial user vector, and the propagation user vector of the current propagation level; the product feature vector is generated according to the product feature vector of the previous propagation level, the initial product vector, and the propagation product vector of the current propagation level;
[0088] The feature interaction module 40 is configured to perform feature interaction processing on the user feature vectors and product feature vectors of all propagation levels to obtain a product recommendation result; the product recommendation result includes recommendation values corresponding to all the target products for different target users;
[0089] The product recommendation module 50 is configured to sort the target products according to all the recommendation values for the same target user, generate a product recommendation sequence corresponding to the target user, and push the product recommendation sequences corresponding to all the target users to the client.
[0090] Preferably, the product recommendation device further includes:
[0091] A vector conversion module, configured to perform vector conversion on the user basic information to obtain an initial user vector; perform vector conversion on the product basic information to obtain an initial product vector;
[0092] A vector propagation module, configured to input the initial user vector and the initial commodity vector into a preset commodity recommendation model, and perform information propagation on the initial user vector and the initial commodity vector through the preset commodity recommendation model to obtain the propagated user vectors corresponding to different propagation levels and the propagated commodity vectors corresponding to different propagation levels.
[0093] Preferably, the vector propagation module includes:
[0094] A bipartite graph construction unit, configured to set the initial user vector as a user node, set the initial commodity vector as a commodity node, and construct a target bipartite graph according to all the user nodes and all the commodity nodes;
[0095] A neighbor node determination unit, configured to determine the number of first neighbor nodes corresponding to the user node and the number of second neighbor nodes corresponding to the commodity node from the target bipartite graph;
[0096] A propagated vector determination unit, configured to determine the propagated user vector and the propagated commodity vector of the current propagation level according to the number of first neighbor nodes, the number of second neighbor nodes, the propagated user vector of the previous propagation level, and the propagated commodity vector of the previous propagation level.
[0097] Preferably, the feature extraction module 30 includes:
[0098] A vector matrix acquisition unit, configured to acquire a first vector matrix and a second vector matrix corresponding to the current propagation level;
[0099] A user feature vector determination unit, configured to determine the user feature vector of the current propagation level according to the user feature vector of the previous propagation level, the initial user vector, the propagated user vector of the current propagation level, the first vector matrix, and the second vector matrix;
[0100] A commodity feature vector determination unit, configured to determine the commodity feature vector of the current propagation level according to the commodity feature vector of the previous propagation level, the initial commodity vector, the propagated commodity vector of the current propagation level, the first vector matrix, and the second vector matrix.
[0101] Preferably, the user feature vector determination unit includes:
[0102] A first activation subunit, configured to perform vector activation processing on the user feature vector of the previous propagation level, the initial user vector, and the first vector matrix to obtain a first activation vector;
[0103] A second activation subunit, configured to perform vector activation processing on the propagated user vector of the current propagation level and the second vector matrix to obtain a second activation vector;
[0104] The first vector superposition subunit is configured to determine the user feature vector of the current propagation level according to the first activation vector and the second activation vector.
[0105] Preferably, the commodity feature vector determination unit includes:
[0106] The third activation subunit is configured to perform vector activation processing on the commodity feature vector, the initial commodity vector, and the first vector matrix of the previous propagation level to obtain a third activation vector;
[0107] The fourth activation subunit is configured to perform vector activation processing on the propagated commodity vector of the current propagation level and the second vector matrix to obtain a fourth activation vector;
[0108] The second vector superposition subunit is configured to determine the commodity feature vector of the current propagation level according to the third activation vector and the fourth activation vector.
[0109] Preferably, the feature interaction module includes:
[0110] The convolution interaction unit is configured to input the user feature vectors and commodity feature vectors of all the propagation levels into a preset convolution network model to obtain a first recommendation result;
[0111] The inner product interaction unit is configured to perform feature interaction processing on the user feature vectors and commodity feature vectors of all the propagation levels through an inner product function to obtain a second recommendation result;
[0112] The commodity recommendation result determination unit is configured to determine the commodity recommendation result according to the first recommendation result and the second recommendation result.
[0113] For the specific limitations on the commodity recommendation device, reference can be made to the limitations on the commodity recommendation method in the foregoing text, which will not be elaborated herein. Each module in the above commodity recommendation device can be implemented in whole or in part by software, hardware, and their combination. The above modules can be embedded in the processor of the computer device in hardware form or independent of it, or stored in the memory of the computer device in software form, so that the processor can call and execute the operations corresponding to the above respective modules.
[0114] In one embodiment, a computer device is provided. The computer device can be a server, and its internal structure diagram can be as Figure 4As shown in the figure. The computer device includes a processor, a memory, a network interface, and a database connected through a system bus. Among them, the processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program, and a database. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The database of the computer device is used to store the data used in the commodity recommendation method in the above embodiments. The network interface of the computer device is used to communicate with an external terminal through a network connection. When the computer program is executed by the processor, it implements a commodity recommendation method.
[0115] In one embodiment, a computer device is provided, including a memory, a processor, and a computer program stored on the memory and executable on the processor. When the processor executes the computer program, it implements the commodity recommendation method in the above embodiments.
[0116] In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by the processor, it implements the commodity recommendation method in the above embodiments.
[0117] Those of ordinary skill in the art can understand that all or part of the processes in the methods of the above embodiments can be completed by instructing relevant hardware through a computer program. The computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above methods. Among them, any reference to a memory, storage, database, or other medium used in the embodiments provided in the present application can include non-volatile and / or volatile memories. Non-volatile memory can include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM), or flash memory. Volatile memory can include random access memory (RAM) or an external cache memory. By way of illustration and not limitation, RAM is available in many forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDR SDRAM), enhanced SDRAM (ESDRAM), synchronous link (Synchlink) DRAM (SLDRAM), memory bus (Rambus) direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM), etc.
[0118] Those skilled in the art can clearly understand that, for the convenience and conciseness of description, only the above-mentioned division of each functional unit and module is used as an example. In actual applications, the above functions can be assigned to different functional units and modules as needed, that is, the internal structure of the device can be divided into different functional units or modules to complete all or part of the functions described above.
[0119] The above-described embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit them; although the present invention has been described in detail with reference to the foregoing embodiments, those of ordinary skill in the art should understand that they can still modify the technical solutions described in the foregoing embodiments, or perform equivalent replacements for some of the technical features; and these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention, and should all be included in the protection scope of the present invention.
Claims
1. A commodity recommendation method, characterized in that, Including: Receiving a commodity recommendation instruction; the commodity recommendation instruction includes the basic user information corresponding to the target user and the basic commodity information corresponding to the target commodity; Obtaining a user propagation vector set corresponding to the basic user information and a commodity propagation vector set corresponding to the basic commodity information; the user propagation vector set includes an initial user vector and multiple propagation user vectors sorted according to the propagation level; the commodity propagation vector set includes an initial commodity vector and multiple propagation commodity vectors sorted according to the propagation level; Obtaining a user feature vector and a commodity feature vector for each propagation level; the user feature vector is generated according to the user feature vector of the previous propagation level, the initial user vector, and the propagation user vector of the current propagation level; the commodity feature vector is generated according to the commodity feature vector of the previous propagation level, the initial commodity vector, and the propagation commodity vector of the current propagation level; Performing feature interaction processing on the user feature vectors and commodity feature vectors of all propagation levels to obtain a commodity recommendation result; the commodity recommendation result includes recommendation values corresponding to all the target commodities for different target users; Sorting the target commodities according to all the recommendation values for the same target user to generate a commodity recommendation sequence corresponding to the target user, and pushing the commodity recommendation sequences corresponding to all the target users to the client; The obtaining a user feature vector and a commodity feature vector for each propagation level includes: Obtaining a first vector matrix and a second vector matrix corresponding to the current propagation level; Determining the user feature vector of the current propagation level according to the user feature vector of the previous propagation level, the initial user vector, the propagation user vector of the current propagation level, the first vector matrix, and the second vector matrix; Determining the commodity feature vector of the current propagation level according to the commodity feature vector of the previous propagation level, the initial commodity vector, the propagation commodity vector of the current propagation level, the first vector matrix, and the second vector matrix; The determining the user feature vector according to the user feature vector of the previous propagation level, the initial user vector, the propagation user vector of the current propagation level, the first vector matrix, and the second vector matrix includes: Performing vector activation processing on the user feature vector of the previous propagation level, the initial user vector, and the first vector matrix to obtain a first activation vector; Performing vector activation processing on the propagation user vector of the current propagation level and the second vector matrix to obtain a second activation vector; Determining the user feature vector of the current propagation level according to the first activation vector and the second activation vector; The determining the commodity feature vector according to the commodity feature vector of the previous propagation level, the initial commodity vector, the propagation commodity vector of the current propagation level, the first vector matrix, and the second vector matrix includes: Performing vector activation processing on the commodity feature vector of the previous propagation level, the initial commodity vector, and the first vector matrix to obtain a third activation vector; Performing vector activation processing on the propagation commodity vector of the current propagation level and the second vector matrix to obtain a fourth activation vector; Determine the product feature vector at the current propagation level according to the third activation vector and the fourth activation vector.
2. The product recommendation method according to claim 1, wherein Before obtaining the user propagation vector set corresponding to the user basic information and the product propagation vector set corresponding to the product basic information, it further includes: Perform vector conversion on the user basic information to obtain an initial user vector; perform vector conversion on the product basic information to obtain an initial product vector; Input the initial user vector and the initial product vector into a preset product recommendation model, and through the preset product recommendation model, perform information propagation on the initial user vector and the initial product vector to obtain propagation user vectors corresponding to different propagation levels and propagation product vectors corresponding to different propagation levels.
3. The product recommendation method according to claim 2, wherein The performing information propagation on the initial user vector and the initial product vector through the preset product recommendation model to obtain propagation user vectors corresponding to different propagation levels and propagation product vectors corresponding to different propagation levels includes: Set the initial user vector as a user node, set the initial product vector as a product node, and construct a target bipartite graph according to all the user nodes and all the product nodes; Determine the number of first neighbor nodes corresponding to the user node and the number of second neighbor nodes corresponding to the product node from the target bipartite graph; Determine the propagation user vector and the propagation product vector at the current propagation level according to the number of first neighbor nodes, the number of second neighbor nodes, the propagation user vector at the previous propagation level, and the propagation product vector at the previous propagation level.
4. The product recommendation method according to claim 1, wherein The performing feature interaction processing on the user feature vectors and product feature vectors at all propagation levels to obtain a product recommendation result includes: Input the user feature vectors and product feature vectors at all the propagation levels into a preset convolutional network model to obtain a first recommendation result; Perform feature interaction processing on the user feature vectors and product feature vectors at all the propagation levels through an inner product function to obtain a second recommendation result; Determine the product recommendation result according to the first recommendation result and the second recommendation result.
5. A product recommendation device, characterized in that, It includes: An instruction receiving module, configured to receive a product recommendation instruction; the product recommendation instruction includes user basic information corresponding to a target user and product basic information corresponding to a target product; A propagation vector obtaining module, configured to obtain a user propagation vector set corresponding to the user basic information and a product propagation vector set corresponding to the product basic information; the user propagation vector set includes an initial user vector and multiple propagation user vectors sorted by propagation level; the product propagation vector set includes an initial product vector and multiple propagation product vectors sorted by propagation level; A feature extraction module, configured to obtain a user feature vector and a product feature vector at each propagation level; the user feature vector is generated according to the user feature vector at the previous propagation level, the initial user vector, and the propagation user vector at the current propagation level; the product feature vector is generated according to the product feature vector at the previous propagation level, the initial product vector, and the propagation product vector at the current propagation level; A feature interaction module, configured to perform feature interaction processing on user feature vectors and product feature vectors at all propagation levels to obtain product recommendation results; the product recommendation results include recommendation values corresponding to all the target products for different target users; A product recommendation module, configured to sort the target products according to all the recommendation values for the same target user, generate a product recommendation sequence corresponding to the target user, and push the product recommendation sequences corresponding to all the target users to a client; The obtaining of the user feature vectors and product feature vectors at each propagation level includes: Obtaining a first vector matrix and a second vector matrix corresponding to the current propagation level; Determining the user feature vectors at the current propagation level according to the user feature vectors at the previous propagation level, the initial user vectors, the propagation user vectors at the current propagation level, the first vector matrix, and the second vector matrix; Determining the product feature vectors at the current propagation level according to the product feature vectors at the previous propagation level, the initial product vectors, the propagation product vectors at the current propagation level, the first vector matrix, and the second vector matrix; The determining of the user feature vectors according to the user feature vectors at the previous propagation level, the initial user vectors, the propagation user vectors at the current propagation level, the first vector matrix, and the second vector matrix includes: Performing vector activation processing on the user feature vectors at the previous propagation level, the initial user vectors, and the first vector matrix to obtain a first activation vector; Performing vector activation processing on the propagation user vectors at the current propagation level and the second vector matrix to obtain a second activation vector; Determining the user feature vectors at the current propagation level according to the first activation vector and the second activation vector; The determining of the product feature vectors according to the product feature vectors at the previous propagation level, the initial product vectors, the propagation product vectors at the current propagation level, the first vector matrix, and the second vector matrix includes: Performing vector activation processing on the product feature vectors at the previous propagation level, the initial product vectors, and the first vector matrix to obtain a third activation vector; Performing vector activation processing on the propagation product vectors at the current propagation level and the second vector matrix to obtain a fourth activation vector; Determining the product feature vectors at the current propagation level according to the third activation vector and the fourth activation vector.
6. A computer device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the computer program, it implements the product recommendation method according to any one of claims 1 to 4.
7. A computer-readable storage medium storing a computer program, characterized in that, When the computer program is executed by the processor, it implements the product recommendation method according to any one of claims 1 to 4.
Citation Information
Patent Citations
Interest point recommendation method and device, equipment and medium
CN111931067A
Information recommendation method and device, computer equipment and storage medium
CN112395515A