A user-centered recommendation method and system based on local differential privacy
By working collaboratively between cloud servers and clients, and utilizing stochastic gradient descent and differential privacy gradient processing, the problem of inaccurate rating prediction in matrix factorization recommendation is solved, achieving personalized user rating prediction and privacy protection.
Patent Information
- Application Number
- CN202310260656.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-03-10
- Publication Date
- 2026-01-02
- Estimated Expiration
- 2043-03-10
AI Technical Summary
Existing recommendation methods using matrix factorization are not accurate enough in predicting ratings and fail to fully consider the different characteristics of each user.
We employ a user-centric recommendation method based on local differential privacy. Through the collaborative work of cloud servers and clients, we generate and update the item matrix and user matrix. We utilize stochastic gradient descent and differential privacy to process gradients, ensuring user privacy and security until the target convergence condition is met.
It effectively reduces the root mean square error of recommendation results, achieves more personalized rating predictions, ensures user privacy and security, and improves the accuracy and personalization of recommendations.
Smart Images

Figure CN116383488B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the field of personalized recommendation, in particular to a user-centered recommendation method and system based on local differential privacy and a computer readable storage medium. BACKGROUND
[0002] In the prior art, when the recommendation method is performed by matrix decomposition, the score predicted by the traditional formula is often not accurate enough. For example, if user A is a very demanding person, his score for each item is lower than the average score, but when the traditional formula is used for prediction, the predicted score will be higher, so when predicting A's score for other unreviewed items, his score characteristics should be considered and the predicted score should be appropriately reduced, so as to better reflect individualization. That is, when the recommendation method is performed by matrix decomposition in the prior art, the different characteristics between each user are often ignored.
[0003] Therefore, the prior art still needs to be improved and improved. SUMMARY
[0004] In view of the above defects of the prior art, the present application provides a user-centered recommendation method and system based on local differential privacy, aiming to solve the problem of inaccurate score prediction in the prior art when the recommendation method is performed by matrix decomposition.
[0005] In order to solve the above technical problems, the technical scheme adopted by the present application is as follows:
[0006] The first aspect of the present application provides a user-centered recommendation method based on local differential privacy, which comprises:
[0007] The cloud server generates an item matrix and sends the item matrix to the client, wherein the item matrix includes a plurality of item matrix vectors;
[0008] The client obtains the item matrix and a local rating dataset and generates a user matrix and a user average rating vector according to the local rating dataset, wherein the user matrix includes a plurality of user matrix vectors;
[0009] The client obtains a first gradient, a second gradient and a third gradient according to the item matrix vector, the user matrix vector and the user average rating vector;
[0010] The client updates the user matrix vector and the user average rating vector according to the first gradient and the third gradient;
[0011] The client performs differential privacy processing on the second gradient to obtain a target gradient, and sends the target gradient to the cloud server;
[0012] The cloud server obtains the target gradient, updates the item matrix according to the target gradient, and sends the updated item matrix to the client;
[0013] The client obtains the updated item matrix and re-executes the steps of obtaining the first gradient, the second gradient and the third gradient according to the item matrix vector, the user matrix vector and the user average rating vector until the target convergence condition is met;
[0014] When the target convergence condition is met, the cloud server generates a target item matrix and sends it to the client;
[0015] The client generates a target user matrix and a target user average rating vector, and obtains a predicted score of a target user according to the target item matrix, the target user matrix and the target user average rating vector, and recommends the item corresponding to the predicted score meeting the first preset condition to the target user.
[0016] The user-centered recommendation method based on local differential privacy, wherein the client obtains the first gradient, the second gradient and the third gradient according to the item matrix vector, the user matrix vector and the user average rating vector, comprises:
[0017] The first gradient, the second gradient and the third gradient are calculated according to a target loss function;
[0018] The target loss function is:
[0019]
[0020] Wherein, A is a set of ratings of all users to items, M is the number of rating data, r ui is the rating of the u-th user to the i-th item, b u is the average rating of the u-th user to all rated items, p u represents the user matrix vector corresponding to the u-th user, q i represents the item matrix vector corresponding to the i-th item, and λ is a regularization parameter.
[0021] The user-centered recommendation method based on local differential privacy, wherein the first gradient is a user matrix gradient;
[0022] The second gradient is an item matrix gradient;
[0023] The third gradient is a user rating gradient.
[0024] The user-centered recommendation method based on local differential privacy, wherein the client updates the user matrix vector and the user average rating vector according to the first gradient and the third gradient, comprising:
[0025] The client updates the user matrix vector according to the first gradient by using the method of stochastic gradient descent.
[0026] The client updates the user average rating vector according to the third gradient by using the method of stochastic gradient descent.
[0027] The user-centered recommendation method based on local differential privacy, wherein the client performs differential privacy processing on the second gradient to obtain a target gradient, comprising:
[0028] The client performs clipping on the second gradient to obtain an intermediate gradient.
[0029] The client adds Gaussian noise to the intermediate gradient to obtain the target gradient.
[0030] The user-centered recommendation method based on local differential privacy, wherein the cloud server obtains the target gradient, updates the item matrix according to the target gradient, and sends the updated item matrix to the client, comprising:
[0031] The cloud server updates the user average rating vector according to the target gradient by using the method of stochastic gradient descent.
[0032] The user-centered recommendation method based on local differential privacy, wherein the target user's predicted score is obtained according to the target item matrix, the target user matrix, and the target user average rating vector, comprising:
[0033] The client obtains the target user's predicted score for the target item according to a first formula.
[0034] The first formula is:
[0035]
[0036] wherein, is the predicted score of the u-th user for the i-th item, b u is the average score of the u-th user for all rated items, p u denotes the user matrix vector corresponding to the u-th user, q i denotes the item matrix vector corresponding to the i-th item.
[0037] In a second aspect, the present application provides a user-centered recommendation system based on local differential privacy, comprising:
[0038] a cloud server and a client;
[0039] The cloud server generates an item matrix and sends the item matrix to the client, wherein the item matrix includes a plurality of item matrix vectors.
[0040] The client acquires the item matrix and a local rating dataset and generates a user matrix and a user average rating vector based on the local rating dataset, wherein the user matrix includes a plurality of user matrix vectors.
[0041] The user-centered recommendation system based on local differential privacy, wherein the system further comprises:
[0042] The client acquires a first gradient, a second gradient and a third gradient based on the item matrix vector, the user matrix vector and the user average rating vector.
[0043] The client updates the user matrix vector and the user average rating vector based on the first gradient and the third gradient.
[0044] The client performs differential privacy processing on the second gradient to obtain a target gradient and sends the target gradient to the cloud server.
[0045] The cloud server acquires the target gradient, updates the item matrix based on the target gradient, and sends the updated item matrix to the client.
[0046] The client re-executes the step of acquiring the first gradient, the second gradient and the third gradient based on the item matrix vector, the user matrix vector and the user average rating vector until a target convergence condition is met.
[0047] When the target convergence condition is met, the cloud server generates a target item matrix and sends it to the client.
[0048] The client generates a target user matrix and a target user average rating vector, and acquires a predicted rating of a target user based on the target item matrix, the target user matrix and the target user average rating vector, and recommends an item corresponding to the predicted rating that meets a first preset condition to the target user.
[0049] In a third aspect, the present application provides a computer readable storage medium storing one or more programs, which can be executed by one or more processors to implement the steps of any of the above-mentioned user-centered recommendation method based on local differential privacy.
[0050] Compared with the prior art, the present application provides a user-centered recommendation method and system based on local differential privacy. In the user-centered recommendation method based on local differential privacy provided by the present application, first, a cloud server generates an item matrix and sends the item matrix to a client, wherein the item matrix includes a plurality of item matrix vectors; the client obtains the item matrix and a local rating dataset and generates a user matrix and a user average rating vector according to the local rating dataset, wherein the user matrix includes a plurality of user matrix vectors; then, the client obtains a first gradient, a second gradient and a third gradient according to the item matrix vector, the user matrix vector and the user average rating vector, and updates the user matrix vector and the user average rating vector according to the first gradient and the third gradient; finally, the second gradient is subjected to differential privacy processing to obtain a target gradient, and the target gradient is sent to the cloud server; the cloud server obtains the target gradient, updates the item matrix according to the target gradient, and sends the updated item matrix to the client; next, the client obtains the updated item matrix and re-executes the step of obtaining the first gradient, the second gradient and the third gradient according to the item matrix vector, the user matrix vector and the user average rating vector until a target convergence condition is met; when the target convergence condition is met, the cloud server generates a target item matrix and sends it to the client; the client generates a target user matrix and a target user average rating vector, and obtains a predicted rating of a target user according to the target item matrix, the target user matrix and the target user average rating vector, and recommends an item corresponding to the predicted rating that meets a first preset condition to the target user. By introducing user average rating data into the matrix decomposition model, the present application effectively reduces the root mean square error of the recommendation result, more personalized prediction of each user's rating, makes the rating prediction more accurate, and truly realizes a user-centered recommendation method. BRIEF DESCRIPTION OF DRAWINGS
[0051] Figure 1 A flowchart of an embodiment of the user-centered recommendation method based on local differential privacy provided by the present application;
[0052] Figure 2 A federated matrix decomposition model diagram of an embodiment of the user-centered recommendation method based on local differential privacy provided by the present application;
[0053] Figure 3 A structural schematic diagram of an embodiment of a user-centered recommendation system based on local differential privacy provided by the present application. DETAILED DESCRIPTION
[0054] To make the objectives, technical solutions and effects of the present application clearer and more explicit, the present application is further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and do not limit the present application.
[0055] Embodiment one
[0056] As shown in the figure, one embodiment of the user-centered recommendation method based on local differential privacy includes the following steps: Figure 1
[0057] S100, the cloud server generates a project matrix and sends the project matrix to the client, wherein the project matrix includes a plurality of project matrix vectors.
[0058] In this embodiment, matrix decomposition (Matrix Factorization) is used as the basic recommendation method, a user-centered federated matrix decomposition model is realized in combination with a federated learning (Federated Learning) framework, and differential privacy (Differential Privacy) is cited to protect the privacy information of users. Specifically, the user-centered federated matrix decomposition model based on local differential privacy used in this embodiment includes a server and a client, as shown in the figure, in this embodiment, the server is the cloud server, and the client is a plurality of clients. Figure 2
[0059] Specifically, the cloud server generates the project matrix according to the existing rating data of a plurality of projects and sends the project matrix to the client, wherein the project matrix includes a plurality of project matrix vectors, and each project matrix vector is a set of all ratings corresponding to one project.
[0060] S200, the client obtains the project matrix and the local rating data set and generates a user matrix and a user average rating vector according to the local rating data set, wherein the user matrix includes a plurality of user matrix vectors.
[0061] Specifically, the client generates the user matrix according to existing rating data of a plurality of users, and calculates a user average rating vector of each user according to the user matrix, wherein the user matrix comprises a plurality of user matrix vectors, and each user matrix vector corresponds to all rating sets evaluated by a user.
[0062] S300, the client obtains a first gradient, a second gradient and a third gradient according to the item matrix vector, the user matrix vector and the user average rating vector.
[0063] The client obtains a first gradient, a second gradient and a third gradient according to the item matrix vector, the user matrix vector and the user average rating vector, comprising:
[0064] The first gradient, the second gradient and the third gradient are calculated according to a target loss function;
[0065] The target loss function is:
[0066]
[0067] Wherein, A is a set of ratings of all users to items, M is the number of rating data, r ui is the rating of the u-th user to the i-th item, b u is the average rating of the u-th user to all rated items, p u represents the user matrix vector corresponding to the u-th user, q i represents the item matrix vector corresponding to the i-th item, and λ is a regularization parameter.
[0068] Specifically, in this embodiment, the client obtains the predicted rating of the target user to the target item according to a first formula;
[0069] The first formula is:
[0070]
[0071] Wherein, is the predicted rating of the u-th user to the i-th item, b u is the average rating of the u-th user to all rated items, p u represents the user matrix vector corresponding to the u-th user, q i represents the item matrix vector corresponding to the i-th item.
[0072] Since the most important problem in matrix decomposition algorithm is to obtain the matrix vector corresponding to each user and each item, and the average rating of each user, in this embodiment, the target loss function of the federated matrix decomposition model is defined as:
[0073]
[0074] wherein A represents a set of all ratings of users u to each item i, M represents the total number of rating data, and λ represents a regularization parameter. The former part of the target loss function is the gap between the predicted score and the actual rating, which determines the bias of the federated matrix factorization model; the latter part is a regularization term, which prevents overfitting and controls the variance of the federated matrix factorization model. In this embodiment, a stochastic gradient descent method is used to find the parameters that minimize the target loss according to the target loss function combined with the characteristics of federated learning.
[0075] Specifically, the first gradient, the second gradient and the third gradient are calculated, wherein:
[0076] S310, the first gradient is a user matrix gradient;
[0077] S320, the second gradient is an item matrix gradient;
[0078] S330, the third gradient is a user rating gradient.
[0079] In this embodiment, the first gradient is a user matrix gradient The first gradient is calculated according to a second formula;
[0080] The second formula is:
[0081]
[0082] wherein e ui represents the error value between the true value and the predicted value, e ui = ui -u-uq i T .
[0083] The second gradient is an item matrix gradient The second gradient is calculated according to a third formula;
[0084] The third formula is:
[0085]
[0086] wherein LDP is the local differential privacy corresponding to the client, which is used to add noise to the item matrix gradient.
[0087] The second gradient is an item matrix gradient The third gradient is calculated according to a fourth formula;
[0088] The fourth formula is:
[0089]
[0090] S400, the client updates the user matrix vector and the user average rating vector according to the first gradient and the third gradient.
[0091] The client updates the user matrix vector and the user average rating vector according to the first gradient and the third gradient, including:
[0092] The client uses the method of stochastic gradient descent to update the user matrix vector according to the first gradient;
[0093] The client uses the method of stochastic gradient descent to update the user average rating vector according to the third gradient. Specifically, the fifth formula is used to update the user matrix vector according to the first gradient;
[0094] The fifth formula is:
[0095]
[0096] Wherein, t represents the training round, and γ represents the learning rate.
[0097] The sixth formula is used to update the user average rating vector according to the third gradient;
[0098] The sixth formula is:
[0099]
[0100] S500, the client performs differential privacy processing on the second gradient to obtain a target gradient, and sends the target gradient to the cloud server.
[0101] In this embodiment, only the second gradient needs to be uploaded to the cloud server, and the first gradient and the third gradient only participate in calculation locally in the client, so that only the second gradient is disturbed by using the Gaussian mechanism to effectively prevent privacy leakage.
[0102] Specifically, in this embodiment, the idea of differential privacy is applied to gradient sharing to reduce privacy budget and improve calculation efficiency. In this embodiment, Gaussian noise is introduced into the second gradient. In order to meet the requirements of differential privacy calculation, the second gradient is first clipped and then Gaussian noise is added.
[0103] Specifically, the client performs differential privacy processing on the second gradient to obtain a target gradient, including:
[0104] S510, the client clips the second gradient to obtain an intermediate gradient.
[0105] Specifically, the eighth formula is used to obtain the intermediate gradient.
[0106] The eighth formula is:
[0107]
[0108] wherein, is the intermediate gradient, C represents an upper limit value of the maximum gradient,
[0109] S520, the client adds Gaussian noise to the intermediate gradient to obtain the target gradient.
[0110] Specifically, the ninth formula is used to obtain the intermediate gradient.
[0111] The ninth formula is:
[0112]
[0113] wherein, is the target gradient, ε represents a privacy budget parameter, σ represents a scale of random noise, and N(0, σ 2 C 2 represents random noise satisfying a Gaussian probability distribution. Since t is known at all times, when satisfies which satisfies (ε, δ) differential privacy. Wherein, ε represents a privacy budget parameter, and δ represents an acceptable privacy leakage probability.
[0114] In the embodiment, a federated learning framework is used to achieve a new paradigm of data usability invisibility and data immobility model mobility, so that users can train a recommendation model locally, and only need to upload gradient information to coordinate all participants to complete training of a final model. That is, the user matrix vector and the item matrix vector, and the update of the user average rating vector can be iteratively updated locally at each client. In addition, a local differential privacy mechanism is added to add noise in the process of sharing the gradient, further preventing the occurrence of privacy leakage problems.
[0115] Then, the client sends the obtained target gradient to the cloud server.
[0116] S600, the cloud server obtains the target gradient, updates the item matrix according to the target gradient, and sends the updated item matrix to the client.
[0117] The cloud server obtains the target gradients sent by the plurality of clients, updates the item matrix according to the plurality of target gradients, and sends the updated item matrix to the plurality of clients.
[0118] The cloud server obtains the target gradients, updates the item matrix according to the target gradients, and sends the updated item matrix to the client, including:
[0119] The cloud server uses a stochastic gradient descent method to update the user average rating vector according to the target gradient.
[0120] Specifically, the cloud server uses a seventh formula to update the item matrix vector according to the second gradient;
[0121] The seventh formula is:
[0122]
[0123] S700, the client obtains the updated item matrix and re-executes the steps of obtaining the first gradient, the second gradient and the third gradient according to the item matrix vector, the user matrix vector and the user average rating vector until the target convergence condition is met.
[0124] The target convergence condition is that the root mean square error value of the predicted score of the recommendation model is between 0.8 and 1.2.
[0125] Specifically, through continuous iteration, it is known from experimental results that when the learning rate is 0.005 and the training round is 200 rounds, the root mean square error of the predicted score of the federated matrix decomposition model can reach the convergence condition, and the convergence condition is that the root mean square error value of the predicted score is between 0.8 and 1.2.
[0126] In this embodiment, the root mean square error formula is:
[0127]
[0128] S800, when the target convergence condition is met, the cloud server generates a target item matrix and sends it to the client.
[0129] When the target convergence condition is met, stop iteration, the cloud server generates the target item matrix according to the last received target gradient, and distributes the target item matrix to the plurality of clients.
[0130] S900, the client generates a target user matrix and a target user average rating vector, and obtains a predicted score of a target user according to the target item matrix, the target user matrix and the target user average rating vector, and recommends an item corresponding to the predicted score meeting a first preset condition to the target user.
[0131] The obtaining of the predicted score of the target user according to the target item matrix, the target user matrix and the target user average rating vector comprises:
[0132] The client obtains the predicted score of the target user to the target item according to a first formula.
[0133] The first formula is:
[0134]
[0135] wherein, is a predicted score of a u-th user to an i-th item, b u is an average score of the u-th user to all scored items, p u denotes a user matrix vector corresponding to the u-th user, q i denotes an item matrix vector corresponding to the i-th item.
[0136] The client generates the target user matrix and the target user average rating vector according to the user matrix and the user average rating vector updated in the last iteration, and then obtains a predicted score of a target user according to the target item matrix, the target user matrix and the target user average rating vector, and recommends an item corresponding to the predicted score meeting a first preset condition to the target user. The first preset condition is to recommend the top preset number of items with the highest predicted scores of the target user to all un-scored items to the target user. The preset number is set according to different situations.
[0137] The embodiment takes matrix decomposition as a basic recommendation method, realizes a user-centered federated matrix decomposition model in combination with a federated learning framework, and references differential privacy to protect the privacy information of users. The user preference information is ingeniously introduced into the matrix decomposition method, so that the model can more personalized recommend the content interested by the user.
[0138] Specifically, the user average rating data is introduced into the matrix decomposition model in terms of recommendation accuracy, effectively reducing the root mean square error (RMSE) of the recommendation result, enabling the model to more personalized predict each user's rating, and truly realize the user-centered recommendation method
[0139] Secondly, in terms of security, the federated learning framework is adopted, achieving a new paradigm of data available invisible and data static model dynamic, so that users can train the recommendation model locally, and only need to upload gradient information to coordinate all participants to complete the training of the final model. In addition, the local differential privacy mechanism is added to add noise in the process of sharing gradient, further preventing the occurrence of privacy leakage problem.
[0140] Finally, in terms of efficiency, the previous cryptography method is changed, greatly reducing the computational complexity and computational overhead, and avoiding the method of perturbing each user's rating, reducing the privacy budget, and laying the foundation for its deployment in the user end in reality.
[0141] To sum up, the embodiment provides a user-centered recommendation method based on local differential privacy. In the method, first, a cloud server generates an item matrix and sends the item matrix to a client, wherein the item matrix includes a plurality of item matrix vectors; the client acquires the item matrix and a local rating dataset and generates a user matrix and a user average rating vector according to the local rating dataset, wherein the user matrix includes a plurality of user matrix vectors; then, the client acquires a first gradient, a second gradient and a third gradient according to the item matrix vector, the user matrix vector and the user average rating vector, and updates the user matrix vector and the user average rating vector according to the first gradient and the third gradient; finally, the second gradient is subjected to differential privacy processing to obtain a target gradient, and the target gradient is sent to the cloud server; the cloud server acquires the target gradient, updates the item matrix according to the target gradient, and sends the updated item matrix to the client; next, the client acquires the updated item matrix and re-executes the step of acquiring the first gradient, the second gradient and the third gradient according to the item matrix vector, the user matrix vector and the user average rating vector until a target convergence condition is met; when the target convergence condition is met, the cloud server generates a target item matrix and sends it to the client; the client generates a target user matrix and a target user average rating vector, and acquires a predicted rating of a target user according to the target item matrix, the target user matrix and the target user average rating vector, and recommends an item corresponding to the predicted rating that meets a first preset condition to the target user. The example of the application effectively reduces the root mean square error of the recommendation result by introducing user average rating data into the matrix decomposition model, more personalized prediction of the rating of each user, more accurate rating prediction, and truly realizes a user-centered recommendation method.
[0142] It should be understood that although each step in the flowchart shown in the drawings of the present application specification is shown in sequence according to the arrow, these steps are not necessarily executed in sequence according to the arrow. Unless otherwise specified herein, the execution of these steps is not strictly limited in sequence, and these steps can be executed in other sequences. Moreover, at least part of the steps in the flowchart can include a plurality of sub-steps or stages, which are not necessarily executed at the same time, but can be executed at different times, and the execution sequence of these sub-steps or stages is not necessarily sequential, but can be executed in rotation or alternation with at least part of other steps or sub-steps or stages of other steps.
[0143] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program. The computer program can be stored in a non-volatile computer readable computer readable storage medium, and when the computer program is executed, the processes of the above-mentioned embodiments of each method can be included. Any reference to memory, storage, database or other medium used in each embodiment provided by the present application can include non-volatile and / or volatile memory. Non-volatile memory can include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM) or flash memory. Volatile memory can include random access memory (RAM) or external cache memory. As an illustration but not limitation, RAM is available in various forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDR SDRAM), enhanced SDRAM (ESDRAM), synchronous link (Synchlink) DRAM (SLDRAM), memory bus (Rambus) direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM), etc.
[0144] Embodiment two
[0145] Based on the above-mentioned embodiments, the present application also correspondingly provides a user-centered recommendation system based on local differential privacy, as shown in Figure 3 The user-centered recommendation system based on local differential privacy comprises:
[0146] A cloud server and a client, as described in embodiment one;
[0147] The cloud server generates an item matrix and sends the item matrix to the client, wherein the item matrix comprises a plurality of item matrix vectors, as described in embodiment one;
[0148] The client acquires the item matrix and a local rating dataset and generates a user matrix and a user average rating vector according to the local rating dataset, wherein the user matrix comprises a plurality of user matrix vectors, as described in embodiment one;
[0149] The system further comprises:
[0150] The client acquires a first gradient, a second gradient and a third gradient according to the item matrix vector, the user matrix vector and the user average rating vector, as described in embodiment one;
[0151] The client updates the user matrix vector and the user average rating vector according to the first gradient and the third gradient, as described in detail in Embodiment One.
[0152] The client performs differential privacy processing on the second gradient to obtain a target gradient, and sends the target gradient to the cloud server, as described in detail in Embodiment One.
[0153] The cloud server obtains the target gradient, updates the item matrix according to the target gradient, and sends the updated item matrix to the client, as described in detail in Embodiment One.
[0154] The client re-executes the steps of obtaining the first gradient, the second gradient and the third gradient according to the item matrix vector, the user matrix vector and the user average rating vector until the target convergence condition is met, as described in detail in Embodiment One.
[0155] When the target convergence condition is met, the cloud server generates a target item matrix and sends it to the client, as described in detail in Embodiment One.
[0156] The client generates a target user matrix and a target user average rating vector, and obtains a predicted score of a target user according to the target item matrix, the target user matrix and the target user average rating vector, and recommends the item corresponding to the predicted score that meets the first preset condition to the target user, as described in detail in Embodiment One.
[0157] Embodiment Three
[0158] The application also provides a computer-readable storage medium, wherein one or more programs are stored, and the one or more programs can be executed by one or more processors to implement the steps of a user-centered recommendation method based on local differential privacy as described above.
[0159] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present application, and not to limit them; although the present application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that they can still modify the technical solutions recorded in the foregoing embodiments, or make equivalent replacements for some technical features; and these modifications or replacements do not make the essence of the corresponding technical solutions deviate from the spirit and scope of the technical solutions of the embodiments of the present application.
Claims
1. A user-centric recommendation method based on local differential privacy, characterized in that, The method comprises: The cloud server generates a project matrix and sends the project matrix to the client, wherein the project matrix comprises a plurality of project matrix vectors; The client obtains the project matrix and a local rating dataset, and generates a user matrix and a user average rating vector according to the local rating dataset, wherein the user matrix comprises a plurality of user matrix vectors; The client obtains a first gradient, a second gradient and a third gradient according to the project matrix vector, the user matrix vector and the user average rating vector; The client updates the user matrix vector and the user average rating vector according to the first gradient and the third gradient; The client performs differential privacy processing on the second gradient to obtain a target gradient, and sends the target gradient to the cloud server; The cloud server obtains the target gradient, updates the project matrix according to the target gradient, and sends the updated project matrix to the client; The client obtains the updated project matrix and re-executes the step of obtaining the first gradient, the second gradient and the third gradient according to the project matrix vector, the user matrix vector and the user average rating vector until a target convergence condition is met; When the target convergence condition is met, the cloud server generates a target project matrix and sends it to the client; The client generates a target user matrix and a target user average rating vector, and obtains a predicted rating of a target user according to the target project matrix, the target user matrix and the target user average rating vector, and recommends the project corresponding to the predicted rating that meets a first preset condition to the target user; The first gradient is a user matrix gradient; The second gradient is a project matrix gradient; The third gradient is a user rating gradient.
2. The user-centric recommendation method based on local differential privacy according to claim 1, characterized in that, The client obtains a first gradient, a second gradient and a third gradient according to the project matrix vector, the user matrix vector and the user average rating vector, comprising: The first gradient, the second gradient and the third gradient are calculated according to a target loss function; The target loss function is: in, A It is a collection of all user ratings for the project. M For the number of rating data, For the first u The user on the first i The rating of each item For the first u The average score of each user for all rated items. Indicates the first u The user matrix vector corresponding to each user. Indicates the first i The project matrix vector corresponding to each project λ This is the regularization parameter.
3. The user-centric recommendation method based on local differential privacy according to claim 1, characterized in that, The client updates the user matrix vector and the user average rating vector according to the first gradient and the third gradient, comprising: The client updates the user matrix vector according to the first gradient using a stochastic gradient descent method; The client updates the user average rating vector according to the third gradient using a stochastic gradient descent method.
4. The user-centric recommendation method based on local differential privacy according to claim 1, characterized in that, The client performs differential privacy processing on the second gradient to obtain a target gradient, comprising: The client clips the second gradient to obtain an intermediate gradient; The client adds Gaussian noise to the intermediate gradient to obtain the target gradient.
5. The user-centric recommendation method based on local differential privacy according to claim 1, characterized in that, The cloud server obtains the target gradient, updates the project matrix according to the target gradient, and sends the updated project matrix to the client, comprising: The cloud server updates the user average rating vector according to the target gradient using a stochastic gradient descent method.
6. The user-centric recommendation method based on local differential privacy according to claim 1, characterized in that, The method further includes: The client obtains the predicted score of the target user for the target item according to a first formula; The first formula is: wherein, is the predicted rating of the u th user for the i th item, is the average rating of the u th user for all rated items, denotes the user matrix vector corresponding to the u th user, denotes the item matrix vector corresponding to the i th item.
7. A user-centric recommendation system based on local differential privacy, characterized in that, The system includes: A cloud server and a client; The cloud server generates an item matrix and sends the item matrix to the client, wherein the item matrix includes a plurality of item matrix vectors; The client obtains the item matrix and a local rating dataset and generates a user matrix and a user average rating vector according to the local rating dataset, wherein the user matrix includes a plurality of user matrix vectors; The client obtains a first gradient, a second gradient and a third gradient according to the item matrix vector, the user matrix vector and the user average rating vector; The client updates the user matrix vector and the user average rating vector according to the first gradient and the third gradient; The client performs differential privacy processing on the second gradient to obtain a target gradient and sends the target gradient to the cloud server; The cloud server obtains the target gradient, updates the item matrix according to the target gradient, and sends the updated item matrix to the client; The client re-executes the step of obtaining the first gradient, the second gradient and the third gradient according to the item matrix vector, the user matrix vector and the user average rating vector until a target convergence condition is met; When the target convergence condition is met, the cloud server generates a target item matrix and sends the target item matrix to the client; The client generates a target user matrix and a target user average rating vector, obtains a predicted score of a target user according to the target item matrix, the target user matrix and the target user average rating vector, and recommends an item corresponding to the predicted score that meets a first preset condition to the target user; The first gradient is a user matrix gradient; The second gradient is an item matrix gradient; The third gradient is a user rating gradient.
8. A computer-readable storage medium, characterized in that, The computer readable storage medium stores one or more programs that can be executed by one or more processors to implement the steps of the user-centered recommendation method based on local differential privacy according to any one of claims 1-6.
Citation Information
Patent Citations
Distributed privacy protection learning recommendation method, equipment and learning system
CN113836584A
Method and system for providing item recommendations in a privacy-enhanced manner
US20170091824A1