Decentralized recommendation method with privacy protection performance

By employing a decentralized federated learning framework in the recommendation system, combined with matrix factorization and blockchain technology, the problems of user privacy leakage and single point of failure in centralized learning are solved, enabling secure sharing of user data and efficient model training.

CN121009573APending Publication Date: 2025-11-25DONGGUAN POLYTECHNIC
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202511041458.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-07-28
Publication Date
2025-11-25

AI Technical Summary

Technical Problem

Existing recommender systems suffer from user privacy leaks during data sharing, especially in centralized federated learning. Attackers can reconstruct the original data through the model aggregation process, and the single point of failure in centralized systems leads to serious privacy and security issues.

Method used

Employing a decentralized federated learning framework that combines matrix factorization algorithms and blockchain technology, the model is trained collaboratively by users in a P2P network. Each user's rating data is kept locally, with only some parameters shared. A consensus mechanism using dynamic random seeds is used to elect a leader, who then aggregates and uploads public parameters to the blockchain, ensuring the security of user privacy.

Benefits of technology

It effectively protects user privacy, avoids the single point of failure problem in centralized learning, reduces the probability of privacy leakage, improves the training efficiency and accuracy of the model, and reduces the waste of computing resources.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121009573A_ABST
    Figure CN121009573A_ABST
Patent Text Reader

Abstract

The invention relates to a decentralized recommendation method with privacy protection performance, which is designed based on a matrix decomposition algorithm and a block chain and is used for providing privacy protection in a recommendation system. By introducing the block chain technology, the single-point fault risk in traditional centralized federated learning is eliminated, and the privacy protection capability is enhanced. In the model training period, a user locally trains a model containing private parameters and public parameters, but only shares the public parameters, so that leakage of original private data and the private parameters of the user is avoided, meanwhile, quantitative analysis is performed on privacy protection performance of the method, the total probability of privacy leakage is deduced, and the user experience is improved. And a theoretical basis is provided for evaluating the privacy protection intensity of the user.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The patent application belongs to the technical field of recommendation methods, and more particularly relates to a decentralized recommendation method with privacy protection performance. BACKGROUND

[0002] With the mature development of network technology and the rapid increase in the number of users, the types and quantities of information on the Internet have increased dramatically, and the information overload problem has become increasingly prominent, which greatly increases the burden of users to obtain effective information. The generation and development of a recommendation system effectively alleviate the information overload phenomenon in the big data era. Generally, in the same recommendation system model, whether the dimension of data instances or the quantity of data instances, more data can often achieve better recommendation results. A single recommendation mechanism has limited data quantity and great data sparsity; and small-scale data often leads to one-sidedness of the trained model and poor performance. In addition, once the data center of the recommendation mechanism is attacked, the security of the entire network of data resources hosted thereon cannot be guaranteed.

[0003] Therefore, in order to improve the recommendation accuracy, some recommendation mechanisms are no longer satisfied with only using their own data to model and train the recommendation system, and some mechanisms with the same user group will form a recommendation data alliance to share each other's user data and jointly complete model training. However, such a direct data sharing recommendation system inevitably involves the transmission of user's personal data in the training and use process, and a large amount of personal sensitive data such as user's physiological characteristics, interests and hobbies, medical records, social networks, action trajectories are collected and even sold by various enterprises and institutions at any time. Although large-scale data can improve the performance of the model, it also infringes on the privacy and human rights of citizens. For example, in 2018, Cambridge Analytica illegally obtained 87 million Facebook user data to build a psychological analysis model to analyze the personality characteristics of Internet users and then targetedly placed false advertisements to manipulate the US election.

[0004] In the face of the contradiction between data demand and privacy security in the recommendation system, federated learning, as a privacy-protected distributed encrypted machine learning technology, has attracted widespread attention from researchers in the field of recommendation systems. Federated learning solves the data island problem and guarantees the data security when data is used for machine learning modeling among multiple recommendation mechanisms. For example, Figure 1As shown, at the beginning of each round of communication, the parameter server distributes the latest global model to the selected clients, and then the clients train the model through the local data set and upload the local model updates to the parameter server for aggregation. Repeat this process until the model converges. Therefore, under the framework of federated learning, terminals can collaboratively learn a global model without directly exchanging data. However, although the local data in federated learning is not explicitly shared in the original format, attackers can still approximately reconstruct the original data, especially during the aggregation process. In particular, privacy leakage can occur due to external attacks during model aggregation.

[0005] The trusted peer-to-peer transmission, tamper-proof data storage, and traceable data viewing features of the blockchain are a feasible method to solve the privacy leakage of centralized federated learning. The blockchain is built on the basis of a P2P network, and in the blockchain network, all participants are equal and there is no central node, so the privacy and security problems caused by centralization are naturally solved, and when a certain node fails or freely joins and exits the network, the entire system can maintain normal operation, and the influence of a single institution on the system is greatly reduced. The blockchain encourages parties with common goals and related data to jointly train models as participants, which can improve the one-sided problem of training models due to sparse data. SUMMARY

[0006] The technical problem to be solved by the present application is to propose a decentralized federated learning framework that can protect user privacy for a recommendation system, and based on this framework, a decentralized recommendation method with privacy protection performance is designed, which makes users trust the recommendation system and its application platform, and is willing to provide more real and effective data to promote the healthy development of the recommendation system.

[0007] To solve the above problems, the technical scheme adopted by the present application is:

[0008] A decentralized recommendation method with privacy protection performance is designed based on matrix decomposition algorithm and blockchain, comprising the following steps:

[0009] S1, constructing a prediction score matrix

[0010] Consider that n users in the P2P network of the blockchain collaboratively train a movie recommendation system model that can recommend movies according to user preferences, assuming that a user-movie rating matrix R=(r ij ) n×m The local private data r i i=1,2,…,n of each user is a row of the rating matrix R, indicating the ratings of the user on the m movies;

[0011] The ratings of user 1 on m movies are r1=(r1j ) 1×m is a row of the rating matrix R, and r1 is sparse with many missing values. The goal of each user is to predict the missing ratings in r i and recommend movies to users based on the predicted ratings;

[0012] Using the matrix factorization algorithm, the rating r i of each user can be decomposed into a private user latent feature vector u i ∈R 1×k and a publicly available movie latent feature matrix V i ∈R m×k , where k, k < min(n, m) is a hyperparameter representing the number of latent features. For example, the rating r1 of user 1 can be decomposed into u1 and V1 as shown in formula (6)

