Personalized item recommendation method based on federated learning and similarity ciphertext computation

By employing an orthogonal matrix-based similarity ciphertext calculation algorithm and federated learning, the problems of privacy leakage and computational burden in recommender systems are solved, achieving efficient and secure personalized item recommendations and improving recommendation accuracy and efficiency.

CN115659000BActive Publication Date: 2025-10-31JINAN UNIVERSITY
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202210972652.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-08-15
Publication Date
2025-10-31
Estimated Expiration
2042-08-15

AI Technical Summary

Technical Problem

Existing recommendation systems pose a risk of privacy breaches in protecting user privacy, and existing solutions have an excessive computational burden when calculating similarity, which affects user experience.

Method used

We design a similarity ciphertext calculation algorithm based on orthogonal matrices, combined with federated learning. By encrypting user needs and project attribute information, we use orthogonal matrices for encryption operations, add noise to protect privacy, and perform collaborative recommendations between cloud servers and recommendation agents.

Benefits of technology

It achieves the goal of protecting user and recommendation agent privacy while reducing computational overhead, improving recommendation accuracy and efficiency, and adapting to collaborative recommendations from multiple recommendation agents.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115659000B_ABST
    Figure CN115659000B_ABST
Patent Text Reader

Abstract

This invention proposes a personalized item recommendation method based on federated learning and encrypted similarity computation, where items include movies, music, books, and goods. First, this invention designs an encrypted similarity computation algorithm based on orthogonal matrices. This algorithm can encryptedly calculate the similarity between user needs and item attributes while reducing computational overhead. Building upon the encrypted similarity computation algorithm based on orthogonal matrices, this invention also incorporates a federated learning framework to construct an efficient recommendation method. This invention can effectively improve the accuracy of recommendations while protecting the privacy of both users and recommendation agents. Furthermore, selecting high-performing agents based on reliability scores to participate in federated recommendations further improves recommendation accuracy. Under a defined threat model, it is proven that this method can meet the privacy requirements of both users and agents. Experiments show that compared with existing solutions, this invention has better security, accuracy, and efficiency.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The technical field of this invention is the research of privacy-preserving recommendation mechanisms. More specifically, this invention is an efficient personalized item recommendation method based on federated learning, similarity-based encrypted computation, and federated learning, wherein the items include movies, music, books, and goods. Background Technology

[0002] With the rise of big data, information overload has led to people receiving more and more useless information. As a result, recommender systems have gradually become popular. The purpose of recommender systems is to provide users with personalized online product or service recommendations. Recommender systems have become an important way to solve the problem of information overload, bringing both opportunities and challenges to education, healthcare, and other industries.

[0003] However, while recommender systems bring convenience, current systems pose many potential risks, with privacy disclosure being a primary concern. Generally, a recommender system consists of two parts: a recommender server and users. To obtain a better recommender model, traditional recommender systems use a centralized architecture, typically collecting a large amount of feedback information, such as user preferences. However, this information is often sensitive to users and can lead to serious privacy and security risks: users' raw data may be leaked from feedback information from certain programs. For example, under certain conditions, a recommender system can infer private information (such as age, income, medical records, etc.) simply by obtaining a user's movie viewing records. Furthermore, recommender systems can also collect users' personal data and share it with third parties for profit. The consequences of such misuse are unimaginable. Therefore, people are increasingly concerned about their data privacy and want their private information to remain hidden from internet applications. Existing research offers many methods to protect data privacy, such as anonymity, differential privacy, homomorphic encryption, and federated learning. Federated learning is a popular tool for reducing privacy risks; therefore, it is gaining increasing attention. In 2021, Zhou et al. proposed a federated learning-based recommendation framework in their paper "A Privacy-Preserving Distributed Contextual Federated Online Learning Framework with Big Data Support in Social Recommender Systems." This scheme defines multiple collaborative recommendation agents and uses a federated learning framework to protect user data privacy and improve the reliability of recommended items. However, in this scheme's system model, the cloud setting is completely trusted, which is difficult to achieve in practice. Furthermore, all records are stored in plaintext in the cloud, thus the risk of privacy breaches remains.

[0004] In other aspects, the concept of similarity is often introduced to obtain better recommendation results. Generally, to ensure the accuracy of recommended items, many recommendation systems need to calculate two parameters: the similarity between the user's needs and the attributes of the recommended items, and the user's evaluation of the recommended items. For the former, a higher similarity means that the item will be more suitable for the user's needs. For the latter, it means that the item will have a higher recommendation priority. After receiving the recommended items, the user will evaluate the recommended items, i.e., submit feedback scores. The recommendation system will collect these scores and calculate the reliability of the recommendation agent based on the evaluation results. Obviously, under the current recommendation system, protecting user privacy is crucial. When users submit needs or estimates, they want their information to be protected. This is because user needs and evaluations are often related to information privacy. To address these issues, some feasible solutions have been proposed. In 2021, Zhang et al. proposed using the BGN cryptosystem to protect user privacy in the recommendation process in the paper "A privacy-preserving optimization of neighborhood-based recommendation formedical-aided diagnosis and treatment," utilizing homomorphic properties to calculate the similarity between two users in the ciphertext domain. However, this scheme uses bilinear pairing calculations, which imposes a heavy computational burden on users. Summary of the Invention

[0005] The purpose of this invention is to address the aforementioned deficiencies in the prior art and provide a personalized item recommendation method based on similarity ciphertext calculation and federated learning. This invention first designs a similarity ciphertext calculation algorithm based on orthogonal matrices. Based on this, it designs an efficient personalized item recommendation method based on similarity ciphertext calculation and federated learning, achieving efficient personalized item recommendation functionality while protecting data privacy. The items include movies, music, books, and goods.

[0006] The objective of this invention can be achieved by adopting the following technical solutions:

[0007] A personalized item recommendation method based on federated learning and similarity-based encrypted computation, wherein the items include movies, music, books, and goods, and the item recommendation method includes the following steps:

[0008] S1. System Initialization: Trusted Center (TA) becomes the Recommendation Agent (Agen) i User u i,j The key is generated and distributed by the cloud server. Assume there are N referral agents, each with M users and n items, and the i-th referral agent is denoted as Agen. iRecommended agent for Agen i The j-th user is represented by u i,j And satisfying 1≤i≤N, 1≤j≤M; Recommended Agent Agen i The i′th item is denoted as I i,i′ And satisfying 1≤i≤N, 1≤i′≤n; the Trusted Center (TA) first runs the key generation algorithm SOMC.KeyGen(p), where p is the matrix dimension, to obtain the first key K for implementing the encryption function. A Second key K s,1 K s,2 , ..., K s,N The third key K1, K2, ..., K N The fourth key L and the fifth keys J1, J2, ..., J N Subsequently, the Trusted Center (TA) will... A K i K s,i Send to the corresponding referral agent Agen i ; K s,1 K s,2 , ..., K s,N Send L to the cloud server; send the key J i Send to the corresponding user u i,1 u i,2 , ..., u i,M The Trusted Center (TA) recommends agents Agen1, Agen2, ..., Agen. N Generate identity identifiers ID1, ID2, ..., ID N ; Give each project I i,i′ Generate the corresponding identity identifier Iid i,i′ The Trusted Center (TA) will recommend agents for Agen1, Agen2, ..., Agen. N Reliability scores RES1, RES2, ..., RES N Initialize to 0, and RES1, RES2, ..., RES N The number of updates: count1, count2, ..., count N Initialize to 0;

[0009] S2, Data Encryption: For each project I i,i′ The attribute information is represented by a p-dimensional vector. It means that b ii′,1 b ii′,2 , ..., b ii′,p Indicates Project I i,i′ The 1st, 2nd, ..., pth attribute values, symbol " " represents the transpose operation; each recommender agent Agen i Run encryption algorithm Output encryption result Uploaded and stored on a cloud server;

