Model training method, instant pushing method, device, medium and electronic equipment
By employing encrypted label value transmission and gradient calculation methods in edge intelligence scenarios, a hybrid approach of horizontal and vertical federated learning was achieved, solving the model training problem in edge intelligence scenarios, meeting the client's feature and sample distribution requirements, and realizing effective model training and delivery.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-05-18
- Publication Date
- 2026-03-27
AI Technical Summary
Existing horizontal and vertical federated learning methods cannot solve the model training problem in edge intelligence scenarios, and cannot meet the data distribution scenarios where various clients have the same features but different samples.
The first participant encrypts and transmits the label value to the second participant. The second participant determines the second gradient based on the encrypted label value and feature value, and transmits it to the first participant. The first participant determines the first gradient and histogram based on the feature value and label value. Through multiple rounds of iteration, the globally optimal split point is determined, realizing model training in a mixed horizontal and vertical federated data distribution scenario.
It enables model training in edge intelligence scenarios, meeting the data distribution requirements of various clients with the same features but different samples. After training, the first and second participants each possess a portion of the model, which can meet the business needs of edge intelligence scenarios.
Smart Images

Figure CN116596092B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present disclosure relates to the technical field of computer, in particular, to a model training method, an instant pushing method, a device, a medium and an electronic device. BACKGROUND
[0002] In order to solve the data security problem under the Artificial Intelligence (AI) modeling, many schemes have been proposed at present, such as horizontal federated learning and vertical federated learning. However, the data scenarios solved by horizontal federated learning and vertical federated learning are fixed, and the modeling problem under the end intelligent business scenario cannot be solved. SUMMARY
[0003] This summary is provided to introduce a selection of concepts that are further described below in the detailed description. This summary is not intended to identify key or essential features of the claimed subject matter, nor is it used to limit the scope of the claimed subject matter's scope.
[0004] In a first aspect, the present disclosure provides a model training method based on federated learning, comprising: a first participant transmitting an encrypted label value possessed by the first participant to a second participant, wherein the first participant is a labeled participant, the number of the first participant is multiple, and each of the first participant possesses the same feature and different samples, the second participant is an unlabeled participant, and the second participant possesses the samples of all the first participants but the second participant possesses different features from each of the first participants; the second participant determines a second gradient based on the encrypted label value and a feature value of the possessed feature, and transmits the second gradient to the first participant, the first participant determines a first gradient and a first histogram based on the feature value of the possessed feature and the possessed label value, and transmits the first gradient and the first histogram to the second participant; the first participant determines a first optimal split point based on the second gradient, and transmits information of the first optimal split point to the second participant; the second participant determines a global optimal split point based on the first gradient, the first histogram and the information of the first optimal split point, and transmits information of the global optimal split point to the first participant.
[0005] In a second aspect, the present disclosure provides an instant push method applied to a client, comprising: inferring a first push content according to a feature value of a sample feature possessed by the client and a local instant push model, and sending the first push content to a server, the first push content being used by the server to obtain an intersection result by intersecting the first push content and a second push content inferred by the server, wherein the local instant push model is a model trained based on the federated learning-based model training method in any one of the first aspect; receiving the intersection result from the server, and performing instant push according to the intersection result.
[0006] In a third aspect, the present disclosure provides an instant push method applied to a server, comprising: receiving a first push content from a client; inferring a second push content according to a feature value of a sample feature possessed by the server and a local instant push model, wherein the local instant push model is a model trained based on the federated learning-based model training method in any one of the first aspect; intersecting the first push content and the second push content to obtain an intersection result; and sending the intersection result to the client, the intersection result being used by the client to perform instant push according to the intersection result.
[0007] In a fourth aspect, the present disclosure provides a federated learning-based model training system, comprising a second participant and a plurality of first participants, the first participants being labeled participants and each of the first participants possessing the same feature and different samples, the second participant being an unlabeled participant and possessing samples of all the first participants but possessing different features from each of the first participants, wherein: each of the first participants transmits an encrypted label value possessed by the first participant to the second participant; the second participant determines a second gradient based on the encrypted label value and a feature value of the possessed feature, and transmits the second gradient to the first participant, the first participant determines a first gradient and a first histogram based on a feature value of the possessed feature and the possessed label value, and transmits the first gradient and the first histogram to the second participant; the first participant determines a first optimal split point based on the second gradient, and transmits information of the first optimal split point to the second participant; and the second participant determines a global optimal split point based on the first gradient, the first histogram and the information of the first optimal split point, and transmits information of the global optimal split point to the first participant.
[0008] In a fifth aspect, the present disclosure provides an instant push device applied to a client, comprising: a first inference module configured to infer first push content according to feature values of sample features possessed by the client and a local instant push model, wherein the local instant push model is a model trained based on the federated learning-based model training method in any one of the first aspect; a first sending module configured to send the first push content to a server, wherein the first push content is used to obtain an intersection result by intersecting the first push content and second push content inferred by the server; a first receiving module configured to receive the intersection result from the server; and a push module configured to perform instant push according to the intersection result.
[0009] In a sixth aspect, the present disclosure provides an instant push device applied to a server, comprising: a second receiving module configured to receive first push content from a client; a second inference module configured to infer second push content according to feature values of sample features possessed by the server and a local instant push model, wherein the local instant push model is a model trained based on the federated learning-based model training method in any one of the first aspect; an intersection obtaining module configured to obtain an intersection result by intersecting the first push content and the second push content; and a second sending module configured to send the intersection result to the client, wherein the intersection result is used by the client to perform instant push according to the intersection result.
[0010] In a seventh aspect, the present disclosure provides an instant push system, comprising a client and a server, wherein: the client is configured to infer first push content according to feature values of sample features possessed by the client and a local instant push model, and send the first push content to the server; the server is configured to infer second push content according to feature values of sample features possessed by the server and a local instant push model, obtain an intersection result by intersecting the first push content and the second push content, and send the intersection result to the client, wherein the local instant push model of the client and the local instant push model of the server are both models trained based on the federated learning-based model training method in any one of the first aspect of the present disclosure; and the client is further configured to perform instant push according to the intersection result.
[0011] In an eighth aspect, the present disclosure provides a computer readable medium having stored thereon a computer program, which, when executed by a processing device, implements the steps of the method in any one of the first aspect of the present disclosure.
[0012] In a ninth aspect, the present disclosure provides an electronic device, comprising: a storage device having a computer program stored thereon; and a processing device configured to execute the computer program in the storage device to implement the steps of any of the methods of the first aspect of the present disclosure.
[0013] By adopting the technical solution, the first participant transmits the owned label value to the second participant in an encrypted manner, the second participant determines the second gradient based on the encrypted label value and the feature value of the owned feature, and transmits the second gradient to the first participant, the first participant determines the first gradient and the first histogram based on the feature value of the owned feature and the owned label value, and transmits the first gradient and the first histogram to the second participant, the first participant determines the first optimal split point based on the second gradient, and transmits the information of the first optimal split point to the second participant, the second participant determines the global optimal split point based on the first gradient, the first histogram and the information of the first optimal split point, and transmits the information of the global optimal split point to the first participant, so that the model training in the data distribution scenario mixed with the horizontal federation and the vertical federation is realized. After the training is completed, the first participant owns a part of the trained model, and the second participant owns another part of the trained model, which can meet the business requirements such as the end intelligent scenario.
[0014] Other features and advantages of the present disclosure will be described in detail in the following detailed description. BRIEF DESCRIPTION OF DRAWINGS
[0015] The above and other features, advantages, and aspects of embodiments of the present disclosure will become more apparent by describing in detail the following specific embodiments thereof with reference to the attached drawings. The same or similar components have the same or similar reference numbers throughout the drawings. It is to be understood that the drawings are schematic, and the original and elements are not necessarily drawn in proportion. In the drawings:
[0016] Figure 1 A schematic diagram of horizontal federated learning is shown.
[0017] Figure 2 A schematic diagram of vertical federated learning is shown.
[0018] Figure 3 A schematic diagram of data distribution in an end intelligent scenario is shown.
[0019] Figure 4 A flowchart of a model training method based on federated learning according to an embodiment of the present disclosure is shown.
[0020] Figure 5 A flowchart of an instant push method according to an embodiment of the present disclosure is shown.
[0021] Figure 6is a flowchart of an instant push method according to an embodiment of the present disclosure.
[0022] Figure 7 is a schematic block diagram of a model training system based on federated learning according to an embodiment of the present disclosure.
[0023] Figure 8 is a schematic block diagram of an instant push device according to an embodiment of the present disclosure.
[0024] Figure 9 is a schematic block diagram of an instant push device according to an embodiment of the present disclosure.
[0025] Figure 10 is a schematic block diagram of an instant push system according to an embodiment of the present disclosure.
[0026] Figure 11 A structural schematic diagram of an electronic device suitable for implementing embodiments of the present disclosure is shown. DETAILED DESCRIPTION
[0027] Embodiments of the present disclosure will be described below in greater detail with reference to the accompanying drawings. While certain embodiments of the present disclosure are shown in the drawings, it should be understood that the present disclosure can be embodied in various forms and should not be construed as being limited to the embodiments set forth herein; rather, these embodiments are provided so as to more completely and thoroughly understand the present disclosure. It should be understood that the drawings and embodiments of the present disclosure are merely for exemplary purposes and are not intended to limit the scope of protection of the present disclosure.
[0028] It should be understood that each of the steps recited in the method embodiments of the present disclosure can be executed in different orders and / or in parallel. In addition, the method embodiments can include additional steps and / or omit the execution of the steps shown. The scope of the present disclosure is not limited in this respect.
[0029] The term "comprising" and variations thereof as used herein are open-ended, that is, "comprising but not limited to." The term "based on" is "based, at least in part, on." The term "one embodiment" means "at least one embodiment"; the term "another embodiment" means "at least one additional embodiment"; the term "some embodiments" means "at least some embodiments." Related terms are defined in the description that follows.
[0030] It should be noted that the concepts of "first", "second", and the like mentioned in the present disclosure are merely used to distinguish different devices, modules, or units, and are not intended to limit the order or interdependence of the functions performed by these devices, modules, or units.
[0031] It should be noted that the modification of "one" and "multiple" mentioned in the present disclosure is illustrative rather than limiting, and those skilled in the art should understand that "one or more" should be understood unless the context clearly indicates otherwise.
[0032] The names of the messages or information exchanged between the plurality of devices in the embodiments of the present disclosure are only for illustrative purposes, and are not intended to limit the scope of the messages or information.
[0033] It can be understood that before using the technical solutions disclosed in the embodiments of the present disclosure, the type, use range, use scenario, etc. of the personal information involved in the present disclosure should be informed to the user and the authorization of the user should be obtained through appropriate means in accordance with relevant laws and regulations.
[0034] For example, in response to receiving the active request of the user, the user is sent prompt information to explicitly prompt the user that the operation requested to be performed will require obtaining and using the personal information of the user. Thus, the user can voluntarily choose whether to provide personal information to the software or hardware such as electronic device, application program, server or storage medium that performs the operation of the technical solution of the present disclosure according to the prompt information.
[0035] As an optional but non-limiting implementation, in response to receiving the active request of the user, the user can be sent prompt information in the form of a pop-up window, for example, in which the prompt information can be presented in the form of text. In addition, the pop-up window can also carry selection controls for the user to select "agree" or "disagree" to provide personal information to the electronic device.
[0036] It can be understood that the above notification and user authorization process is only illustrative and does not limit the implementation of the present disclosure. Other ways that meet the relevant laws and regulations can also be applied to the implementation of the present disclosure.
[0037] At the same time, it can be understood that the data involved in the present technical solution (including but not limited to the data itself, the acquisition or use of the data) should comply with the requirements of the relevant laws and regulations and relevant provisions.
[0038] In the related art, transverse federated learning can only implement model training in the following scenarios, that is, each participant has the same features and different samples. Figure 1 A schematic diagram of transverse federated learning is shown, where participant A and participant B have cross features but different samples. Vertical federated learning can only implement model training in the following scenarios, that is, each participant has different features and the same samples. Figure 2 A schematic diagram of vertical federated learning is shown, where participant A and participant B have different features but cross samples.
[0039] Neither transverse federated learning nor longitudinal federated learning can realize model training in an edge intelligent scenario. In the edge intelligent scenario, each client can have the same features and different samples, and the server has all the samples of the clients, but the features possessed by the server and each client are different. Figure 3 A data distribution diagram in an edge intelligent scenario is shown. As shown in Figure 3 Parties A and B generally represent clients, and Party C generally represents a server; Party C contains data that Parties A and B can upload to the server; Parties A and B have the same features and different samples, and both Parties A and B are labeled parties; Party C is an unlabeled party, and Party C has all the samples of Parties A and B, but the features possessed by Party C are different from those possessed by Parties A and B.
[0040] Figure 4 A flowchart of a federated learning-based model training method according to an embodiment of the present disclosure is shown. As shown in Figure 4 The method includes the following steps S41-S44.
[0041] In step S41, a first party encrypts and transmits a label value possessed by the first party to a second party.
[0042] The first party is a labeled party, the number of first parties is multiple, and each first party has the same features and different samples. The second party is an unlabeled party, and the second party has all the samples of the first parties but the second party has different features from each first party. For example, the first party 1 has sample 1 (e.g., user 1) and sample 2 (e.g., user 2), and the sample features in sample 1 and sample 2 both include feature 1 and feature 2; the first party 2 has sample 3 (e.g., user 3) and sample 4 (e.g., user 4), and the sample features in sample 3 and sample 4 also both include feature 1 and feature 2; the second party has sample 1, sample 2, sample 3, and sample 4, and the sample features in sample 1 to sample 4 all include feature 3 and feature 4.
[0043] In some embodiments, the first participants transmit the owned label values to the second participant in encrypted form, which can be achieved in the following way. First, one of the first participants (e.g., which can be a randomly selected one of the first participants) generates a public key and a private key (e.g., which can be generated using an RSA algorithm, a homomorphic encryption algorithm, etc.), and transmits the public key to the other first participants. The first participants can use the public key to communicate with each other in encrypted form. Then, each first participant encrypts its own label value using the public key, and transmits the encrypted label value to the second participant.
[0044] In step S42, the second participant determines the second gradient based on the encrypted label values and the feature values of the owned features, and transmits the second gradient to the first participants, and the first participants determine the first gradient and the first histograms based on the feature values of the owned features and the owned label values, and transmit the first gradient and the first histograms to the second participant.
[0045] In some embodiments, the second participant determines the second gradient based on the encrypted label values and the feature values of the owned features, which can be achieved in the following way.
[0046] First, the second participant determines the first derivative and the second derivative corresponding to each feature value of each of the owned features based on the encrypted label values.
[0047] For example, the second participant can perform first-order derivation and second-order derivation on the objective function with respect to each feature value of each feature, to obtain the first derivative and the second derivative corresponding to each feature value of each feature.
[0048] Then, the second participant divides the second histograms for each feature value of each of the owned features respectively, and determines the second split points based on the second histograms.
[0049] For example, the second participant can sort each feature according to the feature values respectively, and then divide the second histograms based on the sorting, and take the boundary points between the second histograms as the second split points.
[0050] For example, the second participant has two features, which are a first feature and a second feature, where the first feature has three feature values, which are feature value 1, feature value 2 and feature value 3, and the second feature has four feature values, which are feature value 4, feature value 5, feature value 6 and feature value 7. The second participant can sort the first feature according to the size of the feature values, and suppose that the sorting from small to large is feature value 1, feature value 2 and feature value 3. The second participant can also sort the second feature according to the size of the feature values, and suppose that the sorting from small to large is feature value 4, feature value 5, feature value 6 and feature value 7. Then, the second participant divides a histogram for the first feature based on the sorting of the feature values of the first feature, and suppose that the divided histogram is that feature value 1 and feature value 2 are divided into one histogram, and feature value 3 is divided into another histogram. The boundary point between the two histograms is a split point, which is assumed to be split point 1. Similarly, the second participant divides a histogram for the second feature based on the sorting of the feature values of the second feature, and suppose that the divided histogram is that feature value 4 and feature value 5 are divided into one histogram, and feature value 6 and feature value 7 are divided into another histogram. The boundary point between the two histograms is another split point, which is assumed to be split point 2. That is, the second participant finally determines two split points for the second feature.
[0051] Then, the second participant determines, according to the second split points, the sum of the first-order derivatives and the sum of the second-order derivatives corresponding to the feature values on the left side of the second split points, and the sum of the first-order derivatives and the sum of the second-order derivatives corresponding to the feature values on the right side of the second split points, where the second gradient includes the sum of the first-order derivatives and the sum of the second-order derivatives corresponding to the feature values on the left side of the second split points, and the sum of the first-order derivatives and the sum of the second-order derivatives corresponding to the feature values on the right side of the second split points. Since the second participant uses the encrypted label value, each sum of the first-order derivatives and the sum of the second-order derivatives is an addition operation on ciphertext.
[0052] Still taking the previous example, the second participant determines the sum of the first-order derivatives and the sum of the second-order derivatives corresponding to the feature values on the left side of the split point 1, i.e., the sum of the first-order derivative corresponding to the feature value 1 and the first-order derivative corresponding to the feature value 2, and the sum of the second-order derivative corresponding to the feature value 1 and the second-order derivative corresponding to the feature value 2; the second participant also determines the sum of the first-order derivatives and the sum of the second-order derivatives corresponding to the feature values on the right side of the split point 1, which are the first-order derivative corresponding to the feature value 3 and the second-order derivative corresponding to the feature value 3, respectively; similarly, the second participant also determines the sum of the first-order derivatives and the sum of the second-order derivatives corresponding to the feature values on the left side of the split point 2, i.e., the sum of the first-order derivative corresponding to the feature value 4 and the first-order derivative corresponding to the feature value 5, and the sum of the second-order derivative corresponding to the feature value 4 and the second-order derivative corresponding to the feature value 5; the second participant also determines the sum of the first-order derivatives and the sum of the second-order derivatives corresponding to the feature values on the right side of the split point 2, i.e., the sum of the first-order derivative corresponding to the feature value 6 and the first-order derivative corresponding to the feature value 7, and the sum of the second-order derivative corresponding to the feature value 6 and the second-order derivative corresponding to the feature value 7.
[0053] In this way, the second participant determines the second gradient.
[0054] In some embodiments, the first participant determines the first gradient and the first histogram based on the feature values of the owned features and the owned label values, which can be achieved in the following way. First, the first participant determines the first-order derivative and the second-order derivative corresponding to each feature value of the owned features based on the owned label values. This is similar to the way the second participant determines the first-order derivative and the second-order derivative, and is not described again. Then, the first participant divides the feature values of each owned feature into a first histogram, respectively, and determines a first split point based on the first histogram. This is similar to the way the second participant determines the second gradient and the second histogram, and is not described again. Then, the first participant determines the sum of the first-order derivatives and the sum of the second-order derivatives corresponding to the feature values on the left side of the first split point and the sum of the first-order derivatives and the sum of the second-order derivatives corresponding to the feature values on the right side of the first split point according to the first split point, wherein the first gradient includes the sum of the first-order derivatives and the sum of the second-order derivatives corresponding to the feature values on the left side of the first split point and the sum of the first-order derivatives and the sum of the second-order derivatives corresponding to the feature values on the right side of the first split point. This is similar to the way the second participant determines the second gradient, and is not described again.
[0055] In some embodiments, the second participant can only transmit the second gradient to the first participant that generates the public and private keys, because the first participant has the private key and can decrypt the second gradient.
[0056] In step S43, the first participant determines the first optimal split point based on the second gradient, and transmits information of the first optimal split point to the second participant.
[0057] In some embodiments, after receiving the second gradient, the first participant can decrypt the second gradient using the private key as described above, and then determine the first optimal split point based on the decrypted second gradient. In addition, the first participant can calculate the split gain of each split point based on the sum of the first order derivatives and the sum of the second order derivatives included in the second gradient, and determine the first optimal split point based on the split gain. The first optimal split point is actually the optimal split point generated by the features contained by the second participant.
[0058] In step S44, the second participant determines the global optimal split point based on the first gradient, the first histogram and the information of the first optimal split point, and transmits information of the global optimal split point to the first participant.
[0059] In some embodiments, the second participant can determine the global optimal split point based on the first gradient, the first histogram and the information of the first optimal split point in the following manner.
[0060] First, the second participant determines the second optimal split point based on the first gradient and the first histogram. The second participant determines the second optimal split point in a similar manner as the first participant determines the first optimal split point, which will not be described here. The second optimal split point is actually the optimal split point generated by the features of each first participant.
[0061] Then, the second participant determines the global optimal split point based on the second optimal split point and the first optimal split point. For example, the second participant can compare the split gain corresponding to the first optimal split point with the split gain corresponding to the second optimal split point, and determine the global optimal split point based on the comparison result.
[0062] In some embodiments, the second participant can transmit the information of the global optimal split point to each first participant by broadcasting, so as to facilitate each first participant to split the next node.
[0063] By adopting the technical scheme, since the first participant transmits the possessed label value to the second participant in an encrypted manner, the second participant determines the second gradient based on the encrypted label value and the feature value of the possessed feature, and transmits the second gradient to the first participant, the first participant determines the first gradient and the first histogram based on the feature value of the possessed feature and the possessed label value, and transmits the first gradient and the first histogram to the second participant, the first participant determines the first optimal split point based on the second gradient, and transmits information of the first optimal split point to the second participant, the second participant determines the global optimal split point based on the first gradient, the first histogram and the information of the first optimal split point, and transmits information of the global optimal split point to the first participant, so that the model training in the data distribution scenario mixed with the horizontal federation and the vertical federation is realized. After the training is completed, the first participant possesses a part of the trained model, and the second participant possesses another part of the trained model, so that the business requirements such as the end intelligent scenario can be met.
[0064] In some embodiments, the model training method according to an embodiment of the present disclosure can further include that after receiving the global optimal split point, the first participant judges whether a split stop condition is reached; if the first participant judges that the split stop condition is reached, the first participant transmits the stop split result to the second participant, and the second participant broadcasts the stop split result to all first participants; if the first participant judges that the split stop condition is not reached, the split of the next node is continued.
[0065] By adopting the technical scheme, it can be determined whether to continue the split or stop the split.
[0066] Figure 5 is a flowchart of an instant push method according to an embodiment of the present disclosure. The instant push method can be executed by a client. As shown in Figure 5 , the instant push method includes the following steps S51 to S54.
[0067] In step S51, a first push content is inferred according to a feature value of a sample feature possessed by the client and a local instant push model of the client, wherein the local instant push model is a model trained based on any one of the model training methods based on federated learning in the present disclosure.
[0068] The sample feature of the client can include at least one of the following: current time, acceleration (reflecting whether the user of the client is moving), gyroscope sensing information (reflecting whether the user of the client is moving or stationary), distance of the user from the screen, whether an earphone is inserted, whether the user is playing audio, current power and current network status, etc.
[0069] In step S52, the first push content is sent to the server, where the first push content is used by the server to intersect the first push content and second push content inferred by the server to obtain an intersection result.
[0070] The second push content can be inferred by the server according to a feature value of a sample feature possessed by the server and an instant push model local to the server. The instant push model local to the server can be a model trained by the model training method based on federated learning of the present disclosure.
[0071] The sample feature of the server can include at least one of a first-level vertical category of the content, a popularity of the content at the client, a basic portrait of the content, a click-through rate of a push in a recent first preset time period (e.g., the past week), a time interval from a most recent time of the push to the current time, whether the content is active on the day, and an activity rate of the content in a recent second preset time period (e.g., the past week) (e.g., the number of active days of the content in the past week), and the like.
[0072] In step S53, the intersection result is received from the server.
[0073] In step S54, instant push is performed according to the intersection result.
[0074] By adopting the above technical solution, the user of the client can be instantaneously pushed with appropriate content in combination of the model inference result of the client (i.e., the first push content) and the model inference result of the server (i.e., the second push content).
[0075] Figure 6 is a flowchart of an instant push method according to an embodiment of the present disclosure. The instant push method can be performed by a server. As shown in Figure 6 The method includes the following steps S61 to S64.
[0076] In step S61, first push content is received from a client.
[0077] The first push content can be inferred by the client according to a feature value of a sample feature possessed by the client and an instant push model local to the client. The instant push model local to the client can be a model trained by the model training method based on federated learning of the present disclosure.
[0078] The sample feature of the client can include at least one of the current time, acceleration (reflecting whether the user of the client is moving), gyroscope sensing information (reflecting whether the user of the client is in motion or stationary), the distance of the user from the screen, whether an earphone is plugged in, whether the user is playing audio, the current power level, and the current network status, and the like.
[0079] In step S62, the second push content is inferred according to the feature values of the sample features possessed by the server and the instant push model local to the server.
[0080] The instant push model local to the server can be a model trained by the model training method based on federated learning of the present disclosure.
[0081] The sample features of the server can include at least one of the following: a first-level vertical category of the content, a popularity of the content at the client, a basic portrait of the content, a click-through rate of a push in a recent first preset period (e.g., the past week), a time interval from the last time of the push to the current time, whether the content is active on the day, and an activity rate of the content in a recent second preset period (e.g., the past week) (e.g., the number of active days of the content in the past week), etc.
[0082] In step S63, the intersection of the first push content and the second push content is obtained to obtain an intersection result.
[0083] In step S64, the intersection result is sent to the client, and the intersection result is used by the client to perform instant push according to the intersection result.
[0084] By adopting the above technical solution, the model inference result of the client (i.e., the first push content) and the model inference result of the server (i.e., the second push content) can be combined to instant push appropriate content to the user of the client.
[0085] Figure 7 is a schematic block diagram of a model training system based on federated learning according to an embodiment of the present disclosure. As shown in Figure 7 , the model training system includes a second participant 62 and a plurality of first participants 611 to 61 n The first participants 611 to 61 n are labeled participants, and each of the first participants 611 to 61 n possesses the same features and different samples. The second participant 62 is an unlabeled participant, and the second participant 62 possesses the samples of all the first participants 611 to 61 n but the second participant 62 possesses different features from each of the first participants 611 to 61 n .
[0086] Each of the first participants 611 to 61 n encrypts and transmits the possessed label values to the second participant 62. The second participant 62 determines a second gradient based on the encrypted label values and the feature values of the possessed features and transmits the second gradient to the first participants 611 to 61 ndetermines the first optimal split point based on the second gradient, and transmits information of the first optimal split point to the second participant 62. The second participant 62 determines the global optimal split point based on the first gradient, the first histogram and the information of the first optimal split point, and transmits information of the global optimal split point to each of the first participants 611 to 61 n .
[0087] By adopting the technical solutions described above, since the first participant transmits the owned label value to the second participant in an encrypted manner, the second participant determines the second gradient based on the encrypted label value and the feature value of the owned feature and transmits the second gradient to the first participant, the first participant determines the first gradient and the first histogram based on the feature value of the owned feature and the owned label value, and transmits the first gradient and the first histogram to the second participant, the first participant determines the first optimal split point based on the second gradient, and transmits information of the first optimal split point to the second participant, the second participant determines the global optimal split point based on the first gradient, the first histogram and the information of the first optimal split point, and transmits information of the global optimal split point to the first participant, thus realizing model training in a data distribution scenario that mixes horizontal federation and vertical federation. After the training is completed, the first participant owns a part of the trained model, and the second participant owns another part of the trained model, which can meet business demands such as an end intelligent scenario.
[0088] Optionally, the first participants 611 to 61 n transmit the owned label value to the second participant 62 in an encrypted manner, including that one of the first participants 611 to 61 n generates a public key and a private key, and transmits the public key to other first participants; each of the first participants 611 to 61 n encrypts the respective label value by using the public key, and transmits the encrypted label value to the second participant 62.
[0089] Optionally, the second participant 62 determines the second gradient based on the encrypted label value and the feature values of the possessed features, including: the second participant 62 determines the first and second derivatives corresponding to each feature value of the possessed features based on the encrypted label value; the second participant 62 divides the feature values of each possessed feature into a second histogram, and determines a second split point based on the second histogram; the second participant 62 determines the sum of the first and second derivatives corresponding to the feature values to the left of the second split point, and the sum of the first and second derivatives corresponding to the feature values to the right of the second split point, according to the second split point, wherein the second gradient includes the sum of the first and second derivatives corresponding to the feature values to the left of the second split point, and the sum of the first and second derivatives corresponding to the feature values to the right of the second split point.
[0090] Optionally, the first participant 611 to 61 n The first gradient and the first histogram are determined based on the feature values and label values of the features possessed, including: the first participants 611 to 61 n Based on the possessed label values, determine the first and second derivatives corresponding to each feature value of the possessed features; the first participant 611 to 61 n For each feature possessed, a first histogram is created by partitioning the feature values of each feature, and a first split point is determined based on the first histogram; the first participants 611 to 61 n Based on the first split point, the sum of the first and second derivatives corresponding to the eigenvalues to the left of the first split point, and the sum of the first and second derivatives corresponding to the eigenvalues to the right of the first split point are determined, wherein the first gradient includes the sum of the first and second derivatives corresponding to the eigenvalues to the left of the first split point, and the sum of the first and second derivatives corresponding to the eigenvalues to the right of the first split point.
[0091] Optionally, the second participant 62 determines the global optimal split point based on the information of the first gradient, the first histogram, and the first optimal split point, including: the second participant 62 determines the second optimal split point based on the first gradient and the first histogram; the second participant 62 determines the global optimal split point based on the second optimal split point and the first optimal split point.
[0092] Optionally, the first participant 611 to 61 nFurther, after receiving the global optimal split point, it is determined whether a split stop condition is reached; if the first participant determines that the split stop condition is reached, the first participant transmits a split stop result to the second participant 62, and the second participant 62 broadcasts the split stop result to all the first participants 611-61 n If the first participant does not determine that the split stop condition is reached, the next node split is continued.
[0093] Figure 8 is a schematic block diagram of an instant push device according to an embodiment of the present disclosure. The instant push device is applied to a client. As shown in Figure 8 the instant push device 800 includes a first inference module 81 configured to infer a first push content according to a feature value of a sample feature possessed by the client and a local instant push model, where the local instant push model is a model trained based on the federated learning-based model training method in any of the present disclosure; a first sending module 82 configured to send the first push content to a server, where the first push content is used to obtain an intersection result by the server intersecting the first push content and a second push content inferred by the server; a first receiving module 83 configured to receive the intersection result from the server; and a push module 84 configured to perform instant push according to the intersection result.
[0094] By using the above technical solution, the model inference result of the client (i.e., the first push content) and the model inference result of the server (i.e., the second push content) are combined to instant push appropriate content to a user of the client.
[0095] Figure 9 is a schematic block diagram of an instant push device according to an embodiment of the present disclosure. The instant push device is applied to a server. As shown in Figure 9 the instant push device 900 includes a second receiving module 901 configured to receive a first push content from a client; a second inference module 902 configured to infer a second push content according to a feature value of a sample feature possessed by the server and a local instant push model, where the local instant push model is a model trained based on the federated learning-based model training method in any of the present disclosure; an intersection obtaining module 903 configured to obtain an intersection result by intersecting the first push content and the second push content; and a second sending module 904 configured to send the intersection result to the client, where the intersection result is used by the client to perform instant push according to the intersection result.
[0096] By adopting the technical scheme, the model inference result of the client (i.e., the first push content) and the model inference result of the server (i.e., the second push content) can be combined to push appropriate content to the user of the client in real time.
[0097] Figure 10 is a schematic block diagram of a real-time push system according to an embodiment of the present disclosure. As shown in the figure, the real-time push system includes a client 1001 and a server 1002, wherein: Figure 10 the client 1001 is configured to infer a first push content according to a feature value of a sample feature possessed by the client and a local real-time push model of the client, and send the first push content to the server 1002; the server 1002 is configured to infer a second push content according to a feature value of a sample feature possessed by the server and a local real-time push model of the server, obtain an intersection result by intersecting the first push content and the second push content, and send the intersection result to the client 1001, wherein the local real-time push model of the client and the local real-time push model of the server are both models trained by using a model training method based on federated learning of the present disclosure; and the client 1001 is further configured to perform real-time push according to the intersection result.
[0098] By adopting the technical scheme, the model inference result of the client (i.e., the first push content) and the model inference result of the server (i.e., the second push content) can be combined to push appropriate content to the user of the client in real time.
[0099] Optionally, the sample feature of the client 1001 includes at least one of the following: a current time, an acceleration, gyroscope sensing information, a distance of a user from a screen, whether an earphone is plugged in, whether the user is playing audio, a current power level, and a current network status.
[0100] Optionally, the sample feature of the server 1002 includes at least one of the following: a primary vertical category of content, a heat of the content on the client, a basic portrait of the content, a click-through rate of a push in a most recent first preset time period, a time interval from a most recent time of the push to a current time, whether the content is active on the day, and an active rate of the content in a most recent second preset time period.
[0101] The present disclosure also provides a computer readable medium having a computer program stored thereon, which, when executed by a processing device, implements the steps of the method of the present disclosure.
[0102] The present disclosure also provides an electronic device, including: a storage device having a computer program stored thereon; and a processing device configured to execute the computer program in the storage device to implement the steps of the method of the present disclosure.
[0103] Reference will be made to the following description Figure 11The diagram illustrates a structural schematic of an electronic device (e.g., a terminal device or a server) 600 suitable for implementing embodiments of the present disclosure. The terminal device in the embodiments of the present disclosure may include, but is not limited to, mobile terminals such as mobile phones, laptops, digital broadcast receivers, PDAs (personal digital assistants), PADs (tablet computers), PMPs (portable multimedia players), in-vehicle terminals (e.g., in-vehicle navigation terminals), and fixed terminals such as digital TVs and desktop computers. Figure 11 The electronic device shown is merely an example and should not be construed as limiting the functionality and scope of the embodiments disclosed herein.
[0104] like Figure 11 As shown, electronic device 600 may include a processing device (e.g., a central processing unit, a graphics processor, etc.) 601, which can perform various appropriate actions and processes according to a program stored in read-only memory (ROM) 602 or a program loaded from storage device 608 into random access memory (RAM) 603. RAM 603 also stores various programs and data required for the operation of electronic device 600. Processing device 601, ROM 602, and RAM 603 are interconnected via bus 604. Input / output (I / O) interface 605 is also connected to bus 604.
[0105] Typically, the following devices can be connected to I / O interface 605: input devices 606 including, for example, touchscreens, touchpads, keyboards, mice, cameras, microphones, accelerometers, gyroscopes, etc.; output devices 607 including, for example, liquid crystal displays (LCDs), speakers, vibrators, etc.; storage devices 608 including, for example, magnetic tapes, hard disks, etc.; and communication devices 609. Communication device 609 allows electronic device 600 to communicate wirelessly or wiredly with other devices to exchange data. Although Figure 11 An electronic device 600 with various devices is shown; however, it should be understood that it is not required to implement or possess all of the devices shown. More or fewer devices may be implemented or possessed alternatively.
[0106] In particular, according to embodiments of this disclosure, the processes described above with reference to the flowcharts can be implemented as computer software programs. For example, embodiments of this disclosure include a computer program product comprising a computer program carried on a non-transitory computer-readable medium, the computer program containing program code for performing the methods shown in the flowcharts. In such embodiments, the computer program can be downloaded and installed from a network via a communication device 609, or installed from a storage device 608, or installed from a ROM 602. When the computer program is executed by the processing device 601, it performs the functions defined in the methods of embodiments of this disclosure.
[0107] It should be noted that the computer-readable medium described above can be a computer-readable signal medium or a computer-readable storage medium or any combination thereof. The computer-readable storage medium can be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus or device, or any suitable combination of the above. More specific examples of the computer-readable storage medium can include, but are not limited to, an electrical connection having one or more wires, a portable computer diskette, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or Flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In the present disclosure, the computer-readable storage medium can be any tangible medium that contains or stores a program used by or in connection with an instruction execution system, apparatus or device. In the present disclosure, the computer-readable signal medium can include a data signal propagated in baseband or propagated as a carrier wave in a propagated data signal, in which the computer-readable program code is contained. Such a propagated data signal can take many forms, including but not limited to, an electromagnetic signal, an optical signal, or any suitable combination of the above. The computer-readable signal medium can also be any computer-readable medium that can send, propagate or transfer the program for use by or in connection with the instruction execution system, apparatus or device. The program code contained in the computer-readable medium can be transmitted by any suitable medium, including but not limited to, wire, cable, RF (radio frequency), etc., or any suitable combination of the above.
[0108] In some embodiments, the client, server, or both can communicate using any current known or future developed network protocol, such as HTTP (HyperText Transfer Protocol), and can be interconnected with any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include local area networks ("LAN"), wide area networks ("WAN"), the Internet, and peer-to-peer networks (e.g., ad hoc peer-to-peer networks), as well as any current known or future developed networks.
[0109] The computer-readable medium described above can be included in the electronic device described above; or can exist separately from the electronic device, and is not assembled into the electronic device.
[0110] The computer readable medium described above carries one or more programs, when the one or more programs are executed by the electronic device, cause: a first participant to transmit an owned label value to a second participant in an encrypted manner, wherein the first participant is a labeled participant, the number of the first participants is more than one, and each of the first participants owns the same feature and different sample, the second participant is an unlabeled participant, and the second participant owns the samples of all the first participants but the second participant owns different features from each of the first participants; the second participant to determine a second gradient based on the encrypted label value and a feature value of an owned feature and transmit the second gradient to the first participant, the first participant to determine a first gradient and a first histogram based on a feature value of an owned feature and the owned label value and transmit the first gradient and the first histogram to the second participant; the first participant to determine a first optimal split point based on the second gradient and transmit information of the first optimal split point to the second participant; and the second participant to determine a global optimal split point based on the first gradient, the first histogram, and the information of the first optimal split point, and transmit information of the global optimal split point to the first participant.
[0111] Computer program code for carrying out operations of the present disclosure can be written in any combination of one or more programming languages, including an object oriented programming language such as Java, Smalltalk, C++ or the like, and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code can execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer or entirely on the remote computer or server. In the latter scenario, the remote computer can be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or the connection can be made to an external computer (for example, through the Internet using an Internet Service Provider).
[0112] The diagrams of the flow and block in the drawings illustrate the possible implementation architecture, function and operation of the system, method and computer program product according to various embodiments of the present disclosure. In this regard, each block in the flow or block diagram can represent a module, a program segment, or a part of code containing one or more executable instructions for implementing the specified logic function. It should also be noted that in some alternative implementations, the functions noted in the blocks can occur in different order from that shown in the drawings. For example, two blocks that are shown in succession can actually be executed substantially in parallel, or they can be executed in reverse order according to the involved functions. It should also be noted that each block in the block diagram and / or flow diagram, and the combination of blocks in the block diagram and / or flow diagram, can be implemented by a dedicated hardware-based system that performs the specified function or operation, or can be implemented by a combination of special-purpose hardware and computer instructions.
[0113] The modules described in the embodiments of the present disclosure can be implemented in the form of software or in the form of hardware. Among them, the name of the module does not constitute a limitation to the module itself in some cases, for example, the client can also be described as "a module that infers the first push content according to the feature value of the sample feature owned and the local instant push model".
[0114] The functions described above in the present document can be performed at least in part by one or more hardware logic components. For example, non-limiting example types of hardware logic components that can be used include field-programmable gate arrays (FPGAs), application-specific integrated circuits (ASICs), application-specific standard products (ASSPs), system-on-a-chip (SOCs), complex programmable logic devices (CPLDs), etc.
[0115] In the context of the present disclosure, a machine-readable medium can be a tangible medium that contains or stores a program for use by or in connection with an instruction execution system, apparatus, or device. The machine-readable medium can be a machine-readable signal medium or a machine-readable storage medium. The machine-readable medium can include, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any suitable combination of the above. More specific examples of the machine-readable storage medium can include one or more lines of electrical connection, portable computer disk, hard disk, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage device, magnetic storage device, or any suitable combination of the above.
[0116] According to one or more embodiments of the present disclosure, example 1 provides a model training method based on federated learning, comprising: a first participant transmits an encrypted label value owned by the first participant to a second participant, wherein the first participant is a labeled participant, the number of the first participant is multiple, and each first participant owns the same feature and different samples, and the second participant is an unlabeled participant, and the second participant owns the samples of all the first participants but the second participant owns different features from each of the first participants; the second participant determines a second gradient based on the encrypted label value and a feature value of the owned feature, and transmits the second gradient to the first participant, the first participant determines a first gradient and a first histogram based on the feature value of the owned feature and the owned label value, and transmits the first gradient and the first histogram to the second participant; the first participant determines a first optimal split point based on the second gradient, and transmits information of the first optimal split point to the second participant; the second participant determines a global optimal split point based on the first gradient, the first histogram and the information of the first optimal split point, and transmits information of the global optimal split point to the first participant.
[0117] According to one or more embodiments of the present disclosure, example 2 provides the method of example 1, wherein the first participant transmits the encrypted label value owned by the first participant to the second participant, comprising: one of the first participants generates a public key and a private key, and transmits the public key to other first participants; each of the first participants encrypts the respective label value using the public key, and transmits the encrypted label value to the second participant.
[0118] According to one or more embodiments of the present disclosure, example 3 provides the method of example 1, wherein the second participant determines the second gradient based on the encrypted label value and the feature value of the owned feature, comprising: the second participant determines a first derivative and a second derivative corresponding to each feature value of the owned feature based on the encrypted label value; the second participant divides a second histogram for each feature value of the owned feature respectively, and determines a second split point based on the second histogram; the second participant determines a sum of the first derivative and a sum of the second derivative corresponding to the feature values on the left side of the second split point, and a sum of the first derivative and a sum of the second derivative corresponding to the feature values on the right side of the second split point according to the second split point, wherein the second gradient comprises the sum of the first derivative and the sum of the second derivative corresponding to the feature values on the left side of the second split point, and the sum of the first derivative and the sum of the second derivative corresponding to the feature values on the right side of the second split point.
[0119] According to one or more embodiments of the present disclosure, example 4 provides the method of example 1, wherein the first participant determines the first gradient and the first histogram based on the feature values of the owned features and the owned label values, comprising: the first participant determines the first derivative and the second derivative corresponding to each feature value of the owned features based on the owned label values; the first participant respectively divides the first histogram for the feature values of each owned feature, and determines the first split point based on the first histogram; the first participant determines the sum of the first derivative and the sum of the second derivative corresponding to the feature values on the left side of the first split point, and the sum of the first derivative and the sum of the second derivative corresponding to the feature values on the right side of the first split point according to the first split point, wherein the first gradient comprises the sum of the first derivative and the sum of the second derivative corresponding to the feature values on the left side of the first split point, and the sum of the first derivative and the sum of the second derivative corresponding to the feature values on the right side of the first split point.
[0120] According to one or more embodiments of the present disclosure, example 5 provides the method of example 1, wherein the second participant determines the global optimal split point based on the first gradient, the first histogram and the information of the first optimal split point, comprising: the second participant determines the second optimal split point based on the first gradient and the first histogram; the second participant determines the global optimal split point based on the second optimal split point and the first optimal split point.
[0121] According to one or more embodiments of the present disclosure, example 6 provides the method of any one of examples 1 to 5, wherein the method further comprises: after receiving the global optimal split point, the first participant judges whether a split stop condition is reached; if the first participant judges that the split stop condition is reached, the first participant transmits the stop splitting result to the second participant, and the second participant broadcasts the stop splitting result to all the first participants; if the first participant judges that the split stop condition is not reached, the splitting of the next node is continued.
[0122] According to one or more embodiments of the present disclosure, example 7 provides an instant push method applied to a client, comprising: inferring a first push content according to the feature values of the sample features owned by the client and the instant push model locally stored in the client, wherein the instant push model locally stored in the client is a model trained based on the federated learning-based model training method of any one of examples 1 to 6; sending the first push content to a server, wherein the first push content is used for the server to obtain an intersection result by intersecting the first push content and a second push content inferred by the server; receiving the intersection result from the server; and performing instant push according to the intersection result.
[0123] According to one or more embodiments of the present disclosure, example 8 provides the method of example 7, wherein the sample features of the client include at least one of: current time, acceleration, gyroscopic sensing information, distance of the user from the screen, whether earphones are plugged in, whether the user is playing audio, current battery level, and current network status.
[0124] According to one or more embodiments of the present disclosure, example 9 provides an instant push method applied to a server, comprising: receiving first push content from a client; inferring second push content according to feature values of sample features possessed by the server and an instant push model local to the server, wherein the instant push model local to the server is a model trained based on the federated learning-based model training method of any one of examples 1 to 6; finding an intersection result by intersecting the first push content and the second push content; and sending the intersection result to the client, wherein the intersection result is used by the client to perform instant push according to the intersection result.
[0125] According to one or more embodiments of the present disclosure, example 10 provides the method of example 9, wherein the sample features of the server include at least one of: a primary vertical category of the content, a heat of the content on the client, a basic portrait of the content, a reached click-through rate of a push in a recent first preset time period, a time interval from a most recent click of the push to a current time, whether the content is active on the day, and an active rate of the content in a recent second preset time period.
[0126] According to one or more embodiments of the present disclosure, example 11 provides a model training system based on federated learning, the model training system comprising a second participant and a plurality of first participants, the first participants being labeled participants and each of the first participants having the same features and different samples, the second participant being an unlabeled participant and the second participant having the samples of all the first participants but the second participant having different features from each of the first participants, wherein: each of the first participants encrypts and transmits a label value owned by the first participant to the second participant; the second participant determines a second gradient based on the encrypted label value and a feature value of the owned feature and transmits the second gradient to the first participant, the first participant determines a first gradient and a first histogram based on the feature value of the owned feature and the owned label value and transmits the first gradient and the first histogram to the second participant; the first participant determines a first optimal split point based on the second gradient and transmits information of the first optimal split point to the second participant; the second participant determines a global optimal split point based on the first gradient, the first histogram and the information of the first optimal split point and transmits information of the global optimal split point to the first participant.
[0127] According to one or more embodiments of the present disclosure, example 12 provides an instant push device applied to a client, comprising: a first inference module configured to infer a first push content according to a feature value of a sample feature owned by the client and a local instant push model, wherein the local instant push model is a model trained based on the model training method based on federated learning of any one of examples 1 to 6; a first sending module configured to send the first push content to a server, wherein the first push content is used to obtain an intersection result by the server intersecting the first push content and a second push content inferred by the server; a first receiving module configured to receive the intersection result from the server; and a push module configured to perform instant push according to the intersection result.
[0128] According to one or more embodiments of this disclosure, Example 13 provides an instant push device applied to a server, comprising: a second receiving module for receiving first push content from a client; a second inference module for inferring second push content based on feature values of sample features owned by the server and a local instant push model, wherein the local instant push model is a model trained based on the federated learning-based model training method described in any one of Examples 1 to 6; an intersection module for finding the intersection of the first push content and the second push content to obtain an intersection result; and a second sending module for sending the intersection result to the client, wherein the intersection result is used by the client to perform instant push based on the intersection result.
[0129] According to one or more embodiments of this disclosure, Example 14 provides an instant push system, the instant push system including a client and a server, wherein: the client is configured to infer a first push content based on the feature values of its own sample features and a local instant push model, and send the first push content to the server; the server is configured to infer a second push content based on the feature values of its own sample features and a local instant push model, find the intersection of the first push content and the second push content to obtain an intersection result, and send the intersection result to the client, wherein the instant push model local to the client and the instant push model local to the server are both models trained based on the federated learning-based model training method described in any one of Examples 1 to 6; the client is further configured to perform instant push based on the intersection result.
[0130] According to one or more embodiments of the present disclosure, Example 15 provides a computer-readable medium having a computer program stored thereon that, when executed by a processing device, implements the steps of the method described in any one of Examples 1-10.
[0131] According to one or more embodiments of this disclosure, Example 16 provides an electronic device including: a storage device having a computer program stored thereon; and a processing device for executing the computer program in the storage device to implement the steps of the method of any one of Examples 1-10.
[0132] The above description is merely a preferred embodiment of this disclosure and an explanation of the technical principles employed. Those skilled in the art should understand that the scope of this disclosure is not limited to technical solutions formed by specific combinations of the above-described technical features, but should also cover other technical solutions formed by arbitrary combinations of the above-described technical features or their equivalents without departing from the above-described concept. For example, technical solutions formed by substituting the above features with (but not limited to) technical features disclosed in this disclosure that have similar functions.
[0133] Moreover, while operations are depicted in a particular order, this should not be understood as requiring such an order unless otherwise specifically stated. In certain circumstances, multitasking and parallel processing can be advantageous. Likewise, while a number of separate embodiments have been discussed above, alternate embodiments can also combine, sub-combine, and / or parallelize various aspects, functions, operations, and / or devices discussed above. Rather, the various embodiments can be combined, sub-combined, and / or parallelized in any suitable manner.
[0134] Although the subject matter has been described in language specific to structural features and / or methodological acts, it is to be understood that the subject matter defined in the appended claims is not necessarily limited to the specific features or acts described above. Rather, the specific features and acts described above are disclosed as example forms of implementing the claims. With respect to the devices in the above-described embodiments, the specific manner in which the various modules perform operations has been described in detail in connection with the method embodiments. Here, a detailed explanation will not be given.
Claims
1. A model training method based on federated learning, characterized in that, include: The first participant encrypts and transmits its label values to the second participant. The first participant is a labeled participant, there are multiple first participants, and each first participant has the same characteristics and different samples. The second participant is an unlabeled participant, and the second participant has samples from all the first participants, but the second participant has characteristics that are different from each of the first participants. The second participant determines a second gradient based on the encrypted tag value and the feature value of the possessed features, and transmits the second gradient to the first participant. The first participant determines a first gradient and a first histogram based on the feature value of the possessed features and the possessed tag value, and transmits the first gradient and the first histogram to the second participant. The first participant determines the first optimal split point based on the second gradient and transmits the information of the first optimal split point to the second participant; The second participant determines the global optimal split point based on the information of the first gradient, the first histogram, and the first optimal split point, and transmits the information of the global optimal split point to the first participant. The second participant determines the globally optimal split point based on the information from the first gradient, the first histogram, and the first optimal split point, including: The second participant determines the second optimal split point based on the first gradient and the first histogram; The second participant determines the global optimal split point based on the second optimal split point and the first optimal split point.
2. The method according to claim 1, characterized in that, The first participant encrypts and transmits its tag values to the second participant, including: One of the multiple first participants generates a public key and a private key, and transmits the public key to the other first participants; Each of the first participating parties uses the public key to encrypt its own tag value and transmits the encrypted tag value to the second participating party.
3. The method according to claim 1, characterized in that, The second participant determines the second gradient based on the encrypted tag value and the feature values of the possessed features, including: The second participant determines the first and second derivatives of each feature value of the features it possesses, based on the encrypted tag value. The second participant divides the feature values of each feature it possesses into a second histogram, and determines the second split point based on the second histogram; The second participant determines, based on the second split point, the sum of the first and second derivatives corresponding to the eigenvalues to the left of the second split point, and the sum of the first and second derivatives corresponding to the eigenvalues to the right of the second split point, wherein the second gradient includes the sum of the first and second derivatives corresponding to the eigenvalues to the left of the second split point, and the sum of the first and second derivatives corresponding to the eigenvalues to the right of the second split point.
4. The method according to claim 1, characterized in that, The first participant determines the first gradient and the first histogram based on the feature values and label values of the features it possesses, including: Based on the label values they possess, the first participant determines the first and second derivatives of each feature value of the features they possess. The first participant divides the feature values of each feature it possesses into a first histogram, and determines the first split point based on the first histogram; Based on the first split point, the first participant determines the sum of the first and second derivatives corresponding to the eigenvalues to the left of the first split point, and the sum of the first and second derivatives corresponding to the eigenvalues to the right of the first split point. The first gradient includes the sum of the first and second derivatives corresponding to the eigenvalues to the left of the first split point, and the sum of the first and second derivatives corresponding to the eigenvalues to the right of the first split point.
5. The method according to any one of claims 1 to 4, characterized in that, The method further includes: After receiving the globally optimal split point, the first participant determines whether the split stopping condition has been met. If the first participant determines that the splitting stop condition has been met, the first participant will transmit the result of stopping the splitting to the second participant, and the second participant will then broadcast the result of stopping the splitting to all the first participants. If none of the first participants determines that the splitting stop condition has been met, then the splitting of the next node continues.
6. An instant push method, applied to a client, characterized in that, include: Based on the feature values of the sample features owned by the client and the real-time push model local to the client, the first push content is inferred, wherein the real-time push model local to the client is a model trained based on the federated learning model training method according to any one of claims 1 to 5. The first push content is sent to the server, and the first push content is used by the server to find the intersection result of the first push content and the second push content inferred by the server. Receive the intersection result from the server; The results of the intersection will be pushed out in real time.
7. The method according to claim 6, characterized in that, The client's sample features include at least one of the following: Current time, acceleration, gyroscope sensor information, user distance from screen, whether headphones are plugged in, whether the user is playing audio, current battery level, and current network status.
8. An instant push method, applied to a server, characterized in that, include: Receive the first push notification content from the client; The second push content is inferred based on the feature values of the sample features owned by the server and the real-time push model local to the server, wherein the real-time push model local to the server is a model trained based on the federated learning model training method according to any one of claims 1 to 5. The intersection of the first push content and the second push content is obtained; The intersection result is sent to the client, and the intersection result is used by the client to make real-time push based on the intersection result.
9. The method according to claim 8, characterized in that, The server's sample characteristics include at least one of the following: The content's primary vertical category, its popularity on the client, its basic profile, the reach and click-through rate of push notifications within the most recent first preset time period, the time interval between the most recent click and the current time, whether the content is active on the current day, and the activity rate of the content within the most recent second preset time period.
10. A model training system based on federated learning, characterized in that, The model training system includes a second participant and multiple first participants. The first participants are labeled participants, each possessing the same features and different samples. The second participants are unlabeled participants, possessing samples from all the first participants, but each second participant has features different from those of each of the first participants. Each of the first participants encrypted and transmitted its tag value to the second participant; The second participant determines a second gradient based on the encrypted tag value and the feature value of the possessed features, and transmits the second gradient to the first participant. The first participant determines a first gradient and a first histogram based on the feature value of the possessed features and the possessed tag value, and transmits the first gradient and the first histogram to the second participant. The first participant determines the first optimal split point based on the second gradient and transmits the information of the first optimal split point to the second participant; The second participant determines the global optimal split point based on the information of the first gradient, the first histogram, and the first optimal split point, and transmits the information of the global optimal split point to the first participant.
11. An instant push notification device, applied to a client, characterized in that, include: The first inference module is used to infer the first push content based on the feature values of the sample features owned by the client and the local instant push model, wherein the local instant push model is a model trained based on the federated learning-based model training method according to any one of claims 1 to 5. A first sending module is used to send the first push content to a server, wherein the first push content is used by the server to find the intersection result of the first push content and the second push content inferred by the server; A first receiving module is configured to receive the intersection result from the server; The push module is used to push information in real time based on the intersection result.
12. An instant push device, applied to a server, characterized in that, include: The second receiving module is used to receive the first push content from the client; The second inference module is used to infer the second push content based on the feature values of the sample features owned by the server and the local instant push model, wherein the local instant push model is a model trained based on the federated learning-based model training method according to any one of claims 1 to 5. The intersection module is used to find the intersection of the first push content and the second push content to obtain the intersection result; The second sending module is used to send the intersection result to the client, and the intersection result is used by the client to make real-time push based on the intersection result.
13. An instant push system, characterized in that, The instant push system includes a client and a server, wherein: The client is used to infer the first push content based on the feature values of the sample features it possesses and the local real-time push model, and then send the first push content to the server. The server is configured to infer second push content based on the feature values of the sample features it possesses and a local instant push model, find the intersection of the first push content and the second push content to obtain an intersection result, and send the intersection result to the client. The client's local instant push model and the server's local instant push model are both models trained based on the federated learning-based model training method according to any one of claims 1 to 5. The client is also used to make real-time pushes based on the intersection result.
14. A computer-readable medium having a computer program stored thereon, characterized in that, When executed by the processing device, the program implements the steps of the method according to any one of claims 1-9.
15. An electronic device, characterized in that, include: A storage device on which computer programs are stored; A processing device for executing the computer program in the storage device to implement the steps of the method according to any one of claims 1-9.
Citation Information
Patent Citations
Hybrid federated learning method and architecture
CN110490738A
Data processing method of XGBoost model based on cross-feature federation
CN114648073A
Parameter processing method, device, system and product applied to hybrid federation scene
CN114841373A
Federal learning content pushing method and device based on multi-party multi-model privacy intersection
CN115907043A