[0013] r1 = u1 × V m×k (6)

[0014] The vector u i represents the personal preferences of the i-th user, contains user privacy, and is saved locally. The j-th row v i of the matrix V i,j represents the features of the j-th movie, which can be disclosed and shared publicly. Each user estimates the rating by calculating the inner product of u i and V i , that is

[0015]

[0016] Therefore, the predicted rating can be expressed as formula (8)

[0017]

[0018] S2. Local Training

[0019] Each user hopes to find an approximate decomposition as shown in formula (7). A useful metric widely used is to minimize the squared Euclidean distance between r i and as shown in formula (9). In addition, the regularized squared error is used to avoid overfitting, where λ is the regularization factor. Therefore, the loss function of the i-th user can be defined as follows:

[0020]

[0021] Each node uses the alternating least squares algorithm to iteratively optimize, and trains the user privacy feature vector u i and the movie latent feature sharing matrix V i using the rating r iIn each round, users retrieve the latest data from the blockchain. And perform the following repeated steps to calculate and update:

[0022] Given the latent feature matrix V of the movie i According to the loss function Loss i Each user updates u locally using stochastic gradient descent. i ,

[0023]

[0024] Where α is the learning rate;

[0025] Based on u obtained in the previous step i Each user updates V locally using stochastic gradient descent. i ;

[0026]

[0027] Each user performs iterative calculations according to the above process. When the maximum number of iterations is reached or convergence is achieved, i.e., u... i or V i The iteration terminates when the changes cease.

[0028] S3, Upload Transaction V i

[0029] After local training is completed, a unique leader is randomly selected in each round based on a dynamic random seed leader election consensus mechanism. Simultaneously, each user will transfer V transactions after completing local training. i Uploaded to the leader;

[0030] S4, Aggregation Parameters

[0031] The leader aggregates the shared parameter matrix V of all users. i And calculate all V i average As shown in formula (14), then the leader will Package it into a newly generated block and link it to the blockchain;

[0032]

[0033] S5, Global Synchronization

[0034] Each user received a message containing After a new block is created, it will be verified. If the new block is verified by a majority of users, it will be accepted by the entire network. Each user will link the new block to their local blockchain copy and download the average value from the new block. Globally synchronize and update local V iAs shown in formula (15), in order to further iteratively train.

[0035]

[0036] S6, Update u i Each user is based on formula (11) and Update local u i ;

[0037] S7, Update V i Each user is updated based on the u above. i Update local V with formula (13) i ;

[0038] Each node iterates through the above process in each round until u. i and V i convergence;

[0039] S8. Privacy performance analysis to obtain the total probability of privacy leakage.

[0040] Furthermore, in S3, the leader is selected using a leader election algorithm based on a dynamic random seed, specifically...

[0041] Let ID i Let represent the ID of the i-th node. These IDs are public to all nodes. In each round of leader election, each node performs local computation based on a public random seed and the IDs of all nodes to elect a unique leader. Simultaneously, based on the IDs generated in this round... Each node calculates the new random seed needed for the next round of leader election;

[0042] Let S t Let St represent the random seed used in the leader election of round t. In the initial stage, a random seed S0 is generated, and St is used. S represents the ID of the leader elected in round t. t and The update process is as follows:

[0043] Round t leader election: Each node elects a leader based on S... t Calculate its own hash value with the ID, and record the ID corresponding to the smallest hash value as . As shown in formula (16),

[0044]

[0045] The process of generating random numbers in round t+1: Each node generates random numbers according to S. t and generated in round t Calculate its hash value S t+1As shown in formula (17),

[0046]

[0047] Therefore, all nodes reached a consensus on the leader election.

[0048] Furthermore, in S8, privacy performance analysis includes three scenarios:

[0049] The first scenario: Calculate the probability that all users in the P2P network are honest, and that the same honest user is elected as the leader in two consecutive rounds.

[0050] The second scenario: Calculate the probability that there are dishonest users in the P2P network, and that the same dishonest user is elected as the leader in two consecutive rounds.

[0051] The third scenario: Calculate the probability that there are dishonest users in the P2P network, and that the leaders of two consecutive rounds are different dishonest users who collude to leak privacy.

[0052] By combining the three scenarios and assuming that the probabilities of all three scenarios are equal, we can obtain the total probability of privacy leakage.

[0053] Furthermore, the first scenario specifically refers to...

[0054] Assume that all n users in the P2P network are honest. Let T be the total number of rounds of global synchronization, and let X = {x1, x2, ..., xn}. n} represents the user set, x i Let ξ be the i-th user. In each round, each user performs local computation based on a public random seed and the IDs of all nodes to select a leader. This means that only one user is selected as the leader in each round, implying that the other n-1 users are not selected. The leader is responsible for collecting public parameters, calculating the average, and packaging transactions into the blockchain. Each user is selected as the leader with the same probability in each round. Let ξ, 0 < ξ < 1, represent the probability that any honest user is selected as the leader in any round.

[0055]

[0056] Let Ψ = {ψ1,ψ2,...,ψ T Let} be the set of leaders, where ψ t Let P(ψ) be the leader of round t, t∈{1,...,T}. t =x i For honest user x i The probability of being selected as the leader in round t, i.e.

[0057]

[0058] The election of the Leader in round t+1 is irrelevant to round t, therefore honest user x i The probability P(ψ) of being selected as the leader in round t+1 t+1 =x i The same as in round t, i.e.

[0059] P(ψ t+1 =x i )=ξ·(1-ξ) n-1 (20)

[0060] Therefore, honest user x i The joint probability P(ψ) of being selected as the leader in round t and round t+1 t+1 =x i , ψ t =x i ) can be calculated as

[0061]

[0062] The total number of global synchronization rounds in this system is T, therefore there are only T-1 consecutive two-round iterations. Thus, for the same honest user x... i The probability P(X=x) of being selected as the leader in any two rounds within round T. i The following can be calculated:

[0063]

[0064] Furthermore, the second scenario is specifically as follows:

[0065] Let ε, 0 < ε < 1, represent the probability that any dishonest user will be selected as the leader in any round, i.e.

[0066]

[0067] Let Ψ = {ψ1, ψ2, ..., ψ} T} represents the set of leaders, ψ t As the leader of round t, therefore, any dishonest user ω i The probability P(ψ) of (i∈{1,...,m}) being selected as the leader in round t. t =ω i )as follows,

