CN112287231B - Federal recommendation gradient acquisition method and device, intelligent terminal and storage medium - Google Patents

Federal recommendation gradient acquisition method and device, intelligent terminal and storage medium Download PDF

Info

Publication number
CN112287231B
CN112287231B CN202011222354.2A CN202011222354A CN112287231B CN 112287231 B CN112287231 B CN 112287231B CN 202011222354 A CN202011222354 A CN 202011222354A CN 112287231 B CN112287231 B CN 112287231B
Authority
CN
China
Prior art keywords
gradient
noise
denoising
common
noisy
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202011222354.2A
Other languages
Chinese (zh)
Other versions
CN112287231A (en
Inventor
梁锋
潘微科
明仲
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shenzhen University
Original Assignee
Shenzhen University
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Shenzhen University filed Critical Shenzhen University
Priority to CN202011222354.2A priority Critical patent/CN112287231B/en
Publication of CN112287231A publication Critical patent/CN112287231A/en
Application granted granted Critical
Publication of CN112287231B publication Critical patent/CN112287231B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/95Retrieval from the web
    • G06F16/953Querying, e.g. by the use of web search engines
    • G06F16/9535Search customisation based on user profiles and personalisation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N20/00Machine learning
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02TCLIMATE CHANGE MITIGATION TECHNOLOGIES RELATED TO TRANSPORTATION
    • Y02T90/00Enabling technologies or technologies with a potential or indirect contribution to GHG emissions mitigation

Abstract

The invention discloses a federal recommendation gradient acquisition method, a federal recommendation gradient acquisition device, an intelligent terminal and a storage medium, wherein the federal recommendation gradient acquisition method comprises the following steps: acquiring a common object and a denoising object; acquiring a first noise-containing gradient through each common object based on the model parameters; acquiring a second noise-containing gradient through each denoising object based on the model parameters; and eliminating the common object gradient noise and the denoising gradient noise based on the first noisy gradient and the second noisy gradient, and obtaining a target gradient. Thus, the first noise-containing gradient and the second noise-containing gradient both contain corresponding gradient noise, so that the scoring behavior of the user can be protected; meanwhile, after the first noise-containing gradient and the second noise-containing gradient are obtained, corresponding gradient noise can be eliminated, and a target gradient without gradient noise is obtained. Therefore, the scheme can eliminate gradient noise while protecting the scoring behavior of the user, and improves the accuracy of the model in the federal recommendation process.

Description

Federal recommendation gradient acquisition method and device, intelligent terminal and storage medium
Technical Field
The invention relates to the technical field of federal recommendation, in particular to a federal recommendation gradient acquisition method, a federal recommendation gradient acquisition device, an intelligent terminal and a storage medium.
Background
With the improvement of people's privacy protection consciousness, traditional methods of collecting user data to a server and then modeling such as system filtering algorithms are no longer feasible because user privacy can be revealed. Google firstly proposes federal learning for solving the privacy problem of users, and some researches further combine federal learning with a collaborative filtering algorithm in a recommendation system, ensure that user data is kept locally to users in a modeling process, and only upload model parameters to a server to update a model, namely federal recommendation.
In the prior art, in federal recommendation, the gradient of the un-scored items of the virtual user and the gradient of the truly scored items of the user are generally uploaded to a server together, so that the scoring behavior of the user is protected. For example, a hybrid filling method is proposed in a display feedback federal recommendation (Federated Recommendation with Explicit Feedback, hereinafter referred to as FedRec) proposed by Guanyu Lin et al, wherein a part of unscored articles of a user are randomly sampled, then a virtual score is assigned to the unscored articles by using average score filling and predictive score filling, so as to obtain gradients of the unscored articles, and the gradients of the scored articles of the user and the gradients of the unscored articles are uploaded to a server together, so that the server cannot determine which articles the user truly scores according to the gradients, thereby protecting scoring behaviors of the user.
The problem in the prior art is that the gradient of the article which is not scored by the virtual user and the gradient of the article which is scored by the user truly are uploaded to the server together, so that gradient noise (namely the gradient of the article which is not scored by the virtual user) is introduced while the scoring behavior of the user is protected, the accuracy of a model in the federal recommendation process is reduced, and the recommendation effect is reduced.
Accordingly, there is a need for improvement and development in the art.
Disclosure of Invention
Aiming at the technical problems that in the prior art, the gradient of a virtual article which is not scored by a user and the gradient of an article which is truly scored by the user are uploaded to a server together, gradient noise is introduced while the scoring behavior of the user is protected, and the accuracy and the recommendation effect of a model are reduced, the invention provides a federal recommendation gradient acquisition method, a federal recommendation gradient acquisition device, an intelligent terminal and a storage medium, and model parameters can be acquired; acquiring a common object and a denoising object; acquiring a first noise-containing gradient through each common object based on the model parameters; acquiring a second noise-containing gradient through each denoising object based on the model parameters; and eliminating the common object gradient noise and the denoising gradient noise based on the first noisy gradient and the second noisy gradient, and obtaining a target gradient. The method comprises the steps of setting a common object and a denoising object respectively, eliminating gradient noise through a first noisy gradient obtained by the common object and a second noisy gradient obtained by the denoising object, eliminating gradient noise while protecting scoring behaviors of users, and obtaining a target gradient without gradient noise, thereby improving the accuracy and recommendation effect of a model in the federal recommendation process.
To achieve the above technical effects, a first aspect of the present invention provides a federal recommended gradient acquisition method, where the method includes:
obtaining model parameters;
acquiring a common object and a denoising object;
acquiring a first noise-containing gradient through each common object based on the model parameters, wherein the first noise-containing gradient comprises a common object gradient and common object gradient noise acquired through calculation of each common object;
acquiring a second noise-containing gradient through each denoising object based on the model parameters, wherein the second noise-containing gradient comprises a denoising object gradient and denoising gradient noise which are acquired by calculating each denoising object;
and eliminating the common object gradient noise and the denoising gradient noise based on the first noisy gradient and the second noisy gradient, and obtaining a target gradient.
Optionally, the obtaining the common object and the denoising object includes:
acquiring all object sets for evaluation;
acquiring a denoising object based on a preset denoising object threshold value and the object set;
and taking all objects except the denoising object in the object set as common objects.
Optionally, the obtaining, based on the model parameters, the first noise-containing gradient through each of the common objects includes:
Transmitting the model parameters to each common object;
respectively controlling each common object to calculate and acquire the gradient of the common object and the gradient noise of the common object based on the model parameters, and generating the first noise-containing gradient based on the gradient of the common object and the gradient noise of the common object;
the first noise-containing gradient of each of the common objects is acquired.
Optionally, the obtaining, based on the model parameters, a second noise-containing gradient through each of the denoising objects includes:
respectively controlling each common object to send the gradient noise of the common object to any one of the denoising objects;
transmitting the model parameters to each denoising object;
respectively controlling each denoising object to calculate and acquire the denoising object gradient based on the model parameters, acquiring the denoising gradient noise based on all received common object gradient noises, and generating the second denoising gradient based on the denoising object gradient and the denoising gradient noise, wherein the denoising gradient noise is the sum of the common object gradient noises received by the denoising object;
and acquiring the second noise-containing gradient of each denoising object.
Optionally, the second noise-containing gradient is the denoising object gradient minus the denoising gradient noise, the removing the common object gradient noise and the denoising gradient noise based on the first noise-containing gradient and the second noise-containing gradient, and obtaining the target gradient includes:
calculating and obtaining a first target noise-containing gradient based on each first noise-containing gradient, wherein the first target noise-containing gradient is the sum of the first noise-containing gradients;
calculating and obtaining a second target noise-containing gradient based on each second noise-containing gradient, wherein the second target noise-containing gradient is the sum of each second noise-containing gradient;
and calculating and obtaining the difference between the first target noisy gradient and the second target noisy gradient as the target gradient.
In a second aspect, the present invention provides a federal recommended gradient acquisition device, wherein the device comprises:
the parameter acquisition module is used for acquiring model parameters;
the object acquisition module is used for acquiring a common object and a denoising object;
the first noisy gradient acquisition module is used for acquiring a first noisy gradient through each common object based on the model parameters, wherein the first noisy gradient comprises a common object gradient and common object gradient noise acquired through calculation of each common object;
The second noisy gradient acquisition module is used for acquiring a second noisy gradient through each denoising object based on the model parameters, wherein the second noisy gradient comprises a denoising object gradient and denoising gradient noise acquired by calculation of each denoising object;
and the target gradient acquisition module is used for eliminating the common object gradient noise and the denoising gradient noise based on the first noisy gradient and the second noisy gradient to acquire a target gradient.
Optionally, the first noisy gradient obtaining module includes:
a common object parameter transmitting unit configured to transmit the model parameters to each of the common objects;
a first noise-containing gradient generating unit configured to control each of the common objects to calculate and acquire the common object gradient and the common object gradient noise based on the model parameters, and generate the first noise-containing gradient based on the common object gradient and the common object gradient noise;
a first noisy gradient acquisition unit configured to acquire the first noisy gradient of each of the common objects.
Optionally, the second noisy gradient obtaining module includes:
a common object control unit, configured to control each of the common objects to send the gradient noise of the common object to any one of the denoising objects;
The denoising object parameter sending unit is used for sending the model parameters to each denoising object;
a second noise-containing gradient generating unit configured to control each of the denoising objects to calculate and acquire the denoising object gradient based on the model parameter, acquire the denoising gradient noise based on all the received normal object gradient noise, and generate the second noise-containing gradient based on the denoising object gradient and the denoising gradient noise, where the denoising gradient noise is a sum of the normal object gradient noise received by the denoising object;
and a second noise-containing gradient acquisition unit configured to acquire the second noise-containing gradient of each of the denoising objects.
The third aspect of the present invention provides an intelligent terminal, including a memory, a processor, and a program stored in the memory and capable of running on the processor, where the program when executed by the processor implements the steps of any one of the federal recommended gradient acquisition methods.
A fourth aspect of the present invention provides a non-transitory computer readable storage medium having stored thereon a computer program which, when executed by a processor, performs the steps of any one of the federal recommended gradient acquisition methods described above.
From the above, the scheme of the invention obtains model parameters; acquiring a common object and a denoising object; acquiring a first noise-containing gradient through each common object based on the model parameters; acquiring a second noise-containing gradient through each denoising object based on the model parameters; and eliminating the common object gradient noise and the denoising gradient noise based on the first noisy gradient and the second noisy gradient, and obtaining a target gradient. The method and the device are characterized in that the common object and the denoising object are respectively arranged, gradient noise is eliminated through the first noisy gradient obtained by the common object and the second noisy gradient obtained by the denoising object, the grading behavior of a user is protected, the gradient noise is eliminated, and the target gradient without the gradient noise is obtained. Therefore, compared with the scheme that only the gradients of the virtual unscored objects of the user and the gradients of the real scored objects of the user are uploaded to the server together in the prior art, the scheme can eliminate gradient noise, and therefore accuracy and recommendation effect of the model in the federal recommendation process are improved.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings used in the embodiments or the description of the prior art will be briefly described below, and it is obvious that the drawings in the following description are only some embodiments of the present invention, and other drawings can be obtained according to these drawings without inventive effort for a person skilled in the art.
FIG. 1 is a schematic flow chart of a federal recommended gradient acquisition method according to an embodiment of the present invention;
FIG. 2 is a schematic flow chart of step S200 in FIG. 1 according to an embodiment of the present invention;
FIG. 3 is a flowchart illustrating the step S300 in FIG. 1 according to an embodiment of the present invention;
FIG. 4 is a schematic flow chart of step S400 in FIG. 1 according to an embodiment of the present invention;
FIG. 5 is a flowchart illustrating the step S500 in FIG. 1 according to an embodiment of the present invention;
FIG. 6 is a schematic diagram illustrating interaction between a server and a client according to an embodiment of the present invention;
FIG. 7 is a schematic diagram of a federal recommended gradient acquisition device according to an embodiment of the present invention;
FIG. 8 is a schematic diagram illustrating a specific structure of the first noisy gradient acquisition module 730 in FIG. 7 according to an embodiment of the present invention;
FIG. 9 is a schematic diagram illustrating a specific structure of the second noisy gradient acquisition module 740 in FIG. 7 according to an embodiment of the present invention;
fig. 10 is a schematic block diagram of an internal structure of an intelligent terminal according to an embodiment of the present invention.
Detailed Description
In the following description, for purposes of explanation and not limitation, specific details are set forth such as the particular system architecture, techniques, etc., in order to provide a thorough understanding of the embodiments of the present invention. It will be apparent, however, to one skilled in the art that the present invention may be practiced in other embodiments that depart from these specific details. In other instances, detailed descriptions of well-known systems, devices, circuits, and methods are omitted so as not to obscure the description of the present invention with unnecessary detail.
It should be understood that the terms "comprises" and/or "comprising," when used in this specification and the appended claims, specify the presence of stated features, integers, steps, operations, elements, and/or components, but do not preclude the presence or addition of one or more other features, integers, steps, operations, elements, components, and/or groups thereof.
It is also to be understood that the terminology used in the description of the invention is for the purpose of describing particular embodiments only and is not intended to be limiting of the invention. As used in this specification and the appended claims, the singular forms "a," "an," and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise.
The following description of the embodiments of the present invention will be made more fully hereinafter with reference to the accompanying drawings, in which embodiments of the invention are shown, it being evident that the embodiments described are only some, but not all embodiments of the invention. All other embodiments, which can be made by those skilled in the art based on the embodiments of the invention without making any inventive effort, are intended to be within the scope of the invention.
In the following description, numerous specific details are set forth in order to provide a thorough understanding of the present invention, but the present invention may be practiced in other ways other than those described herein, and persons skilled in the art will readily appreciate that the present invention is not limited to the specific embodiments disclosed below.
With the increasing importance of privacy and the release of some related privacy protection laws, the problem of how to protect the privacy of users is becoming more important. In the field of federal recommendation technology, there has also been a significant portion of research into privacy protection of user scoring behavior, which is typically protected by uploading gradients of virtual unscored items. For example, fedRec randomly samples a part of the unscored articles of the user, and then assigns a virtual score to the unscored articles by using average score filling and predictive score filling, so as to obtain gradients of the unscored articles, and upload the gradients of the scored articles of the user and the gradients of the unscored articles to the server together, so that the server cannot determine which articles are truly scored by the user according to the gradients, thereby protecting scoring behaviors of the user. The problem in the prior art is that the gradient of the article which is not scored by the virtual user and the gradient of the article which is scored by the user truly are uploaded to the server together, so that gradient noise (namely the gradient of the article which is not scored by the virtual user) is introduced while the scoring behavior of the user is protected, the accuracy of a model in the federal recommendation process is reduced, and the recommendation effect is reduced. Therefore, the invention provides a scheme capable of protecting the scoring behavior of the user and eliminating the gradient noise based on FedRec so as to improve the accuracy and recommendation effect of the model in the federal recommendation process.
In order to solve the problems in the prior art, the invention provides a federal recommendation gradient acquisition method, and in the embodiment of the invention, when a user is required to score an article, model parameters are acquired; acquiring a common object and a denoising object; acquiring a first noise-containing gradient through each common object based on the model parameters; acquiring a second noise-containing gradient through each denoising object based on the model parameters; and eliminating the common object gradient noise and the denoising gradient noise based on the first noisy gradient and the second noisy gradient, and obtaining a target gradient. Thus, the first noise-containing gradient obtained through the common object and the second noise-containing gradient obtained through the denoising object eliminate gradient noise, and the grading behavior of the user is protected while the gradient noise is eliminated, and the target gradient without gradient noise is obtained. Therefore, compared with the scheme that only the gradients of the virtual unscored objects of the user and the gradients of the real scored objects of the user are uploaded to the server together in the prior art, the scheme can eliminate gradient noise while protecting the scoring behavior of the user, so that the accuracy and recommendation effect of the model in the federal recommendation process are improved.
Exemplary method
As shown in fig. 1, an embodiment of the present invention provides a federal recommended gradient acquisition method, which includes the following steps:
step S100, obtaining model parameters.
Wherein the model parameters are potential feature vectors of the object, in this embodiment, V Representing potential feature vectors for item I, where I e I is the set of all items in the training set, and there isWhere d is the dimension of the potential feature vector, +.>
Step S200, a normal object and a denoising object are acquired.
Step S300, acquiring a first noise-containing gradient through each common object based on the model parameters, wherein the first noise-containing gradient comprises a common object gradient and common object gradient noise acquired through calculation of each common object.
Step S400, obtaining a second noise-containing gradient through each denoising object based on the model parameters, wherein the second noise-containing gradient comprises the denoising object gradient obtained by calculating each denoising object and denoising gradient noise.
In this embodiment, the server executes the federal recommended gradient obtaining method, the common object and the denoising object are clients associated with the server, the user corresponds to the clients one by one, the score calculation of the clients on the articles generates article gradients, and the server obtains the article gradients uploaded by each client and finally calculates to obtain target gradients, namely, the real gradients of the clients on the articles.
In this embodiment, the common object is a common client, and is configured to perform real scoring and virtual scoring on an object to obtain the first noise gradient. The denoising object is a denoising client, and as can be seen from step S400, the denoising client is configured to truly score the object and collect gradient noise of the common client in the scoring process, that is, gradient noise of the common object. Wherein the common object gradient noise is related to a virtual scoring of the item by the common client.
In the embodiment of the invention, the gradients obtained by the server from the common client and the denoising client all contain gradient noise, so that the server cannot obtain the specific grading conditions of the users corresponding to the common client and the denoising client on the articles (such as the actual grading of the articles by the users corresponding to a certain common client and the actual grading of the articles by the users corresponding to a certain common client, and the actual grading of the articles by the users not corresponding to the common client), thereby protecting the grading behaviors of the users corresponding to the clients.
And S500, eliminating the common object gradient noise and the denoising gradient noise based on the first noisy gradient and the second noisy gradient, and obtaining a target gradient.
Specifically, each of the first noisy gradients includes a common object gradient noise corresponding to a common object, each of the second noisy gradients includes a sum of common object gradients (i.e., denoising gradient noise) corresponding to one or more common objects received by the denoising object, and one common object only transmits its common object gradient noise to one denoising client, i.e., a sum of common object gradient noise included in all of the first noisy gradients is correspondingly equal to a sum of denoising gradient noise included in all of the second noisy gradients, so that all of the common object gradient noise and denoising gradient noise can be eliminated based on all of the first noisy gradients and all of the second noisy gradients, thereby obtaining a target gradient without gradient noise.
From the above, the federal recommended gradient acquisition method provided by the embodiment of the invention acquires model parameters; acquiring a common object and a denoising object; acquiring a first noise-containing gradient through each common object based on the model parameters; acquiring a second noise-containing gradient through each denoising object based on the model parameters; and eliminating the common object gradient noise and the denoising gradient noise based on the first noisy gradient and the second noisy gradient, and obtaining a target gradient. Therefore, the first noise-containing gradient obtained through the common object and the second noise-containing gradient obtained through the denoising object both contain corresponding gradient noise, so that the scoring behavior of the user can be protected; meanwhile, after the first noise-containing gradient and the second noise-containing gradient are obtained, corresponding gradient noise can be eliminated, and a target gradient without gradient noise is obtained. Therefore, compared with the scheme that only the gradients of the virtual unscored objects of the user and the gradients of the real scored objects of the user are uploaded to the server together in the prior art, the scheme can eliminate gradient noise while protecting the scoring behavior of the user, so that the accuracy and recommendation effect of the model in the federal recommendation process are improved.
Specifically, as shown in fig. 2, in this embodiment, the step S200 includes:
step S210, acquiring all the object sets for evaluation.
Step S220, obtaining a denoising object based on a preset denoising object threshold and the object set.
In step S230, all objects except the denoising object in the object set are taken as normal objects.
In this embodiment, the object set for evaluation includes all clients corresponding to the user for evaluation, where the denoising object is a denoising client, and the common object is a common client. The preset denoising target threshold value may be a preset value, or may be adjusted according to actual requirements, which is not limited herein. In actual use, the server acquires all clients, randomly screens and acquires denoising clients based on a preset denoising object threshold, and takes other clients as common clients. Alternatively, other screening methods are also possible, such as sorting screening according to the device conditions corresponding to each client, which is not limited herein.
Specifically, as shown in fig. 3, in this embodiment, the step S300 includes:
step S310, the model parameters are sent to each common object.
Step S320, controlling each of the normal objects to calculate and obtain the normal object gradient and the normal object gradient noise based on the model parameters, and generating the first noise-containing gradient based on the normal object gradient and the normal object gradient noise.
Step S330, obtaining the first noise gradient of each common object.
In this embodiment, the server executes the federal recommendation method, and the server acquires and initializes the model parameter V I is the set of all the articles in the training set, and the model parameters are sent to each commonUser corresponding to objectWherein (1)>For all the above-mentioned sets of objects for evaluation (i.e. sets of all clients), -a +.>For denoising object set (i.e. denoising client set), +.>For belonging to the collection->But not belonging to the>I.e. a set of common objects (i.e. a set of common clients).
Optionally, after the model parameters are sent to each common object, when the user corresponding to the common object performs the real score on the article, the gradient of the article may be obtained based on the corresponding real score. However, for some articles, the user corresponding to the common object does not perform real scoring, and at this time, a virtual score of the corresponding article is obtained through an average score and a predicted score, where the calculation formulas of the average score and the predicted score are shown in the following formulas (1) and (2), respectively:
Wherein r 'is' ui Scoring user u for virtual rank of item iM is the number of items actually scored by the user, y uk R is the indicator variable uk For the user to score the rank of item k, a range for scoring the grade of the article for the user, andt is the iteration number of the current algorithm, T predict To start using the virtual grade score as the iteration number of the virtual score of the corresponding item, +.>Transpose of feature vector for item i, T is the number of algorithm iterations, +.>A user potential feature vector for user u, d is the dimension of the potential feature vector, +.>
For item i, in FedRec, its gradient is shown in equation (3) below:
wherein,for all users +.>Dividing the sum of the gradients of item i by +.> Representing a set of users scoring the item i either truly or virtually, < >>For user u to item i, andis shown in the following formula (4) and formula (5):
wherein U is As the user potential feature vector of the user u, lambda is a weight parameter, lambda can be preset in an algorithm, and y ui Is an indicator variable.
In step S320 of this embodiment, the server controls each of the common clients to calculate and obtain a first noise gradient of the user u corresponding to each of the common clients to the object i through the formulas (1), (2), (4) and (5) based on the model parameters and the real scoring data of the user Wherein I is u Evaluating the collection of items for user u, above I' u The set of items sampled for virtual scoring among items not rated for user u, and having |I '' u |=ρ|I u I, wherein ρ is a preset sampling parameter. Alternatively, ρ may be 1,2 or 3, or may take other values according to practical situations, which is not specifically limited herein. In this embodiment, for the items that the user does not actually score, only a part of the items (ρ times the number of the items to be actually scored) is sampled for deficiencyAnd (5) scoring is performed, so that the scoring behavior of the user is protected, and the calculated amount is reduced. Alternatively, virtual scoring may be performed on all of the user unscored items, which is not particularly limited herein.
In this embodiment, after the server obtains the first noise gradient of each common object, the sum of the first noise gradients of the object may be calculated based on the following formula (6):
wherein,user corresponding to all common objects +.>The sum of gradients for item i +.>The first noise-containing gradient of the user u corresponding to the common object to the object i.
Specifically, as shown in fig. 4, in this embodiment, the step S400 includes:
step S410, each common object is controlled to send the gradient noise of the common object to any one of the denoising objects.
In this embodiment, the gradient noise of the common object is a gradient corresponding to a virtual score of the object by a user corresponding to each common client. The virtual score of the user corresponding to each common client for the article can be calculated based on the formula (1) and the formula (2), and the gradient corresponding to the virtual score can be calculated based on the formula (5). Specifically, for item i, the common object gradient noise corresponding to user u associated with the common client isCan be calculated from the following formula (7):
wherein I' u A set of items sampled for virtual scoring among the items not scored excessively for user u,for belonging to the collection->But not belonging to the>I.e. a set of common objects (i.e. a set of common clients).
Step S420, transmitting the model parameters to each denoising object.
And step S430, respectively controlling each denoising object to calculate and acquire the denoising object gradient based on the model parameters, acquiring the denoising gradient noise based on all received common object gradient noises, and generating the second denoising gradient based on the denoising object gradient and the denoising gradient noise, wherein the denoising gradient noise is the sum of the common object gradient noises received by the denoising object.
Step S440, obtaining the second noise gradient of each of the denoising objects.
In this embodiment, the server side also sends the model parameters to each denoising object (i.e., the denoising client side in this embodiment), and when the user corresponding to the denoising object performs the real score on an article, the server side may obtain the gradient corresponding to the article based on the corresponding real score, and the specific process is similar to that of the common object. However, for the article which is not subjected to real scoring by the user, the denoising object does not perform virtual scoring, so that the denoising object gradient obtained by calculating the denoising object does not comprise gradient noise generated by the virtual scoring. Wherein, for item i, the user associated with the denoising clientThe corresponding denoising object gradient is +.>Wherein I is u Evaluating the user for a set of items, +.>Is a collection of denoising objects (i.e., a collection of denoising clients).
Meanwhile, in this embodiment, the denoising object further needs to receive the normal object gradient noise sent by the normal object, and since each normal object in this embodiment sends the corresponding normal object gradient noise to any one denoising object, one denoising object may receive multiple normal object gradients, and each denoising object sums the normal object gradients received by the denoising object to obtain the denoising gradient noise corresponding to the denoising object. And generating a second noise-containing gradient based on the denoising gradient noise and the denoising object gradient, denoted as In this embodiment, the above second noise-containing gradient may be obtained by calculation based on the following formula (8):
wherein a is the denoising gradient noise corresponding to the denoising object, that is, all the normal object gradient noise received by the denoising object, which can be calculated based on the following formula (9):
wherein,all normal object gradient noise received for the denoised objectThe normal object gradient noise corresponding to each normal object can be calculated based on the above formula (7).
Specifically, although the above-mentioned denoising object does not virtually score the unscored object and does not generate the corresponding gradient noise, the second noise-containing gradient generated by the above-mentioned denoising object includes the gradient noise of the common object, so that the gradient containing noise is still obtained by the server, and the privacy of the user corresponding to the above-mentioned denoising object is also protected.
Optionally, the threshold of the denoising object may be set to be smaller than half of the number of elements of the object set for evaluation, so that the number of the denoising objects is smaller than the number of the normal objects, and further, when the normal objects are controlled to send corresponding normal object gradient noise to the denoising objects, it is ensured that at least one normal object corresponds to send normal object gradient noise to each denoising object, so that privacy of a user corresponding to the denoising object is further ensured.
Specifically, as shown in fig. 5, in this embodiment, the step S500 includes:
step S510, calculating and obtaining a first target noise gradient based on each of the first noise gradients, where the first target noise gradient is a sum of the first noise gradients.
Step S520, calculating and obtaining a second target noise gradient based on each second noise gradient, wherein the second target noise gradient is the sum of the second noise gradients.
In step S530, a difference between the first target noisy gradient and the second target noisy gradient is calculated and obtained as the target gradient.
Specifically, the server obtains the second noise gradient generated by each denoising object in step S440And the sum of the second noisy gradient (second target noisy gradient) and the sum of the first noisy gradient (first target noisy gradient) contains the same part of gradient noise, namely all common pairsThus, the difference between the first target noise-containing gradient and the second target noise-containing gradient is calculated and obtained, and the target gradient for eliminating the gradient noise of all the common objects can be obtained.
The target gradient may be calculated based on the following formula (10):
Wherein B is the target gradient,for the above first target noisy gradient, it can be calculated based on formula (6), and +_>A noise gradient for a second object, wherein +.>For denoising objects->The corresponding second noisy gradient may be calculated based on equation (8) above.
Specifically, as can be seen from the above formula (8) and formula (10), when calculating the target gradient B, subtracting the second target gradient from the first target gradient corresponds to subtracting the sum of gradient noises corresponding to all the denoising objects, and then adding the sum of gradient differences corresponding to all the denoising objects. I.e. the sum of all normal object gradient noise is subtracted, the final obtained target gradient only comprises the sum of all normal object gradients and all denoising object gradients. It can be seen that the obtained target gradient reflects the true score of each common object and the denoising object to the object, and no gradient noise is contained.
Optionally, the common object and the denoising object receive the article feature vector V ,i∈I u When in use, each upper part can also be controlledThe normal object and the denoising object are calculated based on the following formula (11) to obtain a user gradient
Wherein e ui For the difference between the true score of user U for item i and the predicted score of user U for item i, U For the potential feature vector of the user, lambda is a weight parameter, I u User u is scored for an excessive set of items.
Further, it can be based on the aboveFor the user potential feature vector U Updating is carried out to improve the accuracy of the model.
Optionally, when the denoising object receives the common object gradient noise sent by the common object, each denoising object may be further controlled to further count the number of common objects virtually scoring the object i in the common objects to which the common object gradient noise is sent, and record asThe server side can obtain the statistics of each denoising object while executing the step S440>To further count the number of objects that actually score the item.
Optionally, after the target gradient is acquired, the federal recommended gradient acquiring method further includes: and calculating the number of scoring objects for truly scoring the object, and updating the potential feature vector of the object based on the target gradient and the number of scoring objects so as to improve the calculation accuracy in the subsequent gradient calculation. The number of the scoring objects is the sum of the numbers of all common objects and denoising objects which truly score the object.
Specifically, after the server obtains the target gradient B of the item i, the number of clients evaluating the item i excessively is calculatedI.e. < ->Wherein (1)>Representing a set of objects that score item i either truly or virtually,/a->And counting the number of the obtained common objects which virtually score the object i in the common objects which send the common object gradient noise to each denoising object.
Specifically, the server may update the potential feature vector of the item i by the following formula (12):
wherein V to the left of the equation To update the potential feature vector of item i, V to the right of the equation For potential feature vectors of the item i before updating, γ represents the learning rate of the model, and B is the target gradient calculated based on the above formula (10).
Specifically, fig. 6 shows a schematic diagram of interaction between a server and a client provided in this embodiment, and fig. 6 only shows a common client and a denoising client. As shown in fig. 6, the server side transmits to the normal client u and the denoising clientTransmitting item latent feature vector V And receive the first feedback of the common client uA noise gradient->Denoising client->Second noisy gradient of feedback->And the number of common objects virtually scoring the object i in the common objects to which the common object gradient noise is transmitted, which are fed back by the denoising client side +. >Thus, the server calculates and acquires the target gradient based on the first denoising gradient and the second denoising gradient, and based on the +.>The number of objects that truly score the item is calculated and the item potential feature vector is further updated. The specific calculation process may refer to the flow of the federal recommended gradient acquisition method in this embodiment, which is not described herein.
Exemplary apparatus
As shown in fig. 7, corresponding to the above federal recommended gradient acquisition method, an embodiment of the present invention further provides a federal recommended gradient acquisition apparatus, where the federal recommended gradient acquisition apparatus includes:
the parameter obtaining module 710 is configured to obtain model parameters.
Wherein the model parameters are potential feature vectors of the object, in this embodiment, V Representing potential feature vectors for item I, where I e I is the set of all items in the training set, and there isWhere d is the dimension of the potential feature vector, +.>
The object obtaining module 720 is configured to obtain a normal object and a denoising object.
The first noisy gradient obtaining module 730 is configured to obtain a first noisy gradient through each of the common objects based on the model parameters, where the first noisy gradient includes a common object gradient obtained by calculation of each of the common objects and a common object gradient noise.
And a second noisy gradient obtaining module 740, configured to obtain a second noisy gradient through each of the denoising objects based on the model parameters, where the second noisy gradient includes a denoising object gradient and a denoising gradient noise obtained by calculation of each of the denoising objects.
In this embodiment, the federal recommended gradient obtaining device is used as a server, the common object and the denoising object are clients associated with the server, the users are in one-to-one correspondence with the clients, and the score calculation of the clients on the articles is used to generate article gradients, and the server obtains the article gradients uploaded by each client and finally calculates to obtain target gradients, namely, the real gradients of the clients on the articles.
In this embodiment, the common object is a common client, and is configured to perform real scoring and virtual scoring on an object to obtain the first noise gradient. The denoising object is a denoising client, and the denoising client is used for truly scoring the object and collecting gradient noise of the common client in the scoring process, namely gradient noise of the common object. Wherein the common object gradient noise is related to a virtual scoring of the item by the common client.
In the embodiment of the invention, the gradients obtained by the server from the common client and the denoising client all contain gradient noise, so that the server cannot obtain the specific grading conditions of the users corresponding to the common client and the denoising client on the articles (such as the actual grading of the articles by the users corresponding to a certain common client and the actual grading of the articles by the users corresponding to a certain common client, and the actual grading of the articles by the users not corresponding to the common client), thereby protecting the grading behaviors of the users corresponding to the clients.
The target gradient obtaining module 750 is configured to obtain a target gradient by eliminating the common object gradient noise and the denoising gradient noise based on the first noisy gradient and the second noisy gradient.
Specifically, each of the first noisy gradients includes a common object gradient noise corresponding to a common object, each of the second noisy gradients includes a sum of common object gradients (i.e., denoising gradient noise) corresponding to one or more common objects received by the denoising object, and one common object only transmits its common object gradient noise to one denoising client, i.e., a sum of common object gradient noise included in all of the first noisy gradients is correspondingly equal to a sum of denoising gradient noise included in all of the second noisy gradients, so that all of the common object gradient noise and denoising gradient noise can be eliminated based on all of the first noisy gradients and all of the second noisy gradients, thereby obtaining a target gradient without gradient noise.
From the above, the federal recommended gradient acquiring device provided by the embodiment of the invention acquires the model parameters through the parameter acquiring module 710; the general object and the denoising object are acquired by the object acquisition module 720; acquiring a first noise-containing gradient through each of the common objects based on the model parameters by a first noise-containing gradient acquisition module 730; acquiring a second noise-containing gradient through each of the denoising objects based on the model parameters by a second noise-containing gradient acquisition module 740; the target gradient is acquired by the target gradient acquisition module 750 by removing the normal object gradient noise and the denoising gradient noise based on the first noisy gradient and the second noisy gradient. Therefore, the first noise-containing gradient and the second noise-containing gradient both contain corresponding gradient noise, and scoring behaviors of users can be protected; meanwhile, after the first noise-containing gradient and the second noise-containing gradient are obtained, corresponding gradient noise can be eliminated, and a target gradient without gradient noise is obtained. Therefore, compared with the scheme that only the gradients of the virtual unscored objects of the user and the gradients of the real scored objects of the user are uploaded to the server together in the prior art, the scheme can eliminate gradient noise while protecting the scoring behavior of the user, so that the accuracy and recommendation effect of the model in the federal recommendation process are improved.
Optionally, the object obtaining module 720 is specifically configured to: acquiring all object sets for evaluation; acquiring a denoising object based on a preset denoising object threshold value and the object set; and taking all objects except the denoising object in the object set as common objects.
In this embodiment, the object set for evaluation includes all clients corresponding to the user for evaluation, where the denoising object is a denoising client, and the common object is a common client. The preset denoising target threshold value may be a preset value, or may be adjusted according to actual requirements, which is not limited herein. In actual use, the server acquires all clients, randomly screens and acquires denoising clients based on a preset denoising object threshold, and takes other clients as common clients. Alternatively, other screening methods are also possible, such as sorting screening according to the device conditions corresponding to each client, which is not limited herein.
Specifically, as shown in fig. 8, in this embodiment, the first noisy gradient obtaining module 730 includes:
and a common object parameter transmitting unit 731 configured to transmit the model parameters to each of the common objects.
And a first noise-containing gradient generating unit 732 configured to control each of the normal objects to calculate and acquire the normal object gradient and the normal object gradient noise based on the model parameters, respectively, and generate the first noise-containing gradient based on the normal object gradient and the normal object gradient noise.
A first noisy gradient acquisition unit 733 for acquiring the first noisy gradient of each of the common objects.
In this embodiment, the federal recommended gradient obtaining device is a server, and the server obtains and initializes the model parameter V I is the set of all articles in the training set, and the model parameters are sent to the users corresponding to the common objectsWherein (1)>For all the above-mentioned sets of objects for evaluation (i.e. sets of all clients), -a +.>For denoising object set (i.e. denoising client set), +.>For belonging to the collection->But not belonging to the>I.e. a set of common objects (i.e. a set of common clients).
Optionally, after the model parameters are sent to each common object, when the user corresponding to the common object performs the real score on the article, the gradient of the article may be obtained based on the corresponding real score. However, for some articles, the user corresponding to the common object does not perform real scoring, and at this time, a virtual score of the corresponding article is obtained through an average score and a predicted score, where the calculation formulas of the average score and the predicted score are shown in the following formulas (13) and (14), respectively:
Wherein r 'is' ui Scoring the virtual grade of the object i for the user u, and m is the object actually scored by the userThe number of products, y uk R is the indicator variable uk For the user to score the rank of item k, a range for scoring the grade of the article for the user, andt is the iteration number of the current algorithm, T predict To start using the virtual grade score as the iteration number of the virtual score of the corresponding item, +.>Transpose of feature vector for item i, T is the number of algorithm iterations, +.>A user potential feature vector for user u, d is the dimension of the potential feature vector, +.>
For item i, in FedRec, its gradient is shown in equation (15) below:
wherein,for all users +.>Dividing the sum of the gradients of item i by +.> Representing a set of users scoring the item i either truly or virtually, < >>For user u to item i, andis shown in the following formula (16) and formula (17):
/>
wherein U is As the user potential feature vector of the user u, lambda is a weight parameter, lambda can be preset in an algorithm, and y ui Is an indicator variable.
In this embodiment, the server controls each of the common clients to calculate and obtain a first noise gradient of the user u corresponding to each of the common clients to the object i through the formulas (13), (14), (16) and (17) based on the model parameters and the real scoring data of the user Wherein I is u Evaluating the collection of items for user u, above I' u The set of items sampled for virtual scoring among items not rated for user u, and having |I '' u |=ρ|I u I, wherein ρ is a preset sampling parameter. Alternatively, ρ may be 1,2 or 3, or may take other values according to practical situations, which is not specifically limited herein. In this embodiment, for the items that the user does not score truly, only a part of the items (ρ times the number of items scored truly) is sampled for virtual scoring, and the user scoring line is protectedThereby reducing the calculation amount at the same time. Alternatively, virtual scoring may be performed on all of the user unscored items, which is not particularly limited herein.
In this embodiment, after the server obtains the first noise gradient of each common object, the sum of the first noise gradients of the object may be calculated based on the following formula (18):
wherein,user corresponding to all common objects +.>The sum of gradients for item i +.>The first noise-containing gradient of the user u corresponding to the common object to the object i.
Specifically, as shown in fig. 9, in this embodiment, the second noisy gradient obtaining module 740 includes:
and a common object control unit 741 configured to control each of the common objects to transmit the common object gradient noise to any one of the denoising objects.
In this embodiment, the gradient noise of the common object is a gradient corresponding to a virtual score of the object by a user corresponding to each common client. Specifically, for item i, the common object gradient noise corresponding to user u associated with the common client isCan be calculated from the following formula (19):
wherein I' u A set of items sampled for virtual scoring among the items not scored excessively for user u,for belonging to the collection->But not belonging to the>I.e. a set of common objects (i.e. a set of common clients).
The denoising object parameter transmitting unit 742 is configured to transmit the model parameters to each denoising object.
And a second noise-containing gradient generating unit 743 configured to control each of the denoising objects to calculate and acquire the denoising object gradient based on the model parameters, acquire the denoising gradient noise based on all the received normal object gradient noise, and generate the second noise-containing gradient based on the denoising object gradient and the denoising gradient noise, where the denoising gradient noise is a sum of the normal object gradient noise received by the denoising object.
A second noisy gradient acquisition unit 744 for acquiring the second noisy gradient of each of the denoising objects.
In this embodiment, the server side also sends the model parameters to each denoising object (i.e., the denoising client side in this embodiment), and when the user corresponding to the denoising object performs the real score on an article, the server side may obtain the gradient corresponding to the article based on the corresponding real score, and the specific process is similar to that of the common object. However, for the article which is not subjected to real scoring by the user, the denoising object does not perform virtual scoring, so that the denoising object gradient obtained by calculating the denoising object does not comprise gradient noise generated by the virtual scoring. Wherein, for item i, the user associated with the denoising clientThe corresponding denoising object gradient is +.>Wherein I is u Evaluating the user for a set of items, +.>Is a collection of denoising objects (i.e., a collection of denoising clients).
Meanwhile, in this embodiment, the denoising object further needs to receive the normal object gradient noise sent by the normal object, and since each normal object in this embodiment sends the corresponding normal object gradient noise to any one denoising object, one denoising object may receive multiple normal object gradients, and each denoising object sums the normal object gradients received by the denoising object to obtain the denoising gradient noise corresponding to the denoising object. And generating a second noise-containing gradient based on the denoising gradient noise and the denoising object gradient, denoted as In this embodiment, the above second noise-containing gradient may be obtained by calculation based on the following formula (20):
wherein a is the denoising gradient noise corresponding to the denoising object, that is, all the normal object gradient noise received by the denoising object, which can be calculated based on the following formula (21):
wherein,the common object gradient noise corresponding to each common object can be calculated based on the formula (19)Obtaining the product.
Specifically, although the above-mentioned denoising object does not virtually score the unscored object and does not generate the corresponding gradient noise, the second noise-containing gradient generated by the above-mentioned denoising object includes the gradient noise of the common object, so that the gradient containing noise is still obtained by the server, and the privacy of the user corresponding to the above-mentioned denoising object is also protected.
Optionally, the threshold of the denoising object may be set to be smaller than half of the number of elements of the object set for evaluation, so that the number of the denoising objects is smaller than the number of the normal objects, and further, when the normal objects are controlled to send corresponding normal object gradient noise to the denoising objects, it is ensured that at least one normal object corresponds to send normal object gradient noise to each denoising object, so that privacy of a user corresponding to the denoising object is further ensured.
Optionally, the target gradient acquiring module is specifically configured to: calculating and obtaining a first target noise-containing gradient based on each first noise-containing gradient, wherein the first target noise-containing gradient is the sum of the first noise-containing gradients; calculating and obtaining a second target noise-containing gradient based on each second noise-containing gradient, wherein the second target noise-containing gradient is the sum of each second noise-containing gradient; and calculating and obtaining the difference between the first target noisy gradient and the second target noisy gradient as the target gradient.
Specifically, the server obtains the second noise gradient generated by each denoising object through the second noise gradient acquisition unit 744And the sum of the second noise-containing gradient (second target noise-containing gradient) and the sum of the first noise-containing gradient (first target noise-containing gradient) contain the same part of gradient noise, namely the sum of all the common object gradient noise, so that the difference between the first target noise-containing gradient and the second target noise-containing gradient is calculated and obtained, and the target gradient for eliminating all the common object gradient noise can be obtained.
The target gradient may be calculated based on the following formula (22):
wherein B is the target gradient, For the first target noisy gradient described above, the +_a can be calculated based on equation (18)>A noise gradient for a second object, wherein +.>For denoising objects->The corresponding second noisy gradient may be calculated based on equation (20) above.
Specifically, as can be seen from the above formula (20) and formula (22), when calculating the target gradient B, subtracting the second target gradient from the first target gradient corresponds to subtracting the sum of gradient noises corresponding to all the denoising objects, and then adding the sum of gradient differences corresponding to all the denoising objects. I.e. the sum of all normal object gradient noise is subtracted, the final obtained target gradient only comprises the sum of all normal object gradients and all denoising object gradients. It can be seen that the obtained target gradient reflects the true score of each common object and the denoising object to the object, and no gradient noise is contained.
Optionally, the common object and the denoising object receive the article feature vector V ,i∈I u In this case, each of the above-mentioned normal object and the denoising object may be also controlled to obtain a user gradient based on the calculation of the following formula (23)
Wherein e ui For the difference between the true score of user U for item i and the predicted score of user U for item i, U For the potential feature vector of the user, lambda is a weight parameter, I u User u is scored for an excessive set of items.
Further, it can be based on the aboveFor the user potential feature vector U Updating is carried out to improve the accuracy of the model.
Optionally, when the denoising object receives the common object gradient noise sent by the common object, each denoising object may be further controlled to further count the number of common objects virtually scoring the object i in the common objects to which the common object gradient noise is sent, and record asThe server side can also obtain the statistics of each denoising object>To further count the number of objects that actually score the item.
Optionally, after the target gradient is acquired, the federal recommended gradient acquiring device may be further configured to: and calculating the number of scoring objects for truly scoring the object, and updating the potential feature vector of the object based on the target gradient and the number of scoring objects so as to improve the calculation accuracy in the subsequent gradient calculation. The number of the scoring objects is the sum of the numbers of all common objects and denoising objects which truly score the object.
Specifically, after the server obtains the target gradient B of the item i, the number of clients evaluating the item i excessively is calculated I.e. < ->Wherein (1)>Representing a set of objects that score item i either truly or virtually,/a->And counting the number of the obtained common objects which virtually score the object i in the common objects which send the common object gradient noise to each denoising object.
Specifically, the server may update the potential feature vector of the item i by the following formula (24):
wherein V to the left of the equation To update the potential feature vector of item i, V to the right of the equation For potential feature vectors of the item i before updating, γ represents the learning rate of the model, and B is the target gradient calculated based on the above formula (22).
Based on the above embodiment, the present invention further provides an intelligent terminal, and a functional block diagram thereof may be shown in fig. 10. The intelligent terminal comprises a processor, a memory, a network interface and a display screen which are connected through a system bus. The processor of the intelligent terminal is used for providing computing and control capabilities. The memory of the intelligent terminal comprises a nonvolatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of the operating system and computer programs in the non-volatile storage media. The network interface of the intelligent terminal is used for communicating with an external terminal through network connection. The computer program when executed by a processor performs the steps of any of the federal recommended gradient acquisition methods described above. The display screen of the intelligent terminal can be a liquid crystal display screen or an electronic ink display screen.
It will be appreciated by those skilled in the art that the schematic block diagram shown in fig. 10 is merely a block diagram of a portion of the structure associated with the present inventive arrangements and is not limiting of the smart terminal to which the present inventive arrangements are applied, and that a particular smart terminal may include more or fewer components than shown, or may combine some of the components, or have a different arrangement of components.
In one embodiment, an intelligent terminal is provided, including a memory, a processor, and a program stored in the memory and executable on the processor, where the program when executed by the processor performs the following operation instructions:
obtaining model parameters;
acquiring a common object and a denoising object;
acquiring a first noise-containing gradient through each common object based on the model parameters, wherein the first noise-containing gradient comprises a common object gradient and common object gradient noise acquired through calculation of each common object;
acquiring a second noise-containing gradient through each denoising object based on the model parameters, wherein the second noise-containing gradient comprises a denoising object gradient and denoising gradient noise which are acquired by calculating each denoising object;
And eliminating the common object gradient noise and the denoising gradient noise based on the first noisy gradient and the second noisy gradient, and obtaining a target gradient.
The embodiment of the invention also provides a non-transitory computer readable storage medium, on which a computer program is stored, which when executed by a processor, implements the steps of any of the federal recommended gradient acquisition methods provided by the embodiment of the invention.
It should be understood that the sequence number of each step in the above embodiment does not mean the sequence of execution, and the execution sequence of each process should be determined by its function and internal logic, and should not be construed as limiting the implementation process of the embodiment of the present invention.
It will be apparent to those skilled in the art that, for convenience and brevity of description, only the above-described division of the functional units and modules is illustrated, and in practical application, the above-described functional distribution may be performed by different functional units and modules according to needs, i.e. the internal structure of the apparatus is divided into different functional units or modules to perform all or part of the above-described functions. The functional units and modules in the embodiment may be integrated in one processing unit, or each unit may exist alone physically, or two or more units may be integrated in one unit, where the integrated units may be implemented in a form of hardware or a form of a software functional unit. In addition, the specific names of the functional units and modules are only for distinguishing from each other, and are not used for limiting the protection scope of the present invention. The specific working process of the units and modules in the above system may refer to the corresponding process in the foregoing method embodiment, which is not described herein again.
In the foregoing embodiments, the descriptions of the embodiments are emphasized, and in part, not described or illustrated in any particular embodiment, reference is made to the related descriptions of other embodiments. The same amounts are expressed for the respective formulas, and the respective formulas may be referred to each other unless otherwise specified.
Those of ordinary skill in the art will appreciate that the elements and algorithm steps of the examples described in connection with the embodiments disclosed herein may be implemented as electronic hardware, or combinations of computer software and electronic hardware. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the solution. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present invention.
In the embodiments provided in the present invention, it should be understood that the disclosed apparatus/terminal device and method may be implemented in other manners. For example, the apparatus/terminal device embodiments described above are merely illustrative, e.g., the division of the modules or units described above is merely a logical function division, and may be implemented in other manners, e.g., multiple units or components may be combined or integrated into another system, or some features may be omitted, or not performed.
The integrated modules/units described above, if implemented in the form of software functional units and sold or used as stand-alone products, may be stored in a computer-readable storage medium. Based on such understanding, the present invention may implement all or part of the flow of the method of the above embodiment, or may be implemented by instructing related hardware by a computer program, where the computer program may be stored in a computer readable storage medium, and the computer program may implement the steps of each of the method embodiments described above when executed by a processor. The computer program comprises computer program code, and the computer program code can be in a source code form, an object code form, an executable file or some intermediate form and the like. The computer readable medium may include: any entity or device capable of carrying the computer program code described above, a recording medium, a U disk, a removable hard disk, a magnetic disk, an optical disk, a computer Memory, a Read-Only Memory (ROM), a random access Memory (RAM, random Access Memory), an electrical carrier signal, a telecommunications signal, a software distribution medium, and so forth. The content of the computer readable storage medium can be appropriately increased or decreased according to the requirements of the legislation and the patent practice in the jurisdiction.
The above embodiments are only for illustrating the technical solution of the present invention, and not for limiting the same; although the invention has been described in detail with reference to the foregoing embodiments, those of ordinary skill in the art will understand that; the technical scheme described in the foregoing embodiments can be modified or some technical features thereof can be replaced by equivalents; such modifications and substitutions are not intended to depart from the spirit and scope of the various embodiments of the invention, which are also within the spirit and scope of the invention.

Claims (1)

1. A federal recommended gradient acquisition device, the device comprising:
the parameter acquisition module is used for acquiring model parameters;
the object acquisition module is used for acquiring a common object and a denoising object;
the first noisy gradient acquisition module is used for acquiring a first noisy gradient through each common object based on the model parameters, wherein the first noisy gradient comprises a common object gradient acquired through calculation of each common object and common object gradient noise;
the second noisy gradient acquisition module is used for acquiring a second noisy gradient through each denoising object based on the model parameters, wherein the second noisy gradient comprises a denoising object gradient and denoising gradient noise acquired through calculation of each denoising object;
The target gradient acquisition module is used for eliminating the common object gradient noise and the denoising gradient noise based on the first noisy gradient and the second noisy gradient to acquire a target gradient;
the first noisy gradient acquisition module includes:
a common object parameter transmitting unit, configured to transmit the model parameters to each of the common objects;
the first noise-containing gradient generation unit is used for respectively controlling each common object to calculate and acquire the common object gradient and the common object gradient noise based on the model parameters and generating the first noise-containing gradient based on the common object gradient and the common object gradient noise;
a first noisy gradient acquisition unit configured to acquire the first noisy gradient of each of the common objects;
the second noisy gradient acquisition module includes:
the common object control unit is used for respectively controlling each common object to send the common object gradient noise to any one of the denoising objects;
the denoising object parameter sending unit is used for sending the model parameters to each denoising object;
the second noise-containing gradient generating unit is used for respectively controlling each denoising object to calculate and acquire the denoising object gradient based on the model parameters, acquiring the denoising gradient noise based on all received common object gradient noise, and generating the second noise-containing gradient based on the denoising object gradient and the denoising gradient noise, wherein the denoising gradient noise is the sum of the common object gradient noise received by the denoising object;
A second noisy gradient acquisition unit configured to acquire the second noisy gradient of each of the denoised objects;
the target gradient calculation formula is as follows:
wherein B is the target gradient,for the first noisy gradient, +.>For the second noisy gradient;
the second noisy gradient calculation formula is as follows:
wherein i is an article,evaluating the collection of items for the denoised user, +.>To remove noise from passengersUser associated with user terminal, user's permission>For denoising the object set, function->User associated for denoising client +.>For the gradient of the object i, A is denoising gradient noise corresponding to the denoising object, and the calculation formula of A is as follows:
wherein,gradient noise of all normal objects received for the denoised object,/->Is a collection of all objects for evaluation.
CN202011222354.2A 2020-11-05 2020-11-05 Federal recommendation gradient acquisition method and device, intelligent terminal and storage medium Active CN112287231B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011222354.2A CN112287231B (en) 2020-11-05 2020-11-05 Federal recommendation gradient acquisition method and device, intelligent terminal and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011222354.2A CN112287231B (en) 2020-11-05 2020-11-05 Federal recommendation gradient acquisition method and device, intelligent terminal and storage medium

Publications (2)

Publication Number Publication Date
CN112287231A CN112287231A (en) 2021-01-29
CN112287231B true CN112287231B (en) 2024-04-05

Family

ID=74352309

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011222354.2A Active CN112287231B (en) 2020-11-05 2020-11-05 Federal recommendation gradient acquisition method and device, intelligent terminal and storage medium

Country Status (1)

Country Link
CN (1) CN112287231B (en)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110189192A (en) * 2019-05-10 2019-08-30 深圳前海微众银行股份有限公司 A kind of generation method and device of information recommendation model
CN110297848A (en) * 2019-07-09 2019-10-01 深圳前海微众银行股份有限公司 Recommended models training method, terminal and storage medium based on federation's study
CN111079022A (en) * 2019-12-20 2020-04-28 深圳前海微众银行股份有限公司 Personalized recommendation method, device, equipment and medium based on federal learning
CN111260061A (en) * 2020-03-09 2020-06-09 厦门大学 Differential noise adding method and system in federated learning gradient exchange

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8195580B2 (en) * 2008-05-30 2012-06-05 The University Of Memphis Research Foundation Methods of detection of propogating phase gradients using model field theory of non-gaussian mixtures
US9536177B2 (en) * 2013-12-01 2017-01-03 University Of Florida Research Foundation, Inc. Distributive hierarchical model for object recognition in video

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110189192A (en) * 2019-05-10 2019-08-30 深圳前海微众银行股份有限公司 A kind of generation method and device of information recommendation model
CN110297848A (en) * 2019-07-09 2019-10-01 深圳前海微众银行股份有限公司 Recommended models training method, terminal and storage medium based on federation's study
CN111079022A (en) * 2019-12-20 2020-04-28 深圳前海微众银行股份有限公司 Personalized recommendation method, device, equipment and medium based on federal learning
CN111260061A (en) * 2020-03-09 2020-06-09 厦门大学 Differential noise adding method and system in federated learning gradient exchange

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
"FedRec: Federated Recommendation With Explicit Feedback";Guanyu Lin等;《IEEE Intelligent Systems》;第22-28页 *

Also Published As

Publication number Publication date
CN112287231A (en) 2021-01-29

Similar Documents

Publication Publication Date Title
JP5946073B2 (en) Estimation method, estimation system, computer system, and program
CN111126622B (en) Data anomaly detection method and device
US9111375B2 (en) Evaluation of three-dimensional scenes using two-dimensional representations
Liu et al. A fuzzy logic based reputation model against unfair ratings
CN111400754B (en) Construction method and device of user classification system for protecting user privacy
US20210004676A1 (en) Population based training of neural networks
CN111696164B (en) Self-adaptive window width and window level adjusting method, device, computer system and storage medium
KR20160131071A (en) Neural network and method of neural network training
KR102310490B1 (en) The design of GRU-based cell structure robust to missing value and noise of time-series data in recurrent neural network
CN110929799A (en) Method, electronic device, and computer-readable medium for detecting abnormal user
US10635078B2 (en) Simulation system, simulation method, and simulation program
CN112906888B (en) Task execution method and device, electronic equipment and storage medium
Burgos et al. A nonlinear dynamic age-structured model of e-commerce in spain: Stability analysis of the equilibrium by delay and stochastic perturbations
JP6950504B2 (en) Abnormal candidate extraction program, abnormal candidate extraction method and abnormal candidate extraction device
Ullah et al. Dynamic analysis of mean-field and fractional-order epidemic vaccination strategies by evolutionary game approach
Li et al. An uncertainty-based model of the effects of fixation on choice
CN112287231B (en) Federal recommendation gradient acquisition method and device, intelligent terminal and storage medium
WO2021039545A1 (en) Abnormality detection device, abnormality detection method, and program
Roberts An epidemic model with noisy parameters
CN110874638B (en) Behavior analysis-oriented meta-knowledge federation method, device, electronic equipment and system
CN112116024B (en) Method and device for classifying models by user, electronic equipment and storage medium
CN115272152A (en) Method, device, equipment and storage medium for generating confrontation medical image
CN110322055B (en) Method and system for improving grading stability of data risk model
CN116629388B (en) Differential privacy federal learning training method, device and computer readable storage medium
CN111291259A (en) Data screening method and device, electronic equipment and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant