Product recommendation method and device, electronic equipment and storage medium
By obtaining the group attribute map of the target user and the collection of products to be recommended, using the recommendation model of the federated learning framework, combining individual and group attributes for product recommendation, the problem of user privacy leakage and low recommendation accuracy is solved, and higher privacy protection and recommendation accuracy is achieved.
Patent Information
- Application Number
- CN202411791646.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-06
- Publication Date
- 2025-03-14
AI Technical Summary
The prior art can easily lead to the leakage of user privacy information in product recommendations, and only considers the basic characteristics of users or consumer behavior characteristics, so the accuracy of recommendations is not high.
By obtaining the group attribute map of the target user and the product collection to be recommended, the recommendation model trained based on the federated learning framework is used to determine the target recommended product. This method performs data processing on the client to avoid user information leakage.
Improve the protection of user privacy information and improve the accuracy of product recommendations by considering group attributes.
Smart Images

Figure CN119623601A_ABST
Abstract
Description
Technical Field
[0001] The embodiments of the present application relate to artificial intelligence technology, and more particularly to a product recommendation method, device, electronic device and storage medium. Background Art
[0002] With the abundance of various products, users need to filter the target products they need from a large number of similar products when purchasing or applying for products. For example, with the continuous development of credit card products in recent years, a wide variety of card products have been launched one after another, and the rights and interests and usage rules of each card product are different and have their own characteristics. When users apply for credit cards in banks, they need to choose the target card product based on their own needs, as well as the rights and interests and usage rules of the credit card. The product selection process consumes a lot of energy of users, and when the product selection is inappropriate, it will seriously affect the user experience.
[0003] In the prior art, basic customer characteristics or consumption behavior characteristics are usually extracted based on expert knowledge, and combined with the card usage of existing credit card customers, a machine learning model is trained to learn the customer's preference pattern for card products based on relevant characteristics, and provide product recommendation functions for applicants.
[0004] However, the training process of machine learning requires a large amount of user information, which may lead to the leakage of user privacy information, and only considers the basic characteristics or consumption behavior characteristics of users, so the accuracy of product recommendations is not high. Summary of the invention
[0005] The present application provides a product recommendation method, device, electronic device and storage medium to improve the protection of user privacy information and improve the accuracy of product recommendations.
[0006] In a first aspect, an embodiment of the present application provides a product recommendation method, the product recommendation method comprising:
[0007] Get the target user's recommendation request;
[0008] In response to the recommendation request, the target user's group attribute graph and the set of products to be recommended are obtained on the client; the group attribute graph is a relationship graph between the target user and the associated users;
[0009] Through the recommendation model trained based on the federated learning framework, the target recommended products are determined according to the group attribute graph and the set of products to be recommended.
[0010] In a second aspect, an embodiment of the present application further provides a product recommendation device, the product recommendation device comprising:
[0011] A recommendation request acquisition module is used to obtain the recommendation request of the target user;
[0012] The recommendation request response module is used to respond to the recommendation request and obtain the target user's group attribute graph and the set of products to be recommended on the client; the group attribute graph is a relationship graph between the target user and the associated users;
[0013] The target recommendation product determination module is used to determine the target recommendation product based on the recommendation model trained based on the federated learning framework, the group attribute graph and the set of products to be recommended.
[0014] In a third aspect, an embodiment of the present application further provides an electronic device, the electronic device comprising:
[0015] one or more processors;
[0016] A storage device for storing one or more programs;
[0017] When one or more programs are executed by one or more processors, the one or more processors implement any product recommendation method provided in the embodiments of the present application.
[0018] In a fourth aspect, an embodiment of the present application further provides a storage medium comprising computer executable instructions, which, when executed by a computer processor, are used to execute any one of the product recommendation methods provided in the embodiments of the present application.
[0019] The present application obtains the recommendation request of the target user; in response to the recommendation request, obtains the group attribute graph of the target user on the client and the set of products to be recommended; the group attribute graph is the relationship graph between the target user and the associated users. By obtaining the group attribute graph of the target user, the group attributes of the target user can be integrated. When making subsequent product recommendations, not only the individual attributes of the target user are considered, but also the impact of the group attributes on the decision-making of the target user is considered, thereby improving the accuracy of subsequent product recommendations; through the recommendation model trained based on the federated learning framework, the target recommended product is determined according to the group attribute graph and the set of products to be recommended. Based on the recommendation model trained based on the federated learning framework, the personal data of the target user collected will only participate in the calculation on the client and will not be exposed to the Internet, thereby improving the protection of the target user's privacy information. Therefore, through the technical solution of the present application, the problem that a large amount of user information is required in the training process of machine learning, which may lead to the leakage of user privacy information, and only the basic characteristics or consumption behavior characteristics of the user are considered, and the accuracy of the recommendation is not high, is achieved to improve the protection of user privacy information and improve the accuracy of the recommendation. BRIEF DESCRIPTION OF THE DRAWINGS
[0020] Figure 1 This is a flow chart of a product recommendation method in Embodiment 1 of the present application;
[0021] Figure 2is a flow chart of a product recommendation method in Embodiment 2 of the present application;
[0022] Figure 3 This is a flow chart of a product recommendation method in Embodiment 3 of the present application;
[0023] Figure 4 It is a structural schematic diagram of a product recommendation device in Embodiment 4 of the present application;
[0024] Figure 5 It is a structural diagram of an electronic device in Embodiment 5 of the present application. DETAILED DESCRIPTION
[0025] In order to enable those skilled in the art to better understand the solution of the present application, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of the present application.
[0026] It should be noted that the terms "first" and "second" etc. in the specification and claims of the present application and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchangeable where appropriate, so that the embodiments of the present application described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any of their variations are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device comprising a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.
[0027] Embodiment 1
[0028] Figure 1 This is a flowchart of a product recommendation method provided in Example 1 of the present application. This embodiment can be applied to situations where product recommendations are made to users. The method can be executed by a product recommendation device, which can be implemented in software and / or hardware and specifically configured in a client, such as a mobile phone.
[0029] See also Figure 1 The product recommendation method shown specifically includes the following steps:
[0030] S110: Obtain a recommendation request from a target user.
[0031] The target user is the user who needs product recommendation. The recommendation request can be a request for product recommendation obtained by the client based on the user's search and application for the product. For example, in a credit card application scenario, the target user can be a user who applies for a credit card. The target user sends a credit card application request on the client, and the client obtains a recommendation request for a credit card recommendation for the target user. For another example, in a shopping scenario, the target user can be a user who searches on a shopping page. The target user enters a product name in the product search box, and the client obtains a recommendation request for recommending products with the same name to the target user.
[0032] S120 , in response to the recommendation request, obtaining a group attribute graph of the target user on the client and a set of products to be recommended; the group attribute graph is a relationship graph between the target user and associated users.
[0033] The group attribute graph can be a relationship graph between the target user and the associated users, which can be used to represent the social attributes of the target user. The group attribute graph includes the target user, the associated user group group with which the target user has a social relationship, the social relationship between the target user and each associated user, and the basic information of the target user and each associated user. The associated user is a user with whom the target user has a social relationship. Exemplarily, the associated user may include relatives, friends, colleagues, and common contacts of the target user, etc., which are not specifically limited in this application. Exemplarily, the group attribute graph can be generated in the form of a relationship graph. After obtaining the recommendation request of the target user, in response to the recommendation request, in the client where the target user is located, the associated users with which the target user has a social relationship and their basic information are obtained, and the group attribute graph is generated based on the social relationship and basic information between the target user and each associated user. Exemplarily, with the authorization of the target user, the associated users of the target user are obtained in the relevant application in the target user client, and the basic information of the associated users is obtained, and the group attribute graph is constructed based on the social relationship and basic information between the target user and each associated user.
[0034] The set of products to be recommended may be a set of products that can be recommended according to the recommendation request. For example, in a credit card application scenario, the set of products to be recommended may be determined according to the credit card grade, credit limit, and category applied by the target user. For another example, in a shopping scenario, the set of products to be recommended may be determined according to the product category and product specifications searched by the target user.
[0035] Social attributes, as important attribute characteristics of target users, will have a great impact on the behavior of target users. In the prior art, most product recommendation schemes only consider the personal behavior characteristics of target users when making recommendations, but ignore the impact of the group effect caused by social attributes on the decision-making behavior of target users. Although some technical solutions add the target user's association relationship information to the recommendation process, these solutions only add the impact of the target user's shallow social relationship on product selection through regularized definitions. Since it is impossible to learn the pattern between deep social relationships and decision results, the universality is not good and the long-tail recommendation effect is prone to occur. This application can obtain the user's group attributes comprehensively by obtaining the target user's group attribute graph on the client, so as to fully consider the impact of the group effect on the target user's decision-making behavior in the subsequent recommendation process and improve the accuracy of the recommendation.
[0036] S130. Determine the target recommended product based on the recommendation model trained based on the federated learning framework and the group attribute graph and the set of products to be recommended.
[0037] The federated learning framework can be a solution that supports efficient and flexible federated learning and is used to implement federated learning. Federated learning is a privacy computing method that can well protect the privacy information of users. In the federated learning framework, a parameter server is deployed on the server side. The parameter server is responsible for collecting local gradient information from each client during the training process of the recommendation model, and after gradient fusion, obtains global gradient information and returns the global gradient information to the client. In this way, the target user information corresponding to each client does not need to be transmitted to each other. However, by performing gradient fusion through the federated learning framework, the global optimality of the model gradient can be achieved, which can not only protect the privacy of user information, but also achieve the global optimality of the model.
[0038] The recommendation model can be a deep learning model trained based on a federated learning framework, which is used to determine the target recommended products based on the group attribute graph and the set of products to be recommended. The recommendation model is deployed in the client held by the target user. The information in the group attribute graph collected by the recommendation model does not need to be transmitted outward through the network. The group attribute graph and the set of products to be recommended are input into the trained recommendation model to obtain the target recommended products. The target recommended products can be products recommended to the target user by the trained recommendation model. The target recommended products can be one or more, and the number of target recommended products can be determined according to the recommendation scenario, which is not specifically limited in this application. For example, in a credit card recommendation scenario, the target recommended product can be 1. For another example, in a shopping scenario, the target recommended products can be 3.
[0039] In the financial field, credit cards, as a product, are entering the lives of the public. As more and more people begin to accept and use credit cards, optimizing the credit card application process becomes increasingly important. A good application process can greatly increase the number of credit card customers and promote the rapid development of the card system.
[0040] The traditional online credit card application process often uses a flat list format to display all credit card product information to customers. Due to the continuous development of credit card products in recent years, a wide variety of card products have been launched one after another, and the rights and interests and usage rules of each card product are different and have their own characteristics. This requires customers to conduct more tedious analysis and comparison based on their own needs and card usage scenarios when choosing a credit card. They need to read and understand a large amount of information in a short period of time before they can finally decide on the most suitable credit card product for their own use. At the same time, in the process of selecting a credit card, due to the large amount of information, it is more difficult to extract effective information. There may be a large number of customers who do not choose a card product that is truly suitable for them, which directly affects the subsequent card experience and activity. What's more, some customers cancel their application at the stage of selecting a card product, which has brought huge obstacles to credit card application and use.
[0041] In recent years, due to the successful application and practice of machine learning and data mining in the field of recommendation, these methods have also been cited in the recommendation of credit card application process, reducing the manpower input of customers, assisting customers in making choices, and then optimizing the entire process and improving application efficiency. However, with the gradual improvement of financial regulatory regulations, more and more emphasis is placed on the protection of customer privacy. The daily behavior data of some customers on private terminals cannot be collected and exposed to the Internet at will. Therefore, in activities in the financial field, privacy security also needs to be considered as an important factor.
[0042] The technical solution of this embodiment obtains the recommendation request of the target user; in response to the recommendation request, obtains the group attribute graph of the target user on the client and the set of products to be recommended; the group attribute graph is the relationship graph between the target user and the associated users. By obtaining the group attribute graph of the target user, the group attributes of the target user can be integrated. When making subsequent product recommendations, not only the individual attributes of the target user are considered, but also the impact of the group attributes on the decision-making of the target user is considered, thereby improving the accuracy of subsequent product recommendations; through the recommendation model trained based on the federated learning framework, the target recommended product is determined according to the group attribute graph and the set of products to be recommended. Based on the recommendation model trained based on the federated learning framework, the personal data of the target user collected will only participate in the calculation on the client and will not be exposed to the Internet, thereby improving the protection of the target user's privacy information. Therefore, through the technical solution of this application, the problem that a large amount of user information is required in the training process of machine learning, which may lead to the leakage of user privacy information, and only considering the basic characteristics or consumption behavior characteristics of the user, the accuracy of the recommendation is not high, is achieved to improve the protection of user privacy information and improve the accuracy of the recommendation.
[0043] Embodiment 2
[0044] Figure 2 This is a flow chart of a product recommendation method provided in Example 2 of the present application. The technical solution of this embodiment is further refined on the basis of the above technical solution.
[0045] Furthermore, the recommendation model trained based on the federated learning framework includes: a user feature generation model, a product feature generation model and a selection simulation model. Accordingly, "determine the target recommended product according to the group attribute graph and the set of products to be recommended through the recommendation model trained based on the federated learning framework" is refined as: "Based on the user feature generation model, obtain the user feature vector according to the group attribute graph, and based on the product feature generation model, obtain the product feature vector according to the set of products to be recommended; concatenate the user feature vector and the product feature vector to obtain the vector to be recommended; based on the selection simulation model, determine the target recommended product according to the vector to be recommended" to determine the target recommended product.
[0046] See also Figure 2 A product recommendation method shown includes:
[0047] S210: Obtain a recommendation request from a target user.
[0048] S220 , in response to the recommendation request, obtaining a group attribute graph of the target user on the client and a set of products to be recommended; the group attribute graph is a relationship graph between the target user and associated users.
[0049] In an optional embodiment, the group attribute graph includes: a plurality of nodes identifying the target user and the associated customers, and a plurality of edges identifying the social relationships between the target user and the associated customers.
[0050] The group attribute graph consists of nodes and edges between nodes. The nodes in the group attribute graph include the target user and multiple associated customers. There is an edge between a pair of nodes corresponding to the target user and the associated customer, which represents the social relationship between the target user and the associated customer.
[0051] The social relationships between target users and related customers can be accurately identified through the nodes and edges in the group attribute graph, so that the social attributes of target users can be fully obtained when making subsequent product recommendations.
[0052] In an optional embodiment, the nodes in the group attribute graph include: node attributes, where the node attributes include at least one user feature that affects the recommendation of the product to be recommended.
[0053] In addition to the connection structure between nodes in the group attribute graph, each node also has corresponding node attributes. The node attribute can be a feature vector, which contains at least one user feature that affects the recommendation of the product to be recommended. Exemplarily, the user features that affect the recommendation of the product to be recommended may include gender, age, and income, etc., which are not specifically limited in this application. For example, in a credit card recommendation scenario, the feature vector may include the corresponding user's income, age, and transaction information, etc. Exemplarily, the user's user features can be collected with the user's permission, and the user features can be represented in vector form to generate node attributes.
[0054] Through the node attributes of each node in the group attribute graph, we can comprehensively obtain the user characteristics that affect the recommendation of target users and improve the accuracy of subsequent product recommendations.
[0055] S230 , based on the user feature generation model, a user feature vector is obtained according to the group attribute graph, and based on the product feature generation model, a product feature vector is obtained according to the set of products to be recommended.
[0056] The recommendation models trained based on the federated learning framework include: user feature generation model, product feature generation model and selection simulation model.
[0057] The user feature generation model is used to obtain the user feature vector based on the group attribute graph. The product feature generation model is used to obtain the product feature vector based on the set of products to be recommended. The selection simulation model is used to simulate the user's selection process based on the user feature vector and the product feature vector, and determine the target recommended product for the target user.
[0058] Exemplarily, the user feature generation model may be a multi-layer graph convolutional neural network. A graph convolutional neural network may be a neural network model for processing graph data, generally composed of multiple layers, each layer including aggregation and convolution operations. A multi-layer graph convolutional neural network may fuse the association relationship between the target user and the associated user with basic information into a user feature vector. The group attribute graph is input into the multi-layer graph convolutional neural network, and the output is a user feature vector.
[0059] Exemplarily, the product feature generation model may be a single-layer fully connected layer. The single-layer fully connected layer may process the set of products to be recommended into a product feature vector. The set of products to be recommended is input into the single-layer fully connected layer, and the output is a product feature vector.
[0060] S240: Concatenate the user feature vector and the product feature vector to obtain a vector to be recommended.
[0061] The user feature vector and each product feature vector are concatenated to obtain a vector to be recommended. For example, the user feature vector and the product feature vector can be concatenated by connecting the end to the end. Specifically, the user feature vector and the product feature vector can be concatenated by the following formula:
[0062]
[0063] Among them, CONCAT is the concatenation function, is the user feature vector, is the product feature vector.
[0064] By concatenating the user feature vector and the product feature vector to obtain the vector to be recommended, the user features and product features can be integrated to make recommendations in the subsequent recommendations, thereby improving the accuracy of product recommendations.
[0065] S250: Based on the selection simulation model and the vector to be recommended, determine the target recommended product.
[0066] Exemplarily, the selection simulation model may be a multi-layer fully connected layer. The multi-layer fully connected layer may process the vector to be recommended into a target recommended product. The vector to be recommended is input into the multi-layer fully connected layer, and the output is the target recommended product. The vector to be recommended is input into the selection simulation model, and the selection simulation model generates the selection tendency probability of the product to be recommended corresponding to each vector to be recommended, and all the selection tendency probabilities are sorted from large to small. According to the number m of target recommended products, the products to be recommended corresponding to the first m selection tendency probabilities are used as target recommended products.
[0067] The technical solution of this embodiment obtains a user feature vector based on a group attribute graph based on a user feature generation model, and obtains a product feature vector based on a set of products to be recommended based on a product feature generation model, taking into account the influence of the user's social attributes on product selection, thereby improving the accuracy of product recommendations; concatenating the user feature vector and the product feature vector to obtain a vector to be recommended; based on a selection simulation model, determining target recommended products based on the vector to be recommended, fully learning the individual behavior and group influence of the target user, recommending suitable products to the target user, improving the customer's purchasing or application experience, and meeting the customer's usage needs.
[0068] Embodiment 3
[0069] Figure 3 This is a flow chart of a product recommendation method provided in Example 3 of the present application. The technical solution of this embodiment is further refined on the basis of the above technical solution.
[0070] Furthermore, the “training process of the recommendation model trained based on the federated learning framework” is added as follows: “On the client where the target user is located, obtain the target user’s group attribute graph and the set of products to be recommended, as well as the product selection results of the target user and the associated users; train the initial recommendation model based on the product selection results, the group attribute graph and the set of products to be recommended to obtain the initial gradient; determine the target gradient based on the initial gradient through the parameter server in the federated learning framework; update the initial recommendation model through the target gradient to obtain the trained recommendation model”, so as to train the recommendation model based on the federated learning framework.
[0071] See also Figure 3 A product recommendation method shown includes:
[0072] S310: On the client where the target user is located, obtain the target user's group attribute graph and the set of products to be recommended, as well as the product selection results of the target user and associated users.
[0073] On the client side, with the permission of the target user, the associated users who have social connections with the target user are collected as nodes through the address book and the corresponding software of the product, and the node attributes of each node are obtained. According to the nodes and node attributes, as well as the social relationship between the target user and the associated users, a group attribute graph of the target user is generated.
[0074] A set of products to be recommended is obtained from the relevant product applications to form a set of products to be recommended. The product selection result may be a product selected by the target user and the associated user in the set of products to be recommended.
[0075] S320: Train the initial recommendation model based on the product selection results, the group attribute graph, and the set of products to be recommended to obtain an initial gradient.
[0076] The product selection results are used as sample labels for the training process, and the group attribute graph and the set of products to be recommended are used as sample data. The product selection results, group attribute graph and the set of products to be recommended are input into the initial recommendation model for training to obtain the initial gradient.
[0077] The initial recommendation model includes: initial user feature generation model, initial product feature generation model and initial selection simulation model.
[0078] The initial user feature generation model is structurally divided into an input layer, a hidden layer, and an output layer. The calculation of each input layer and hidden layer can be divided into three steps. The first step is the aggregation operation, the second step is the pooling dimensionality reduction operation, and the last step is the regularization operation.
[0079] Aggregation operation, the calculation method is as follows:
[0080]
[0081] in, represents the hidden feature vector of node u in the previous layer of the current hidden layer. In particular, when k = 1 (the first hidden layer), is equal to the node attribute of the target user corresponding to node u. N(v) represents the set of neighbor nodes of node v in the heterogeneous network (customer nodes are sampled by random walk). AVG represents the operation of finding the average value of each element in the vector.
[0082] The pooling dimension reduction operation is calculated as follows:
[0083]
[0084] Among them, σ(·) represents a nonlinear activation function, which is used to increase the learning ability of the model. Generally, the ReLu function (professional term, a loss function) is selected. k Represents a linear mapping matrix, used for dimensionality reduction. CONCAT(a,b) represents the concatenation of two vectors a and b.
[0085] Regularization operation, the calculation method is as follows:
[0086]
[0087] Among them, ||·|| represents the bi-norm of the vector.
[0088] Because the latent feature vector calculated for each node in the current layer can be regularized to improve the robustness of the model.
[0089] The initial product feature generation model is used to characterize the set of products to be recommended and obtain a product feature vector. Exemplarily, the structure of the initial product feature generation model can be a single-layer fully connected layer. It is expressed as follows:
[0090]
[0091] in, is the product feature vector, matrix W and vector They represent the weight and bias of the fully connected layer, which are trainable model parameters. σ(·) represents a nonlinear activation function, which is used to increase the learning ability of the model. Generally, the ReLu function can be selected.
[0092] The initial selection simulation model can be a multi-layer fully connected layer, which is used to learn the behavior pattern of target users in selecting credit cards. In terms of structure, the initial selection simulation model is similar to the initial product feature generation model. The multi-layer fully connected layer can be regarded as a single-layer fully connected layer obtained by stacking, and the input of each layer is the output of the previous layer. Specifically, the kth fully connected layer of the multi-layer fully connected layer is defined as follows:
[0093]
[0094] Among them, the matrix W and the vector Respectively represent the weight and bias of the fully connected layer, which are trainable model parameters. σ(·) represents a nonlinear activation function, which is used to increase the learning ability of the model. Generally, the ReLu function can be selected. and are the input and output of the current fully connected layer respectively. When k=1, it represents the input layer of these fully connected layers. The input layer is composed of the output vectors of the graph convolutional neural layer and the representation layer. and The splicing is done as follows:
[0095]
[0096] In order to complete the training of the model, you also need to add the following loss function.
[0097]
[0098] Among them, y' v ∈{1, 0} is the product selection result, indicating whether a customer has selected a certain product (1 represents selection, 0 represents no selection), and y v Then, by the output of the last layer of the multi-layer fully connected layer Add the following sigmoid function (professional term, an activation function) as the final output of the model:
[0099]
[0100] After defining an initial learning rate, the Adam (professional term, an optimizer algorithm) gradient descent method is used to minimize the above loss function to complete the training of model parameters. After the client completes the training, the initial gradient of the initial recommendation model is obtained.
[0101] S330. Determine the target gradient according to the initial gradient through the parameter server in the federated learning framework.
[0102] When each client trains the initial recommendation model, the group attribute graph is a local data, that is, each client can only access the data in the group attribute graph of the target user to which the client belongs. Therefore, the recommendation model trained in this way has a certain deviation. Due to the influence of privacy protection, the data of each client is prohibited from being transmitted and shared with each other. Therefore, in order to train a global and unbiased risk transaction discrimination model, it is necessary to introduce a federated learning framework when training the recommendation model.
[0103] The federated learning framework is a machine learning framework that is generally used in scenarios where training data is stored in multiple nodes and is privacy protected, and all training data cannot be aggregated. Federated learning frameworks can be divided into centralized and decentralized types. Among them, the centralized type uses a parameter server to uniformly update and distribute parameters, while the decentralized type completes the unified update of shared models by communicating with each other between clients. The federated learning framework in this application is centralized to better protect user privacy information. Specifically, a parameter server is set up on the server side. The parameter server is used to obtain the initial gradient after training of each client, obtain the target gradient after fusion according to a certain gradient fusion algorithm, and return it to the client, so that the gradient parameters of the client's recommendation model are global.
[0104] In an optional embodiment, a target gradient is determined based on an initial gradient through a parameter server in a federated learning framework, including: the client where the target user is located sends the initial gradient to the parameter server; the parameter server determines the target gradient based on the initial gradient and the gradients of other clients that have been obtained based on a preset gradient fusion algorithm; and the target gradient is returned to the client where the target user is located.
[0105] After the target user's client completes training and obtains the initial gradient, it sends the initial gradient to the parameter server. After the parameter server obtains the initial gradient sent by the target user's client, it fuses the initial gradient with the gradients of other clients that have been obtained based on the preset gradient fusion algorithm to obtain the target gradient. Exemplarily, the process of gradient fusion according to the preset gradient fusion algorithm can be shown as follows:
[0106]
[0107] in, The gradient information collected by the parameter server from each client during the local model training process, that is, the initial gradient and the gradients obtained from other clients.
[0108] The initial gradient is sent to the parameter server through the client where the target user is located; the parameter server determines the target gradient based on the initial gradient and the gradients of other clients obtained based on the preset gradient fusion algorithm; the target gradient is returned to the client where the target user is located, and the local gradient parameters of each client are fused through the parameter server to obtain the global gradient parameters. The clients do not need to share user information, but only pass model parameters to protect user privacy information, achieve global optimization of model parameters, and improve the accuracy of recommendation by the recommendation model.
[0109] S340. Update the initial recommendation model through the target gradient to obtain a trained recommendation model.
[0110] The target gradient is used to replace the initial gradient in the client to update the parameters of the initial recommendation model and obtain a trained recommendation model. The initial recommendation model updated by the target gradient becomes a global model. In the globalization process of the gradient parameters of the initial recommendation model, the transmission of the client's social information is not involved, which protects the privacy information of the target user.
[0111] S350: Obtain a recommendation request from a target user.
[0112] S360: In response to the recommendation request, obtain a group attribute graph of the target user on the client and a set of products to be recommended; the group attribute graph is a relationship graph between the target user and associated users.
[0113] S370. Determine the target recommended product based on the recommendation model trained based on the federated learning framework and the group attribute graph and the set of products to be recommended.
[0114] The technical solution of this embodiment is to obtain the target user's group attribute graph and the set of products to be recommended, as well as the product selection results of the target user and the associated users on the client where the target user is located; train the initial recommendation model based on the product selection results, the group attribute graph and the set of products to be recommended to obtain the initial gradient, and implement local parameter training on the client; determine the target gradient according to the initial gradient through the parameter server in the federated learning framework; update the initial recommendation model through the target gradient to obtain the trained recommendation model, and only pass the initial gradient, and implement global optimization of the gradient parameters of the initial recommendation model through the parameter server, thereby improving the accuracy of the trained recommendation model, and there is no need to share the information in the target user's group attribute graph, so as to protect the information privacy of the target user.
[0115] Embodiment 4
[0116] Figure 4 The structure diagram of a product recommendation device provided in the fourth embodiment of the present application is shown. This embodiment is applicable to the case of recommending products to users and is configured on the client. The specific structure of the product recommendation device is as follows:
[0117] A recommendation request acquisition module 410 is used to acquire a recommendation request from a target user;
[0118] The recommendation request response module 420 is used to obtain the target user's group attribute graph and the set of products to be recommended on the client in response to the recommendation request; the group attribute graph is a relationship graph between the target user and the associated users;
[0119] The target recommended product determination module 430 is used to determine the target recommended product according to the group attribute graph and the set of products to be recommended by using the recommendation model trained based on the federated learning framework.
[0120] The technical solution of this embodiment obtains the recommendation request of the target user; in response to the recommendation request, obtains the group attribute graph of the target user on the client and the set of products to be recommended; the group attribute graph is the relationship graph between the target user and the associated users. By obtaining the group attribute graph of the target user, the group attributes of the target user can be integrated. When making subsequent product recommendations, not only the individual attributes of the target user are considered, but also the impact of the group attributes on the decision-making of the target user is considered, thereby improving the accuracy of subsequent product recommendations; through the recommendation model trained based on the federated learning framework, the target recommended product is determined according to the group attribute graph and the set of products to be recommended. Based on the recommendation model trained based on the federated learning framework, the personal data of the target user collected will only participate in the calculation on the client and will not be exposed to the Internet, thereby improving the protection of the target user's privacy information. Therefore, through the technical solution of this application, the problem that a large amount of user information is required in the training process of machine learning, which may lead to the leakage of user privacy information, and only considering the basic characteristics or consumption behavior characteristics of the user, the accuracy of the recommendation is not high, is achieved to improve the protection of user privacy information and improve the accuracy of the recommendation.
[0121] Optional recommendation models trained based on the federated learning framework include: user feature generation model, product feature generation model, and selection simulation model;
[0122] Accordingly, the target recommended product determination module 430 includes:
[0123] An input data processing unit is used to generate a model based on user characteristics, obtain a user feature vector according to a group attribute graph, and to generate a model based on product characteristics, obtain a product feature vector according to a set of products to be recommended;
[0124] A vector generation unit to be recommended, used for concatenating the user feature vector and the product feature vector to obtain the vector to be recommended;
[0125] The target recommended product determination unit is used to determine the target recommended product based on the selection simulation model and the vector to be recommended.
[0126] Optional, product recommendation devices include:
[0127] The input data acquisition module is used to obtain the target user's group attribute graph and the set of products to be recommended, as well as the product selection results of the target user and the associated users, at the client where the target user is located;
[0128] An initial gradient determination module is used to train the initial recommendation model based on the product selection results, the group attribute graph and the set of products to be recommended to obtain an initial gradient;
[0129] A target gradient determination module is used to determine the target gradient according to the initial gradient through the parameter server in the federated learning framework;
[0130] The initial recommendation model update module is used to update the initial recommendation model through the target gradient to obtain a trained recommendation model.
[0131] Optionally, a target gradient determination module includes:
[0132] An initial gradient sending unit, used for the client where the target user is located to send the initial gradient to the parameter server;
[0133] A gradient fusion unit is used for the parameter server to determine the target gradient based on the initial gradient and the gradients of other clients that have been obtained based on a preset gradient fusion algorithm;
[0134] The target gradient returning unit is used to return the target gradient to the client where the target user is located.
[0135] Optionally, the group attribute graph includes: a plurality of nodes identifying the target user and the associated customers, and a plurality of edges identifying the social relationships between the target user and the associated customers.
[0136] Optionally, the nodes in the group attribute graph include: node attributes, where the node attributes include at least one user feature that affects the recommendation of the product to be recommended.
[0137] The product recommendation device provided in the embodiments of the present application can execute the product recommendation method provided in any embodiment of the present application, and has the corresponding functional modules and beneficial effects for executing the product recommendation method.
[0138] According to an embodiment of the present invention, the present invention also provides an electronic device, a readable storage medium and a computer program product.
[0139] Embodiment 5
[0140] Figure 5 A schematic diagram of the structure of an electronic device provided in Embodiment 5 of the present application is shown in FIG. Figure 5 As shown, the electronic device includes a processor 510, a memory 520, an input device 530 and an output device 540; the number of the processor 510 in the electronic device can be one or more. Figure 5 A processor 510 is taken as an example; the processor 510, the memory 520, the input device 530 and the output device 540 in the electronic device can be connected via a bus or other means. Figure 5 The example of connecting through bus is taken in the following.
[0141] The memory 520, as a computer-readable storage medium, can be used to store software programs, computer executable programs and modules, such as program instructions / modules corresponding to the product recommendation method in the embodiment of the present application (for example, the recommendation request acquisition module 410, the recommendation request response module 420 and the target recommended product determination module 430). The processor 510 executes various functional applications and data processing of the electronic device by running the software programs, instructions and modules stored in the memory 520, that is, realizing the above-mentioned product recommendation method.
[0142] The memory 520 may mainly include a program storage area and a data storage area, wherein the program storage area may store an operating system and at least one application required for a function; the data storage area may store data created according to the use of the terminal, etc. In addition, the memory 520 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one disk storage device, a flash memory device, or other non-volatile solid-state storage device. In some instances, the memory 520 may further include a memory remotely arranged relative to the processor 510, and these remote memories may be connected to the electronic device via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.
[0143] The input device 530 may be used to receive input character information and generate key signal input related to user settings and function control of the electronic device. The output device 540 may include a display device such as a display screen.
[0144] Embodiment 6
[0145] Embodiment 6 of the present application also provides a storage medium containing computer executable instructions, which, when executed by a computer processor, are used to execute a product recommendation method, the method comprising: obtaining a recommendation request from a target user; in response to the recommendation request, obtaining a group attribute graph of the target user on a client and a set of products to be recommended; the group attribute graph is a relationship graph of the target user and associated users; and determining a target recommended product based on the group attribute graph and the set of products to be recommended by using a recommendation model trained based on a federated learning framework.
[0146] Of course, the storage medium containing computer executable instructions provided in the embodiment of the present application, whose computer executable instructions are not limited to the method operations described above, can also execute related operations in the product recommendation method provided in any embodiment of the present application.
[0147] Through the above description of the implementation method, the technicians in the relevant field can clearly understand that the present application can be implemented with the help of software and necessary general hardware, and of course it can also be implemented by hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of the present application can be essentially or the part that contributes to the prior art can be embodied in the form of a software product, and the computer software product can be stored in a computer-readable storage medium, such as a computer floppy disk, read-only memory (ROM), random access memory (RAM), flash memory (FLASH), hard disk or optical disk, etc., including a number of instructions for an electronic device (which can be a personal computer, server, or network device, etc.) to execute the methods described in each embodiment of the present application.
[0148] It is worth noting that in the embodiment of the above-mentioned product recommendation device, the various units and modules included are only divided according to functional logic, but are not limited to the above-mentioned division, as long as the corresponding functions can be achieved; in addition, the specific names of the functional units are only for the convenience of distinguishing each other, and are not used to limit the scope of protection of this application.
[0149] Note that the above are only preferred embodiments of the present application and the technical principles used. Those skilled in the art will understand that the present application is not limited to the specific embodiments described herein, and that various obvious changes, readjustments and substitutions can be made by those skilled in the art without departing from the scope of protection of the present application. Therefore, although the present application is described in more detail through the above embodiments, the present application is not limited to the above embodiments, and may include more other equivalent embodiments without departing from the concept of the present application, and the scope of the present application is determined by the scope of the appended claims.
Claims
1. A product recommendation method, characterized in that: include: Get the target user's recommendation request; In response to the recommendation request, obtaining a group attribute graph of the target user on the client and a set of products to be recommended; The group attribute graph is a relationship graph between the target user and the associated users; The target recommended product is determined according to the group attribute graph and the set of products to be recommended by using a recommendation model trained based on a federated learning framework.
2. The method according to claim 1, characterized in that The recommendation model trained based on the federated learning framework includes: a user feature generation model, a product feature generation model and a selection simulation model; Accordingly, the recommendation model trained based on the federated learning framework determines the target recommended product according to the group attribute graph and the set of products to be recommended, including: Based on the user feature generation model, a user feature vector is obtained according to the group attribute graph, and based on the product feature generation model, a product feature vector is obtained according to the set of products to be recommended; Concatenate the user feature vector and the product feature vector to obtain a vector to be recommended; Based on the selection simulation model and according to the vector to be recommended, the target recommended product is determined.
3. The method according to any one of claims 1-2, characterized in that: The training process of the recommendation model trained based on the federated learning framework includes: At the client where the target user is located, obtaining the group attribute graph of the target user and the set of products to be recommended, as well as the product selection results of the target user and associated users; Training the initial recommendation model based on the product selection result, the group attribute graph and the set of products to be recommended to obtain an initial gradient; Determining a target gradient according to the initial gradient through a parameter server in the federated learning framework; The initial recommendation model is updated using the target gradient to obtain a trained recommendation model.
4. The method according to claim 3, characterized in that The step of determining the target gradient according to the initial gradient by a parameter server in the federated learning framework includes: The client where the target user is located sends the initial gradient to the parameter server; The parameter server determines a target gradient based on a preset gradient fusion algorithm according to the initial gradient and the gradients of other clients that have been obtained; The target gradient is returned to the client where the target user is located.
5. The method according to claim 1, characterized in that The group attribute graph includes: a plurality of nodes identifying the target user and associated customers, and a plurality of edges identifying the social relationships between the target user and associated customers.
6. The method according to claim 5, characterized in that The nodes in the group attribute graph include: node attributes, and the node attributes include at least one user feature that affects the recommendation of the product to be recommended.
7. A product recommendation device, characterized in that: include: A recommendation request acquisition module is used to obtain the recommendation request of the target user; A recommendation request response module, configured to obtain, in response to the recommendation request, a group attribute graph of the target user on the client and a set of products to be recommended; the group attribute graph is a relationship graph between the target user and associated users; The target recommended product determination module is used to determine the target recommended product according to the group attribute graph and the set of products to be recommended through the recommendation model trained based on the federated learning framework.
8. An electronic 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 program, the product recommendation method as described in any one of claims 1-6 is implemented.
9. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, the product recommendation method as described in any one of claims 1 to 6 is implemented.
10. A computer program product, characterized in that The computer program product comprises a computer program, and when the computer program is executed by a processor, the computer program implements the product recommendation method according to any one of claims 1 to 6.