Product information recommendation method and device based on federated learning, equipment and medium
Patent Information
- Application Number
- CN202211428755.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-11-15
- Publication Date
- 2026-09-18
- Estimated Expiration
- 2042-11-15
AI Technical Summary
[0028]The embodiments of this disclosure provide a product information recommendation method based on federated learning. By having a first participant and a second participant use federated learning collaborative filtering to predict product information that users prefer, the method improves the accuracy of recommending product information that users are interested in by utilizing social network data between users, while protecting data security and privacy.
Smart Images

Figure CN115718847B_ABST
Abstract
Description
Technical Field
[0001] This disclosure relates to the field of data processing technology, and in particular to a method, apparatus, device, and medium for recommending product information based on federated learning. Background Technology
[0002] With the development of internet technology, information has gone from scarcity to overload. In this context, it is becoming increasingly difficult to present information to users who are genuinely interested in it. Ordinary users also find it difficult to find content of interest from a large amount of information. Generally, by analyzing massive amounts of information and presenting users with information that they may be interested in through recommendations, value can be created by connecting users and information.
[0003] Given the constraints of data security and privacy protection, how to accurately recommend product information that users are interested in from massive amounts of information through compliant means is an urgent problem to be solved.
[0004] It should be noted that the information disclosed in the background section above is only used to enhance the understanding of the background of this disclosure, and therefore may include information that does not constitute prior art known to those skilled in the art. Summary of the Invention
[0005] This disclosure provides a method, apparatus, device, and medium for recommending product information based on federated learning, which can at least accurately recommend product information that users are interested in to users under constraints such as data security and privacy protection.
[0006] Other features and advantages of this disclosure will become apparent from the following detailed description, or may be learned in part from practice of this disclosure.
[0007] In a first aspect, embodiments of this disclosure provide a product information recommendation method based on federated learning, the method comprising: Based on the user / product interaction data of the first participant, obtain the user / product interaction matrix of the first participant in the federated learning, and obtain the product embedding matrix corresponding to the first participant. The product embedding matrix is obtained in advance through federated learning. Based on the product embedding matrix and the user / product interaction matrix, determine the user product preference matrix of the first participant; A federated learning collaboration request is initiated to the second participant, and a user social preference matrix returned by the second participant according to the federated learning collaboration request is received; wherein, the user social preference matrix is determined by the second participant based on the user / user social matrix of the second participant and the user embedding matrix corresponding to the second participant; the user embedding matrix corresponding to the second participant is obtained in advance through federated learning; the user / user social matrix is obtained based on the user / user social data of the second participant; Based on the user product preference matrix, the user social preference matrix, and the product embedding matrix, the product preference information of users in the first participant is predicted to obtain a prediction result matrix, so as to recommend product information based on the product preference information; wherein, the product preference information is information that predicts whether users have preferences for products.
[0008] In one embodiment of this disclosure, the method further includes: Using the user / product interaction training data of the first participant and the user / user social training data of the second participant, federated learning is performed on the initial product embedding matrix and the initial user embedding matrix to obtain the difference in training prediction results; wherein, the initial product embedding matrix is the product embedding matrix that has not undergone federated learning training; and the initial user embedding matrix is the user embedding matrix that has not undergone federated learning training. Based on the difference in the training prediction results, the gradient of the initial product embedding matrix is updated, and the parameters in the federated learning training process are adjusted until the federated collaborative training loss value meets the first preset value, thus obtaining the trained product embedding matrix. Gradient update information is sent to the second participant so that the second participant can perform gradient update on the initial user embedding matrix according to the gradient update matrix in the gradient update information to obtain the trained user embedding matrix; the gradient update information is determined based on the difference between the training prediction results and the product embedding matrix.
[0009] In one embodiment of this disclosure, the step of performing federated learning training on the initial product embedding matrix and the initial user embedding matrix using the user / product interaction training data of the first participant and the user / user social training data of the second participant to obtain the difference in training prediction results includes: Based on the user / product interaction training data of the first participant, determine the user / product interaction training matrix of the first participant; Based on the user / product interaction training matrix, an initial product embedding matrix is randomly generated; A federated learning training request is initiated to the second participant, enabling the second participant to establish a user / user social training matrix based on the user / user social training data, and to randomly generate an initial user embedding matrix based on the user / user social training matrix; User samples are extracted from the first participant, and the user samples are indexed based on the user / product interaction training matrix to obtain the user / product interaction training matrix sample corresponding to the user sample; The user samples are synchronized to the second participant, enabling the second participant to construct user / user social training matrix samples corresponding to the user samples, and index user embedding matrix samples corresponding to the user samples; Based on the user / product interaction training matrix samples and the initial product embedding matrix, determine the user product preference training matrix; Obtain the user social preference training matrix returned by the second participant based on the federated learning training request; wherein the user social preference training matrix is determined based on the user / user social training matrix sample and the user embedding matrix sample; Based on the user product preference training matrix and the user social preference training matrix, the training prediction results are obtained; Based on the user / product interaction training matrix samples, a user / product interaction training positive and negative sample matrix is generated; wherein, the user / product interaction training positive and negative sample matrix is obtained by setting the random part of the user sample and product values in the user / product interaction training matrix samples from 0 to 1; The difference between the training prediction results is determined based on the training prediction results, the positive and negative sample matrix of user / product interaction training, and the sample of user / product interaction training matrix.
[0010] In one embodiment of this disclosure, sending gradient update information to the second participant, so that the second participant performs gradient update on the initial user embedding matrix according to the gradient update matrix in the gradient update information to obtain the trained user embedding matrix, includes: Gradient update information is sent to the second participant so that the second participant can determine the user update gradient value according to the gradient update matrix; wherein, the user update gradient value is the update gradient value of the initial user embedding matrix sample corresponding to the training sample extracted from the user / user social training data; Based on the updated gradient value and the user / user social training matrix samples, the initial user embedding matrix is updated by gradient to obtain the trained user embedding matrix; the user / user social training matrix samples are matrices corresponding to the training samples extracted from the user / user social training data.
[0011] In one embodiment of this disclosure, the user product preference matrix of the first participant is as follows:
[0012] in, Represents a user product preference matrix; Represents the user / product interaction matrix; This represents the product embedding matrix.
[0013] In one embodiment of this disclosure, the user social preference matrix of the second participant is as follows:
[0014] in, Represents the user's social preference matrix; Represents a user / user social matrix; This represents the user embedding matrix.
[0015] In one embodiment of this disclosure, the step of predicting the product preference information of users in the first participant based on the user product preference matrix, the user social preference matrix, and the product embedding matrix to obtain a prediction result matrix includes: The user social preference matrix is multiplied by the transpose of the product embedding matrix using a secure matrix multiplication algorithm to obtain the secure matrix multiplication result. The prediction result matrix is determined based on the user product preference matrix, the transpose of the product embedding matrix, and the result of the security matrix multiplication.
[0016] In one embodiment of this disclosure, recommending product information based on the product preference information includes: The system detects the browsing of product information interfaces by users to be recommended and indexes the product preference information of these users from the prediction result matrix. On the product information interface, product information is recommended based on the product preference information of the user to be recommended.
[0017] In one embodiment of this disclosure, recommending product information based on the product preference information includes: The target product preference information of the first participant is determined by the prediction result matrix; the target product preference information is the product preference information of the first participant whose number of users corresponding to the product preference information is within a preset range. Based on the target product preference information, target product information is recommended on the product information interface.
[0018] Secondly, embodiments of this disclosure provide a product information recommendation device based on federated learning, the device comprising: The acquisition unit is used to acquire the user / product interaction matrix of the first participant in the federated learning based on the user / product interaction data of the first participant, and to acquire the product embedding matrix corresponding to the first participant, wherein the product embedding matrix is obtained in advance through federated learning. The determining unit is used to determine the user product preference matrix of the first participant based on the product embedding matrix and the user / product interaction matrix. A federated collaboration unit is used to initiate a federated learning collaboration request to a second participant and receive a user social preference matrix returned by the second participant based on the federated learning collaboration request; wherein, the user social preference matrix is determined by the second participant based on the second participant's user / user social matrix and the user embedding matrix corresponding to the second participant; the user embedding matrix corresponding to the second participant is obtained in advance through federated learning training; the user / user social matrix is obtained based on the second participant's user / user social data; The prediction and recommendation unit is used to predict the product preference information of users in the first participant based on the user product preference matrix, the user social preference matrix, and the product embedding matrix, and obtain a prediction result matrix to recommend product information based on the product preference information; wherein, the product preference information is information that predicts whether users have preferences for products.
[0019] In one embodiment of this disclosure, the prediction and recommendation unit is further configured to: The user social preference matrix is multiplied by the transpose of the product embedding matrix using a secure matrix multiplication algorithm to obtain the secure matrix multiplication result. The prediction result matrix is determined based on the user product preference matrix, the transpose of the product embedding matrix, and the result of the security matrix multiplication.
[0020] In one embodiment of this disclosure, the product information recommendation device based on federated learning further includes: The training unit is used to perform federated learning training on the initial product embedding matrix and the initial user embedding matrix using the user / product interaction training data of the first participant and the user / user social training data of the second participant, and to obtain the difference in training prediction results; wherein, the initial product embedding matrix is a product embedding matrix that has not undergone federated learning training; and the initial user embedding matrix is a user embedding matrix that has not undergone federated learning training. Based on the difference in the training prediction results, the gradient of the initial product embedding matrix is updated, and the parameters in the federated learning training process are adjusted. The trained product embedding matrix is obtained until the federated collaborative training loss value meets the first preset value. Gradient update information is sent to the second participant so that the second participant can perform gradient update on the initial user embedding matrix according to the gradient update matrix in the gradient update information to obtain the trained user embedding matrix; the gradient update information is determined based on the difference between the training prediction results and the product embedding matrix.
[0021] In one embodiment of this disclosure, the training unit is further configured to: Based on the user / product interaction training data of the first participant, determine the user / product interaction training matrix of the first participant; Based on the user / product interaction training matrix, an initial product embedding matrix is randomly generated; A federated learning training request is initiated to the second participant, enabling the second participant to establish a user / user social training matrix based on the user / user social training data, and to randomly generate an initial user embedding matrix based on the user / user social training matrix; User samples are extracted from the first participant, and the user samples are indexed based on the user / product interaction training matrix to obtain the user / product interaction training matrix sample corresponding to the user sample; The user samples are synchronized to the second participant, enabling the second participant to construct user / user social training matrix samples corresponding to the user samples, and index user embedding matrix samples corresponding to the user samples; Based on the user / product interaction training matrix samples and the initial product embedding matrix, determine the user product preference training matrix; Obtain the user social preference training matrix returned by the second participant based on the federated learning training request; wherein the user social preference training matrix is determined based on the user / user social training matrix sample and the user embedding matrix sample; Based on the user product preference training matrix and the user social preference training matrix, the training prediction results are obtained; Based on the user / product interaction training matrix samples, a user / product interaction training positive and negative sample matrix is generated; wherein, the user / product interaction training positive and negative sample matrix is obtained by setting the random part of the user sample and product values in the user / product interaction training matrix samples from 0 to 1; The difference between the training prediction results is determined based on the training prediction results, the positive and negative sample matrix of user / product interaction training, and the sample of user / product interaction training matrix.
[0022] In one embodiment of this disclosure, the training unit is further configured to: Gradient update information is sent to the second participant so that the second participant can determine the user update gradient value according to the gradient update matrix; wherein, the user update gradient value is the update gradient value of the initial user embedding matrix sample corresponding to the training sample extracted from the user / user social training data; Based on the updated gradient value and the user / user social training matrix samples, the initial user embedding matrix is updated by gradient to obtain the trained user embedding matrix; the user / user social training matrix samples are matrices corresponding to the training samples extracted from the user / user social training data.
[0023] In one embodiment of this disclosure, the prediction and recommendation unit is further configured to: The system detects the browsing of product information interfaces by users to be recommended and indexes the product preference information of these users from the prediction result matrix. On the product information interface, product information is recommended based on the product preference information of the user to be recommended.
[0024] In one embodiment of this disclosure, the prediction and recommendation unit is further configured to: The target product preference information of the first participant is determined by the prediction result matrix; the target product preference information is the product preference information of the first participant whose number of users corresponding to the product preference information is within a preset range. Based on the target product preference information, target product information is recommended on the product information interface.
[0025] Thirdly, embodiments of this disclosure provide an electronic device, including: a processor; and a memory for storing executable instructions of the processor; wherein the processor is configured to perform the method described in the first aspect above by executing the executable instructions.
[0026] Fourthly, embodiments of this disclosure provide a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the method described in the first aspect above.
[0027] Fifthly, according to another aspect of this disclosure, a computer program product or computer program is also provided, the computer program product or computer program including computer instructions stored in a computer-readable storage medium. A processor of a computer device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, causing the computer device to perform the methods described in any of the preceding claims.
[0028] The embodiments of this disclosure provide a product information recommendation method based on federated learning. By having a first participant and a second participant use federated learning collaborative filtering to predict product information that users prefer, the method improves the accuracy of recommending product information that users are interested in by utilizing social network data between users, while protecting data security and privacy.
[0029] It should be understood that the above general description and the following detailed description are exemplary and explanatory only, and are not intended to limit this disclosure. Attached Figure Description
[0030] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with this disclosure and, together with the description, serve to explain the principles of this disclosure. It is obvious that the drawings described below are merely some embodiments of this disclosure, and those skilled in the art can obtain other drawings based on these drawings without any inventive effort.
[0031] Figure 1 This diagram illustrates the structure of a product information recommendation system according to an embodiment of the present disclosure. Figure 2 A flowchart illustrating a product information recommendation method according to an embodiment of this disclosure is shown. Figure 3 A flowchart illustrating a secure matrix multiplication algorithm according to an embodiment of this disclosure is shown. Figure 4 This diagram illustrates a flowchart of a collaborative prediction process using federated learning, as described in an embodiment of this disclosure. Figure 5 This diagram illustrates a process for training a product embedding matrix and a user embedding matrix according to an embodiment of the present disclosure. Figure 6 This illustration shows a flowchart of a federated learning training process according to an embodiment of the present disclosure. Figure 7 This diagram illustrates the structure of a product information recommendation device according to an embodiment of the present disclosure. Figure 8 A schematic diagram of the structure of an electronic device according to an embodiment of the present disclosure is shown. Detailed Implementation
[0032] Exemplary embodiments will now be described more fully with reference to the accompanying drawings. However, these exemplary embodiments can be implemented in many forms and should not be construed as limited to the examples set forth herein; rather, they are provided so that this disclosure will be more comprehensive and complete, and will fully convey the concept of the exemplary embodiments to those skilled in the art. The described features, structures, or characteristics may be combined in any suitable manner in one or more embodiments.
[0033] Furthermore, the accompanying drawings are merely illustrative of this disclosure and are not necessarily drawn to scale. The same reference numerals in the drawings denote the same or similar parts, and therefore repeated descriptions of them will be omitted. Some block diagrams shown in the drawings are functional entities and do not necessarily correspond to physically or logically independent entities. These functional entities may be implemented in software, in one or more hardware modules or integrated circuits, or in different network and / or processor devices and / or microcontroller devices.
[0034] It should be noted that the acquisition, storage, use, and processing of data in this disclosed technical solution comply with the relevant provisions of national laws and regulations. The various types of data, such as personal identity data, operational data, and behavioral data related to individuals, customers, and groups, obtained in the embodiments of this disclosure have all been authorized.
[0035] Because current technologies often store user-product interaction data and social network data between users in different organizations, and are subject to legal and regulatory restrictions, centralized modeling is impossible. This makes it difficult to accurately predict product information that users may be interested in and to provide precise recommendations.
[0036] Therefore, this disclosure provides a product information recommendation method based on federated learning. Using user / product interaction data from the first participant and user / user social data from the second participant, along with a trained product embedding matrix and a trained user embedding matrix, a federated learning collaborative filtering method is used to predict the product preference information of users in the first participant, obtaining a prediction result matrix. This matrix is then used to more accurately recommend product information that users in the first participant prefer. Through this method, the accuracy of product information recommendations can be improved by utilizing user / user social data while protecting data security and privacy.
[0037] The federated learning-based product information recommendation method disclosed herein can be applied to electronic devices or product information recommendation systems.
[0038] Figure 1 A schematic diagram is shown that can be applied to a product information recommendation system in embodiments of this disclosure.
[0039] like Figure 1 As shown, the product information recommendation system 100 may include a terminal device 101, a network 102, and a server 103.
[0040] Network 102 is a medium used to provide a communication link between terminal device 101 and server 103, and can be a wired network or a wireless network.
[0041] Optionally, the aforementioned wireless or wired networks use standard communication technologies and / or protocols. The network is typically the Internet, but can also be any network, including but not limited to Local Area Networks (LANs), Metropolitan Area Networks (MANs), Wide Area Networks (WANs), mobile, wired or wireless networks, private networks, or any combination of virtual private networks. In some embodiments, technologies and / or formats including Hyper Text Markup Language (HTML), Extensible Markup Language (XML), etc., are used to represent data exchanged over the network. Furthermore, conventional encryption technologies such as Secure Socket Layer (SSL), Transport Layer Security (TLS), Virtual Private Networks (VPNs), and Internet Protocol Security (IPsec) can be used to encrypt all or some links. In other embodiments, custom and / or dedicated data communication technologies can be used to replace or supplement the aforementioned data communication technologies.
[0042] Terminal device 101 can be various electronic devices, including but not limited to smartphones, tablets, laptops, desktop computers, wearable devices, augmented reality devices, virtual reality devices, etc.
[0043] Optionally, the client of the application installed on different terminal devices 101 may be the same, or the client of the same type of application based on different operating systems. Depending on the terminal platform, the specific form of the application client may also be different; for example, the application client may be a mobile client, a PC client, etc.
[0044] Server 103 can be a server that provides various services, such as a backend management server that supports the device operated by the user using terminal device 101. The backend management server can analyze and process received requests and other data, and feed the processing results back to the terminal device.
[0045] Optionally, the server can be a standalone physical server, a server cluster or distributed system composed of multiple physical servers, or a cloud server providing basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communication, middleware services, domain name services, security services, CDN (Content Delivery Network), and big data and artificial intelligence platforms. The terminal can be a smartphone, tablet, laptop, desktop computer, smart speaker, smartwatch, etc., but is not limited to these. The terminal and server can be directly or indirectly connected via wired or wireless communication, and this disclosure does not impose any restrictions.
[0046] Those skilled in the art will know that Figure 1 The number of terminal devices, networks, and servers shown is merely illustrative; any number of terminal devices, networks, and servers can be included depending on actual needs. This disclosure does not limit the scope of the embodiments.
[0047] The following detailed description of this exemplary implementation method is provided in conjunction with the accompanying drawings and embodiments.
[0048] First, this disclosure provides a product information recommendation method based on federated learning. This method can be executed by any electronic device with computing power. In the following process, the electronic device is used as a server as an example.
[0049] This disclosure provides a product information recommendation method based on federated learning. By using federated learning, a first participant and a second participant collaborate to predict product information that matches user preferences and make recommendations to the user.
[0050] In this disclosure, the participants can be understood as enterprises or institutions. The first participant refers to the party that has the interaction data between users and the product, and the second participant refers to the party that has the interaction data between users.
[0051] Figure 2 This illustration shows a flowchart of a product information recommendation method based on federated learning, as shown in an embodiment of this disclosure. Figure 2 As shown in the embodiments of this disclosure, the product information recommendation method based on federated learning includes the following steps: S202: Based on the user / product interaction data of the first participant, obtain the user / product interaction matrix of the first participant in the federated learning, and obtain the product embedding matrix corresponding to the first participant.
[0052] User / product interaction data can be understood as the data information generated by the interaction between users and products.
[0053] In this disclosure, "product" can refer to goods or services, such as mobile phones or clothing purchased through certain applications, or financial management methods or insurance products offered through those applications. The above are merely illustrative examples.
[0054] The product embedding matrix is obtained in advance through federated learning.
[0055] In one possible embodiment, an interaction matrix between users and products, i.e., a user / product interaction matrix, is constructed using user / product interaction data from the first participant. Among them, the user / product interaction matrix It can be an N×M matrix, where N represents the number of users and M represents the number of products.
[0056] In a user / product interaction matrix, the existence of historical interaction records can be represented by whether a user has purchased a product. For example, if user A has purchased product A, then user A has a historical interaction record with product A, indicating that user A is interested in product A, which is represented by 1 in the matrix. If a user has no historical interaction record with a product, then it is represented by 0 in the matrix, indicating that product A is not a product that user A is interested in.
[0057] The obtained M×D product embedding matrix Q; where, Let D represent the number of products, and let D represent the feature dimension of the product embedding matrix. The product embedding matrix is the embedding representation of the products.
[0058] The number of products in the user / product interaction matrix is the same as the number of products in the product embedding matrix. In the following text, R represents the user / product interaction matrix, and... This represents the product embedding matrix.
[0059] S204: Determine the user product preference matrix of the first participant based on the product embedding matrix and the user / product interaction matrix.
[0060] In one possible embodiment, the formula for determining the user product preference matrix is as follows:
[0061] in, Represents a user product preference matrix; Represents the user / product interaction matrix; Represents the product embedding matrix; Let R represent the modulus of matrix R.
[0062] S206: Initiate a federated learning collaboration request to the second participant and receive the user social preference matrix returned by the second participant based on the federated learning collaboration request.
[0063] The user embedding matrix corresponding to the second participant is obtained in advance through federated learning.
[0064] It should be noted that the user / user social matrix is derived from user / user social data of a second participant. User / user social data can be understood as social information between users.
[0065] Wherein, the user / user social matrix S can be A 2D matrix. It represents the social connection between user A and user B. For example, if user A and user B are friends, it is represented by 1 in the matrix; if they are not friends, or have no social communication, it is represented by 0 in the matrix.
[0066] Where N represents the number of users, and the N users in the user / product interaction matrix R are the same users; It also represents the number of users, specifically meaning the number of people who may have social relationships with N users. One user.
[0067] The user embedding matrix, denoted by P, is an N×D matrix, where N represents the number of users and D represents the feature dimension of the product embedding matrix. The user embedding matrix represents the user's embedding.
[0068] The user social preference matrix is determined by the second participant based on the second participant's user / user social matrix and the user embedding matrix corresponding to the second participant. The specific formula is as follows:
[0069] in, Represents the user's social preference matrix; Represents a user / user social matrix; Represents the user embedding matrix; Let S represent the modulus of matrix S.
[0070] S208: Based on the user product preference matrix, user social preference matrix and product embedding matrix, predict the product preference information of users in the first participant to obtain the prediction result matrix, and recommend product information based on product preference information.
[0071] Among them, product preference information is information that predicts users' preferences for products.
[0072] In one possible embodiment, the formula for determining the prediction result matrix using the aforementioned user product preference matrix and user social preference matrix is as follows:
[0073] in, Represents the prediction result matrix; Represents the user product preference matrix. Represents the user's social preference matrix; This represents the transpose of the product embedding matrix; This indicates a safe matrix multiplication; the content within the parentheses represents the content to be multiplied safely.
[0074] Specifically, the process of determining the prediction result matrix involves... The safe matrix multiplication algorithm can be used to process it, where the safe matrix multiplication result is calculated without revealing the original matrix information.
[0075] The specific processing steps include: multiplying the user social preference matrix by the transpose of the product embedding matrix using a secure matrix multiplication algorithm to obtain the secure matrix multiplication result; the secure matrix multiplication result is: Then, based on the user product preference matrix, the transpose of the product embedding matrix, and the result of the security matrix multiplication, the prediction result matrix is determined.
[0076] like Figure 3 As shown, where Figure 3 In the matrix, x and y represent the two matrices input into the secure matrix, and a, b, c, e, f, etc. represent the encryption parameters used in the secure matrix multiplication operation. The final result is the multiplication of x and y, and the result remains unchanged.
[0077] Using safe matrix multiplication The multiplication operation can be understood as inputting the two matrices mentioned above into a third-party server other than the first and second participants for computation. The computation process is encrypted. The first participant can only obtain the encrypted data during the entire federated learning collaboration process and cannot obtain the original data of user-to-user social interactions in the second participant. This can complete the collaborative processing process while ensuring data security and user privacy, thereby improving the accuracy of recommended product information.
[0078] Through the above prediction process, a prediction result matrix can be obtained. Then, based on the user's product preference information in the prediction result matrix, product information can be recommended.
[0079] It should be noted that product preference information is information that predicts whether users have a preference for a product. That is, if the vector representation of a user for a product in the obtained prediction result matrix is 1, it means that the user is interested in the product and has a preference. When making recommendations, the product information of that product can be recommended to the user.
[0080] Based on the rich information contained in the prediction result matrix, different product information recommendation methods can be provided to users using this information. There are multiple recommendation methods. The following two examples illustrate two product information recommendation methods.
[0081] Example 1: The product of the first participant is a commodity, and the second participant is a social review website that includes user community information.
[0082] After obtaining the prediction result matrix through the first and second participants in Example 1, products can be recommended to users in a targeted manner based on the information contained in the prediction result matrix.
[0083] Specifically, the system detects the browsing of product information interfaces by users to be recommended, indexes the product preference information of users to be recommended from the prediction result matrix, and displays product information on the product information interfaces browsed by users to be recommended based on the product preference information of users to be recommended.
[0084] The prediction result matrix includes product preference information for all users in the first participating party. When making a recommendation for a specific user, the user's product preference information can be indexed from the prediction result matrix. When it is detected that the user is browsing products using a certain application, a recommendation can be made.
[0085] For example, when user A purchases goods through an e-commerce application, and the user opens the application to browse the products, the system indexes user A's product preference information from the prediction result matrix and recommends products that user A is interested in to the product information interface.
[0086] Example 2: If the product of the first participant is a wealth management product of a certain bank, the second participant is multiple wealth management forums.
[0087] After obtaining the prediction result matrix through the first and second participants in Example 2, financial products are recommended to all users based on the information contained in the prediction result matrix.
[0088] Specifically, the target product preference information of the first participant is determined by the prediction result matrix, and the target product information is recommended on the product information interface based on the target product preference information.
[0089] Among them, the target product preference information is the product preference information of the number of users corresponding to the product preference information of the first participant within a preset range.
[0090] The aforementioned target product preference information can be understood as selecting the top ten products that all users are interested in based on the product preference information of all users in the prediction result matrix, and recommending them to all users.
[0091] One method for selecting the top ten products is by considering the number of users interested in each product. For example, if the product is an investment product, the ten investment products with the highest number of interested users are selected from the prediction result matrix and recommended to all users.
[0092] The aforementioned process of forecasting through federated learning, in collaboration with the first and second participants, can be achieved through... Figure 4 The structural diagram shown is illustrated below.
[0093] like Figure 4 As shown, the first participant obtains the user / product interaction matrix and the product embedding matrix, and the second participant obtains the user / user social matrix and the user embedding matrix. After the first participant initiates a federated learning collaboration request to the second participant, the user product preference matrix and the user social preference matrix are processed in the federated learning collaboration module to obtain the prediction result matrix.
[0094] By training product embedding matrices and user embedding matrices, we can leverage the statistical correlation between users and products, as well as the physical correlation between users. By introducing physical correlation, we can more accurately model the user profiles of the first participant, obtain a more accurate prediction result matrix, and improve the performance of recommending product information.
[0095] The trained user embedding matrix and trained product embedding matrix used in the above process were trained in the following manner, such as... Figure 5 As shown. The training process includes the following steps: S502: Determine the user / product interaction training matrix of the first participant based on the user / product interaction training data of the first participant.
[0096] S504: Randomly generate an initial product embedding matrix based on the user / product interaction training matrix.
[0097] In one possible embodiment, the user / product interaction training matrix uses... This indicates that the corresponding dimension can also be... Dimension. The generated initial product embedding matrix is obtained through... This indicates that the dimension is M×D. The initial product embedding matrix is randomly generated based on the user / product interaction training matrix. M represents the number of users, D represents the number of products, and D represents the feature dimension of the matrix, which is a hyperparameter.
[0098] S506: Initiate a federated learning training request to the second participant, enabling the second participant to establish a user / user social training matrix and, based on the user / user social training matrix, randomly generate an initial user embedding matrix.
[0099] In one possible embodiment, the user / user social training matrix is obtained through... It is indicated that the dimension is Dimension; among which, Weizhong Indicates the number of users and the user / product interaction training matrix. In These users are the same user; This indicates the number of users, and its specific meaning is related to... Users may have social relationships. One user.
[0100] The initial user embedding matrix is obtained through It is indicated that the dimension is ×D dimensions. The initial user embedding matrix is randomly generated based on the user / user social training matrix, where, ×D-dimensional initial user embedding matrix middle This represents the number of users. The values in the initial user embedding matrix are random, and there are no restrictions on the specific values in the initial product embedding matrix.
[0101] S508: Extract user samples from the first participant, index the user samples based on the user / product interaction training matrix, and obtain the user / product interaction training matrix samples corresponding to the user samples.
[0102] In one possible embodiment, a portion of user samples are extracted from the training data of the first participant. Conduct training, from The user / product interaction training matrix samples are obtained from the index. ;in, The dimension is represented as ×M.
[0103] S510: Synchronize the user samples to the second participant, so that the second participant can construct the user / user social training matrix sample corresponding to the user sample, and the user embedding matrix sample corresponding to the index user sample.
[0104] In one possible embodiment, the same user samples are indexed in the second participant. Used for training to obtain user / user social training matrix samples. ;in, The dimension is represented as × .
[0105] Among them, the user embedding matrix samples corresponding to the user samples obtained by indexing are obtained through... express.
[0106] S512: Determine the user product preference training matrix based on the user / product interaction training matrix samples and the initial product embedding matrix.
[0107] S514: Obtain the user social preference training matrix returned by the second participant based on the federated learning training request.
[0108] The user social preference training matrix is determined based on user / user social training matrix samples and user embedding matrix samples.
[0109] S516: Based on the user product preference training matrix and the user social preference training matrix, the training prediction results are obtained.
[0110] In one possible embodiment, the specific methods for determining the user product preference training matrix, the user social preference training matrix, and the training prediction results during the above training process are the same as those used in the usage process, and will not be elaborated further here; the results are obtained directly.
[0111] User product preference training matrix through It is stated that the user's social preference training matrix is obtained through... This indicates that the training prediction results are passed express.
[0112] S518: Generate a positive and negative sample matrix of user / product interaction training based on the user / product interaction training matrix samples.
[0113] In one possible embodiment, to make the training results more accurate and reliable, a user / product interaction training positive and negative sample matrix can be added during the training process. This user / product interaction training positive and negative sample matrix is obtained by setting the random values between user samples and products in the user / product interaction training matrix from 0 to 1.
[0114] The process of obtaining the positive and negative sample matrix of user / product interaction training can be understood as changing the vector representation of the relationship between users and their interested products in the original user samples from 0 to 1, that is, changing products that users are not interested in to products that they are interested in. This increases the training difficulty and the bias value.
[0115] S520: Determine the difference between training prediction results based on the training prediction results, the positive and negative sample matrix of user / product interaction training, and the sample of user / product interaction training matrix.
[0116] In one possible embodiment, the specific formula for determining the difference between the training prediction results is as follows:
[0117] in, This represents the training prediction result; This represents the positive and negative sample matrix for user / product interaction training. This represents the user / product interaction training matrix samples; This represents the difference between the training and prediction results.
[0118] The above formula can effectively represent the difference between training and prediction results.
[0119] S522: Based on the difference in training prediction results, update the gradient of the initial product embedding matrix, adjust the parameters in the training process, and determine the federated collaborative training loss value.
[0120] S524: Determine whether the federated collaborative training loss value meets the first preset value; if not, return to execute S508 based on the initial product embedding matrix updated by the gradient; if it meets the value, execute step S526.
[0121] S526: Obtain the trained product embedding matrix.
[0122] In one possible embodiment, this is essentially the iteration point of the iterative training process, which will be specifically described below.
[0123] For example, in the first training process of the iterative training process, after determining the difference in the first training prediction results, the federated collaborative training loss value corresponding to the difference in the first training prediction results can be determined. The specific formula for determining the federated collaborative training loss value based on the difference in the first training prediction results is as follows:
[0124] in, This represents the difference between the training and prediction results. Represents the initial product embedding matrix; This represents the user / product interaction training matrix; This represents the loss value of federal collaborative training.
[0125] If the loss value of this federated collaborative training does not meet the first preset value, then the initial product embedding matrix will be updated by gradient based on the difference between the training prediction results.
[0126] The method for performing a gradient update on the initial product embedding matrix is as follows: determine the first product gradient update value of the initial product embedding matrix using the following formula, and update the initial product embedding matrix using the first product gradient update value.
[0127] The formula for determining the first product gradient update value of the initial product embedding matrix is as follows:
[0128] in, This indicates the first product gradient update value. The meanings of the other letters have already been explained in the above content and will not be repeated here.
[0129] Through the above process, the first training process of the iterative training process is completed, and the first iteration product embedding matrix can be obtained based on the first training process.
[0130] It should be noted that the first iteration product embedding matrix is the initial product embedding matrix that has undergone one gradient update. It should be understood that, in this disclosure, the product embedding matrix obtained through each gradient update process during the iteration is referred to as the iterative product embedding matrix.
[0131] The initial product embedding matrix after one training cycle is the first iteration product embedding matrix. The initial product embedding matrix after two training cycles and two gradient updates is the second iteration product embedding matrix.
[0132] In one possible embodiment, if the loss value of the first federated collaborative training does not meet the first preset value, the iteration of the federated collaborative training process is further explained, and a second federated collaborative training process is performed. The formula for determining the loss value of the second federated collaborative training is as follows:
[0133] in, This represents the loss value of the second federal collaborative training; This represents the difference in training prediction results determined during the second federal collaborative training process; This represents the embedding matrix of the first iteration product; This represents the user / product interaction training matrix obtained from the re-sampled data during the second federal collaborative training process.
[0134] The second federated collaborative training process can further determine the second federated collaborative training loss value. If the second federated collaborative training loss value meets the first preset value, the training process ends. If the second federated collaborative training loss value does not meet the first preset value, the third federated collaborative training process is carried out after gradient update of the embedding matrix of the first iteration product.
[0135] Through the above training process, the product embedding matrix is continuously trained and updated until the federated collaborative training loss value meets the first preset value. Taking the nth iteration process as an example, when the federated collaborative training loss value meets the first preset value, the gradient update value of the nth product is determined according to the nth iteration product embedding matrix, and the gradient update value of the nth iteration product embedding matrix is used to update the gradient of the nth iteration product embedding matrix, so as to obtain the final trained product embedding matrix.
[0136] S528: Send gradient update information to the second participant so that the second participant can update the initial user embedding matrix according to the gradient update matrix in the gradient update information to obtain the trained user embedding matrix.
[0137] In one possible embodiment, the process of gradient updating the initial user embedding matrix in the second participant specifically includes: sending gradient update information to the second participant so that the second participant can determine the user update gradient value of the initial user embedding matrix sample according to the gradient update matrix, and perform gradient update on the initial user embedding matrix according to the user update gradient value and the user / user social training matrix sample to obtain the trained user embedding matrix.
[0138] The gradient update matrix in the gradient update information is determined based on the positive and negative sample matrices trained by user / product interaction, the difference between training prediction results, and the trained product embedding matrix.
[0139] The gradient update matrix specifically includes:
[0140] Specifically, the second participant first determines the initial user embedding matrix samples by updating the gradient matrix as described above. The user updates the gradient value, and the specific formula is as follows:
[0141] in, This indicates that the user is updating the gradient value.
[0142] The gradient is updated again after the user updates the gradient value, as shown in the following formula:
[0143] in, This represents the gradient update value corresponding to the initial user embedding matrix.
[0144] The trained user embedding matrix can be obtained by updating the initial user embedding matrix based on the gradient update value corresponding to the initial user embedding matrix.
[0145] It is important to understand that the gradient update process described above is essentially a computational process.
[0146] By using federated learning to train the data in collaboration with the first and second participants, not only can the privacy of the data of both participants be protected, but data security can also be effectively protected. The product embedding matrix and user embedding matrix obtained by training in this way are fully compliant.
[0147] Furthermore, in the federated collaborative training process, this disclosure uses a gradient update method to iteratively update the initial product embedding matrix, without limiting the value of the initial product embedding matrix, which can be randomly generated, thus providing greater flexibility.
[0148] Furthermore, the process of coordinating the first and second participants in the prediction can be achieved through... Figure 6 The structural diagram shown is illustrated below.
[0149] Figure 6 The training process, specifically the collaborative training between the first and second participants through federated learning, will not be elaborated upon here. Through this training process, it can be considered that the embedded relationships between users and products are learned from the user's interaction history with the product; this can be considered a user profile, i.e., the products the user is interested in. The user profile can be divided into two parts: user preferences learned from the first participant's interaction history (statistical correlation); and social preferences learned from the second participant's social network (physical correlation). Together, these two parts constitute the user profile.
[0150] This process allows the trained embedding matrix to better represent the relationship between users and products, resulting in higher accuracy when using the trained user embedding matrix and product embedding matrix for prediction and recommendation.
[0151] Based on the same inventive concept, this disclosure also provides a product information recommendation device based on federated learning, as shown in the following embodiment. Since the principle by which this device embodiment solves the problem is similar to that of the above-described method embodiment, the implementation of this device embodiment can refer to the implementation of the above-described method embodiment, and repeated details will not be elaborated further.
[0152] Figure 7 This diagram illustrates the structure of a product information recommendation device based on federated learning, as shown in an embodiment of this disclosure. Figure 7 As shown, the product information recommendation device 70 based on federated learning includes: The acquisition unit 701 is used to acquire the user / product interaction matrix of the first participant in the federated learning based on the user / product interaction data of the first participant, and to acquire the product embedding matrix corresponding to the first participant. The product embedding matrix is obtained in advance through federated learning. The determining unit 702 is used to determine the user product preference matrix of the first participant based on the product embedding matrix and the user / product interaction matrix; The federated collaboration unit 703 is used to initiate a federated learning collaboration request to the second participant and receive a user social preference matrix returned by the second participant according to the federated learning collaboration request; wherein, the user social preference matrix is determined by the second participant based on the user / user social matrix of the second participant and the user embedding matrix corresponding to the second participant; the user embedding matrix corresponding to the second participant is obtained in advance through federated learning; the user / user social matrix is obtained based on the user / user social data of the second participant. The prediction and recommendation unit 704 is used to predict the product preference information of users in the first participant based on the user product preference matrix, the user social preference matrix and the product embedding matrix, and obtain the prediction result matrix to recommend product information based on the product preference information; wherein, the product preference information is the information that predicts the user's preference for the product.
[0153] In one embodiment of this disclosure, the product information recommendation device based on federated learning further includes: Training unit 705 is used to perform federated learning training on the initial product embedding matrix and the initial user embedding matrix using user / product interaction training data from the first participant and user / user social training data from the second participant, to obtain the difference in training prediction results; wherein, the initial product embedding matrix is the product embedding matrix that has not undergone federated learning training; and the initial user embedding matrix is the user embedding matrix that has not undergone federated learning training. Based on the difference between the training and prediction results, the gradient of the initial product embedding matrix is updated, and the parameters in the federated learning training process are adjusted until the federated collaborative training loss value meets the first preset value, thus obtaining the trained product embedding matrix. Gradient update information is sent to the second participant so that the second participant can update the initial user embedding matrix according to the gradient update matrix in the gradient update information to obtain the trained user embedding matrix; the gradient update information is determined based on the difference between the training prediction results and the product embedding matrix.
[0154] In one embodiment of this disclosure, the training unit 705 is further configured to: Based on the user / product interaction training data of the first participant, determine the user / product interaction training matrix of the first participant; Based on the user / product interaction training matrix, an initial product embedding matrix is randomly generated; A federated learning training request is sent to the second participant, enabling the second participant to build a user / user social training matrix based on the user / user social training data, and to randomly generate an initial user embedding matrix based on the user / user social training matrix. User samples are extracted from the first participant, and the user samples are indexed based on the user / product interaction training matrix to obtain the user / product interaction training matrix samples corresponding to the user samples; The user samples are synchronized to the second participant, enabling the second participant to construct user / user social training matrix samples corresponding to the user samples, as well as user embedding matrix samples corresponding to the indexed user samples; Based on the user / product interaction training matrix samples and the initial product embedding matrix, determine the user product preference training matrix; Obtain the user social preference training matrix returned by the second participant based on the federated learning training request; wherein, the user social preference training matrix is determined based on user / user social training matrix samples and user embedding matrix samples; The training prediction results are obtained based on the user product preference training matrix and the user social preference training matrix; Based on the user / product interaction training matrix samples, generate a user / product interaction training positive and negative sample matrix; wherein, the user / product interaction training positive and negative sample matrix is obtained by setting the random part of the user samples and product values in the user / product interaction training matrix samples from 0 to 1; The difference between the training prediction results is determined based on the training prediction results, the positive and negative sample matrix of user / product interaction training, and the sample of user / product interaction training matrix.
[0155] Those skilled in the art will understand that various aspects of this disclosure can be implemented as a system, method, or program product. Therefore, various aspects of this disclosure can be specifically implemented in the following forms: a completely hardware implementation, a completely software implementation (including firmware, microcode, etc.), or a combination of hardware and software aspects, collectively referred to herein as a "circuit," "module," or "system."
[0156] The following reference Figure 8 To describe an electronic device 800 according to such an embodiment of the present disclosure. Figure 8 The electronic device 800 shown is merely an example and should not impose any limitation on the functionality and scope of use of the embodiments disclosed herein.
[0157] like Figure 8 As shown, the electronic device 800 is manifested in the form of a general-purpose computing device. The components of the electronic device 800 may include, but are not limited to: at least one processing unit 810, at least one storage unit 820, and a bus 830 connecting different system components (including storage unit 820 and processing unit 810).
[0158] The storage unit stores program code that can be executed by the processing unit 810, causing the processing unit 810 to perform the steps described in the "Exemplary Methods" section of this specification according to various exemplary embodiments of this disclosure. For example, the processing unit 810 can perform the steps described in the above method embodiments, such as... Figure 2 The steps in the process.
[0159] Storage unit 820 may include a readable medium in the form of a volatile storage unit, such as random access memory (RAM) 8201 and / or cache memory 8202, and may further include a read-only memory (ROM) 8203.
[0160] The storage unit 820 may also include a program / utility 8204 having a set (at least one) of program modules 8205, such program modules 8205 including but not limited to: an operating system, one or more application programs, other program modules, and program data, each or some combination of these examples may include an implementation of a network environment.
[0161] Bus 830 can represent one or more of several types of bus structures, including a memory cell bus or memory cell controller, a peripheral bus, a graphics acceleration port, a processing unit, or a local bus using any of the various bus structures.
[0162] Electronic device 800 can also communicate with one or more external devices 840 (e.g., keyboard, pointing device, Bluetooth device, etc.), and with one or more devices that enable a user to interact with electronic device 800, and / or with any device that enables electronic device 800 to communicate with one or more other computing devices (e.g., router, modem, etc.). This communication can be performed via input / output (I / O) interface 850. Furthermore, electronic device 800 can also communicate with one or more networks (e.g., local area network (LAN), wide area network (WAN), and / or public networks, such as the Internet) via network adapter 860. As shown, network adapter 860 communicates with other modules of electronic device 800 via bus 830. It should be understood that, although not shown in the figures, other hardware and / or software modules can be used in conjunction with electronic device 800, including but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, and data backup storage systems.
[0163] From the above description of the embodiments, those skilled in the art will readily understand that the exemplary embodiments described herein can be implemented by software or by combining software with necessary hardware. Therefore, the technical solutions according to the embodiments of this disclosure can be embodied in the form of a software product, which can be stored in a non-volatile storage medium (such as a CD-ROM, USB flash drive, external hard drive, etc.) or on a network, including several instructions to cause a computing device (such as a personal computer, server, terminal device, or network device, etc.) to execute the methods according to the embodiments of this disclosure.
[0164] Specifically, according to embodiments of this disclosure, the process described above with reference to the flowchart can be implemented as a computer program product or computer program, which includes computer instructions stored in a computer-readable storage medium. A processor of a computer device reads the computer instructions from the computer-readable storage medium and executes the computer instructions, causing the computer device to perform any of the above-described federated learning-based product information recommendation methods.
[0165] In exemplary embodiments of this disclosure, a computer-readable storage medium is also provided, which may be a readable signal medium or a readable storage medium. A program product capable of implementing the methods described above is stored thereon. In some possible implementations, various aspects of this disclosure may also be implemented as a program product including program code, which, when run on a terminal device, causes the terminal device to perform the steps described in the "Exemplary Methods" section of this specification according to various exemplary embodiments of this disclosure.
[0166] More specific examples of computer-readable storage media in this disclosure may include, but are not limited to: electrical connections having one or more wires, portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination of the foregoing.
[0167] In this disclosure, a computer-readable storage medium may include a data signal propagated in baseband or as part of a carrier wave, carrying readable program code. Such propagated data signals may take various forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination thereof. A readable signal medium may also be any readable medium other than a readable storage medium, capable of transmitting, propagating, or transmitting a program for use by or in connection with an instruction execution system, apparatus, or device.
[0168] Optionally, the program code contained on the computer-readable storage medium may be transmitted using any suitable medium, including but not limited to wireless, wired, optical fiber, RF, etc., or any suitable combination thereof.
[0169] In practical implementation, program code for performing the operations of this disclosure can be written in any combination of one or more programming languages, including object-oriented programming languages such as Java and C++, and conventional procedural programming languages such as C or similar languages. The program code can execute entirely on the user's computing device, partially on the user's device, as a standalone software package, partially on the user's computing device and partially on a remote computing device, or entirely on a remote computing device or server. In cases involving remote computing devices, the remote computing device can be connected to the user's computing device via any type of network, including a local area network (LAN) or a wide area network (WAN), or it can be connected to an external computing device (e.g., via the Internet using an Internet service provider).
[0170] It should be noted that although several modules or units for the device used to perform actions have been mentioned in the detailed description above, this division is not mandatory. In fact, according to embodiments of this disclosure, the features and functions of two or more modules or units described above can be embodied in one module or unit. Conversely, the features and functions of one module or unit described above can be further divided and embodied by multiple modules or units.
[0171] Furthermore, although the steps of the method in this disclosure are described in a specific order in the accompanying drawings, this does not require or imply that the steps must be performed in that specific order, or that all the steps shown must be performed to achieve the desired result. Additional or alternative steps may be omitted, multiple steps may be combined into one step, and / or a step may be broken down into multiple steps.
[0172] From the above description of the embodiments, those skilled in the art will readily understand that the exemplary embodiments described herein can be implemented by software or by combining software with necessary hardware. Therefore, the technical solutions according to the embodiments of this disclosure can be embodied in the form of a software product, which can be stored in a non-volatile storage medium (such as a CD-ROM, USB flash drive, external hard drive, etc.) or on a network, including several instructions to cause a computing device (such as a personal computer, server, mobile terminal, or network device, etc.) to execute the methods according to the embodiments of this disclosure.
[0173] Other embodiments of this disclosure will readily occur to those skilled in the art upon consideration of the specification and practice of the invention disclosed herein. This disclosure is intended to cover any variations, uses, or adaptations of this disclosure that follow the general principles of this disclosure and include common knowledge or customary techniques in the art not disclosed herein. The specification and examples are to be considered exemplary only, and the true scope and spirit of this disclosure are indicated by the appended claims.
Claims
1. A product information recommendation method based on federated learning, characterized in that, The method includes: Based on the user / product interaction data of the first participant, obtain the user / product interaction matrix of the first participant in the federated learning, and obtain the product embedding matrix corresponding to the first participant; the product embedding matrix is obtained in advance through federated learning. Based on the product embedding matrix and the user / product interaction matrix, determine the user product preference matrix of the first participant; A federated learning collaboration request is initiated to the second participant, and a user social preference matrix returned by the second participant according to the federated learning collaboration request is received; wherein, the user social preference matrix is determined by the second participant based on the user / user social matrix of the second participant and the user embedding matrix corresponding to the second participant; the user embedding matrix corresponding to the second participant is obtained in advance through federated learning; the user / user social matrix is obtained based on the user / user social data of the second participant; Based on the user product preference matrix, the user social preference matrix, and the product embedding matrix, the product preference information of users in the first participant is predicted to obtain a prediction result matrix, so as to recommend product information based on the product preference information; wherein, the product preference information is information that predicts whether users have preferences for products; The prediction of product preference information of users in the first participant based on the user product preference matrix, the user social preference matrix, and the product embedding matrix, to obtain a prediction result matrix, includes: The user social preference matrix is multiplied by the transpose of the product embedding matrix using a secure matrix multiplication algorithm to obtain the secure matrix multiplication result. The prediction result matrix is determined based on the user product preference matrix, the transpose of the product embedding matrix, and the result of the security matrix multiplication.
2. The product information recommendation method according to claim 1, characterized in that, The method further includes: Using the user / product interaction training data of the first participant and the user / user social training data of the second participant, federated learning is performed on the initial product embedding matrix and the initial user embedding matrix to obtain the difference in training prediction results; wherein, the initial product embedding matrix is the product embedding matrix that has not undergone federated learning training; and the initial user embedding matrix is the user embedding matrix that has not undergone federated learning training. Based on the difference in the training prediction results, the gradient of the initial product embedding matrix is updated, and the parameters in the federated learning training process are adjusted until the federated collaborative training loss value meets the first preset value, thus obtaining the trained product embedding matrix. Gradient update information is sent to the second participant so that the second participant can perform gradient update on the initial user embedding matrix according to the gradient update matrix in the gradient update information to obtain the trained user embedding matrix; the gradient update information is determined based on the difference between the training prediction results and the product embedding matrix.
3. The product information recommendation method according to claim 2, characterized in that, The step of performing federated learning training on the initial product embedding matrix and the initial user embedding matrix using the user / product interaction training data of the first participant and the user / user social training data of the second participant to obtain the difference in training prediction results includes: Based on the user / product interaction training data of the first participant, determine the user / product interaction training matrix of the first participant; Based on the user / product interaction training matrix, an initial product embedding matrix is randomly generated; A federated learning training request is initiated to the second participant, enabling the second participant to establish a user / user social training matrix based on the user / user social training data, and to randomly generate an initial user embedding matrix based on the user / user social training matrix; User samples are extracted from the first participant, and the user samples are indexed based on the user / product interaction training matrix to obtain the user / product interaction training matrix sample corresponding to the user sample; The user samples are synchronized to the second participant, enabling the second participant to construct user / user social training matrix samples corresponding to the user samples, and index user embedding matrix samples corresponding to the user samples; Based on the user / product interaction training matrix samples and the initial product embedding matrix, determine the user product preference training matrix; Obtain the user social preference training matrix returned by the second participant based on the federated learning training request; wherein the user social preference training matrix is determined based on the user / user social training matrix sample and the user embedding matrix sample; Based on the user product preference training matrix and the user social preference training matrix, the training prediction results are obtained; Based on the user / product interaction training matrix samples, a user / product interaction training positive and negative sample matrix is generated; wherein, the user / product interaction training positive and negative sample matrix is obtained by setting the random part of the user sample and product values in the user / product interaction training matrix samples from 0 to 1; The difference between the training prediction results is determined based on the training prediction results, the positive and negative sample matrix of user / product interaction training, and the sample of user / product interaction training matrix.
4. The product information recommendation method according to claim 2, characterized in that, The step of sending gradient update information to the second participant, so that the second participant can perform gradient update on the initial user embedding matrix according to the gradient update matrix in the gradient update information to obtain the trained user embedding matrix, includes: Gradient update information is sent to the second participant so that the second participant can determine the user update gradient value according to the gradient update matrix; wherein, the user update gradient value is the update gradient value of the initial user embedding matrix sample corresponding to the training sample extracted from the user / user social training data; Based on the updated gradient value and the user / user social training matrix samples, the initial user embedding matrix is updated by gradient to obtain the trained user embedding matrix; the user / user social training matrix samples are matrices corresponding to the training samples extracted from the user / user social training data.
5. The product information recommendation method according to claim 1, characterized in that, The user product preference matrix of the first participant is as follows: in, Represents a user product preference matrix; Represents the user / product interaction matrix; This represents the product embedding matrix.
6. The product information recommendation method according to claim 1, characterized in that, The user social preference matrix of the second participant is as follows: in, Represents the user's social preference matrix; Represents a user / user social matrix; This represents the user embedding matrix.
7. The product information recommendation method according to claim 1, characterized in that, The recommendation of product information based on the product preference information includes: The system detects the browsing of product information interfaces by users to be recommended and indexes the product preference information of these users from the prediction result matrix. On the product information interface, product information is recommended based on the product preference information of the user to be recommended.
8. The product information recommendation method according to claim 1, characterized in that, The recommendation of product information based on the product preference information includes: The target product preference information of the first participant is determined by the prediction result matrix; the target product preference information is the product preference information of the first participant whose number of users corresponding to the product preference information is within a preset range. Based on the target product preference information, target product information is recommended on the product information interface.
9. A product information recommendation device based on federated learning, characterized in that, The device includes: The acquisition unit is used to acquire the user / product interaction matrix of the first participant in the federated learning based on the user / product interaction data of the first participant, and to acquire the product embedding matrix corresponding to the first participant, wherein the product embedding matrix is obtained in advance through federated learning. The determining unit is used to determine the user product preference matrix of the first participant based on the product embedding matrix and the user / product interaction matrix. The federated collaboration unit is used to initiate a federated learning collaboration request to the second participant and receive a user social preference matrix returned by the second participant according to the federated learning collaboration request; wherein, the user social preference matrix is determined by the second participant based on the second participant's user / user social matrix and the user embedding matrix corresponding to the second participant; the user embedding matrix corresponding to the second participant is obtained in advance through federated learning training; the user / user social matrix is obtained based on the second participant's user / user social data. The prediction and recommendation unit is used to predict the product preference information of users in the first participant based on the user product preference matrix, the user social preference matrix, and the product embedding matrix, to obtain a prediction result matrix, and to recommend product information based on the product preference information; wherein, the product preference information is information that predicts whether users have preferences for products; The prediction and recommendation unit is further configured to multiply the user social preference matrix by the transpose of the product embedding matrix using a secure matrix multiplication algorithm to obtain a secure matrix multiplication result; and to determine the prediction result matrix based on the user product preference matrix, the transpose of the product embedding matrix, and the secure matrix multiplication result.
10. An electronic device, characterized in that, include: processor; as well as Memory for storing the executable instructions of the processor; The processor is configured to execute the method of any one of claims 1 to 8 by executing the executable instructions.
11. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the method described in any one of claims 1 to 8.
Citation Information
Patent Citations
Social collaborative filtering recommendation method based on federal learning
CN114510652A