Prediction model training method, data processing device and system

By realizing information interaction between two machine learning models in the federated learning system, forward propagation and back propagation are performed, which solves the problem of large amount of calculation in the existing technology and improves the training efficiency of the model.

CN113657613BActive Publication Date: 2024-08-30BEIJING CENTURY TAL EDUCATION TECH CO LTD +1
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202110969640.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-08-23
Publication Date
2024-08-30
Estimated Expiration
2041-08-23

AI Technical Summary

Technical Problem

In the existing federated learning system, because the machine learning model needs to update all parameters during the training process, the amount of calculation is large and the training efficiency of the model cannot be improved.

Method used

By realizing information interaction between two machine learning models in the federated learning system, forward propagation and back propagation are performed to reduce the amount of calculation and thereby improve the training efficiency of the model. The specific method includes receiving user characteristic sample data in the first data processing device, splicing to generate training samples, performing forward propagation and back propagation through the interactive layer, and updating model parameters.

Benefits of technology

It effectively improves the training efficiency of the model, reduces the amount of calculation, and improves the training efficiency of the federated learning system.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN113657613B
    Figure CN113657613B
Patent Text Reader

Abstract

The present disclosure provides a prediction model training method, a data processing device and a system. The prediction model training method is executed by a first data processing device in a federated learning system, and includes: receiving first user feature sample data from a second data processing device in the federated learning system; determining a training sample according to the first user feature sample data and the second user feature sample data that participates in the training; inputting the training sample into a first machine learning model, and sending the training sample to a second data processing device so that the second data processing device inputs the training sample into a second machine learning model; inputting a first adjustment parameter of a second machine learning model provided by the second data processing device into the first machine learning model for forward propagation; using the loss value of the second machine learning model to input into the second machine learning model for back propagation, thereby obtaining a user behavior prediction model.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the field of information processing, and in particular to a prediction model training method, a data processing device and a system. Background Art

[0002] Distributed training technology based on federated learning has been widely used in blockchain, medical data modeling, personalized search recommendation and other fields. The federated learning algorithm uses traditional machine learning methods such as logistic regression. Data samples are distributed among different participants during the generation and transmission process to ensure secure data sharing. Summary of the invention

[0003] Through research, the inventors found that in the existing federated learning system, since the machine learning models on different platforms need to update all parameters during the training process, the amount of calculation is large and the training efficiency of the model cannot be improved.

[0004] Accordingly, the present disclosure provides a prediction model training scheme, which performs forward propagation and backward propagation by exchanging information between two machine learning models in a federated learning system. Since the amount of calculation is small, the training efficiency of the model can be effectively improved.

[0005] According to a first aspect of an embodiment of the present disclosure, a prediction model training method is provided, which is executed by a first data processing device in a federated learning system, including: receiving first user feature sample data from a second data processing device in the federated learning system; determining a training sample based on the first user feature sample data and the second user feature sample data that participates in the training; inputting the training sample into a first machine learning model, and sending the training sample to the second data processing device so that the second data processing device inputs the training sample into a second machine learning model; inputting a first adjustment parameter of the second machine learning model provided by the second data processing device into the first machine learning model for forward propagation; and using the loss value of the second machine learning model to input the second machine learning model for back propagation, thereby obtaining a user behavior prediction model.

[0006] In some embodiments, determining a training sample based on the first user feature sample data and the second user feature sample data that participates in the training includes: concatenating sample data with the same user identifier in the first user feature sample data and the second user feature sample data to generate the training sample.

[0007] In some embodiments, inputting the first adjustment parameter of the second machine learning model provided by the second data processing device into the first machine learning model includes: receiving the first adjustment parameter of the second machine learning model from the second data processing device; generating a first bias parameter using the first adjustment parameter and a first weight, and generating a second bias parameter using the second adjustment parameter and a second weight of the first machine learning model; sending the first bias parameter to the second data processing device; receiving a first fusion parameter from the second data processing device, wherein the first fusion parameter includes the first bias parameter and a third bias parameter generated using the first adjustment parameter and a third weight; generating a first gradient parameter using the first fusion parameter and the second bias parameter; and inputting the first gradient parameter into the first machine learning model for forward propagation.

[0008] In some embodiments, the first bias parameter is the product of the first adjustment parameter and the first weight; the second bias parameter is the product of the second adjustment parameter and the second weight; the third bias parameter is the product of the first adjustment parameter and the third weight; the first fusion parameter is the sum of the first bias parameter and the third bias parameter; the first gradient parameter is the sum of the first fusion parameter and the second bias parameter.

[0009] In some embodiments, the first bias parameter is the sum of the product of the first adjustment parameter and the first weight and a first random number; the second bias parameter is the product of the second adjustment parameter and the second weight; the third bias parameter is the product of the first adjustment parameter and the third weight; the first fusion parameter is the sum of the first bias parameter and the third bias parameter; the first gradient parameter is the difference between the sum of the first fusion parameter and the second bias parameter and the first random number.

[0010] In some embodiments, using the loss value of the second machine learning model to input the second machine learning model for back propagation includes: updating the second weight using the loss value and the second adjustment parameter; determining the first back propagation parameter using the loss value and the updated second weight; and inputting the first back propagation parameter into the first machine learning model for back propagation.

[0011] In some embodiments, the updated second weight is the product of the loss value and the second adjustment parameter; and the first back-propagation parameter is the product of the loss value and the updated second weight.

[0012] In some embodiments, the loss value is sent to the second data processing device so that the second data processing device inputs the loss value into the second machine learning model for back propagation.

[0013] In some embodiments, sending the loss value to the second data processing device includes: generating a first training parameter using the loss value and the first adjustment parameter, and sending the first training parameter to the second data processing device; receiving a second fusion parameter and the third weight from the second data processing device, wherein the second fusion parameter includes the first training parameter and a second training parameter generated using a second random number; updating the first weight using the second fusion parameter; generating a second back propagation parameter using the loss value, the updated first weight, and the third weight; and sending the second back propagation parameter to the second data processing device so that the second data processing device inputs the second back propagation parameter into the second machine learning model for back propagation.

[0014] In some embodiments, the first training parameter is the product of the loss value and the first adjustment parameter; the second training parameter is the ratio of the second random number and a preset parameter; the second fusion parameter is the sum of the first training parameter and the second training parameter; the second back propagation parameter is the sum of the product of the loss value and the updated first weight and the third weight; updating the first weight using the second fusion parameter includes: taking the difference between the first weight and the product of the preset parameter and the second fusion parameter as the updated first weight.

[0015] In some embodiments, the first training parameter is the sum of the product of the loss value and the first adjustment parameter and a third random number; the second training parameter is the ratio of the second random number and a preset parameter; the second fusion parameter is the sum of the first training parameter and the second training parameter; the second back propagation parameter is the sum of the product of the loss value and the updated first weight and the third weight; updating the first weight using the second fusion parameter includes: subtracting the difference of the third random number from the second fusion parameter to obtain a first difference; taking the second difference of the first weight minus the product of the preset parameter and the first difference as the updated first weight.

[0016] In some embodiments, the first machine learning model and the second machine learning model are binary classification machine learning models.

[0017] According to a second aspect of an embodiment of the present disclosure, a prediction model training device is provided, which is a first data processing device in a federated learning system, comprising: a first processing module, configured to receive first user feature sample data from a second data processing device in the federated learning system, determine a training sample based on the first user feature sample data and the second user feature sample data that participates in the training, input the training sample into a first machine learning model, and send the training sample to the second data processing device so that the second data processing device inputs the training sample into a second machine learning model; a second processing module, configured to input a first adjustment parameter of the second machine learning model provided by the second data processing device into the first machine learning model for forward propagation, and use the loss value of the second machine learning model to input the second machine learning model for back propagation, thereby obtaining a user behavior prediction model.

[0018] In some embodiments, the first processing module is configured to concatenate sample data having the same user identifier in the first user feature sample data and the second user feature sample data to generate the training sample.

[0019] In some embodiments, the second processing module is configured to receive a first adjustment parameter of the second machine learning model from the second data processing device, generate a first bias parameter using the first adjustment parameter and the first weight, generate a second bias parameter using the second adjustment parameter and the second weight of the first machine learning model, send the first bias parameter to the second data processing device, receive a first fusion parameter from the second data processing device, wherein the first fusion parameter includes the first bias parameter and a third bias parameter generated using the first adjustment parameter and the third weight, generate a first gradient parameter using the first fusion parameter and the second bias parameter, and input the first gradient parameter into the first machine learning model for forward propagation.

[0020] In some embodiments, the first bias parameter is the product of the first adjustment parameter and the first weight; the second bias parameter is the product of the second adjustment parameter and the second weight; the third bias parameter is the product of the first adjustment parameter and the third weight; the first fusion parameter is the sum of the first bias parameter and the third bias parameter; the first gradient parameter is the sum of the first fusion parameter and the second bias parameter.

[0021] In some embodiments, the first bias parameter is the sum of the product of the first adjustment parameter and the first weight and a first random number; the second bias parameter is the product of the second adjustment parameter and the second weight; the third bias parameter is the product of the first adjustment parameter and the third weight; the first fusion parameter is the sum of the first bias parameter and the third bias parameter; the first gradient parameter is the difference between the sum of the first fusion parameter and the second bias parameter and the first random number.

[0022] In some embodiments, the second processing module is configured to update the second weight using the loss value and the second adjustment parameter, determine the first back propagation parameter using the loss value and the updated second weight, and input the first back propagation parameter into the first machine learning model for back propagation.

[0023] In some embodiments, the updated second weight is the product of the loss value and the second adjustment parameter; and the first back-propagation parameter is the product of the loss value and the updated second weight.

[0024] In some embodiments, the second processing module is configured to send the loss value to the second data processing device so that the second data processing device inputs the loss value into the second machine learning model for back propagation.

[0025] In some embodiments, the second processing module is configured to generate a first training parameter using the loss value and the first adjustment parameter, and send the first training parameter to the second data processing device, receive a second fusion parameter and the third weight from the second data processing device, wherein the second fusion parameter includes the first training parameter and a second training parameter generated using a second random number, update the first weight using the second fusion parameter, generate a second back propagation parameter using the loss value, the updated first weight and the third weight, and send the second back propagation parameter to the second data processing device so that the second data processing device inputs the second back propagation parameter into the second machine learning model for back propagation.

[0026] In some embodiments, the first training parameter is the product of the loss value and the first adjustment parameter; the second training parameter is the ratio of the second random number and a preset parameter; the second fusion parameter is the sum of the first training parameter and the second training parameter; the second back propagation parameter is the sum of the product of the loss value and the updated first weight and the third weight; the second processing module is also configured to take the difference between the first weight and the product of the preset parameter and the second fusion parameter as the updated first weight.

[0027] In some embodiments, the first training parameter is the sum of the product of the loss value and the first adjustment parameter and a third random number; the second training parameter is the ratio of the second random number to a preset parameter; the second fusion parameter is the sum of the first training parameter and the second training parameter; the second back propagation parameter is the sum of the product of the loss value and the updated first weight and the third weight; the second processing module is also configured to subtract the difference between the second fusion parameter and the third random number to obtain a first difference, and take the second difference between the first weight and the product of the preset parameter and the first difference as the updated first weight.

[0028] In some embodiments, the first machine learning model and the second machine learning model are binary classification machine learning models.

[0029] According to a third aspect of an embodiment of the present disclosure, there is provided a data processing device, comprising: a memory configured to store instructions; a processor coupled to the memory, the processor being configured to execute a method as described in any of the above embodiments based on the instructions stored in the memory.

[0030] According to a fourth aspect of an embodiment of the present disclosure, a data processing system is provided, comprising: a first data processing device, which is the data processing device described in any of the above embodiments; a second data processing device, configured to send first user feature sample data to the first data processing device, input the training sample sent by the first data processing device into a second machine learning model, and send a first adjustment parameter of the second machine learning model to the first data processing device.

[0031] In some embodiments, the second data processing device is configured to generate a third bias parameter using the first adjustment parameter and a third weight after receiving the first bias parameter sent by the first data processing device, and send a first fusion parameter to the first data processing device, wherein the first fusion parameter includes the first bias parameter and the third bias parameter.

[0032] In some embodiments, the third bias parameter is the product of the first adjustment parameter and the third weight; and the first fusion parameter is the sum of the first bias parameter and the third bias parameter.

[0033] In some embodiments, the second data processing device is configured to input the loss value sent by the first data processing device into the second machine learning model for back propagation.

[0034] In some embodiments, the second data processing device is configured to generate second training parameters using second random numbers after receiving the first training parameters sent by the first data processing device, send second fusion parameters to the first data processing device, wherein the second fusion parameters include the first training parameters and the second training parameters generated using the second random number, update the third weight using the second random number, send the updated third weight to the first data processing device, and input the second back propagation parameters sent by the first data processing device into the second machine learning model for back propagation.

[0035] In some embodiments, the second training parameter is the ratio of the second random number to a preset parameter; the second fusion parameter is the sum of the first training parameter and the second training parameter; and the second data processing device uses the sum of the third weight and the second random number as the updated third weight.

[0036] According to a fifth aspect of an embodiment of the present disclosure, a prediction method is provided, comprising: extracting user feature data; inputting the user feature data into a user behavior prediction model to obtain a user behavior prediction result, wherein the user behavior prediction model is obtained by the training method described in any of the above embodiments.

[0037] According to the sixth aspect of the embodiments of the present disclosure, a prediction device is provided, comprising: an extraction module configured to extract user feature data; a prediction module configured to input the user feature data into a user behavior prediction model to obtain a user behavior prediction result, wherein the user behavior prediction model is obtained by the training method described in any of the above embodiments.

[0038] According to a seventh aspect of an embodiment of the present disclosure, a prediction device is provided, comprising: a memory configured to store instructions; a processor coupled to the memory, the processor being configured to execute a prediction method as described in any of the above embodiments based on the instructions stored in the memory.

[0039] According to an eighth aspect of an embodiment of the present disclosure, a computer-readable storage medium is provided, wherein the computer-readable storage medium stores computer instructions, and when the instructions are executed by a processor, the method involved in any of the above embodiments is implemented.

[0040] Other features and advantages of the present disclosure will become apparent from the following detailed description of exemplary embodiments of the present disclosure with reference to the accompanying drawings. BRIEF DESCRIPTION OF THE DRAWINGS

[0041] In order to more clearly illustrate the embodiments of the present disclosure or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present disclosure. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative labor.

[0042] Figure 1 A flowchart of a prediction model training method according to an embodiment of the present disclosure;

[0043] Figure 2 A flowchart of a prediction model training method according to another embodiment of the present disclosure;

[0044] Figure 3 A flowchart of a prediction model training method according to another embodiment of the present disclosure;

[0045] Figure 4 A flowchart of a prediction model training method according to another embodiment of the present disclosure;

[0046] Figure 5 A schematic diagram of the structure of a prediction model training device according to an embodiment of the present disclosure;

[0047] Figure 6 A schematic diagram of the structure of a prediction model training device according to another embodiment of the present disclosure;

[0048] Figure 7 A schematic diagram of the structure of a data processing system according to an embodiment of the present disclosure;

[0049] Figure 8 A flowchart of a prediction model training method according to another embodiment of the present disclosure;

[0050] Fig. 9 A flowchart of a prediction model training method according to another embodiment of the present disclosure;

[0051] Fig.10 A flowchart of a prediction model training method according to another embodiment of the present disclosure;

[0052] Fig.11 The figure is a flowchart of a prediction method according to an embodiment of the present disclosure.

[0053] Fig.12 It is a structural schematic diagram of a prediction device according to an embodiment of the present disclosure;

[0054] Fig.13 It is a schematic diagram of the structure of a prediction device according to another embodiment of the present disclosure. DETAILED DESCRIPTION

[0055] The following will be combined with the drawings in the embodiments of the present disclosure to clearly and completely describe the technical solutions in the embodiments of the present disclosure. Obviously, the described embodiments are only part of the embodiments of the present disclosure, rather than all of the embodiments. The following description of at least one exemplary embodiment is actually only illustrative and is by no means intended to limit the present disclosure and its application or use. Based on the embodiments in the present disclosure, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present disclosure.

[0056] Unless specifically stated otherwise, the relative arrangement of components and steps, the numerical expressions and numerical values ​​set forth in these embodiments do not limit the scope of the present disclosure.

[0057] At the same time, it should be understood that for the convenience of description, the sizes of the various parts shown in the drawings are not drawn according to the actual proportional relationship.

[0058] Technologies, methods, and apparatus known to ordinary technicians in the relevant field may not be discussed in detail, but where appropriate, such technologies, methods, and apparatus should be considered part of the authorization specification.

[0059] In all examples shown and discussed herein, any specific values ​​should be interpreted as merely exemplary and not as limiting. Therefore, other examples of the exemplary embodiments may have different values.

[0060] It should be noted that like reference numerals and letters refer to similar items in the following figures, and therefore, once an item is defined in one figure, it need not be further discussed in subsequent figures.

[0061] Figure 1 The following is a flow chart of a prediction model training method according to an embodiment of the present disclosure. In some embodiments, the following prediction model training method is executed by a first data processing device in a federated learning system.

[0062] In step 101, first user feature sample data is received from a second data processing device in a federated learning system.

[0063] In step 102, a training sample is determined according to the first user feature sample data and the second user feature sample data that participates in the training.

[0064] In some embodiments, sample data with the same user identifier in the first user feature sample data and the second user feature sample data are concatenated to generate a training sample.

[0065] In step 103, the training samples are input into the first machine learning model, and the training samples are sent to the second data processing device so that the second data processing device inputs the training samples into the second machine learning model.

[0066] In step 104, the first adjustment parameter of the second machine learning model provided by the second data processing device is input into the first machine learning model for forward propagation.

[0067] In some embodiments, the above step 104 is as follows Figure 2 shown.

[0068] In step 201, a first adjustment parameter of a second machine learning model is received from a second data processing device.

[0069] In step 202, a first bias parameter is generated using the first adjustment parameter and the first weight, and a second bias parameter is generated using the second adjustment parameter and the second weight of the first machine learning model.

[0070] In step 203, the first bias parameter is sent to the second data processing device.

[0071] In step 204, a first fusion parameter is received from the second data processing device, wherein the first fusion parameter includes a first bias parameter and a third bias parameter generated by using the first adjustment parameter and a third weight.

[0072] In step 205, a first gradient parameter is generated using the first fusion parameter and the second bias parameter.

[0073] At step 206, the first gradient parameter is input into the first machine learning model for forward propagation.

[0074] In some embodiments, an interaction layer is provided in the first machine learning model, and forward propagation is performed by inputting the first gradient parameter into the interaction layer of the first machine learning model.

[0075] In some embodiments, the first bias parameter is the product of the first adjustment parameter and the first weight, the second bias parameter is the product of the second adjustment parameter and the second weight, the third bias parameter is the product of the first adjustment parameter and the third weight, the first fusion parameter is the sum of the first bias parameter and the third bias parameter, and the first gradient parameter is the sum of the first fusion parameter and the second bias parameter.

[0076] In other embodiments, the first bias parameter is the sum of the product of the first adjustment parameter and the first weight and the first random number, the second bias parameter is the product of the second adjustment parameter and the second weight, the third bias parameter is the product of the first adjustment parameter and the third weight, the first fusion parameter is the sum of the first bias parameter and the third bias parameter, and the first gradient parameter is the difference between the sum of the first fusion parameter and the second bias parameter and the first random number.

[0077] return Figure 1 In step 105, the loss value of the second machine learning model is input into the second machine learning model for back propagation, thereby obtaining a user behavior prediction model.

[0078] In some embodiments, the loss value of the second machine learning model is input into the interaction layer of the second machine learning model for back propagation.

[0079] In some embodiments, the above step 105 is as follows Figure 3 shown.

[0080] In step 301, the second weight is updated using the loss value and the second adjustment parameter.

[0081] For example, the loss value is the difference between the predicted value and the true value.

[0082] In step 302, a first back propagation parameter is determined using the loss value and the updated second weight.

[0083] In step 303, the first back-propagation parameters are input into the first machine learning model for back-propagation.

[0084] In some embodiments, the updated second weight is the product of the loss value and the second adjustment parameter, and the first back-propagation parameter is the product of the loss value and the updated second weight.

[0085] In some embodiments, Figure 4 As shown, the loss value is sent to the second data processing device so that the second data processing device inputs the loss value into the interaction layer of the second machine learning model for back propagation.

[0086] In step 401, a first training parameter is generated using a loss value and a first adjustment parameter, and the first training parameter is sent to a second data processing device.

[0087] In step 402, second fusion parameters and third weights are received from a second data processing device, wherein the second fusion parameters include first training parameters and second training parameters generated using second random numbers.

[0088] In step 403, the first weight is updated using the second fusion parameter.

[0089] In step 404, a second back propagation parameter is generated using the loss value, the updated first weight value, and the third weight value.

[0090] In step 405, the second back-propagation parameters are sent to the second data processing device so that the second data processing device inputs the second back-propagation parameters into the second machine learning model for back-propagation.

[0091] In some embodiments, the first training parameter is the product of the loss value and the first adjustment parameter, the second training parameter is the ratio of the second random number and the preset parameter, the second fusion parameter is the sum of the first training parameter and the second training parameter, the second back propagation parameter is the product of the loss value and the updated first weight and the sum of the third weight, and in addition, the difference between the first weight and the product of the preset parameter and the second fusion parameter is taken as the updated first weight.

[0092] In other embodiments, the first training parameter is the sum of the product of the loss value and the first adjustment parameter and the third random number, the second training parameter is the ratio of the second random number and the preset parameter, the second fusion parameter is the sum of the first training parameter and the second training parameter, the second back propagation parameter is the sum of the product of the loss value and the updated first weight and the third weight, and in addition, the difference between the second fusion parameter and the third random number is subtracted to obtain the first difference, and the second difference between the first weight and the product of the preset parameter and the first difference is used as the updated first weight.

[0093] In some embodiments, the first machine learning model and the second machine learning model are binary classification machine learning models such as GBDT (GradientBoosting Decision Tree).

[0094] For example, the first data processing device in the federated learning system is located on the first platform, and the second data processing device in the federated learning system is located on the second platform. The first platform has a small number of user behavior characteristics, and the second platform has more user behavior characteristics in related business areas. Through the interaction between the first data processing device and the second data processing device, the machine learning model at the first platform and the machine learning model at the second platform are forward propagated and back propagated to obtain a user behavior prediction model. The user behavior prediction model can be used to predict the user's behavior characteristics for related businesses. Due to the small amount of calculation, the training efficiency of the model can be effectively improved.

[0095] Figure 5 The present invention is a schematic diagram of the structure of a prediction model training device according to an embodiment of the present invention. Figure 5 The prediction model signaling device shown is the first data processing device in the federated learning system. Figure 5As shown, the prediction model training device includes a first processing module 51 and a second processing module 52.

[0096] The first processing module 51 receives the first user feature sample data from the second data processing device in the federated learning system, determines the training sample based on the first user feature sample data and the second user feature sample data participating in the training, inputs the training sample into the first machine learning model, and sends the training sample to the second data processing device so that the second data processing device inputs the training sample into the second machine learning model.

[0097] In some embodiments, the first processing module 51 concatenates the sample data with the same user identifier in the first user feature sample data and the second user feature sample data to generate a training sample.

[0098] The second processing module 52 is configured to input the first adjustment parameter of the second machine learning model provided by the second data processing device into the first machine learning model for forward propagation, and use the loss value of the second machine learning model to input the second machine learning model for back propagation, so as to obtain a user behavior prediction model.

[0099] In some embodiments, the second processing module 52 receives a first adjustment parameter of a second machine learning model from a second data processing device, generates a first bias parameter using the first adjustment parameter and the first weight, generates a second bias parameter using the second adjustment parameter and the second weight of the first machine learning model, sends the first bias parameter to the second data processing device, receives a first fusion parameter from the second data processing device, wherein the first fusion parameter includes a first bias parameter and a third bias parameter generated using the first adjustment parameter and the third weight, generates a first gradient parameter using the first fusion parameter and the second bias parameter, and inputs the first gradient parameter into the first machine learning model for forward propagation.

[0100] In some embodiments, the first bias parameter is the product of the first adjustment parameter and the first weight, the second bias parameter is the product of the second adjustment parameter and the second weight, the third bias parameter is the product of the first adjustment parameter and the third weight, the first fusion parameter is the sum of the first bias parameter and the third bias parameter, and the first gradient parameter is the sum of the first fusion parameter and the second bias parameter.

[0101] In other embodiments, the first bias parameter is the sum of the product of the first adjustment parameter and the first weight and the first random number, the second bias parameter is the product of the second adjustment parameter and the second weight, the third bias parameter is the product of the first adjustment parameter and the third weight, the first fusion parameter is the sum of the first bias parameter and the third bias parameter, and the first gradient parameter is the difference between the sum of the first fusion parameter and the second bias parameter and the first random number.

[0102] In some embodiments, the second processing module 52 updates the second weight using the loss value and the second adjustment parameter, determines the first back propagation parameter using the loss value and the updated second weight, and inputs the first back propagation parameter into the first machine learning model for back propagation.

[0103] For example, the updated second weight is the product of the loss value and the second adjustment parameter, and the first back propagation parameter is the product of the loss value and the updated second weight.

[0104] In some embodiments, the second processing module 52 sends the loss value to a second data processing device so that the second data processing device inputs the loss value into a second machine learning model for back propagation.

[0105] For example, the second processing module 52 generates a first training parameter using the loss value and the first adjustment parameter, and sends the first training parameter to the second data processing device, receives a second fusion parameter and a third weight from the second data processing device, wherein the second fusion parameter includes the first training parameter and a second training parameter generated using a second random number, updates the first weight using the second fusion parameter, generates a second back propagation parameter using the loss value, the updated first weight and the third weight, and sends the second back propagation parameter to the second data processing device so that the second data processing device inputs the second back propagation parameter into the second machine learning model for back propagation.

[0106] In some embodiments, the first training parameter is the product of the loss value and the first adjustment parameter, the second training parameter is the ratio of the second random number and the preset parameter, the second fusion parameter is the sum of the first training parameter and the second training parameter, the second back propagation parameter is the product of the loss value and the updated first weight and the sum of the third weight, and the second processing module is further configured to take the difference between the first weight and the product of the preset parameter and the second fusion parameter as the updated first weight.

[0107] In other embodiments, the first training parameter is the sum of the product of the loss value and the first adjustment parameter and a third random number, the second training parameter is the ratio of the second random number to a preset parameter, the second fusion parameter is the sum of the first training parameter and the second training parameter, the second back propagation parameter is the sum of the product of the loss value and the updated first weight and the third weight, and the second processing module is further configured to subtract the difference between the second fusion parameter and the third random number to obtain a first difference, and use the second difference between the first weight and the product of the preset parameter and the first difference as the updated first weight.

[0108] In some embodiments, the first machine learning model and the second machine learning model are binary classification machine learning models such as GBDT.

[0109] Figure 6FIG. 1 is a schematic diagram of the structure of a data processing device according to another embodiment of the present disclosure. Figure 6 As shown, the data processing device includes a memory 61 and a processor 62 .

[0110] The memory 61 is used to store instructions. The processor 62 is coupled to the memory 61. The processor 62 is configured to execute the instructions stored in the memory to implement the following. Figures 1 to 4 The method of any one of the embodiments.

[0111] like Figure 6 As shown, the data processing device also includes a communication interface 63 for information exchange with other devices. At the same time, the data processing device also includes a bus 64, through which the processor 62, the communication interface 63, and the memory 61 communicate with each other.

[0112] The memory 61 may include a high-speed RAM memory, and may also include a non-volatile memory, such as at least one disk memory. The memory 61 may also be a memory array. The memory 61 may also be divided into blocks, and the blocks may be combined into virtual volumes according to certain rules.

[0113] In addition, the processor 62 may be a central processing unit (CPU), or may be an application specific integrated circuit (ASIC), or may be configured to implement one or more integrated circuits of the embodiments of the present disclosure.

[0114] The present disclosure also relates to a computer-readable storage medium, wherein the computer-readable storage medium stores computer instructions, which are executed by a processor to implement the following Figures 1 to 4 The method of any one of the embodiments.

[0115] Figure 7 FIG. 1 is a schematic diagram of the structure of a data processing system according to an embodiment of the present disclosure. Figure 7 As shown, the data processing system includes a first data processing device 71 and a second data processing device 72. The first data processing device 71 is Figure 5 or Figure 6 A data processing device according to any one of the embodiments.

[0116] The second data processing device 72 sends the first user feature sample data to the first data processing device 71, inputs the training sample sent by the first data processing device 71 into the second machine learning model, and sends the first adjustment parameter of the second machine learning model to the first data processing device 71.

[0117] In some embodiments, after receiving the first bias parameter sent by the first data processing device 71, the second data processing device 72 generates a third bias parameter using the first adjustment parameter and the third weight, and sends the first fusion parameter to the first data processing device 71, wherein the first fusion parameter includes the first bias parameter and the third bias parameter.

[0118] For example, the third bias parameter is the product of the first adjustment parameter and the third weight, and the first fusion parameter is the sum of the first bias parameter and the third bias parameter.

[0119] In some embodiments, the second data processing device 72 inputs the loss value sent by the first data processing device 71 into the second machine learning model for back propagation.

[0120] In some embodiments, after receiving the first training parameters sent by the first data processing device 71, the second data processing device 72 generates second training parameters using second random numbers, sends second fusion parameters to the first data processing device 71, the second fusion parameters include the first training parameters and the second training parameters generated using the second random numbers, updates the third weights using the second random numbers, sends the updated third weights to the first data processing device 71, and inputs the second back propagation parameters sent by the first data processing device 71 into the second machine learning model for back propagation.

[0121] In some embodiments, the second training parameter is a ratio of the second random number to the preset parameter. The second fusion parameter is the sum of the first training parameter and the second training parameter. The second data processing device 72 uses the sum of the third weight and the second random number as the updated third weight.

[0122] Figure 8 The present invention is a flowchart of a prediction model training method according to another embodiment of the present invention.

[0123] In step 801, the second data processing device sends the first user feature sample data to the first data processing device.

[0124] In step 802, the first data processing device determines a training sample according to the first user feature sample data and the second user feature sample data that participates in the training.

[0125] In step 803, the first data processing device sends the training samples to the second data processing device.

[0126] In step 804, the first data processing device inputs the training samples into the first machine learning model.

[0127] In step 805, the second data processing device inputs the training samples into the second machine learning model.

[0128] In step 806, the first data processing device inputs the interaction information into the first machine learning model for forward propagation and back propagation.

[0129] In step 807, the second data processing device inputs the interaction information into the second machine learning model for back propagation.

[0130] In step 808, the trained first machine learning model is used as a user behavior prediction model.

[0131] In some embodiments, the first machine learning model performs a forward pass such as Fig. 9 shown.

[0132] In step 901a, the second data processing device determines a first adjustment parameter a(p) for forward propagation.

[0133] In step 901b, the second data processing device determines a second adjustment parameter a(A) for forward propagation.

[0134] In step 902, the second data processing device encrypts the first adjustment parameter a(p) to obtain a first encrypted parameter [a(p)], and sends the first encrypted parameter [a(p)] to the first data processing device.

[0135] In step 903, the first data processing device decrypts the first encryption parameter [a(p)] to obtain the first adjustment parameter a(p), and calculates the first bias parameter Z(p) and the second bias parameter Z(A), where Z(p)=a(p)*W(p)+ε(A), W(p) is the first weight, ε(A) is a random number. Z(A)=a(A)*W(A), W(A) is the second weight.

[0136] In step 904, the first data processing device encrypts the first bias parameter Z(p) to obtain a second encryption parameter [a(p)*W(p)+ε(A)], and sends the second encryption parameter [a(p)*W(p)+ε(A)] to the second data processing device.

[0137] In step 905, after the second data processing device decrypts the second encryption parameter, it calculates the first fusion parameter, where the first fusion parameter is a(p)*W(p)+ε(A)+a(p)*ε(acc), and ε(acc) is the third weight.

[0138] In step 906, the second data processing device sends the first fusion parameter to the first data processing device.

[0139] In step 907, the first data processing device calculates the first gradient parameter Z using the first fusion parameter and the second bias parameter, Z=Z(A)+(a(p)*W(p)+ε(A)+a(p)*ε(acc))-ε(A).

[0140] In step 908, the forward propagation parameter f(Z) is calculated using the activation function f.

[0141] At step 909, the first machine learning model performs forward propagation using f(Z).

[0142] In some embodiments, the first machine learning model and the second machine learning model perform back propagation such as Fig.10 shown.

[0143] In step 1001, the first data processing device calculates a loss value δ.

[0144] In step 1002, the first data processing device calculates a first training parameter, where the first training parameter is δ*a(p)+ε(A), and ε(A) is a random value.

[0145] In step 1003, the first data processing device sends the encrypted first training parameter [δ*a(p)+ε(A)] to the second data processing device.

[0146] In step 1004, the second data processing device decrypts the encrypted first training parameter and calculates the fusion parameter, which is δ*a(p)+ε(A)+ε(p) / η, where ε(p) is a random number and η is a preset parameter.

[0147] In step 1005, the second data processing device sends the fusion parameters to the first data processing device.

[0148] In step 1006, after receiving the fusion parameters, the first data processing device updates the first weight W(p), that is, W(p)=W(p)-η((δ*a(p)+ε(A)+ε(p) / η)-ε(A)).

[0149] In step 1007, the second data processing device updates the third parameter ε(acc), that is, ε(acc)=ε(acc)+ε(p).

[0150] In step 1008, the second data processing device encrypts the updated third parameter ε(acc) to obtain [ε(acc)], and sends [ε(acc)] to the first data processing device.

[0151] In step 1009, the first data processing device decrypts the received [ε(acc)] to obtain a third parameter ε(acc), and calculates a back-propagation parameter δ(p), δ(p) = δ*W(p) + ε(acc).

[0152] In step 1010, the first data processing device encrypts the back-propagation parameter δ(p) to obtain [δ(p)], and sends [δ(p)] to the second data processing device.

[0153] In step 1011, the second data processing device decrypts [δ(p)] to obtain a back-propagation parameter δ(p).

[0154] In step 1012, the second data processing device inputs δ(p) into the second machine learning model for back propagation.

[0155] In step 1013, the first data processing device updates the second weight W(A), that is, W(A)=δ*a(A).

[0156] In step 1014, the first data processing device determines the back propagation parameter δ(A) using the loss value and the updated second weight, δ(A)=δ*W(A).

[0157] In step 1015, the first data processing device inputs the back-propagation parameter δ(A) into the first machine learning model for back-propagation.

[0158] Fig.11 The following is a flow chart of a prediction method according to an embodiment of the present disclosure. In some embodiments, the following prediction method is performed by a prediction device.

[0159] In step 1101, user feature data is extracted.

[0160] In step 1102, user feature data is input into a prediction model to obtain a prediction result.

[0161] It should be noted here that the prediction model is Figure 1-4 The training method of any one of the embodiments is obtained.

[0162] Fig.12 FIG. 1 is a schematic diagram of the structure of a prediction device according to an embodiment of the present disclosure. Fig.12 As shown, the prediction device includes an extraction module 1201 and a prediction module 1202 .

[0163] The extraction module 1201 is configured to extract user feature data.

[0164] The prediction module 1202 is configured to input the user feature data into the prediction model to obtain the prediction result. Figure 1-4The training method of any one of the embodiments is obtained.

[0165] Fig.13 FIG. 1 is a schematic diagram of the structure of a prediction device according to another embodiment of the present disclosure. Fig.13 As shown, the prediction device includes a memory 1301 , a processor 1302 , a communication interface 1303 and a bus 1304 . Fig.13 and Figure 6 The difference is that in Fig.13 In the illustrated embodiment, the processor 1302 is configured to execute instructions stored in the memory to implement the following Fig.11 The method of any one of the embodiments.

[0166] The present disclosure also relates to a computer-readable storage medium, wherein the computer-readable storage medium stores computer instructions, which are executed by a processor to implement the following Fig.11 The method of any one of the embodiments.

[0167] In some embodiments, the functional unit module described above can be implemented as a general-purpose processor, a programmable logic controller (PLC), a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components or any appropriate combination thereof for performing the functions described in the present disclosure.

[0168] A person skilled in the art will understand that all or part of the steps to implement the above embodiments may be accomplished by hardware or by instructing related hardware through a program, and the program may be stored in a computer-readable storage medium, and the above-mentioned storage medium may be a read-only memory, a disk or an optical disk, etc.

[0169] The description of the present disclosure is given for the purpose of illustration and description, and is not intended to be exhaustive or to limit the present disclosure to the disclosed form. Many modifications and variations will be apparent to those of ordinary skill in the art. The embodiments are selected and described in order to better illustrate the principles and practical applications of the present disclosure, and to enable those of ordinary skill in the art to understand the present disclosure and thereby design various embodiments with various modifications suitable for specific uses.

Claims

1. A prediction model training method, performed by a first data processing device in a federated learning system, comprising: receiving first user feature sample data from a second data processing device in the federated learning system; Determine a training sample according to the first user feature sample data and the second user feature sample data participating in the training; Inputting the training sample into a first machine learning model, and sending the training sample to the second data processing device so that the second data processing device inputs the training sample into a second machine learning model; Inputting the first adjustment parameter of the second machine learning model provided by the second data processing device into the first machine learning model for forward propagation; Inputting the loss value of the second machine learning model into the second machine learning model for back propagation, thereby obtaining a user behavior prediction model; The step of inputting the first adjustment parameter of the second machine learning model provided by the second data processing device into the first machine learning model comprises: receiving a first adjustment parameter of the second machine learning model from the second data processing device; Generate a first bias parameter using the first adjustment parameter and the first weight, and generate a second bias parameter using the second adjustment parameter and the second weight of the first machine learning model; sending the first bias parameter to the second data processing device; receiving a first fusion parameter from the second data processing device, wherein the first fusion parameter includes the first bias parameter and a third bias parameter generated by using the first adjustment parameter and a third weight; Generate a first gradient parameter using the first fusion parameter and the second bias parameter; Inputting the first gradient parameter into the first machine learning model for forward propagation; Wherein, inputting the loss value of the second machine learning model into the second machine learning model for back propagation includes: Updating the second weight using the loss value and the second adjustment parameter; Determine a first back propagation parameter using the loss value and the updated second weight; The first back-propagation parameters are input into the first machine learning model for back-propagation.

2. The method according to claim 1, wherein: Determining a training sample according to the first user feature sample data and the second user feature sample data participating in the training includes: The sample data with the same user identifier in the first user feature sample data and the second user feature sample data are concatenated to generate the training sample.

3. The method according to claim 1, wherein: The first bias parameter is the product of the first adjustment parameter and the first weight; The second bias parameter is the product of the second adjustment parameter and the second weight; The third bias parameter is the product of the first adjustment parameter and the third weight; The first fusion parameter is a sum of the first bias parameter and the third bias parameter; The first gradient parameter is the sum of the first fusion parameter and the second bias parameter.

4. The method according to claim 1, wherein: The first bias parameter is a sum of a product of the first adjustment parameter and the first weight and a first random number; The second bias parameter is the product of the second adjustment parameter and the second weight; The third bias parameter is the product of the first adjustment parameter and the third weight; The first fusion parameter is a sum of the first bias parameter and the third bias parameter; The first gradient parameter is a difference between the sum of the first fusion parameter and the second bias parameter and the first random number.

5. The method according to claim 1, wherein: The updated second weight is the product of the loss value and the second adjustment parameter; The first back propagation parameter is the product of the loss value and the updated second weight.

6. The method according to claim 1, further comprising: The loss value is sent to the second data processing device so that the second data processing device inputs the loss value into the second machine learning model for back propagation.

7. The method according to claim 6, wherein: Sending the loss value to the second data processing device comprises: generating a first training parameter using the loss value and the first adjustment parameter, and sending the first training parameter to the second data processing device; receiving a second fusion parameter and the third weight from the second data processing device, wherein the second fusion parameter includes the first training parameter and a second training parameter generated by a second random number; Updating the first weight using the second fusion parameter; Generate a second back propagation parameter using the loss value, the updated first weight and the third weight; The second back-propagation parameters are sent to the second data processing device so that the second data processing device inputs the second back-propagation parameters into the second machine learning model for back-propagation.

8. The method according to claim 7, wherein: The first training parameter is the product of the loss value and the first adjustment parameter; The second training parameter is a ratio of the second random number to a preset parameter; The second fusion parameter is the sum of the first training parameter and the second training parameter; The second back propagation parameter is the sum of the product of the loss value and the updated first weight and the third weight; Updating the first weight by using the second fusion parameter includes: The difference between the first weight and the product of the preset parameter and the second fusion parameter is taken as the updated first weight.

9. The method according to claim 7, wherein: The first training parameter is a sum of a product of the loss value and the first adjustment parameter and a third random number; The second training parameter is a ratio of the second random number to a preset parameter; The second fusion parameter is the sum of the first training parameter and the second training parameter; The second back propagation parameter is the sum of the product of the loss value and the updated first weight and the third weight; Updating the first weight by using the second fusion parameter includes: Subtracting the difference of the third random number from the second fusion parameter to obtain a first difference; A second difference value obtained by subtracting the product of the preset parameter and the first difference value from the first weight value is used as the updated first weight value.

10. The method according to any one of claims 1 to 9, wherein: The first machine learning model and the second machine learning model are binary classification machine learning models.

11. A prediction model training device, the prediction model training device being a first data processing device in a federated learning system, comprising: A first processing module is configured to receive first user feature sample data from a second data processing device in the federated learning system, determine a training sample according to the first user feature sample data and second user feature sample data participating in the training, input the training sample into a first machine learning model, and send the training sample to the second data processing device so that the second data processing device inputs the training sample into a second machine learning model; The second processing module is configured to input the first adjustment parameter of the second machine learning model provided by the second data processing device into the first machine learning model for forward propagation, and use the loss value of the second machine learning model to input the second machine learning model for back propagation, so as to obtain a user behavior prediction model, wherein the first adjustment parameter of the second machine learning model is received from the second data processing device, a first bias parameter is generated using the first adjustment parameter and the first weight, a second bias parameter is generated using the second adjustment parameter and the second weight of the first machine learning model, the first bias parameter is sent to the second data processing device, and a first fusion parameter is received from the second data processing device, wherein the first fusion parameter includes the first bias parameter and a third bias parameter generated using the first adjustment parameter and the third weight, a first gradient parameter is generated using the first fusion parameter and the second bias parameter, and the first gradient parameter is input into the first machine learning model for forward propagation, wherein the second weight is updated using the loss value and the second adjustment parameter, a first back propagation parameter is determined using the loss value and the updated second weight, and the first back propagation parameter is input into the first machine learning model for back propagation.