[0010] S3, Project Recommendation: For each user... i,j Demand information is represented by a p-dimensional vector. It means that a ij,1 a ij,2 , ..., a ij,p Indicates user u i,j The 1st, 2nd, ..., pth attribute values ​​of the requirement, user u i,j Run encryption algorithm Output encryption result Then user u i,j Output results Adding noise to obtain Subsequently, user u i,j The demand vector for encryption and noise addition Send to the recommending agent Agen i Through the referral agent Agen i Interact with cloud servers to execute project recommendation algorithms. W i , Get the recommended project I opt and the corresponding identity identifier Iid opt Send to user u i,j ,in User u i,j The encryption and noise-adding requirement vector, It is recommended to use Agen as an agent. i Project attribute encrypted dataset, W i It is recommended to use Agen as an agent. i The recommendation weight matrix, {RES i Let {i = 1, 2, ..., N} be the reliability score dataset for each recommendation agent, and L be the private key of the cloud server. These are the first and second threshold values ​​for selecting a recommending agent;

[0011] S4. Update reliability score: for each user u i,j After receiving the recommendation results, a rating matrix R is generated. i,j User u i,j To the rating matrix R i,j Adding noise to obtain And generate a rating identifier vector. And run the encryption algorithm Obtain the encryption and noise-increasing scoring matrix R′ i,j ,calculate The symbol “·” represents multiplication; subsequently, user u i,j Will Send to the recommending agent Agen i ; through referral agent Agen i Interact with the cloud server to execute and update the reliability score algorithm. Update Recommended Agent Agen i The reliability score, of which It is recommended to use Agen as an agent. i All encrypted feedback received, F i It is for recommending agents Agen i The collection of users who have provided feedback, RES i It is recommended to use Agen as an agent. i The reliability score, count i It is recommended to use Agen as an agent. i Reliability score RES i The number of times it is updated.

[0012] Furthermore, in step S1, the key algorithm SOMC.KeyGen(p) takes an input matrix dimension of p, and the trust center TA randomly generates N+2 p×p orthogonal matrices, denoted as K. A L, K s,1 K s,2 , ..., K s,N Then, K1, K2, ..., K are generated according to the following formula. N and J1, J2, ..., J N :K i =K A ·K s,i i = 1, 2, ..., N; J i =K i ·L, i = 1, 2, ..., N. Using an orthogonal matrix as the key allows multiple plaintexts to be processed simultaneously in a single operation. Furthermore, orthogonal matrices possess the following properties: Assuming matrix P is an orthogonal matrix, then it satisfies... Where E represents the identity matrix, symbol " The symbol "" indicates the transpose operation, and the symbol "-1" indicates the matrix inversion operation, that is, the inverse of an orthogonal matrix is ​​the transpose of the orthogonal matrix.

[0013] Furthermore, in step S2, the encryption algorithm SOMC.Enc(SK, M) is input with private key SK and plaintext M, where private key SK is K. i or J i The plaintext M is a p×p matrix or a p-dimensional vector. The calculation... Among them, the symbol " " indicates the transpose operation, outputting the ciphertext CSK In this encryption method, it possesses the properties of additive homomorphic encryption. Decryption only requires finding the inverse of the key matrix. The orthogonal matrix property makes decryption more convenient when the key is known, but finding the inverse matrix is ​​extremely difficult without knowing the key matrix, thus ensuring data security.

[0014] Furthermore, in step S3, the encryption algorithm... Output results Adding noise to obtain in

[0015]

[0016] a′ ij,1 ,a′ ij,2 , ..., a′ ij,p Indicates a ij,1 a ij,2 , ..., a ij,p The encrypted result, user u i,j In a′ ij,1 ,a′ ij,2 , ..., a′ ij,p Selected from A set Sub is composed of elements, where p represents the dimension of the vector; symbol This indicates the floor function; subsequently, user u i,j Calculate the result after adding noise:

[0017]

[0018] Where, a″ ij,1 ,a″ ij,2 , ..., a″ ij,p Indicates a′ ij,1 ,a′ ij,2 , ..., a′ ij,p After adding noise, Lap(·) represents the Laplace function, and b represents the Laplace parameter. In this step, noise is added to the encrypted result to further protect privacy. Without noise, assuming an adversary (recommended proxy or cloud server) possesses the encrypted matrix key, the randomness of the user's choice of noisy elements and the characteristics of the Laplace function prevent the adversary from obtaining sensitive information without affecting the subsequent similarity calculation.

[0019] Furthermore, the item recommendation algorithm in step S3

[0020]

[0021] The implementation process is as follows:

[0022] S31, When recommending agent Agen i Received from user u i,j Encryption requirements Then, calculate the encrypted recommendation weight matrix result W′ according to the following formula. i :W′ i =SOMC.Enc(K i W i ), where K i Recommended Agent Agen i W's private key i Let W be a diagonal matrix. i =diag(w i,1 w i,2 , ..., w i,p ), where w i,1 w i,2 , ..., w i,p The weight parameter represents the attribute vector of the recommended items. The influence factor of the corresponding attribute, followed by the recommendation agent Agen. i Will Send to the cloud server and request collaborative recommendations; in this step, recommend the agent Agen. i Encrypting one's own recommendation weight matrix is ​​to prevent the cloud server from obtaining the detailed parameter information in the recommendation weight matrix, so as to allow the cloud server to use it but not to let the cloud server know the details;

[0023] S32, Cloud server receives recommended agent Agen i Sent Then, determine the recommended agent Agen. i Does the reliability score satisfy the threshold value r, i.e.: RES i If the condition is met (>r), the cloud server will initiate a federated collaboration recommendation and execute step S33; otherwise, the cloud server will only use the recommendation agent Agen. i The recommendation weight matrix is ​​used for independent recommendation, let W′ rec =W′ i , where W′ rec To calculate the encrypted form of the recommendation weight matrix of the recommendation results, step S34 is executed; in this step, the cloud server needs to determine the recommendation agent Agen. i Whether a recommendation agent is qualified to make independent recommendations depends on its reliability score exceeding a threshold r. If such a score exceeds a threshold r, it indicates that the recommendation agent's past recommendations have received high user ratings, thus qualifying it for independent recommendations. In other words, only the recommendation agent Agen is used. i The recommendation weight matrix; conversely, the cloud server determines the recommendation agent Agen.i It does not have the qualification to make recommendations on its own. It needs to make recommendations in a federated manner with other recommendation agents to generate more user-satisfying recommendations, making the recommendations more credible and user-satisfying.

[0024] S33, The cloud server first assigns all reliability scores {RES} i Sort the candidates (i = 1, 2, ..., N) in descending order and select the j-th highest reliability scores to form a set AC. i And it meets the threshold condition: Among them RES (max-z) RES represents the z-th reliability score after sorting. q Indicates a recommended agent Agen q The reliability score; cloud server selection of recommended proxies that meet the requirements: the total reliability score of the recommended proxies reaches a certain threshold percentage of the total reliability score of all recommended proxies. Therefore, only recommendations generated by the federated recommendation system are considered credible. Subsequently, the cloud server assigns an Agen to each selected recommendation agent. k ∈AC i Calculate the pseudo-random identifier (PID) k PID k =H(ID) k ||R k ), where ID k Recommended Agent Agen k Identity identifier, R k Let H be a random number, defined as {0, 1}. * →{0,1} λ A hash function that maps a string of arbitrary length to a string of length λ, where {0, 1} * Represents a string of arbitrary length, {0, 1} λ Represents a string of length λ; cloud servers need to use pseudo-random identifiers (PIDs). k This is used to collect encrypted recommendation matrices from each selected recommender to verify whether any individual recommender has failed to submit their recommendations as required. Additionally, if information is intercepted by malicious users, only a pseudo-random identifier (PID) will be available. k This does not correspond to the recommended agent. Subsequently, the cloud server will assign the PID... k Send to the corresponding referral agent Agen k ∈AC i And send a referral request. Referral Agent Agen k ∈AC i Upon receiving the result, calculate the encrypted recommendation weight matrix: W′ k =SOMC.Enc(K k W k), where W k Indicates recommended agent Agen k The recommendation weight matrix, K k Recommended Agent Agen k The private key; subsequently, the recommended proxy Agen k ∈AC i Send PID k , W′ k Give it to the cloud server; the cloud server collects all the PIDs k , W′ k (Agen k ∈AC i After that, the agent re-encrypts each recommender agent Agen. k ∈AC i The encrypted recommendation matrix W′ k (Agen k ∈AC i The result W′ was obtained. aggr,k (Agen k ∈AC i ):

[0025]

[0026] Where K s,i For cloud servers and Agen i Shared key, K s,k For cloud servers and Agen k Shared key, K k Recommended Agent Agen k private key, K A The main purpose of agent re-encryption, which uses a shared key for all recommended agents, is to normalize the encrypted ciphertext for easier aggregation later. Because of the previous key settings, the recommended agent's key is now the product of the shared key among recommended agents and the shared key between the recommended agent and the cloud server, i.e., K. i =K A ·K s,i , i = 1, 2, ..., N; Meanwhile, the user's key is the product of the recommending agent's key and the cloud server's key, i.e., J i =K i ·L, i = 1, 2, ..., N, therefore the cloud server possesses key K s,1 K s,2 , ..., K s,N All you need to know is K1, K2, ..., K N Any one of them, through formula K i =K A ·K s,iThe key conversion can be achieved when i = 1, 2, ..., N. Subsequently, the cloud server calculates the aggregation weight matrix W′. fed :

[0027]

[0028] Among them, RES k Indicates a recommended agent Agen k The reliability score is actually a weighted sum. Among the selected recommendation agents, the one with the higher reliability score has a higher weighting, because a higher reliability score indicates that its previous recommendations received higher user feedback and evaluation. get: Where W′ fed Represented as W fed The encryption result ultimately makes W′ rec =W′ fed , where W′ rec This is the encrypted form of the recommendation weight matrix for calculating the recommendation results;

[0029] S34, Cloud Server finds recommended proxy Agen i Project Attribute Encrypted Dataset Then, calculate:

[0030]

[0031] in For user u i,j Encrypted demand vector, W′ rec To calculate the recommendation weight matrix in encrypted form, the symbol " " indicates the transpose operation; subsequently, the cloud server runs the algorithm." Obtain the similarity set Where the definition "|·| 2 "" represents the square operation of the vector magnitude, and "-" represents the vector subtraction operation. Then, the cloud server selects the item with the lowest similarity. Finally, the recommended items and their identification numbers are output: I opt Iid opt The cloud server will I opt Iid opt Send to the recommending agent Agen i Recommended agent for Agen i Forwarded to user u i,j In this step, similarity is the degree of similarity between user needs and projects. Each item in the user need vector and the project's attribute matrix is ​​subtracted, and then the sum of squares is calculated. The smaller the value, the closer the two are, indicating a higher degree of matching.

[0032] Furthermore, in step S34, the ciphertext calculation algorithm SOMC.Eval(L, C) k C j Enter the private key L and the ciphertext C. k and C j ciphertext C k =SOMC.Enc(K i M k ), C j =SOMC.Enc(J i M j ),

[0033] and Let m be a p-dimensional vector. k,1 m k,2 , ..., m k,p For vector M k The array contains p elements, all of which are real numbers, and m... j,1 m j,2 , ..., m j,p For vector M j Given a set of p elements, all of which are real numbers, calculate M. k and M j similarity sim k,j :

[0034]

[0035] Output similarity sim k,j Because the calculations are performed in encrypted form throughout the process, sensitive user information or recommendation agent parameters are not exposed, thus protecting the data privacy of both the user and the recommendation agent.

[0036] Furthermore, in step S4, the scoring matrix R... i,j Adding noise to obtain In, R i,j Let be a diagonal matrix, denoted as Where r i,1 r i,2 ,...,r i,p For the rating scores of user u regarding the 1st, 2nd, ..., pth dimensions of the recommended items i,j exist Selected from The set Rsub consists of 1 element. i,j Where p represents the dimension of the vector; symbol This indicates the floor function; subsequently, user u i,j Calculate the result after adding noise:

[0037] Where r′ j,1 , r′ j,2 ,...,r′ j,p Represented as The result after noise addition is then used to calculate the rating identifier vector.

[0038]

[0039] Where, r 0,1 r 0,2 ,...,r 0,p Represents the rating identifier vector The p elements in the array have values ​​of 1 or 0;

[0040] Finally, the true score vector is obtained. in

[0041]

[0042] r″ j,1 ,r″ j,2 ,...,r″ j,p Represents the true rating vector The algorithm contains p elements, all of which are real numbers. In the process, the cloud server is only allowed to know the sum of user ratings, but not the specific score for each item. The recommendation agent is not allowed to know either the sum of user ratings or the specific score for each item. Therefore, this invention designs an identifier vector to mark which element in the rating matrix is ​​noise and which is the true rating. The rating matrix is ​​a diagonal matrix. After multiplying with the identifier vector, only the true rating is retained. However, the identifier vector is controlled by the user before being sent. i,j He rode on his private key J i Agen recommendation needed i Using your private key K i After partial decryption, the cloud server can then use the key L to decrypt the code. Therefore, using a proxy like Agen is recommended. i Unable to obtain the decryption result of the identifier vector.

[0043] Furthermore, the reliability score update algorithm in step S4 The implementation process is as follows:

[0044] S41, Recommended Agent Agen i Collect user u i,j ∈F i Encrypted feedback dataset Then, for each user u i,j ∈F i calculate Then send the processed encrypted feedback dataset. Provide the cloud server; in this step, it is recommended to use a proxy Agen. i You need to use your private key K first. i The identifier vector is partially decrypted before being sent to the cloud server;

[0045] S42, cloud server Decryption The decryption process is as follows:

[0046]

[0047] In this step, because the previous step recommended using an agent (Agen)... i The identifier vector was partially decrypted, so the cloud server can decrypt the identifier vector using its private key L to obtain the plaintext result;

[0048] S43, Cloud server computes and updates recommended agent Agen i Reliability score RES i and reliability score RES i update count i The specific process is as follows:

[0049]

[0050]

[0051] count i(new) =count i +1

[0052] in, For user u i,j Provide a total feedback score. Let r be the true rating vector. i,1 r i,2 ,...,r i,p Rsub represents the rating scores for dimensions 1, 2, ..., p of the recommended items. i,j Represented as user u i,j exist Selected from A set consisting of elements, RES i(new) For the updated referral agent Agen i The reliability score, |F i |For recommending agent Agen iThe total number of users who have provided feedback. In this step, because the rating matrix is ​​in encrypted form, the cloud server cannot know the specific score of each item. However, because it knows the plaintext of the identifier vector and the key is an orthogonal matrix, it can obtain the sum of the actual scores for each item by performing vector inner product operations after multiplication, without knowing the specific score of each item.

[0053] The present invention has the following advantages and effects compared with the prior art:

[0054] (1) This invention designs a ciphertext similarity calculation algorithm based on orthogonal matrices, which not only reduces computational overhead but also ensures user privacy. Based on this algorithm, this invention designs a personalized item recommendation method based on federated learning and ciphertext similarity calculation. This method can securely aggregate recommendation weight matrices from multiple recommendation agents and calculate the similarity between user needs and item attributes under ciphertext, thereby improving the accuracy of recommendations while ensuring the privacy of both users and recommendation agents. Furthermore, agents with better performance are selected to participate in federated recommendations based on reliability scores, further improving the accuracy of recommendations.

[0055] (2) Under a defined threat model, where both the cloud server and the recommendation agent are honest but curious: assuming that the recommendation agent and the cloud server will operate according to the protocol but may be curious about the user's sensitive information, and that collusion between the recommendation agent and the cloud server is not permitted; this invention demonstrates that the method can meet the privacy requirements of both the user and the recommendation agent. Furthermore, experiments show that this method has the best accuracy and efficiency compared to existing solutions. Attached Figure Description

[0056] Figure 1 This is a system design diagram of a personalized item recommendation method based on federated learning and similarity ciphertext calculation disclosed in an embodiment of the present invention;

[0057] Figure 2 This is a flowchart illustrating a personalized item recommendation method based on federated learning and similarity ciphertext calculation disclosed in an embodiment of the present invention. Detailed Implementation

[0058] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0059] Example 1

[0060] With the rise of big data, information overload has led to a surge in useless information. As a result, recommender systems have become increasingly popular. The primary purpose of recommender systems is to provide users with personalized recommendations, including movies and books. Currently, recommender systems have become an important way to solve the problem of information overload. However, while they bring opportunities to education, healthcare, and other industries, they also present a series of challenges. Privacy breaches are one of the primary issues. Generally, a recommender system consists of two parts: a recommender server and users. To obtain a better recommendation model, traditional recommender systems use a centralized architecture, typically collecting a large amount of feedback information, such as user preferences. However, this information is often sensitive to users and can lead to serious privacy and security risks: users' raw data may be leaked from feedback information from certain programs. For example, under certain conditions, a recommender system can infer private information (such as age, income, medical records, etc.) simply by obtaining a user's movie viewing records. Furthermore, recommender systems can also collect users' personal data and share it with third parties for profit. If this information is misused, the consequences are unimaginable. Therefore, people are increasingly concerned about their data privacy and want their private information to remain unknown to internet applications.

[0061] This embodiment addresses the above-mentioned problems by studying an efficient personalized item recommendation technology based on federated learning and encrypted similarity calculation. The items include movies, music, books, and goods. First, an encrypted similarity calculation algorithm based on orthogonal matrices is designed, which not only reduces computational overhead but also ensures user privacy. Based on this algorithm, this invention designs a personalized item recommendation method based on federated learning and encrypted similarity calculation. This method can securely aggregate recommendation weight matrices from multiple recommendation agents and calculate the similarity between user needs and item attributes under encrypted text, thereby improving recommendation accuracy while ensuring the privacy of both users and recommendation agents. Furthermore, agents with better performance are selected to participate in federated recommendation based on reliability scores, further improving recommendation accuracy.

[0062] The following is combined with Figure 1 This embodiment discloses a personalized item recommendation method based on federated learning and similarity ciphertext computation, using a movie recommendation scenario as a specific implementation example for detailed explanation:

[0063] S1. System Initialization: Trusted Center (TA) becomes the movie recommendation agent (Agen). i User u i,j The key is generated and distributed with the cloud server. Assume there are N movie recommendation agents, each with M users and n movies. The i-th movie recommendation agent is denoted as Agen. i Movie recommendation agent Agen iThe j-th user is represented by u i,j And satisfying 1≤i≤N, 1≤j≤M; Movie recommendation agent Agen i The i′-th movie is represented by I. i,i′ And satisfying 1≤i≤N, 1≤i′≤n; the Trusted Center (TA) first runs the key generation algorithm SOMC.KeyGen(p), where p is the matrix dimension, to obtain the first key K for implementing the encryption function. A Second key K s,1 K s,2 , ..., K s,N The third key K1, K2, ..., K N The fourth key L and the fifth keys J1, J2, ..., J M Subsequently, the Trusted Center (TA) will... A K i K s,i Send to the corresponding movie recommendation agent Agen i , where i = 1, 2, ..., N; let K s,1 K s,2 , ..., K s,N Send L to the cloud server; send J i Send to user u i,1 u i,2 , ..., u i,M Trust Center recommends agents for movies: Agen1, Agen2, ..., Agen. N Generate identity identifiers ID1, ID2, ..., ID N Every movie I i,i′ Generate the corresponding identity identifier Iid i,i′ Where i = 1, 2, ..., N, i′ = 1, 2, ..., n; the Trusted Center (TA) will recommend movies to agents Agen1, Agen2, ..., Agen. N Reliability scores RES1, RES2, ..., RES N Initialize to 0, and RES1, RES2, ..., RES N The number of updates: count1, count2, ..., count N Initialize to 0;

[0064] S2, Data Encryption: For each movie I i,i′ The attribute information is represented by a p-dimensional vector. It means that b ii′,1 b ii′,2 , ..., b ii′,p Indicates movie I i,i′ The 1st, 2nd, ..., pth attribute values, symbol " " indicates the transpose operation; each movie recommendation agent Agen i Run encryption algorithm Output encryption result Uploaded and stored on a cloud server;

[0065] S3, Movie Recommendations: For every user... i,j Demand information is represented by a p-dimensional vector. It means that a ij,1 a ij,2 , ..., a ij,p Indicates user u i,j The 1st, 2nd, ..., pth attribute values ​​of the requirement, user u i,j Run encryption algorithm Output encryption result Then user u i,j Output results Adding noise to obtain Subsequently, user u i,j The demand vector for encryption and noise addition Send to movie recommendation agent Agen i Agen through movie recommendation agency i Interact with cloud servers to execute movie recommendation algorithms. W i , Get the recommended movie I opt and the corresponding identity identifier Iid opt Send to user u i,j ;

[0066] S4. Update reliability score: for each user u i,j After receiving the recommendation results, a rating matrix R is generated. i,j User u i,j To the rating matrix R i,j Adding noise to obtain And generate a rating identifier vector. And run the encryption algorithm Obtain the noisy and encrypted scoring matrix R′ i,j ,calculate Subsequently, user u i,j Will Send to movie recommendation agent Agen i ; through movie recommendation agent Agen i Interact with the cloud server to execute and update the reliability score algorithm. Update movie recommendation agent Agen i The reliability score.

[0067] Example 2

[0068] The following is combined Figure 1 This embodiment discloses a personalized item recommendation method based on federated learning and similarity ciphertext computation, using music, book, and product recommendation scenarios as specific implementation examples for detailed explanation:

[0069] S1. System Initialization: Trusted Center (TA) recommends agents (Agen) for music / books / products. i User u i,j The key is generated and distributed with the cloud server. Assume there are N music / book / product recommendation agents, each with M users and n music / book / products. The i-th music / book / product recommendation agent is denoted as Agen. i Music / Books / Product Recommendation Agent Agen i The j-th user is represented by u i,j And satisfy 1≤i≤N, 1≤j≤M; Music / Book / Product Recommendation Agent Agen i The i′th music / book / product is represented by I. i,i′ And satisfying 1≤i≤N, 1≤i′≤n; the Trusted Center (TA) first runs the key generation algorithm SOMC.KeyGen(p), where p is the matrix dimension, to obtain the first key K for implementing the encryption function. A Second key K s,1 K s,2 , ..., K s,N The third key K1, K2, ..., K N The fourth key L and the fifth keys J1, J2, ..., J M Subsequently, the Trusted Center (TA) will... A K i K s,i Send to the corresponding music / book / product recommendation agent Agen i , where i = 1, 2, ..., N; let K s,1 K s,2 , ..., K s,N Send L to the cloud server; send J i Send to user u i,1 u i,2 , ..., u i,M Trust Center recommends agents for music / books / products: Agent 1, Agent 2, ..., Agent 3. N Generate identity identifiers ID1, ID2, ..., ID N Every music / book / product i,i′ Generate the corresponding identity identifier Iid i,i′Where i = 1, 2, ..., N, i′ = 1, 2, ..., n; the Trusted Center (TA) will recommend music / books / products to agents Agen1, Agen2, ..., Agen. N Reliability scores RES1, RES2, ..., RES N Initialize to 0, and RES1, RES2, ..., RES N The number of updates: count1, count2, ..., count N Initialize to 0;

[0070] S2, Data Encryption: For each music / book / product... i,i′ The attribute information is represented by a p-dimensional vector. It means that b ii′,1 b ii′,2 , ..., b ii′,p Indicates music / books / products I i,i′ The 1st, 2nd, ..., pth attribute values, symbol " " indicates the transpose operation; each music / book / product recommendation agent Agen i Run encryption algorithm Output encryption result Uploaded and stored on a cloud server;

[0071] S3, Music / Books / Product Recommendations: Recommendations for every user i,j Demand information is represented by a p-dimensional vector. It means that a ij,1 a ij,2 , ..., a ij,p Indicates user u i,j The 1st, 2nd, ..., pth attribute values ​​of the requirement, user u i,j Run encryption algorithm Output encryption result Then user u i,j Output results Adding noise to obtain Subsequently, user u i,j The demand vector for encryption and noise addition Send to music / book / product recommendation agents Agen i Agen is recommended through music / books / products. i Interact with cloud servers to execute music / book / product recommendation algorithms.

[0072] Get recommended music / books / products I opt and the corresponding identity identifier Iid opt Send to user ui,j ;

[0073] S4. Update reliability score: for each user u i,j After receiving the recommendation results, a rating matrix R is generated. i,j User u i,j To the rating matrix R i,j Adding noise to obtain And generate a rating identifier vector. And run the encryption algorithm Obtain the noisy and encrypted scoring matrix R′ i,j ,calculate Subsequently, user u i,j Will Send to music / book / product recommendation agents Agen i ; through music / book / product recommendation agents Agen i Interact with the cloud server to execute and update the reliability score algorithm. Update music / book / product recommendation agent Agen i The reliability score.

[0074] In terms of efficiency, the proposed personalized item recommendation method based on federated learning and similarity ciphertext computation is compared with that in references [1, 2]. Specifically, the comparison includes encryption time and recommendation time. The results are shown in Tables 1 and 2, where the number of recommendations represents the number of cycles from when a user submits a request vector to when they obtain the recommendation result. The authors, titles, and sources of reference [1] are M. Zhang, Y. Chen, J. Lin, A privacy-preserving optimization of neighborhood-based recommendation for medical-aided diagnosis and treatment, IEEE Internet of Things Journal. The authors, titles, and sources of reference [2] are Peng, D. He, J. Chen, N. Kumar, MK Khan, Ept: An efficient privacy preserving medical service recommendation and trust discovery scheme for ehealth system, ACM Transactions on Internet Technology (TOIT) 21(3)(2021) 1-24.

[0075] Table 1. Comparison of Encryption Time between the Invention and Related Schemes (Unit: seconds)

[0076] Number of recommendations 100 200 300 400 500 600 This invention 0.0978 0.1709 0.2751 0.3403 0.426 0.5086 Reference [1] 0.11179 0.22259 0.33675 0.44871 0.56251 0.67988 Reference [2] 0.966341 1.950137 2.912003 3.888913 4.857202 5.840947

[0077] Table 2. Comparison of recommended time between the present invention and related solutions (unit: seconds)

[0078] Number of recommendations 100 200 300 400 500 600 This invention 0.2641 0.5013 0.7513 1.0132 1.247 1.51 Reference [1] 1 2.1 3.2 5.5 6.2 6.8 Reference [2] 1.0345 2.0417 3.0555 4.0871 5.2102 6.1359

[0079] As shown in Tables 1 and 2, with the increase of the number of recommendations, the encryption time and recommendation time required by the present invention, reference [1], and reference [2] all tend to increase. However, the present invention always maintains the minimum encryption time and recommendation time. This is because in the encryption method of reference [1], one encryption operation can only process 1 bit of information, and in the encryption method of reference [2], one encryption operation can only process one integer. However, in the encryption method of the present invention, one encryption operation can process multiple integers simultaneously. Therefore, the computational cost of the present invention is lower than that of references [1, 2], effectively improving the recommendation efficiency.

[0080] Regarding recommendation accuracy, the proposed personalized item recommendation method based on federated learning and similarity ciphertext computation is compared with that in references [1, 2], and validated using the MovieLens-100k dataset for movie recommendation ratings. The basic statistics of this dataset are shown in Table 3. The dataset contains 943 users, 1682 movie items, and 1000 rating records. Each user has rated at least 20 movies. Users and movies are numbered consecutively starting from number 1. The data is randomly sorted.

[0081] Table 3. Basic statistics of the MovieLens-100k dataset

[0082] Dataset user Project (film) Rating Record MovieLens-100k 943 1682 10000

[0083] The present invention was compared with that in references [1, 2], and the performance was evaluated using accuracy. The comparison results are shown in Table 4:

[0084] Table 4. Comparison of Recommendation Accuracy between the Invention and Related Solutions

[0085] Number of recommendations 7000 8000 9000 10000 This invention 65.51% 67.94% 71.24% 75.19% Reference [1] 58.51% 57.57% 57.98% 59.69% Reference [2] 59.60% 60.53% 61.33% 62.64%

[0086] As can be seen from Table 4, the personalized item recommendation method based on federated learning and similarity ciphertext calculation of the present invention consistently achieves higher accuracy and better predictive performance than the methods in references [1, 2] as the number of recommendations increases.

[0087] The above embodiments are preferred embodiments of the present invention, but the embodiments of the present invention are not limited to the above embodiments. Any changes, modifications, substitutions, combinations, or simplifications made without departing from the spirit and principle of the present invention shall be considered equivalent substitutions and shall be included within the protection scope of the present invention.

Claims

1. A personalized item recommendation method based on federated learning and similarity ciphertext computation, wherein the items include movies, music, books, and goods, characterized in that, The project recommendation method includes the following steps: S1. System Initialization: Trusted Center (TA) becomes the Recommendation Agent (Agen) i User u i,j The key is generated and distributed by the cloud server. Assume there are N referral agents, each with M users and n items, and the i-th referral agent is denoted as Agen. i Recommended agent for Agen i The j-th user is represented by u i,j And satisfying 1≤i≤N, 1≤j≤M; Recommended Agent Agen i The i′th item is denoted as I i,i′ And satisfying 1≤i≤N, 1≤i′≤n; the Trusted Center (TA) first runs the key generation algorithm SOMC.KeyGen(p), where p is the matrix dimension, to obtain the first key K for implementing the encryption function. A Second key K s,1 K s,2 , ..., K s,N The third key K1, K2, ..., K N The fourth key L and the fifth keys J1, J2, ..., J N Subsequently, the Trusted Center (TA) will... A K i K s,i Send to the corresponding referral agent Agen i ; K s,1 K s,2 , ..., K s,N Send L to the cloud server; send the key J i Send to the corresponding user u i,1 u i,2 , ..., u i,M The Trusted Center (TA) recommends agents Agen1, Agen2, ..., Agen. N Generate identity identifiers ID1, ID2, ..., ID N ; Give each project I i,i′ Generate the corresponding identity identifier Iid i,i′ The Trusted Center (TA) will recommend agents for Agen1, Agen2, ..., Agen. N Reliability scores RES1, RES2, ..., RES N Initialize to 0, and RES1, RES2, ..., RES N The number of updates: count1, count2, ..., count N Initialize to 0; S2, Data Encryption: For each project I i,i′ The attribute information is represented by a p-dimensional vector. It means that b ii′,1 b ii′,2 , ..., b ii′,p Indicates Project I i,i′ The 1st, 2nd, ..., pth attribute values, symbol This represents the transpose operation; each recommender agent Agen i Run encryption algorithm Output encryption result Uploaded and stored on a cloud server; S3, Project Recommendation: For each user... i,j Demand information is represented by a p-dimensional vector. It means that a ij,1 a ij,2 , ..., a ij,p Indicates user u i,j The 1st, 2nd, ..., pth attribute values ​​of the requirement, user u i,j Run encryption algorithm Output encryption result Then user u i,j Output results Adding noise to obtain Subsequently, user u i,j The demand vector for encryption and noise addition Send to the recommending agent Agen i Through the referral agent Agen i Interact with cloud servers to execute project recommendation algorithms. Get the recommended project I opt and the corresponding identity identifier Iid opt Send to user u i,j ,in User u i,j The encryption and noise-adding requirement vector, It is recommended to use Agen as an agent. i Project attribute encrypted dataset, W i It is recommended to use Agen as an agent. i The recommendation weight matrix, {RES i Let {i = 1, 2, ..., N} be the reliability score dataset for each recommendation agent, and L be the private key of the cloud server. These are the first and second threshold values ​​for selecting a recommending agent; S4. Update reliability score: for each user u i,j After receiving the recommendation results, a rating matrix R is generated. i,j User u i,j To the rating matrix R i,j Adding noise to obtain And generate a rating identifier vector. And run the encryption algorithm Obtain the encryption and noise-increasing scoring matrix R′ i,j ,calculate The symbol "·" represents multiplication; subsequently, user u i,j R′ i,j , Send to the recommending agent Agen i ; through referral agent Agen i Interact with the cloud server to execute and update the reliability score algorithm. Update Recommended Agent Agen i The reliability score, of which It is recommended to use Agen as an agent. i All encrypted feedback received, F i It is for recommending agents Agen i The collection of users who have provided feedback, RES i It is recommended to use Agen as an agent. i The reliability score, count i It is recommended to use Agen as an agent. i Reliability score RES i The number of times it is updated.

2. The personalized item recommendation method based on federated learning and similarity ciphertext computation according to claim 1, characterized in that, In step S1, the key algorithm SOMC.KeyGen(p) takes a matrix dimension of p as input and the trust center TA randomly generates N+2 p×p orthogonal matrices, denoted as K. A L, K s,1 K s,2 , ..., K s,N Then, K1, K2, ..., K are generated according to the following formula. N and J1, J2, ..., J N :K i =K A ·K s,i i = 1, 2, ..., N; J i =K i ·L, i = 1, 2, ..., N.

3. The personalized item recommendation method based on federated learning and similarity ciphertext computation according to claim 1, characterized in that, In step S2, the encryption algorithm SOMC.Enc(SK, M) is input with the private key SK and the plaintext M, where the private key SK is K. i or J i ; plain text M is a p×p matrix or a p-dimensional vector, calculated Among them, symbols This represents the transpose operation, outputting the ciphertext C. SK .

4. The personalized item recommendation method based on federated learning and similarity ciphertext calculation according to claim 1, characterized in that, In step S3, the encryption algorithm is... Output results Adding noise to obtain in a′ ij,1 ,a′ ij,2 , ..., a′ ij,p Indicates a ij,1 a ij,2 , ..., a ij,p The encrypted result, user u i,j In a′ ij,1 ,a′ ij,2 , ..., a′ ij,p Selected from A set Sub is composed of elements, where p represents the dimension of the vector; symbol This indicates the floor function; subsequently, user u i,j Calculate the result after adding noise: Where, a″ ij,1 ,a″ ij,2 , ..., a″ ij,p Indicates a′ ij,1 ,a′ ij,2 , ..., a′ ij,p The result after adding noise is represented by Lap(·), which is the Laplace function, and b is the Laplace parameter.

5. The personalized item recommendation method based on federated learning and similarity ciphertext calculation according to claim 1, characterized in that, The project recommendation algorithm in step S3 The implementation process is as follows: S31, When recommending agent Agen i Received from user u i,j Encryption requirements Then, calculate the encrypted recommendation weight matrix result W′ according to the following formula. i :W′ i =SOMC.Enc(K i W i ), where K i Recommended Agent Agen i W's private key i Let W be a diagonal matrix. i =diag(w i,1 w i,2 , ..., w i,p ), where w i,1 w i,2 , ..., w i,p The weight parameter represents the attribute vector of the recommended items. The influence factor of the corresponding attribute, followed by the recommendation agent Agen. i Will W′ i Send to the cloud server and request collaborative recommendations; S32, Cloud server receives recommended agent Agen i Sent W′ i Then, determine the recommended agent Agen. i Does the reliability score satisfy the threshold value r, i.e.: RES i If the condition is met (>r), the cloud server will initiate a federated collaboration recommendation and execute step S33; otherwise, the cloud server will only use the recommendation agent Agen. i The recommendation weight matrix is ​​used for independent recommendation, let W′ rec =W′ i , where W′ rec To calculate the encrypted form of the recommendation weight matrix of the recommendation results, proceed to step S34; S33, The cloud server first assigns all reliability scores {RES} i Sort the following lists in descending order: i = 1, 2, ..., N. Select the j-th highest reliability scores from the recommended agents to form a set AC. i And it meets the threshold condition: Among them RES (max-z) RES represents the z-th reliability score after sorting. q Indicates a recommended agent Agen q The reliability score is then calculated; subsequently, the cloud server assigns a reliability score to each selected recommending agent (Agen). k ∈AC i Calculate the pseudo-random identifier (PID) k PID k =H(ID) k ||R k ), where ID k Recommended Agent Agen k Identity identifier, R k Let H be a random number, defined as {0, 1}. * →{0,1} λ A hash function that maps a string of arbitrary length to a string of length λ, where {0, 1} * Represents a string of arbitrary length, {0, 1} λ This represents a string of length λ; subsequently, the cloud server will assign the PID. k Send to the corresponding referral agent Agen k ∈AC i And send a referral request. Referral Agent Agen k ∈AC i Upon receiving the result, calculate the encrypted recommendation weight matrix: W′ k =SOMC.Enc(K k W k ), where W k Indicates recommended agent Agen k The recommendation weight matrix, K k Recommended Agent Agen k The private key; subsequently, the recommended proxy Agen k ∈AC i Send PID k , W′ k Give it to the cloud server; the cloud server collects all the PIDs k , W′ k (Agen k ∈AC i After that, the agent re-encrypts each recommender agent Agen. k ∈AC i The encrypted recommendation matrix W′ k (Agen k ∈AC i The result W′ was obtained. aggr,k (Agen k ∈AC i ): Where K s,i For cloud servers and Agen i Shared key, K s,k For cloud servers and Agen k Shared key, K k Recommended Agent Agen k private key, K A A shared key is used for all recommended agents; subsequently, the cloud server calculates the aggregate weight matrix W′. fed : Among them, RES k Indicates a recommended agent Agen k The reliability score is given by get: Where W′ fed Represented as W fed The encryption result ultimately makes W′ rec =W′ fed , where W′ rec This is the encrypted form of the recommendation weight matrix for calculating the recommendation results; S34, Cloud Server finds recommended proxy Agen i Project Attribute Encrypted Dataset Then, calculate: in For user u i,j Encrypted demand vector, W′ rec To calculate the recommendation weight matrix in encrypted form, the symbols are... This represents the transpose operation; subsequently, the cloud server runs the algorithm. Obtain the similarity set Where the definition |·| 2 "" represents the square operation of the vector magnitude, and "-" represents the vector subtraction operation. Then, the cloud server selects the item with the lowest similarity. Finally, the recommended items and their identification numbers are output: I opt Iid opt The cloud server will I opt Iid opt Send to the recommending agent Agen i Recommended agent for Agen i Forwarded to user u i,j .

6. The personalized item recommendation method based on federated learning and similarity ciphertext computation according to claim 5, characterized in that, In step S34, the ciphertext calculation algorithm SOMC.Eval(L, C) is used. k C j Enter the private key L and the ciphertext C. k and C j ciphertext C k =SOMC.Enc(K i M k ), C j =SOMC.Enc(J i M j ), and Let m be a p-dimensional vector. k,1 m k,2 , ..., m k,p For vector M k The array contains p elements, all of which are real numbers, and m... j,1 m j,2 , ..., m j,p For vector M j Given a set of p elements, all of which are real numbers, calculate M. k and M j similarity sim k,j : Output similarity sim k,j .

7. The personalized item recommendation method based on federated learning and similarity ciphertext computation according to claim 1, characterized in that, In step S4, the scoring matrix R i,j Adding noise to obtain In, R i,j Let be a diagonal matrix, denoted as Where r i,1 r i,2 ,...,r i,p For the rating scores of user u regarding the 1st, 2nd, ..., pth dimensions of the recommended items i,j exist Selected from The set Rsub consists of 1 element. i,j Where p represents the dimension of the vector; symbol This indicates the floor function; subsequently, user u i,j Calculate the result after adding noise: Where r′ j,1 , r′ j,2 ,...,r′ j,p Represented as The result after noise addition is then used to calculate the rating identifier vector. Where, r 0,1 r 0,2 ,...,r 0,p Represents the rating identifier vector The vector consists of p elements, each with a value of 1 or 0; finally, the true score vector is obtained. in r″ j,1 ,r″ j,2 ,...,r″ j,p Represents the true rating vector The array contains p elements, all of which are real numbers.

8. The personalized item recommendation method based on federated learning and similarity ciphertext computation according to claim 1, characterized in that, The reliability score update algorithm in step S4 The implementation process is as follows: S41, Recommended Agent Agen i Collect user u i,j ∈F i Encrypted feedback dataset Then, for each user u i,j ∈F i calculate Then send the processed encrypted feedback dataset. Give it to the cloud server; S42, cloud server Decryption The decryption process is as follows: S43, Cloud server computes and updates recommended agent Agen i Reliability score RES i and reliability score RES i update count i The specific process is as follows: count i(new) =count i +1 in, For user u i,j Provide a total score for the feedback rating. Let r be the true rating vector. i,1 r i,2 ,...,r i,p Rsub represents the rating scores for dimensions 1, 2, ..., p of the recommended items. i,j Represented as user u i,j exist Selected from A set consisting of elements, RES i(new) For the updated referral agent Agen i The reliability score, To recommend agent Agen i Total number of users who have provided feedback.

Citation Information

Patent Citations

  • Integrated recommendation method based on differential privacy protection

    CN110837603A

  • Federal learning privacy protection method based on homomorphic encryption and secret sharing

    CN113037460A