Recommendation model training method, recommendation method, device, equipment and storage medium

By obtaining the common local data of multiple participants in the recommendation system for matrix decomposition and iterative training, the problem of low cold-start recommendation accuracy and data security for new users is solved, and recommendation model training with high accuracy and privacy protection is achieved.

CN112633356BActive Publication Date: 2024-09-10PING AN TECH (SHENZHEN) CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202011508002.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2020-12-18
Publication Date
2024-09-10
Estimated Expiration
2040-12-18

AI Technical Summary

Technical Problem

Existing recommendation systems are difficult to improve recommendation accuracy when new users are cold-started, and multi-party data sharing may lead to customer privacy leaks, causing data security and privacy issues.

Method used

The item rating matrix is ​​constructed by obtaining the common local data of multiple participants, performing matrix decomposition to obtain the user latent matrix and item latent matrix, and then iteratively trains locally and calculates the loss function to complete the training of the matrix model to ensure data security.

Benefits of technology

It improves the recommendation accuracy of the recommendation model and achieves good data security and privacy protection without leaking user private information.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN112633356B
    Figure CN112633356B
Patent Text Reader

Abstract

The present application relates to the field of model construction, and specifically discloses a training method for a recommendation model, a user recommendation method, an apparatus, a device and a storage medium, wherein the method comprises: obtaining common local data of multiple participants, and constructing multiple item rating matrices based on the user information and the item rating information corresponding to the user information; performing matrix decomposition on the constructed multiple item rating matrices to obtain a user latent matrix and multiple item latent matrices; each participant performs iterative training on the user latent matrix and their respective item latent matrices locally, and constructs a matrix model based on the user latent matrix and the multiple item latent matrices, and calculates the loss value of the loss function of the matrix model; when the loss value of the loss function of the matrix model reaches a preset value, the matrix model is used as a recommendation model to complete the model training. This improves data security and improves the recommendation accuracy of the trained recommendation model.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of recommendation models, and in particular to a recommendation model training method, user recommendation method, device, equipment and storage medium. Background Art

[0002] With the rapid development of the Internet and e-commerce, recommendation systems have become an important tool for companies to improve their market competitiveness. When a new user joins the recommendation system, since the new user has no historical data in the recommendation system, it is impossible to recommend the new user based on the traditional recommendation algorithm, and the accuracy of the recommendation is low. In order to recommend new users in the existing technology, it is often necessary to combine data from multiple parties, but when data is shared and accessed between multiple companies, it is easy to cause customer privacy leakage, resulting in privacy issues.

[0003] Therefore, how to improve data security when training recommendation models and improve the recommendation accuracy of the trained recommendation models has become an urgent problem to be solved. Summary of the invention

[0004] The present application provides a recommendation model training method, user recommendation method, device, equipment and storage medium to improve data security and improve the recommendation accuracy of the trained recommendation model.

[0005] In a first aspect, the present application provides a method for training a recommendation model, the method comprising:

[0006] Acquire common local data of multiple participants, wherein the common local data includes user information and item rating information corresponding to the user information, and construct multiple item rating matrices based on the user information and the item rating information corresponding to the user information; perform matrix decomposition on the constructed multiple item rating matrices to obtain a user latent matrix and multiple item latent matrices; each participant performs iterative training on the user latent matrix and its own item latent matrix locally, and constructs a matrix model based on the user latent matrix and the multiple item latent matrices, and calculates the loss value of the loss function of the matrix model; when the loss value of the loss function of the matrix model reaches a preset value, use the matrix model as a recommendation model to complete the model training.

[0007] In a second aspect, the present application provides a user recommendation method, the method comprising:

[0008] Obtain user information of a new user, and based on the user information, obtain item rating information of the new user in other participants; determine the item rating information of the new user in the recommendation participants based on the rating information and a pre-trained recommendation model; recommend the new user based on the item rating information of the new user in the recommendation participants; wherein the pre-trained recommendation model is trained using the training method of the recommendation model as described above.

[0009] In a third aspect, the present application also provides a training device for a recommendation model, the device comprising:

[0010] A matrix construction module is used to obtain common local data of multiple participants, wherein the common local data includes user information and item rating information corresponding to the user information, and construct multiple item rating matrices based on the user information and the item rating information corresponding to the user information; a matrix decomposition module is used to perform matrix decomposition on the constructed multiple item rating matrices to obtain a user latent matrix and multiple item latent matrices; a loss calculation module is used for each participant to iteratively train the user latent matrix and their respective item latent matrices locally, and to construct a matrix model based on the user latent matrix and the multiple item latent matrices, and calculate the loss value of the loss function of the matrix model; a model training module is used to use the matrix model as a recommendation model to complete model training when the loss value of the loss function of the matrix model reaches a preset value.

[0011] In a fourth aspect, the present application further provides a user recommendation device, the device comprising:

[0012] An information acquisition module is used to obtain user information of a new user, and based on the user information, obtain item rating information of the new user in other participants; a rating determination module is used to determine the item rating information of the new user in the recommendation participants based on the rating information and a pre-trained recommendation model; a user recommendation module is used to recommend the new user based on the item rating information of the new user in the recommendation participants; wherein the pre-trained recommendation model is trained using the training method of the recommendation model as described above.

[0013] In a fifth aspect, the present application also provides a computer device, comprising a memory and a processor; the memory is used to store a computer program; the processor is used to execute the computer program and implement the training method of the recommendation model and the user recommendation method as described above when executing the computer program.

[0014] In a sixth aspect, the present application also provides a computer-readable storage medium, which stores a computer program. When the computer program is executed by a processor, the processor implements the training method of the recommendation model and the user recommendation method as described above.

[0015] The present application discloses a training method for a recommendation model, a user recommendation method, an apparatus, a device and a storage medium. The method obtains common local data of multiple participants, constructs multiple item rating matrices based on the common local data, and then performs matrix decomposition on the multiple item rating matrices to obtain a user latent matrix and multiple item latent matrices; each participant performs iterative training on the user latent matrix and the respective item latent matrix locally, and calculates the loss value of the loss function of the matrix model. When the loss value reaches a preset value, the matrix model is used as the recommendation model to complete the model training. The matrix model is constructed by matrix decomposition to improve the recommendation accuracy of the constructed matrix model when making recommendations. Moreover, since each participant performs iterative training on the user latent matrix and the item latent matrix locally, a rating matrix with a lower degree of privacy is introduced for joint training without leaking the user's privacy information, so that a good recommendation model training is performed while greatly ensuring privacy. BRIEF DESCRIPTION OF THE DRAWINGS

[0016] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.

[0017] Figure 1 is a schematic flow chart of a training method for a recommendation model provided in an embodiment of the present application;

[0018] Figure 2 is a schematic flow chart of a user recommendation method provided in an embodiment of the present application;

[0019] Figure 3 A schematic block diagram of a training device for a recommendation model provided in an embodiment of the present application;

[0020] Figure 4 A schematic block diagram of a user recommendation device provided in an embodiment of the present application;

[0021] Figure 5 A schematic block diagram of the structure of a computer device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0022] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are 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 are within the scope of protection of this application.

[0023] The flowcharts shown in the accompanying drawings are only examples and do not necessarily include all the contents and operations / steps, nor must they be executed in the order described. For example, some operations / steps may also be decomposed, combined or partially merged, so the actual execution order may change according to actual conditions.

[0024] It should be understood that the terms used in this application specification are only for the purpose of describing specific embodiments and are not intended to limit the application. As used in this application specification and the appended claims, unless the context clearly indicates otherwise, the singular forms "a", "an" and "the" are intended to include plural forms.

[0025] It should also be understood that the term “and / or” used in the specification and appended claims refers to any and all possible combinations of one or more of the associated listed items, and includes these combinations.

[0026] The embodiments of the present application provide a recommendation model training method, a recommendation method, an apparatus, a computer device and a storage medium. The recommendation model training method can be used to train the recommendation model so as to make item recommendations to new users.

[0027] In conjunction with the accompanying drawings, some embodiments of the present application are described in detail below. In the absence of conflict, the following embodiments and features in the embodiments can be combined with each other.

[0028] See also Figure 1 , Figure 1 This is a schematic flow chart of a training method for a recommendation model provided in an embodiment of the present application. The training method for the recommendation model trains a cold start recommendation model while ensuring data security by utilizing matrix decomposition and vertical federated learning, realizes recommendation for new users, improves data security during model training, and improves the recommendation accuracy of the recommendation model obtained.

[0029] like Figure 1 As shown, the training method of the recommendation model specifically includes: step S101 to step S104.

[0030] S101. Acquire common local data of multiple participants, wherein the common local data includes user information and item rating information corresponding to the user information, and construct multiple item rating matrices based on the user information and the item rating information corresponding to the user information.

[0031] In order to solve the cold start problem of users, multiple participants can be combined for model training. That is, for different participants, the users they have and the services they provide are different. For example, participant A may provide book services, participant B may provide movie services, and so on.

[0032] Therefore, local data of each participant participating in training the recommendation model is obtained respectively, wherein the local data includes user information and item rating information corresponding to the user information. The item rating information is also the user's rating information for the services provided by the participant. For example, the user's rating information for different books.

[0033] Since the local data of each participant has the same user information, each participant can build an item rating matrix based on this same user information. Each participant builds its own item rating matrix to facilitate training of the recommendation model.

[0034] S102: performing matrix decomposition on the constructed multiple item rating matrices to obtain a user latent matrix and multiple item latent matrices.

[0035] For each constructed item rating matrix, matrix decomposition is performed respectively to decompose the original item rating matrix into the product of two low-dimensional matrices, the user latent matrix and the item latent matrix. When performing matrix decomposition, for example, an SVD algorithm can be used.

[0036] For example, for participant A, if the constructed item rating matrix is ​​R A , then the decomposed user hidden matrix is ​​U, and the item hidden matrix is ​​V A , that is

[0037] For participant B, if the constructed item rating matrix is ​​R B , then the decomposed user hidden matrix is ​​U, and the item hidden matrix is ​​V B , that is

[0038] S103. Each participant performs iterative training on the user latent matrix and the respective item latent matrix locally, and constructs a matrix model based on the user latent matrix and the plurality of item latent matrices, and calculates a loss value of a loss function of the matrix model.

[0039] After obtaining the user latent matrix and multiple item latent matrices, each participant can iteratively train the user latent matrix and their respective item latent matrices locally, and build a matrix model based on the trained user latent matrix and item latent matrix, and determine whether the matrix model converges by calculating the loss value of the loss function of the matrix model.

[0040] In one embodiment, the multiple participants include a recommendation participant and other participants, the other participants are other training participants other than the recommendation participant among the multiple participants, and the multiple item latent matrices include a recommended item latent matrix and other item latent matrices. Each participant performs iterative training on the user latent matrix and the respective item latent matrix locally, including: initializing the user latent matrix and the multiple item latent matrices respectively to obtain an initialized user latent matrix, an initialized recommended item latent matrix, and an initialized other item latent matrix; sending the initialized user latent matrix to other participants, so that the other participants calculate intermediate values ​​based on the initialized other item latent matrix and the initialized user latent matrix locally, and sending the intermediate values ​​to the recommendation participant; updating the initialized user latent matrix based on the intermediate values ​​to obtain an updated user latent matrix and an updated recommended item latent matrix; sending the updated user latent matrix to other participants, so that the other participants update the initialized other item latent matrix based on the initialized user latent matrix to obtain an updated other item latent matrix.

[0041] For multiple participants participating in the training, the multiple participants can be divided into recommended participants and other participants. Each participant can be a recommended participant or other participant.

[0042] For example, when the user is a new user relative to the participant, then the participant is a recommended participant; if the user is an old user relative to the participant, then the participant is another participant.

[0043] Multiple participants are divided into recommended participants and other participants. Correspondingly, the item latent matrix corresponding to each participant also includes the recommended item latent matrix and the other item latent matrix, wherein the item latent matrix corresponding to the recommended participant is the recommended item latent matrix, and the item latent matrix corresponding to other participants is the other item latent matrix.

[0044] When iteratively training the user latent matrix and multiple item latent matrices, the user latent matrix and multiple item latent matrices are initialized respectively to obtain an initialized user latent matrix, an initialized recommended item latent matrix, and an initialized other item latent matrix. Initialization refers to randomly taking values ​​for each eigenvector in the matrix.

[0045] After initialization, the recommendation participant sends the initialized user latent matrix to other participants. After receiving the initialized user latent matrix, other participants calculate the intermediate value based on the initialized user latent matrix and other item latent matrices, and then send the obtained intermediate value to the recommendation participant.

[0046] After receiving the intermediate value, the recommendation participant updates the initialized user latent matrix based on the intermediate value to obtain an updated user latent matrix, and updates the initialized recommendation latent matrix according to the updated user latent matrix and the initialized recommended item latent matrix to obtain an updated recommended item latent matrix.

[0047] After obtaining the updated user latent matrix, the recommendation participant sends the updated user latent matrix to other participants, so that other participants can update the initialized other item latent matrix according to the user latent matrix and the initialized other item latent matrix to obtain the updated other item latent matrix.

[0048] The recommending party will then send the updated latent matrix of the recommended items to other parties, and the iterative training will be repeated until the matrix model converges.

[0049] In one embodiment, the calculating the loss value of the loss function of the matrix model includes: calculating the loss value of the loss function of the feature matrix according to the updated user latent matrix, the updated recommended item latent matrix, and the updated other item latent matrix based on the loss function formula of the feature matrix;

[0050] The loss function formula of the feature matrix is:

[0051]

[0052] Among them, L J represents the loss function of the feature matrix J; u i is the i-th row vector of the user latent matrix U, representing the eigenvector of user i; v Aj is the latent matrix V of recommended items A The j-th row vector of represents the feature vector of the j-th item in the recommended participant; v Bj is the hidden matrix V of other items B The j-th row vector of represents the feature vector of the j-th item in other participants; λ1,λ2 are regularization coefficients.

[0053] The loss value of the loss function of the matrix model is calculated according to the loss function, and whether the matrix model converges is determined according to the calculated loss value.

[0054] In one embodiment, the method includes: calculating the loss value of the loss function of the feature matrix based on the updated user latent matrix, the updated recommended item latent matrix and the updated other item latent matrix, and minimizing the loss value of the loss function using a gradient descent method.

[0055] When calculating the loss value of the loss function of the feature matrix based on updating the user latent matrix, updating the recommended item latent matrix, and updating the other item latent matrices, the gradient descent method can be used to minimize the loss value of the loss function.

[0056] When performing the tth iteration of the matrix model, the formula is as follows:

[0057]

[0058]

[0059]

[0060] in, Indicates u i is the value of the i-th row vector of the latent matrix U at the t+1th iteration training, γ is the learning rate, a ij Represents the recommended item hidden matrix V A The vector of the jth row and ith column in b ij Represents the hidden matrix V of other items B The vector with the j-th row and i-th column in .

[0061] Specifically, the recommendation participant obtains the intermediate value, and when updating the initialized user latent matrix based on the intermediate value, the above formula (1) can be used to calculate each eigenvector in the updated user latent matrix, thereby obtaining the updated user latent matrix.

[0062] When the updated user latent matrix is ​​obtained and the initialized recommended item latent matrix is ​​updated according to the updated user latent matrix and the initialized recommended item latent matrix, the above formula (2) can be used to calculate each eigenvector in the updated recommended item latent matrix, thereby obtaining the updated recommended item latent matrix.

[0063] When other participants update the initialized other item latent matrix based on the obtained updated user latent matrix and the initialized other item latent matrix, they can use the above formula (3) to calculate each eigenvector in the updated other item latent matrix, thereby obtaining the updated other item latent matrix.

[0064] In one embodiment, sending the intermediate value to the recommendation participant includes: encrypting the intermediate value and sending the encrypted intermediate value to the recommendation participant; sending the updated user latent matrix to other participants includes: encrypting the updated user latent matrix and sending the encrypted updated user latent matrix to other participants.

[0065] When sending the intermediate value and the updated user latent matrix, the intermediate value and the updated user latent matrix can be encrypted, thereby improving the security of data interaction between different participants. The encryption method can be, for example, homomorphic encryption.

[0066] S104: When the loss value of the loss function of the matrix model reaches a preset value, the matrix model is used as a recommended model to complete model training.

[0067] When the loss value of the loss function of the matrix model reaches a preset value, the matrix model training is considered completed, and the matrix model is used as a recommended model to complete the model training. The preset value can be pre-set.

[0068] The training method of the recommendation model provided in the above embodiment obtains the common local data of multiple participants, and constructs multiple item rating matrices based on the common local data, and then performs matrix decomposition on the multiple item rating matrices to obtain a user latent matrix and multiple item latent matrices; each participant performs iterative training on the user latent matrix and each item latent matrix locally, and calculates the loss value of the loss function of the matrix model. When the loss value reaches a preset value, the matrix model is used as the recommendation model to complete the model training. The matrix model is constructed by matrix decomposition to improve the recommendation accuracy of the constructed matrix model when making recommendations. Moreover, since each participant performs iterative training on the user latent matrix and the item latent matrix locally, a rating matrix with a lower degree of privacy is introduced for joint training without leaking the user's privacy information, so that a good recommendation model training is performed while greatly ensuring privacy.

[0069] See also Figure 2 , Figure 2 It is a schematic flow chart of a user recommendation method provided in an embodiment of the present application.

[0070] like Figure 2 As shown, the user recommendation method includes steps S201 to S203.

[0071] S201. Obtain user information of a new user, and based on the user information, obtain item rating information of the new user from other participants.

[0072] The user information of the new user is obtained. The user information may be information such as name. When it is determined that the user is a new user for the recommendation participants, the other participants obtain the item rating information of the new user.

[0073] S202: Determine the item rating information of the new user in the recommendation participant based on the item rating information and a pre-trained recommendation model.

[0074] The pre-trained recommendation model is trained by using the training method of the recommendation model as described above. The item rating information of the new user in the recommendation participant is determined based on the item rating information and the recommendation model.

[0075] Specifically, the item rating information and other item latent matrices in the recommendation model are used to calculate the value of the user latent matrix corresponding to the new user, and then the value of the latent matrix corresponding to the new user and the recommended item latent matrix in the recommendation model are used to calculate the item rating information of the new user in the recommendation participant.

[0076] S203: Recommend the new user according to the item rating information of the new user at the recommendation participant.

[0077] After obtaining the item rating information of the new user from the recommendation participants, corresponding items are recommended to the new user based on the item rating information.

[0078] In one embodiment, recommending the new user based on the rating information of the new user on the recommendation participant for the item includes: sorting the items based on the rating information of the new user on the recommendation participant for the item to obtain an arrangement order of the items; and selecting a target item from the items according to the arrangement order to recommend to the new user.

[0079] After obtaining the item rating information of each item from the new user in the recommendation participant, the items are sorted according to the item rating information to obtain the order of the items. When sorting, the items can be sorted in descending order according to the rating.

[0080] Then, according to the arrangement order, target items are selected from the items to be recommended to the new user. For example, the first five items in the order can be selected to be recommended to the new user.

[0081] The user recommendation method provided in the above embodiment obtains the user information of the new user, then obtains the item rating information of the new user in other participants based on the user information, and then determines the item rating information of the new user in the recommendation participants based on the item rating information and the pre-trained recommendation model, and finally recommends the new user based on the item rating information. The pre-trained recommendation model is used to achieve the purpose of recommending new users and realize cold start recommendation for new users.

[0082] See also Figure 3 , Figure 3 1 is a schematic block diagram of a training device for a recommendation model provided in an embodiment of the present application, wherein the training device for a recommendation model is used to execute the training method for the recommendation model described above, wherein the training device for a recommendation model can be configured in a server or a terminal.

[0083] The server may be an independent server or a server cluster. The terminal may be an electronic device such as a mobile phone, a tablet computer, a notebook computer, a desktop computer, a personal digital assistant, a wearable device, etc.

[0084] like Figure 3 As shown, the training device 300 for the recommendation model includes: a matrix construction module 301, a matrix decomposition module 302, a loss calculation module 303 and a model training module 304.

[0085] The matrix construction module 301 is used to obtain common local data of multiple participants, wherein the common local data includes user information and item rating information corresponding to the user information, and construct multiple item rating matrices based on the user information and the item rating information corresponding to the user information.

[0086] The matrix decomposition module 302 is used to perform matrix decomposition on the constructed multiple item rating matrices to obtain a user latent matrix and multiple item latent matrices.

[0087] The loss calculation module 303 is used for each participant to iteratively train the user latent matrix and the respective item latent matrix locally, and to construct a matrix model based on the user latent matrix and multiple item latent matrices, and to calculate the loss value of the loss function of the matrix model.

[0088] The model training module 304 is used to use the matrix model as a recommendation model to complete model training when the loss value of the loss function of the matrix model reaches a preset value.

[0089] It should be noted that technical personnel in the relevant field can clearly understand that, for the convenience and conciseness of description, the specific working process of the training device of the recommendation model and each module described above can refer to the corresponding process in the aforementioned training method embodiment of the recommendation model, and will not be repeated here.

[0090] See also Figure 4 , Figure 4 The embodiment of the present application provides a schematic block diagram of a user recommendation device, which is used to execute the aforementioned user recommendation method. The user recommendation device can be configured in a server or a terminal.

[0091] The server may be an independent server or a server cluster. The terminal may be an electronic device such as a mobile phone, a tablet computer, a notebook computer, a desktop computer, a personal digital assistant, a wearable device, etc.

[0092] like Figure 4 As shown, the user recommendation device 400 includes: an information acquisition module 401 , a score determination module 402 and a user recommendation module 403 .

[0093] The information acquisition module 401 is used to acquire the user information of the new user, and acquire the item rating information of the new user from other participants based on the user information.

[0094] The rating determination module 402 is used to determine the item rating information of the new user in the recommendation participant based on the rating information and a pre-trained recommendation model, wherein the pre-trained recommendation model is trained using the training method of the recommendation model as described above.

[0095] The user recommendation module 403 is used to recommend the new user according to the item rating information of the new user in the recommendation participant.

[0096] It should be noted that those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the user recommendation device and each module described above can refer to the corresponding processes in the aforementioned user recommendation method embodiment, and will not be repeated here.

[0097] The training device for the recommendation model and the user recommendation device described above can be implemented in the form of a computer program. The computer program can be used in Figure 5 Runs on the computer device shown.

[0098] See also Figure 5 , Figure 5 1 is a schematic block diagram of a computer device provided in an embodiment of the present application. The computer device may be a server or a terminal.

[0099] See also Figure 5 The computer device includes a processor, a memory and a network interface connected through a system bus, wherein the memory may include a non-volatile storage medium and an internal memory.

[0100] The non-volatile storage medium can store an operating system and a computer program. The computer program includes program instructions, and when the program instructions are executed, the processor can execute any one of the training methods of the recommendation model and the user recommendation method.

[0101] The processor is used to provide computing and control capabilities and support the operation of the entire computer equipment.

[0102] The internal memory provides an environment for the operation of the computer program in the non-volatile storage medium. When the computer program is executed by the processor, the processor can execute any training method of the recommendation model and the user recommendation method.

[0103] The network interface is used for network communication, such as sending assigned tasks, etc. Those skilled in the art will appreciate that Figure 5 The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.

[0104] It should be understood that the processor may be a central processing unit (CPU), and the processor may also be other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. Among them, the general-purpose processor may be a microprocessor or the processor may also be any conventional processor, etc.

[0105] In one embodiment, the processor is used to run a computer program stored in the memory to implement the following steps:

[0106] Acquire common local data of multiple participants, wherein the common local data includes user information and item rating information corresponding to the user information, and construct multiple item rating matrices based on the user information and the item rating information corresponding to the user information; perform matrix decomposition on the constructed multiple item rating matrices to obtain a user latent matrix and multiple item latent matrices; each participant performs iterative training on the user latent matrix and its own item latent matrix locally, and constructs a matrix model based on the user latent matrix and the multiple item latent matrices, and calculates the loss value of the loss function of the matrix model; when the loss value of the loss function of the matrix model reaches a preset value, use the matrix model as a recommendation model to complete the model training.

[0107] In one embodiment, the multiple participants include a recommending participant and other participants, the other participants are other training participants other than the recommending participant among the multiple participants, and the multiple item latent matrices include a recommended item latent matrix and other item latent matrices; when the processor implements the iterative training of the user latent matrix and the respective item latent matrix by each participant locally, it is used to implement:

[0108] Initialize the user latent matrix and multiple item latent matrices respectively to obtain an initialized user latent matrix, an initialized recommended item latent matrix and an initialized other item latent matrix; send the initialized user latent matrix to other participants, so that other participants can calculate intermediate values ​​locally based on the initialized other item latent matrix and the initialized user latent matrix, and send the intermediate values ​​to the recommendation participants; update the initialized user latent matrix based on the intermediate values ​​to obtain an updated user latent matrix and an updated recommended item latent matrix; send the updated user latent matrix to other participants, so that other participants can update the initialized other item latent matrix based on the initialized user latent matrix to obtain an updated other item latent matrix.

[0109] In one embodiment, the processor, when implementing the loss value of the loss function of the matrix model, is used to implement:

[0110] Based on the loss function formula of the feature matrix, the loss value of the loss function of the feature matrix is ​​calculated according to the updated user latent matrix, the updated recommended item latent matrix and the updated other item latent matrix; the loss function formula of the feature matrix is:

[0111]

[0112] Among them, L J represents the loss function of the feature matrix J; u i is the i-th row vector of the user latent matrix U, representing the eigenvector of user i; v Aj is the latent matrix V of recommended items A The j-th row vector of represents the feature vector of the j-th item in the recommended participant; v Bj is the hidden matrix V of other items B The j-th row vector of represents the feature vector of the j-th item in other participants; λ1,λ2 are regularization coefficients.

[0113] In one embodiment, the processor is configured to implement:

[0114] The loss value of the loss function of the feature matrix is ​​calculated according to the updated user latent matrix, the updated recommended item latent matrix and the updated other item latent matrix, and the loss value of the loss function is minimized by using the gradient descent method.

[0115] In one embodiment, when implementing the sending of the intermediate value to the recommendation participant, the processor is used to implement: encrypting the intermediate value and sending the encrypted intermediate value to the recommendation participant; when implementing the sending of the updated user latent matrix to other participants, the processor is used to implement: encrypting the updated user matrix and sending the encrypted updated user matrix to other participants.

[0116] In one embodiment, the processor is used to run a computer program stored in the memory to implement the following steps:

[0117] Obtain user information of a new user, and based on the user information, obtain item rating information of the new user in other participants; determine the item rating information of the new user in the recommendation participants based on the rating information and a pre-trained recommendation model; recommend the new user based on the item rating information of the new user in the recommendation participants; wherein the pre-trained recommendation model is trained using the training method of the recommendation model as described above.

[0118] A computer-readable storage medium is also provided in an embodiment of the present application, wherein the computer-readable storage medium stores a computer program, wherein the computer program includes program instructions, and the processor executes the program instructions to implement any one of the recommendation model training methods and user recommendation methods provided in the embodiments of the present application.

[0119] The computer-readable storage medium may be an internal storage unit of the computer device described in the foregoing embodiment, such as a hard disk or memory of the computer device. The computer-readable storage medium may also be an external storage device of the computer device, such as a plug-in hard disk, a smart memory card (SmartMedia Card, SMC), a secure digital (Secure Digital, SD) card, a flash card (Flash Card), etc., equipped on the computer device.

[0120] The above is only a specific implementation of the present application, but the protection scope of the present application is not limited thereto. Any technician familiar with the technical field can easily think of various equivalent modifications or replacements within the technical scope disclosed in the present application, and these modifications or replacements should be included in the protection scope of the present application. Therefore, the protection scope of the present application shall be based on the protection scope of the claims.

Claims

1. A training method for a recommendation model, characterized in that: include: Acquire common local data of multiple participants, the common local data including user information and item rating information corresponding to the user information, and construct multiple item rating matrices based on the user information and the item rating information corresponding to the user information; Performing matrix decomposition on the constructed multiple item rating matrices to obtain a user latent matrix and multiple item latent matrices; Each participant performs iterative training on the user latent matrix and the respective item latent matrix locally, builds a matrix model based on the user latent matrix and the plurality of item latent matrices, and calculates a loss value of a loss function of the matrix model; When the loss value of the loss function of the matrix model reaches a preset value, the matrix model is used as a recommended model to complete model training; The multiple participants include a recommending participant and other participants, the other participants are other training participants except the recommending participant among the multiple participants, the multiple item latent matrices include a recommended item latent matrix and other item latent matrices; each participant performs iterative training on the user latent matrix and the respective item latent matrix locally, including: Initializing the user latent matrix and the plurality of item latent matrices respectively to obtain an initialized user latent matrix, an initialized recommended item latent matrix, and an initialized other item latent matrix; Sending the initialized user latent matrix to other participants, so that other participants can calculate intermediate values ​​locally based on the initialized other item latent matrix and the initialized user latent matrix, and send the intermediate values ​​to the recommendation participant; The initialized user latent matrix is ​​updated based on the intermediate value to obtain an updated user latent matrix and an updated recommended item latent matrix; Sending the updated user latent matrix to other participants, so that other participants update the initialized other item latent matrix based on the initialized user latent matrix to obtain updated other item latent matrix; The calculating the loss value of the loss function of the matrix model includes: Based on the loss function formula of the feature matrix, the loss value of the loss function of the feature matrix is ​​calculated according to the updated user latent matrix, the updated recommended item latent matrix and the updated other item latent matrix; The loss function formula of the feature matrix is: in, Represents the feature matrix The loss function of is the user hidden matrix No. Row vector, representing user The eigenvector of is the recommended item hidden matrix No. Row vector, representing the recommended participants Feature vector of the item; Hidden matrix for other items No. Row vector, representing the Feature vector of the item; is the regularization coefficient; Represents the recommended item hidden matrix Middle Row, No. A vector of columns, Represents the hidden matrix of other items Middle Row, No. Vector of columns.

2. The training method of the recommendation model according to claim 1, characterized in that: The method comprises: The loss value of the loss function of the matrix model is calculated according to the updated user latent matrix, the updated recommended item latent matrix and the updated other item latent matrix, and the loss value of the loss function is minimized by using the gradient descent method.

3. The training method of the recommendation model according to claim 1, characterized in that: The sending the intermediate value to the recommendation participant includes: Encrypting the intermediate value and sending the encrypted intermediate value to the recommendation participant; The sending the updated user latent matrix to other participants includes: The updated user latent matrix is ​​encrypted, and the encrypted updated user matrix is ​​sent to other participants.

4. A user recommendation method, characterized in that: The method comprises: Acquire user information of the new user, and based on the user information, acquire item rating information of the new user from other participants; Determining item rating information of the new user in the recommendation participant based on the rating information and a pre-trained recommendation model; Recommending the new user according to the item rating information of the new user on the recommendation participant; The pre-trained recommendation model is trained using the recommendation model training method described in any one of claims 1 to 3.

5. A training device for a recommendation model, characterized in that: The training device of the recommendation model is used to implement the training method of the recommendation model according to any one of claims 1 to 3, comprising: A matrix construction module, used to obtain common local data of multiple participants, the common local data including user information and item rating information corresponding to the user information, and construct multiple item rating matrices based on the user information and the item rating information corresponding to the user information; A matrix decomposition module, used to perform matrix decomposition on the constructed multiple item rating matrices to obtain a user latent matrix and multiple item latent matrices; A loss calculation module, used for each participant to iteratively train the user latent matrix and the respective item latent matrix locally, and to construct a matrix model based on the user latent matrix and a plurality of item latent matrices, and to calculate the loss value of the loss function of the matrix model; The model training module is used to use the matrix model as a recommendation model to complete model training when the loss value of the loss function of the matrix model reaches a preset value.

6. A user recommendation device, characterized in that: include: An information acquisition module, used to acquire user information of a new user, and based on the user information, acquire item rating information of the new user from other participants; A rating determination module, used to determine the item rating information of the new user in the recommendation participant based on the rating information and a pre-trained recommendation model; A user recommendation module, used to recommend the new user according to the item rating information of the new user on the recommendation participant; Wherein, the pre-trained recommendation model is trained by using the training method of the recommendation model according to any one of claims 1 to 5; The multiple participants include a recommending participant and other participants, the other participants are other training participants except the recommending participant among the multiple participants, the multiple item latent matrices include a recommended item latent matrix and other item latent matrices; each participant performs iterative training on the user latent matrix and the respective item latent matrix locally, including: Initializing the user latent matrix and the plurality of item latent matrices respectively to obtain an initialized user latent matrix, an initialized recommended item latent matrix, and an initialized other item latent matrix; Sending the initialized user latent matrix to other participants, so that other participants can calculate intermediate values ​​locally based on the initialized other item latent matrix and the initialized user latent matrix, and send the intermediate values ​​to the recommendation participant; The initialized user latent matrix is ​​updated based on the intermediate value to obtain an updated user latent matrix and an updated recommended item latent matrix; Sending the updated user latent matrix to other participants, so that other participants update the initialized other item latent matrix based on the initialized user latent matrix to obtain updated other item latent matrix; The calculating the loss value of the loss function of the matrix model includes: Based on the loss function formula of the feature matrix, the loss value of the loss function of the feature matrix is ​​calculated according to the updated user latent matrix, the updated recommended item latent matrix and the updated other item latent matrix; The loss function formula of the feature matrix is: in, Represents the feature matrix The loss function of is the user hidden matrix No. Row vector, representing user The eigenvector of is the recommended item hidden matrix No. Row vector, representing the recommended participants Feature vector of the item; Hidden matrix for other items No. Row vector, representing the Feature vector of the item; is the regularization coefficient; Represents the recommended item hidden matrix Middle Row, No. A vector of columns, Represents the hidden matrix of other items Middle Row, No. Vector of columns.

7. A computer device, characterized in that: The computer device includes a memory and a processor; The memory is used to store computer programs; The processor is used to execute the computer program and implement the training method of the recommendation model according to any one of claims 1 to 3 when executing the computer program.

8. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, which, when executed by a processor, enables the processor to implement the training method for a recommendation model according to any one of claims 1 to 3.