[0068] This user ω i The probability P(ψ) of being selected as the leader in round t+1 t+1 =ω i Same as formula (24), that is

[0069] P(ψ t+1 =ω i)=ε·(1-ε) n-1 (25)

[0070] Dishonest user ω i The joint probability P(ψ) of being selected as the leader in round t and round t+1 t+1 =ω i ,ψ t =ω i ) can be calculated as

[0071] P(ψ t+1 =ω i ,ψ t =ω i )=P(ψ t+1 =ω i )·P(ψ t =ω i )

[0072] =(ε·(1-ε) n-1 )·(ε·(1-ε) n-1 (26)

[0073] Therefore, the same dishonest user ω i The probability P(X=ω) of being selected as the leader in any two rounds within T synchronization periods. i The following can be calculated:

[0074]

[0075] Furthermore, the third scenario is specifically as follows:

[0076] A dishonest user ω i The probability of being selected as the leader in round t is shown in formula (28), that is, formula (24) and formula (28) are the same, and both can be used.

[0077]

[0078] Another dishonest user ω j The probability P(ψ) of (i≠j,j∈{1,...,m}) being selected as the leader in the (t+1)th round. t+1 =ω j The following can be calculated:

[0079]

[0080] Therefore, in round t, ω i Selected as leader and in round t+1 ω j The joint probability P(ψ) of being selected as the leader t+1 =ω j ,ψ t =ω i) can be calculated as

[0081]

[0082]

[0083] Any two rounds ω within T synchronization cycles i ω j The probability of being selected as a leader is P(X=ω). i X=ω j The following can be calculated:

[0084]

[0085] Furthermore, assuming the probabilities of the above three scenarios are equal, the total probability P of privacy leakage satisfies the following expression:

[0086]

[0087] Due to the adoption of the above technical solution, the beneficial effects achieved by this invention are:

[0088] In the architecture of this invention, the architecture is based on the matrix factorization method (MF) and blockchain design, and is named the dFL architecture. The dFL architecture includes a blockchain P2P network and a blockchain at the bottom layer. The blockchain P2P network corresponds to the blockchain.

[0089] A blockchain P2P network consists of n nodes that are equal in status to each other. Each node can hold a copy of the blockchain. Each node holding a copy of the blockchain uses its local private scoring data to optimize the training and obtain two types of feature parameters: private parameters and public parameters. The private parameters contain privacy information and are kept locally.

[0090] A blockchain consists of multiple blocks, and each block contains a header and a body. The header contains information such as the leader ID; the body contains... The transaction, and a list of IDs of all nodes that submitted public parameters in this round. Transactions are obtained through aggregation;

[0091] In this dFL architecture:

[0092] Each participant (e.g., a user or service provider) first trains its own model locally using its own local data and private parameters, as well as the latest public parameters (i.e., matrix V) synchronized from the blockchain, thereby updating the private and public parameters.

[0093] Then all participants compete for the leader according to the consensus mechanism. The successful contestant becomes the leader, and the leader is replaced periodically; the unsuccessful contestant becomes a worker.

[0094] The leader is responsible for collecting and aggregating the public parameters of all nodes, and then packaging the aggregated public parameters into a new block and publishing it to the blockchain for updating.

[0095] Workers alternately use stochastic gradient descent to update private and public parameters locally, upon receiving a message containing... After the latest block of a transaction, the worker verifies the new block. If the verification is successful, the worker adds the new block to its local blockchain.

[0096] This invention uses blockchain technology to solve the single point of failure problem in centralized federated learning (cFL). Each blockchain participant can be elected as a leader to aggregate received model parameters, acting as a central server for cFL, and stores these parameters in the blockchain. Users with the same goal and relevant data apply the MF algorithm to decompose their local data into private parameters containing user privacy information and public parameters that can be shared. They then alternately optimize the private and public parameters, and then send the public parameters to the leader. The leader generates a global public parameter set to share with these users, while storing their private parameters locally. The contributions are summarized below:

[0097] 1) Researchers proposed a decentralized federated learning (dFL) architecture that combines MF and blockchain, which solves the single point of failure and privacy leakage problems in cFL.

[0098] 2) For the proposed dFL, a high-performance, low-cost consensus mechanism was designed for leader election, and a privacy protection analysis was conducted. In addition, an auditing mechanism and an incentive mechanism were designed to reward contributors and punish malicious actors.

[0099] 3) In leader election algorithms based on dynamic random seeds, the newly calculated... This is used to calculate a new random seed, which not only prevents the security risks caused by the early prediction of the new random seed, but also ensures that each node has an equal opportunity to become the leader.

[0100] 4) Through case studies of movie recommendations, the researchers conducted extensive experiments to verify the accuracy and privacy protection capabilities of the proposed method.

[0101] 5) Quantitative analysis of privacy protection performance and derivation of privacy leakage probability provide a theoretical basis for assessing the strength of user privacy protection. Attached Figure Description

[0102] Figure 1 This is a diagram of the traditional centralized federated learning (cFL) architecture.

[0103] Figure 2This invention provides a decentralized federated learning framework.

[0104] Figure 3 This is a diagram of the decentralized federated learning training process of the present invention.

[0105] Figure 4 This diagram illustrates the process of updating the random seed and electing the leader in this invention. Detailed Implementation

[0106] The present invention will be further described in detail below with reference to the embodiments.

[0107] This invention first introduces the basic idea of ​​a matrix factorization-based recommender system (RS). Then, it proposes the matrix factorization-based RS problem and the design goals of this invention.

[0108] I. Recommendation Systems Based on Matrix Factorization

[0109] A typical movie recommendation system requires multiple movie recommendation platforms to collaboratively train a model that can recommend movies based on user preferences. Consider n users (i.e., U1, U2, ..., U...). n ) watched m movies (i.e., M1, M2, ..., M) from I ∈ N movie platforms. m The ratings of m movies by n users form a user-movie rating matrix R = (r ij ) n×m Each matrix element r ij (r ij Let ∈[1,5]) represent the rating of the i-th user for the j-th movie. In fact, as shown in Table 2, in movie recommendation platforms, each user is often only interested in and rates a very small number of movies. Therefore, the rating matrix is ​​often very sparse, with at least 80% of the elements likely being 0, and only 20% being sparse ratings. For example, the MovieLens dataset has 671 users and 9125 movies, but only 100,004 ratings, resulting in a sparsity of 1.63%. In Table 2, "?" indicates that the user has not yet rated the movie. The goal of the recommendation system is to predict the missing ratings in the rating matrix R and then recommend movies to users based on those ratings.