12. The device according to claim 11, wherein The first processing module is configured to concatenate sample data having the same user identifier in the first user feature sample data and the second user feature sample data to generate the training sample.

13. The device according to claim 11, wherein: The first bias parameter is the product of the first adjustment parameter and the first weight; The second bias parameter is the product of the second adjustment parameter and the second weight; The third bias parameter is the product of the first adjustment parameter and the third weight; The first fusion parameter is a sum of the first bias parameter and the third bias parameter; The first gradient parameter is the sum of the first fusion parameter and the second bias parameter.

14. The device according to claim 11, wherein: The first bias parameter is a sum of a product of the first adjustment parameter and the first weight and a first random number; The second bias parameter is the product of the second adjustment parameter and the second weight; The third bias parameter is the product of the first adjustment parameter and the third weight; The first fusion parameter is a sum of the first bias parameter and the third bias parameter; The first gradient parameter is a difference between the sum of the first fusion parameter and the second bias parameter and the first random number.

15. The device according to claim 11, wherein The updated second weight is the product of the loss value and the second adjustment parameter; The first back propagation parameter is the product of the loss value and the updated second weight.

16. The device according to claim 11, wherein The second processing module is configured to send the loss value to the second data processing device so that the second data processing device inputs the loss value into the second machine learning model for back propagation.

17. The device according to claim 16, wherein: The second processing module is configured to generate a first training parameter using the loss value and the first adjustment parameter, and send the first training parameter to the second data processing device, receive a second fusion parameter and the third weight from the second data processing device, wherein the second fusion parameter includes the first training parameter and a second training parameter generated using a second random number, update the first weight using the second fusion parameter, generate a second back propagation parameter using the loss value, the updated first weight and the third weight, and send the second back propagation parameter to the second data processing device so that the second data processing device inputs the second back propagation parameter into the second machine learning model for back propagation.

18. The device according to claim 17, wherein: The first training parameter is the product of the loss value and the first adjustment parameter; The second training parameter is a ratio of the second random number to a preset parameter; The second fusion parameter is the sum of the first training parameter and the second training parameter; The second back propagation parameter is the sum of the product of the loss value and the updated first weight and the third weight; The second processing module is further configured to use the difference between the first weight and the product of the preset parameter and the second fusion parameter as the updated first weight.

19. The device according to claim 17, wherein: The first training parameter is a sum of a product of the loss value and the first adjustment parameter and a third random number; The second training parameter is a ratio of the second random number to a preset parameter; The second fusion parameter is the sum of the first training parameter and the second training parameter; The second back propagation parameter is the sum of the product of the loss value and the updated first weight and the third weight; The second processing module is further configured to obtain a first difference by subtracting the third random number from the second fusion parameter, and to use a second difference obtained by subtracting the product of the preset parameter and the first difference from the first weight as the updated first weight.

20. The device according to any one of claims 11 to 19, wherein: The first machine learning model and the second machine learning model are binary classification machine learning models.

21. A data processing device, comprising: a memory configured to store instructions; A processor is coupled to the memory, and the processor is configured to execute the method according to any one of claims 1 to 10 based on instructions stored in the memory.

22. A data processing system comprising: A first data processing device, which is a data processing device according to any one of claims 11 to 21; The second data processing device is configured to send the first user feature sample data to the first data processing device, input the training sample sent by the first data processing device into the second machine learning model, and send the first adjustment parameter of the second machine learning model to the first data processing device.

23. The system of claim 22, wherein: The second data processing device is configured to, after receiving the first bias parameter sent by the first data processing device, generate a third bias parameter using the first adjustment parameter and a third weight, and send a first fusion parameter to the first data processing device, wherein the first fusion parameter includes the first bias parameter and the third bias parameter.

24. The system of claim 23, wherein: The third bias parameter is the product of the first adjustment parameter and the third weight; The first fusion parameter is the sum of the first bias parameter and the third bias parameter.

25. The system of claim 22, wherein: The second data processing device is configured to input the loss value sent by the first data processing device into the second machine learning model for back propagation.

26. The system of claim 25, wherein: The second data processing device is configured to, after receiving the first training parameters sent by the first data processing device, generate second training parameters using second random numbers, send second fusion parameters to the first data processing device, wherein the second fusion parameters include the first training parameters and second training parameters generated using the second random numbers, update the third weight using the second random numbers, send the updated third weight to the first data processing device, and input the second back propagation parameters sent by the first data processing device into the second machine learning model for back propagation.

27. The system of claim 26, wherein: The second training parameter is a ratio of the second random number to a preset parameter; The second fusion parameter is the sum of the first training parameter and the second training parameter; The second data processing device uses the sum of the third weight and the second random number as the updated third weight.

28. A prediction method, comprising: Extract user feature data; The user feature data is input into a user behavior prediction model to obtain a user behavior prediction result, wherein the user behavior prediction model is obtained by the training method described in any one of claims 1-10.

29. A prediction device, comprising: An extraction module, configured to extract user feature data; The prediction module is configured to input user feature data into a user behavior prediction model to obtain a user behavior prediction result, wherein the user behavior prediction model is obtained by the training method described in any one of claims 1-10.

30. A prediction device, comprising: a memory configured to store instructions; A processor is coupled to the memory, and the processor is configured to execute the method according to claim 28 based on instructions stored in the memory.

31. A computer-readable storage medium, wherein: The computer-readable storage medium stores computer instructions, and when the instructions are executed by a processor, the method according to any one of claims 1-10 and 28 is implemented.

Citation Information

Patent Citations

  • Model parameter training method and device based on federated learning, equipment and medium

    CN109886417A

  • Sample completion method, terminal, system and medium based on encrypted transfer learning

    CN109902742A