[0110] Table 1 User-Movie Rating Table

[0111]

[0112]

[0113] Matrix Factorization (MF) is a classic and widely used algorithm in recommendation systems. It maps both users and movies to a joint latent factor space with dimension k, where k < min(n, m), and models the user-movie interaction as the inner product in this space. It decomposes the user-movie rating matrix R into a user latent feature matrix U ∈ R n×k and a movie latent feature matrix V ∈ R m×k , where k represents the number of latent features. u i (i = 1, …, n) is the i-th row vector in the user latent feature matrix U n×k , representing the preference of the i-th user, such as the movie genres and directors the user likes. v j (j = 1, …, m) is the i-th row vector in the movie latent feature matrix V m×k , representing the attributes of the j-th movie, such as the movie's genre and director. Each dimension of the user and movie vectors represents the intensity of the latent feature. When performing matrix factorization, the dimensions of the user and movie vectors can be controlled, that is, the number of latent features can be controlled. If the first dimension represents the comedic nature of the movie, then the value of the first dimension of u i represents the degree to which the user likes comedies, and the first dimension of v j represents the probability that the movie is a comedy.

[0114] Matrix factorization estimates the rating by calculating the dot product of U n×k and V m×k , that is

[0115]

[0116] where is the predicted rating matrix, which has the same dimension as the rating matrix. Therefore, the predicted rating value i of user u j for movie v can be estimated by calculating the dot product of the two vectors u i and v j , that is

[0117]

[0118] It can be seen that the more consistent the user and movie vectors are, that is, the various latent features of the movie are exactly what the user likes, the higher the predicted rating.

[0119] Matrix factorization finds a set of U n×k and V m×k by calling an optimization algorithm (such as stochastic gradient descent), such that and R n×m have the smallest difference. A widely used and useful metric is to minimize Rn×m and The square of the Euclidean distance between them is given by formula (3).

[0120]

[0121] Once a set of optimal U n×k and V m×k It can generate the final prediction rating matrix according to formula (1) and recommend movies to users according to formula (1).

[0122] II. Problems and Objectives

[0123] In practice, user ratings of movies are considered either private user data or confidential data of service providers. However, traditional matrix factorization-based recommendation systems require the collection and acquisition of this sensitive data to train their models. This forces users to sacrifice their privacy for item recommendations, while service providers, for the sake of protecting user privacy and protecting their business interests, are unwilling to share data. Consequently, each service provider has only a limited amount of training data, resulting in biased and poorly performing models.

[0124] Furthermore, traditional matrix factorization-based recommender systems mostly employ a centralized learning framework. If the central parameter server, which aggregates the model parameters of all participating nodes, is attacked, data privacy will be compromised. Moreover, recommender organizations may resell user-generated and stored data to third parties without user consent, leading to user privacy breaches. Even if the recommender system adopts a centralized federated learning architecture, where raw data is stored locally and not shared, with only model parameters shared, attackers can still reconstruct the raw data during the aggregation process because model parameters carry sensitive user information, resulting in privacy breaches.

[0125] In this invention, we aim to solve these problems.

[0126] Intuitively, user privacy is protected if the user's rating data and gradient values ​​from two consecutive iterations are unavailable or inaccessible to any third party during training. However, protecting user privacy without sacrificing prediction accuracy is not easy. Previous studies have used methods such as data anonymization, noise perturbation, or homomorphic encryption to protect user privacy data, but these privacy protection schemes still have shortcomings. For example, while data anonymization can protect user privacy to some extent, it is still highly probable that anonymized data can be re-identified by associating numerous data sets. Adding noise to the training data using data perturbation reduces the usability of the machine learning model because it only yields approximate solutions. While using homomorphic encryption to protect training can guarantee model usability, the enormous computational resources required for encryption make this method difficult to apply.

[0127] Unlike their approach, researchers have attempted to use decentralized federated learning techniques to protect user privacy. In this invention, our goal is to propose a privacy-preserving decentralized federated learning framework for recommender systems to operate within. In our framework, each participant (e.g., a user or service provider) initially uses their own data and the latest public parameters (i.e., matrix V). m×k Train its model locally (i.e., update the parameter matrix U) n×k and V m×k Then all participants update the public parameters together. Because user rating data is kept local and only some parameters are shared, our framework protects user privacy.

[0128] III. Design of a Decentralized Federated Learning Framework

[0129] We propose a privacy-preserving decentralized federated learning framework for recommender systems. This framework consists of an underlying P2P network and a blockchain. Each node in the blockchain P2P network is an equal participant, collaboratively training the recommender system model using their respective local private data and obtaining two types of parameters: public parameters and private parameters. Private parameters contain the user's private characteristics and are not publicly disclosed. Public parameters contain shared characteristics and need to be publicly disclosed. The blockchain records the public parameters of the recommender system model. Each participating node updates its model using its local private data and private parameters, as well as the latest public parameters synchronized from the blockchain. Furthermore, by applying our proposed consensus mechanism based on dynamic random seeds, they require minimal computational resources and time to compete for the Leader. The Leader is responsible for collecting and aggregating the public parameters from all nodes and publishing the aggregated parameters to the blockchain. Throughout the training process, the user's private data remains local, and only the model's public parameters are transmitted; therefore, the decentralized federated learning framework protects user privacy.

[0130] System Framework

[0131] Figure 2 This demonstrates our decentralized federated learning framework. Below, we will detail each component.

[0132] P2P Network: The underlying P2P network consists of multiple nodes, each holding a copy of the blockchain. They collaboratively train the recommender system model. All nodes in the blockchain are equal, with no central node, avoiding the privacy and security issues associated with a centralized parameter server in centralized federated learning frameworks. Each node holding a copy of the blockchain optimizes the training and obtains two types of feature parameters using its local private data: private parameters (i.e.,...) Figure 2 Ui ) and common parameters (i.e. Figure 2 V i Each node stores its private parameters, containing its privacy information, locally, and instead uploads public parameters to the consensus leader elected according to our consensus mechanism. Note that the consensus leader is changed periodically to prevent malicious nodes or leader failures from harming the entire system. The leader elected in each round collects the public parameters from all nodes and then aggregates them. It then aggregates the parameters (i.e.,...) Figure 2 of Pack it into a block and attach this new block to the blockchain.

[0133] Blockchain: Our blockchain is similar to the blockchain proposed by Satoshi Nakamoto. The difference is that our blockchain contains aggregation parameters instead of buy / sell transactions as in the Nakamoto blockchain. These aggregation parameters are obtained through a learning model trained on nodes. A block in the blockchain contains a Header and a Body. The Header contains information such as the Leader ID. The Body contains the aggregation parameter transactions, as well as a list of IDs of all nodes that submitted the public parameters at that time. If the block size is too large, communication overhead increases. We can reduce block size and cost by storing only the hash value of each transaction in the block body.

[0134] In our proposed decentralized federated learning framework, each node in the blockchain P2P network plays one of two roles in each round: Worker or Leader. Initially, each node acts as a Worker. Each Worker trains the model using an optimization algorithm round by round, based on local private data and public parameters V. i Use formulas (4) and (5) to update private and public parameters.

[0135]

[0136] After the local model training is complete, each Worker competes for the Leader position based on our proposed consensus mechanism using dynamic random seeds. Once it wins the competition, the node becomes the Leader for that round; otherwise, it remains a Worker. Each Worker uploads shared parameters to the Leader for parameter aggregation. Below, we describe the work of both the Worker and the Leader.

[0137] Worker: The Worker synchronizes the local blockchain to the latest state, that is, it downloads the latest public parameters. Replace local public parameter V iThis is done so that the next iteration of training can proceed. Taking the i-th Worker as an example, it uses a matrix factorization algorithm to transform the original rating vector r... i It is decomposed into two low-dimensional matrices, namely the private parameter U. i and common parameter V i Then, the Worker updates U locally and alternately using the stochastic gradient descent (SGD) algorithm. i and V i The worker receives a message containing... After the latest block of a transaction is processed, the new block will be verified. If the verification passes, the Worker will add the new block to its local blockchain.

[0138] Leader: In each round, a unique Leader is selected based on our proposed consensus mechanism algorithm using dynamic random seeds. The Leader collects and aggregates the common parameter V of all Workers. i In the aggregation parameters After being packaged into a new block, the Leader broadcasts the block to the P2P network.

[0139] Taking a movie recommendation system as an example, we consider a model of a movie recommendation system that can recommend movies based on user preferences, where n users collaboratively train each other on a blockchain P2P network. Assume there are n users and m movies, and the user-movie rating matrix R = (r... ij ) n×m Each user's local private data r i Let i = 1, 2, ..., n be a row of the rating matrix R, representing the user's ratings for the m movies. As shown in Table 1 below, user 1's rating for the m movies is r1 = (r... 1j ) 1×m This is a row of the rating matrix R. Since user 1 only rates a very small number of movies, r1 is sparse, and missing values ​​are marked with "?". Each user's goal is to predict r. i It identifies missing ratings and recommends movies to users based on predicted ratings.

[0140] Table 2 User-Movie Rating Table for User 1

[0141] Y M1 [M2] [M3] … M m ]]>

[001] U1 5 ? ? … ?

[0142] Using matrix factorization algorithms, each user's rating r i It can be decomposed into a private user latent feature vector u containing user privacy. i ∈R 1×k A publicly available movie latent feature matrix V i ∈R m×k, where \(k, k < \min(n, m)\) is a hyperparameter representing the number of latent features. For example, the rating \(r_1\) of user 1 can be decomposed into \(u_1\) and \(V_1\) as shown in formula (6).

[0143] \(r_1 = u_1\times V\) m×k (6)

[0144] Vector \(u\) i represents the personal preference of the \(i\)-th user, contains user privacy, and is saved locally. The \(j\)-th row \(v\) of matrix \(V\) i represents the features of the \(j\)-th movie and can be disclosed and shared publicly. Each user estimates the rating by calculating the inner product of \(u\) i,j and \(V\), that is i and \(V\) i The estimated rating can be expressed as formula (8)

[0145]

[0146] Therefore, the predicted rating can be expressed as formula (8)

[0147]

[0148] Each user wants to find an approximate factorization to obtain two feature vectors as shown in formula (7). A widely used useful metric is to minimize the squared Euclidean distance between \(r\) i and as shown in formula (9). In addition, we use regularized squared error to avoid overfitting, where \(\lambda\) is the regularization factor. Therefore, the loss function of the \(i\)-th user can be defined as follows:

[0149]

[0150] Each node uses the alternating least squares algorithm to iteratively optimize, and trains the user privacy feature vector \(u\) <​​​​​​​​​​​​​​​​​​​​​​​​​i Each user updates V locally using stochastic gradient descent. i .

[0155]

[0156] Each user performs iterative calculations according to the above process. The calculation ends when the maximum number of iterations is reached or convergence is achieved, i.e., u... i or V i The iteration terminates when no further changes occur. Based on this model, the framework can effectively protect privacy while achieving the purpose of recommendation. The specific training process is as follows: Figure 3 As shown.

[0157] The detailed operating steps are as follows:

[0158] 1) Local training: Each user independently trains the above formulas (9)(10)(11)(12)(13) using their local private rating data, and at the end of the local iteration, each user obtains two parameters, namely a vector u containing privacy features. i and shared feature matrix V i Therefore, each user will generate a transaction V. i .

[0159] 2) Upload transaction V i Based on the Leader election consensus mechanism using dynamic random seeds, a unique Leader is randomly selected in each round. Simultaneously, each user uploads their transaction V after completing local training. i To the Leader.

[0160] 3) Aggregation parameters. The Leader selected through the consensus mechanism aggregates the shared parameter matrix V of all users. i And calculate all V i average As shown in formula (14). Then the Leader will Package it into a newly generated block and link it to the blockchain.

[0161]

[0162] 4) Global synchronization. Each user receives a message containing... After a new block is created, it will be verified. If the new block is verified by a majority of users, it will be accepted across the network. Each user links the new block to their local copy of the blockchain and downloads an average of the new blocks from the blockchain. Globally synchronize and update local V i As shown in Equation (15), this is for further iterative training.

[0163]

[0164] 5) Update u i Each user is based on formula (11) and Update local u i .

[0165] 6) Update V i Each user is updated based on the u above. i Update local V with formula (13) i .

[0166] Each node iterates through the above process in each round until u. i and V i convergence.

[0167] The specific algorithm is as follows:

[0168]

[0169]

[0170] B consensus mechanism

[0171] Consensus mechanisms are a crucial component of blockchain technology. A blockchain's consensus mechanism enables nodes to reach a consensus, spontaneously and honestly adhering to pre-defined rules in the protocol, verifying the authenticity of each record, and ultimately recording the verifiable records into the blockchain. The blockchain consensus mechanism ensures that all honest nodes maintain a consistent view of the blockchain.

[0172] Similarly, the decentralized federated learning framework based on blockchain proposed in this invention must also have a consensus mechanism. All nodes in the framework must reach consensus on two points: leader election and new block generation. However, most traditional blockchains use Proof-of-Work (PoW) consensus mechanisms, which waste a lot of computing resources. On the other hand, since messages in traditional blockchains are broadcast, consensus efficiency is low, scalability is poor, and synchronization between nodes is difficult. Therefore, this invention proposes a high-performance consensus mechanism to reduce computing resources while maintaining security similar to traditional consensus mechanisms.

[0173] Leader Election. To reach a consensus on the generated Leader, we propose a Leader election algorithm based on a dynamic random seed. Let ID... i Let i = 1, 2, ..., n represent the IDs of n nodes in the P2P network. These node IDs are public. In each round, each node performs local computation based on a public random seed and the IDs of other nodes to select a unique Leader. Simultaneously, based on the newly generated... Each node calculates the new random seed needed for the next Leader election. Note that we rely on the newly calculated... To calculate a new random seed, we can both prevent the new random seed from being predicted in advance and thus avoid security risks, and ensure that each node has a chance to become the Leader.

[0174] Let S t Let St represent the random seed used in the t-th round of Leader election (in the initial stage, the system generates a random seed S0), and let St represent the random seed used in the t-th round of Leader election. This represents the ID of the Leader elected in the i-th round of elections. (Using...) Figure 4 S t and The update process is as follows Figure 4 As shown.

[0175] The t-th round Leader election process: Each node, according to S... t Calculate its own hash value with the ID, and record the ID corresponding to the smallest hash value as . As shown in formula (16).

[0176]

[0177] The process of generating random numbers in round t+1: Each node generates random numbers according to S. t and generated in round t Calculate its hash value S t+1 As shown in formula (17).

[0178]

[0179] Compared to traditional consensus mechanisms, our consensus mechanism is computationally simpler. In traditional Proof-of-Work (PoW) consensus mechanisms, each node needs to expend its own computing power to try different nonces to find a hash value that meets the difficulty requirements. However, in our consensus mechanism, each node only needs to calculate its hash value during the Leader election process and the generation of the next nonce period. Therefore, our proposed consensus mechanism based on dynamic random seeds has low computational overhead.

[0180] On the other hand, each node can independently verify the information in the new block. Furthermore, since the information in the new block is public and transparent, all nodes can obtain consistent verification results.

[0181] Next, we will conduct a privacy performance analysis.

[0182] In this work, our goal is to design a decentralized federated learning framework that protects user privacy. In our design, each user trains using local private data to obtain private and public parameters, where the private parameter u... i Stored locally, common parameter V i It is disseminated and made public. It includes the public parameter V, which contains shared features. i Broadcast to the entire network and participate in collaborative training among nodes, thus not affecting model performance. Furthermore, private parameters containing user privacy are stored locally and will not be leaked, thereby protecting user privacy.

[0183] However, researchers have proposed that if the central server obtains user rating data or gradient values ​​in two consecutive iterations, it can accurately infer the user's original rating data, thus stealing user privacy. Unlike previous designs, in our design, each user in each round of the P2P network can only download the aggregated mean of all public parameters from the blockchain, making it impossible to infer user rating data based on the mathematical proofs in related papers. However, in our design, all users upload their own public parameters to the Leader in each round. If the same user is selected as Leader for two consecutive rounds, the Leader can infer user privacy using the public parameters obtained from the two consecutive rounds. Even though our proposed consensus mechanism is based on a random seed algorithm to randomly select a user as Leader in each round, and the probability of the same user being selected as Leader for two consecutive rounds is extremely low, there are still three situations in which the Leader can infer user privacy.

[0184] The first scenario is when all users in the P2P network are honest, and we consider the probability of the same user being selected as the Leader in two consecutive rounds. The second and third scenarios involve the possibility of dishonest users in the P2P network. Because there is no central server node for oversight and control, nodes operate independently, and dishonest users might perform spurious training on the model, uploading incorrect public parameters or using fake data for training. Therefore, we need to consider the probability of the same dishonest user being selected as the Leader in two consecutive rounds. Finally, we also need to consider the scenario where the Leaders in two consecutive rounds are different users, but these two dishonest users collude to share data, which could also reveal user privacy issues.

[0185] Next, we will analyze in detail the probability of the original data being leaked due to privacy issues in these three scenarios.

[0186] (1) First case: Calculate the probability that all users in the P2P network are honest and that the same honest user is selected as the leader in two consecutive rounds.

[0187] Assume that all n users in the P2P network are honest. Let T be the total number of rounds of global synchronization. Let X = {x1, x2, ..., x...} n} represents the user set, x i Let ξ be the i-th user. In each round, each user performs local computation based on a public random seed and the IDs of all nodes to select a Leader. That is, only one user is selected as the Leader in each round, meaning the other n-1 users are not selected. The Leader is responsible for collecting public parameters, calculating the average, and packaging transactions into the blockchain. In each round, each user is selected as the Leader with the same probability. Let ξ, 0 < ξ < 1, represent the probability that any honest user is selected as the Leader in any round, i.e., ξ ≥ 1.

[0188]

[0189] Let Ψ = {ψ1, ψ2, ..., ψ} T Let} be the set of Leaders, where ψ t Let P(ψ) be the Leader of the t-th round, t∈{1,...,T}. t =x i For honest user x i The probability of being selected as Leader in round t, i.e.

[0190]

[0191] The election of the Leader in round t+1 is irrelevant to round t, therefore honest user x i The probability P(ψ) of being selected as Leader in round t+1 t+1 =x i The same as in round t, i.e.

[0192] P(ψ t+1 =x i )=ξ·(1-ξ) n-1 (20)

[0193] Therefore, honest user x i The joint probability P(ψ) of being selected as Leader in round t and round t+1 t+1 =x i , ψ t =x i ) can be calculated as

[0194]

[0195]

[0196] The total number of global synchronization rounds in this system is T, therefore there are only T-1 consecutive two-round iterations. Therefore, for the same honest user x... i The probability P(X=x) of being selected as Leader in any two rounds within round T. i The following can be calculated:

[0197]

[0198] Next, we analyze the case where there are dishonest users in the system. Assume there are m (m << n) dishonest users in the P2P network, and let Ω = {ω1, ω2, ..., ωn}. m Let} represent a set of m dishonest users. Next, we will analyze the probability of privacy derived by the Leader in the second and third cases.

[0199] (2) Second case: Calculate the probability that there are dishonest users in the P2P network and the same dishonest user is selected as the leader in two consecutive rounds.

[0200] Let ε, 0 < ε < 1, represent the probability that any dishonest user will be selected as the Leader in any round, i.e.

[0201]

[0202] Let Ψ = {ψ1,ψ2,…,ψ} T} represents the Leader set, ψ t It is the leader in round t. Therefore, any dishonest user ω i The probability P(ψ) of (i∈{1,...,m}) being selected as Leader in round t. t =ω i )as follows,

[0203]

[0204] This user ω i The probability P(ψ) of being selected as Leader in round t+1 t+1 =ω i Same as formula (24), that is

[0205] P(ψ t+1 =ω i )=ε·(1-ε) n-1 (25)

[0206] Furthermore, dishonest users ω i The joint probability P(ψ) of being selected as Leader in round t and round t+1 t+1 =ω i ,ψ t =ω i ) can be calculated as

[0207] P(ψ t+1 =ω i ,ψ t =ω i )=P(ψ t+1 =ω i )P(ψ t =ω i (26)

[0208] =(ε·(1-ε) n-1 )·(ε·(1-ε) n-1 (26)

[0209] Therefore, the same dishonest user ω i The probability P(X=ω) of being selected as Leader in any two rounds within T synchronization cycles. i The following can be calculated:

[0210]

[0211] (3) The third case: Calculate the probability that there are dishonest users in the P2P network, and the Leaders in two consecutive rounds are different dishonest users, and they collude to leak privacy.

[0212] Based on the second scenario, we further analyze. A dishonest user ω i The probability of being selected as Leader in round t is shown in equation (28). Equation (24) is also acceptable (equation (24) is the same as equation (28), that is...

[0213]

[0214] Another dishonest user ω j The probability P(ψ) of (i≠j,j∈{1,...,m}) being selected as Leader in the (t+1)th round. t+1 =ω j The following can be calculated:

[0215]

[0216] Therefore, in round t, ω i Selected as Leader and in round t+1 ω j The joint probability P(ψ) of being selected as Leader t+1 =ω j ,ψ t =ω i ) can be calculated as

[0217]

[0218] Any two rounds ω within T synchronization cycles i ω j The probability P(X=ω) of being selected as Leader at the same time i X=ω j The following can be calculated:

[0219]

[0220] Finally, assuming all three scenarios have equal probabilities, we can calculate the total probability P of privacy leakage in our proposed decentralized federated learning framework as follows:

[0221]

[0222] Finally, simulation and result analysis were performed.

[0223] In this section, we demonstrate how our decentralized learning algorithm can protect privacy without compromising prediction accuracy in a movie recommendation system. We run extensive simulations to evaluate the effectiveness of our decentralized design and compare it with a centralized design. Below, we detail the performance evaluation.

[0224] For a recommendation model to gain acceptance and objective evaluation, authoritative datasets and unified evaluation metrics are essential. The MovieLiens dataset contains 100,004 training samples of ratings for 1-5 movies, consisting of 671 users and 9,125 movies, with a sparsity of 1.63%. We randomly selected 70% of the samples as training samples and the remaining 30% as test samples.

[0225] Overview

[0226] In this invention, we propose a privacy-preserving decentralized federated learning framework that uses blockchain as the underlying technology to address privacy and security issues in federated learning model training. We also quantify the degree of privacy protection offered by the algorithm. Extensive experiments demonstrate that our algorithm can guarantee the effectiveness of recommendations while protecting user privacy in the recommendation system.

[0227] In the future, we plan to use Non-IID data analysis to assess the convergence speed and privacy performance of this framework. Furthermore, asynchronous training not only reduces communication bottlenecks but also optimizes the algorithm through load balancing techniques, allowing slower nodes to perform less computation between synchronous operations, while faster nodes do more work. Therefore, we will further analyze the convergence speed of asynchronous training.

[0228] The symbols used in the remainder of this invention are summarized in Table I.

[0229] Table 1. Symbol Summary

[0230]

[0231]

Claims

1. A decentralized recommendation method with privacy protection features, based on matrix factorization algorithm and blockchain design, characterized in that... Includes the following steps: S1. Construct the prediction score matrix Consider a P2P network in blockchain where n users collaboratively train a movie recommendation system model that can recommend movies based on user preferences. Assume there are n users and m movies, with a user-movie rating matrix R = (r... ij ) n×m Each user's local private data r i ,i=1,2,…,n is a row of the rating matrix R, representing the user's rating of these m movies; User 1's rating of m movies: r1 = (r 1j ) 1×m Let r1 be a row of the rating matrix R, and r1 is sparse with many missing values. The goal for each user is to predict r. i The system identifies missing ratings and recommends movies to users based on predicted ratings. Using the matrix factorization algorithm, the rating r of each user i can be decomposed into a private user latent feature vector u containing user privacy i ∈R 1×k and a publicly available movie latent feature matrix V i ∈R m×k , where k, k < min(n, m) is a hyperparameter representing the number of latent features. For example, the rating r1 of user 1 can be decomposed into u1 and V1, as shown in formula (6) r1=u1×V m×k (6) Vector u i Represents the personal preferences of the i-th user, including user privacy, stored locally, matrix V. i row j v i,j Represents the characteristics of the j-th movie, which can be disclosed and shared publicly. Each user calculates u. i and V i The inner product estimation score, i.e. Therefore, the predicted score can be expressed as formula (8). S2, Local Training Each user hopes to find an approximate decomposition as shown in equation (7), and a widely used useful metric is minimizing r. i and The square of the Euclidean distance between them is given by Equation (9). Furthermore, regularized squared error is used to avoid overfitting, where λ is the regularization factor. Therefore, the loss function for the i-th user can be defined as follows: Each node is iteratively optimized using an alternating least squares algorithm, through a score r. i Training user privacy feature vector u i Film latent feature sharing matrix V i In each round, users retrieve the latest data from the blockchain. And perform the following repeated steps to calculate and update: Given the latent feature matrix V of the movie i According to the loss function Loss i Each user updates u locally using stochastic gradient descent. i , Where α is the learning rate; Based on u obtained in the previous step i Each user updates V locally using stochastic gradient descent. i ; Each user performs iterative calculations according to the above process. When the maximum number of iterations is reached or convergence is achieved, i.e., u... i or V i The iteration terminates when the changes cease. S3, Upload Transaction V i After local training is completed, a unique leader is randomly selected in each round based on a dynamic random seed leader election consensus mechanism. Simultaneously, each user will transfer V transactions after completing local training. i Uploaded to the leader; S4, Aggregation Parameters The leader aggregates the shared parameter matrix V of all users. i And calculate all V i average As shown in formula (14), then the leader will Package it into a newly generated block and link it to the blockchain; S5, Global Synchronization Each user received a message containing After a new block is created, it will be verified. If the new block is verified by a majority of users, it will be accepted by the entire network. Each user will link the new block to their local blockchain copy and download the average value from the new block. Globally synchronize and update local V i As shown in formula (15), in order to further iteratively train. S6, Update u i Each user is based on formula (11) and Update local u i ; S7, Update V i Each user is updated based on the u above. i Update local V with formula (13) i ; Each node iterates through the above process in each round until u. i and V i convergence; S8. Privacy performance analysis to obtain the total probability of privacy leakage.

2. The decentralized recommendation method with privacy protection as described in claim 1, characterized in that: In S3, the leader is selected using a leader election algorithm based on a dynamic random seed, specifically... Let ID i Let represent the ID of the i-th node. These IDs are public to all nodes. In each round of leader election, each node performs local computation based on a public random seed and the IDs of all nodes to elect a unique leader. Simultaneously, based on the IDs generated in this round... Each node calculates the new random seed needed for the next round of leader election; Let S t Let St represent the random seed used in the leader election of round t. In the initial stage, a random seed S0 is generated, and St is used. S represents the ID of the leader elected in round t. t and The update process is as follows: Round t leader election: Each node elects a leader based on S... t Calculate its own hash value with the ID, and record the ID corresponding to the smallest hash value as . As shown in formula (16), The process of generating random numbers in round t+1: Each node generates random numbers according to S. t and generated in round t Calculate its hash value S t+1 As shown in formula (17), Therefore, all nodes reached a consensus on the leader election.

3. The decentralized recommendation method with privacy protection as described in claim 1, characterized in that: In S8, privacy performance analysis includes three scenarios: The first scenario: Calculate the probability that all users in the P2P network are honest, and that the same honest user is elected as the leader in two consecutive rounds. The second scenario: Calculate the probability that there are dishonest users in the P2P network, and that the same dishonest user is elected as the leader in two consecutive rounds. The third scenario: Calculate the probability that there are dishonest users in the P2P network, and that the leaders of two consecutive rounds are different dishonest users who collude to leak privacy. By combining the three scenarios and assuming that the probabilities of each scenario are equal, we can obtain the total probability of privacy leakage.

4. The decentralized recommendation method with privacy protection as described in claim 3, characterized in that: The first scenario is as follows: Assume that all n users in the P2P network are honest. Let T be the total number of rounds of global synchronization, and let X = {x1, x2, ..., xn}. n } represents the user set, x i Let ξ be the i-th user. In each round, each user performs local computation based on a public random seed and the IDs of all nodes to select a leader. This means that only one user is selected as the leader in each round, implying that the other n-1 users are not selected. The leader is responsible for collecting public parameters, calculating the average, and packaging transactions into the blockchain. Each user is selected as the leader with the same probability in each round. Let ξ, 0 < ξ < 1, represent the probability that any honest user is selected as the leader in any round. Let Ψ = {ψ1, ψ2, ..., ψ T Let} be the set of leaders, where ψ t Let P(ψ) be the leader of round t, t∈{1,...,T}. t =x i For honest user x i The probability of being selected as the leader in round t, i.e. The election of the Leader in round t+1 is irrelevant to round t, therefore honest user x i The probability P(ψ) of being selected as the leader in round t+1 t+1 =x i The same as in round t, i.e. P(ψ t+1 =x i )=ξ·(1-ξ) n-1 (20) Therefore, honest user x i The joint probability P(ψ) of being selected as the leader in round t and round t+1 t+1 =x i Ψ t =x i ) can be calculated as The total number of global synchronization rounds in this system is T, therefore there are only T-1 consecutive two-round iterations. Thus, for the same honest user x... i The probability P(X=x) of being selected as the leader in any two rounds within round T. i The following can be calculated:

5. The decentralized recommendation method with privacy protection as described in claim 4, characterized in that: The second scenario is as follows: Let ε, 0 < ε < 1, represent the probability that any dishonest user will be selected as the leader in any round, i.e. Let Ψ = {ψ1,ψ2,…,ψ} T } represents the set of leaders, ψ t As the leader of round t, therefore, any dishonest user ω i The probability P(ψ) of (i∈{1,...,m}) being selected as the leader in round t. t =ω i )as follows, This user ω i The probability P(ψ) of being selected as the leader in round t+1 t+1 =ω i Same as formula (24), that is P(ψ t+1 =ω i )=e·(1-e) n-1 (25) Dishonest user ω i The joint probability P(ψ) of being selected as the leader in round t and round t+1 t+1 =ω i ,ψ t =ω i ) can be calculated as P(ψ t+1 =ω i ,ψ t =ω i )=P(ψ t+1 =ω i )·P(ψ t =ω i )=(e·(1-e) n-1 )·(e·(1-e) n-1 ) (26) Therefore, the same dishonest user ω i The probability P(X=ω) of being selected as the leader in any two rounds within T synchronization periods. i The following can be calculated:

6. The decentralized recommendation method with privacy protection as described in claim 5, characterized in that: The third scenario is as follows: A dishonest user ω i The probability of being selected as the leader in round t is shown in formula (28). Another dishonest user ω j The probability P(ψ) of (i≠j,j∈{1,...,m}) being selected as the leader in the (t+1)th round. t+1 =ω j The following can be calculated: Therefore, in round t, ω i Selected as leader and in round t+1 ω j The joint probability P(ψ) of being selected as the leader t+1 =ω j ,ψ t =ω i ) can be calculated as Any two rounds ω within T synchronization cycles i ω j The probability of being selected as a leader is P(X=ω). i X=ω j The following can be calculated:

7. A decentralized recommendation method with privacy protection as described in claim 6, characterized in that: Under the condition that the probabilities of the three scenarios are equal, the total probability P of privacy leakage satisfies the following expression: