CN110837653B - Label prediction method, apparatus and computer readable storage medium - Google Patents

Label prediction method, apparatus and computer readable storage medium Download PDF

Info

Publication number
CN110837653B
CN110837653B CN201911083212.XA CN201911083212A CN110837653B CN 110837653 B CN110837653 B CN 110837653B CN 201911083212 A CN201911083212 A CN 201911083212A CN 110837653 B CN110837653 B CN 110837653B
Authority
CN
China
Prior art keywords
model
provider
demander
parameter
parameters
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201911083212.XA
Other languages
Chinese (zh)
Other versions
CN110837653A (en
Inventor
吴玙
马国强
张�杰
范涛
魏文斌
陈天健
杨强
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
WeBank Co Ltd
Original Assignee
WeBank Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by WeBank Co Ltd filed Critical WeBank Co Ltd
Priority to CN201911083212.XA priority Critical patent/CN110837653B/en
Publication of CN110837653A publication Critical patent/CN110837653A/en
Application granted granted Critical
Publication of CN110837653B publication Critical patent/CN110837653B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/60Protecting data
    • G06F21/602Providing cryptographic facilities or services
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/60Protecting data
    • G06F21/62Protecting access to data via a platform, e.g. using keys or access control rules
    • G06F21/6218Protecting access to data via a platform, e.g. using keys or access control rules to a system of files or objects, e.g. local or distributed file system or database
    • G06F21/6245Protecting personal data, e.g. for financial or medical purposes
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N20/00Machine learning
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q40/00Finance; Insurance; Tax strategies; Processing of corporate or income taxes
    • G06Q40/02Banking, e.g. interest calculation or account maintenance
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L63/00Network architectures or network communication protocols for network security
    • H04L63/04Network architectures or network communication protocols for network security for providing a confidential data exchange among entities communicating through data packet networks
    • H04L63/0428Network architectures or network communication protocols for network security for providing a confidential data exchange among entities communicating through data packet networks wherein the data content is protected, e.g. by encrypting or encapsulating the payload

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Security & Cryptography (AREA)
  • Software Systems (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Bioethics (AREA)
  • General Health & Medical Sciences (AREA)
  • Health & Medical Sciences (AREA)
  • Business, Economics & Management (AREA)
  • Computer Hardware Design (AREA)
  • Finance (AREA)
  • Medical Informatics (AREA)
  • Accounting & Taxation (AREA)
  • Computing Systems (AREA)
  • Development Economics (AREA)
  • Marketing (AREA)
  • Mathematical Physics (AREA)
  • Databases & Information Systems (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Artificial Intelligence (AREA)
  • Data Mining & Analysis (AREA)
  • Economics (AREA)
  • Evolutionary Computation (AREA)
  • Strategic Management (AREA)
  • Technology Law (AREA)
  • General Business, Economics & Management (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)

Abstract

The invention discloses a label prediction method, which comprises the following steps: the method comprises the steps that a demand side obtains a first parameter updated by a demand side model, a first characteristic quantity of a demand side prediction sample and a first exposure quantity of the demand side prediction sample; the demand side determines a first predicted value of the demand side model based on the first parameter, the first feature quantity and the first exposure quantity; the method comprises the steps that a demand party obtains a second predicted value of a provider model and a poisson calculation rule to determine the second predicted value; the demander determines a predicted tag amount of the demander's predicted sample based on the first predicted value, the second predicted value, and the poisson calculation rule. The invention also discloses a label prediction device and a computer readable storage medium. According to the invention, through combining the poisson regression implementation scheme and training the demand side model and the provider side model in the longitudinal federal learning model, the predicted label quantity corresponding to the demand side prediction sample can be accurately predicted, and the problem that accurate label data cannot be predicted in the prior art is solved.

Description

Label prediction method, apparatus and computer readable storage medium
Technical Field
The present invention relates to the field of financial technology (Fintech), and in particular, to a tag prediction method, apparatus, and computer readable storage medium.
Background
With the development of computer technology, more and more technologies (big data, distributed, blockchain, artificial intelligence, etc.) are applied in the financial field, and the traditional financial industry is gradually changing to the financial technology (Fintech), but due to the requirements of security and real-time performance of the financial industry, higher requirements are also put forward on the technologies. For example, federal learning is a technology which is widely applied in the financial field, and by combining different participants to perform machine learning, high-efficiency machine learning is performed among multiple participants or multiple computing nodes on the premise of guaranteeing information security during large data exchange, protecting terminal data and personal data privacy and guaranteeing legal compliance. The longitudinal federation learning in federation learning is a method for training by splitting the data sets of two participants according to the longitudinal direction (i.e. feature dimension) and taking out the data of the two users with the same user features but not the same user features under the condition that the data sets of the two participants have more user overlaps and less user features overlap.
In a longitudinal federal learning scene in the prior art, an A party, a B party and a C party are set, a partner B has the label with the most commercial value, the partner A has certain characteristics which the B party does not have, the C party is a coordinator, and part of data which are the same as the A party and the B party but not identical to the user characteristics is taken out for federal learning modeling and prediction, so that only the correct or incorrect result of the label data can be predicted, and the accurate label data cannot be predicted.
The foregoing is provided merely for the purpose of facilitating understanding of the technical solutions of the present invention and is not intended to represent an admission that the foregoing is prior art.
Disclosure of Invention
The invention mainly aims to provide a label prediction method, a label prediction device and a computer readable storage medium, and aims to solve the technical problem that an accurate data result cannot be predicted.
In order to achieve the above object, the present invention provides a tag prediction method, comprising the steps of:
the method comprises the steps that a demand side obtains a first parameter updated by a demand side model, a first characteristic quantity of a demand side prediction sample and a first exposure quantity of the demand side prediction sample;
the demander determining a first predicted value of the demander model based on the first parameter, the first feature amount, and the first exposure amount;
the demander acquires a second predicted value of a provider model and a poisson calculation rule, wherein the provider is used for acquiring a second parameter updated by the provider model and a second characteristic quantity of a provider predicted sample, and determining the second predicted value based on the second parameter and the second characteristic quantity;
the demander determines a predicted tag amount of the demander's predicted sample based on the first predicted value, the second predicted value, and the poisson calculation rule.
Optionally, before the step of obtaining the first parameter after updating the demand side model, the first feature quantity of the demand side prediction sample and the first exposure quantity of the demand side prediction sample by the demand side, the method further includes:
the demander acquires a third parameter before updating the demander model, a third characteristic quantity of a demander training sample and a second exposure quantity of the demander training sample;
the demander determining a third predicted value of the demander model based on the third parameter, the third feature amount, and the second exposure amount;
the provider is used for acquiring a fourth parameter before updating the provider model and a fourth characteristic quantity of the provider training sample, and determining a fourth predicted value of the provider model based on the fourth parameter and the fourth characteristic quantity;
the demander determines fifth parameters of the demander model based on the third predicted value to update the demander model parameters and train the demander model, and the provider determines sixth parameters of the provider model based on the fourth predicted value to update the provider model parameters and train the provider model.
Optionally, the step of determining the fifth parameter of the demand side model to update demand side model parameters and train the demand side model by the demand side based on the third predicted value, and determining the sixth parameter of the provider model to update provider model parameters and train the provider model by the provider based on the fourth predicted value comprises:
the demander acquires the label quantity of the training sample of the demander, public key information provided by a coordinator and intermediate encryption quantity of the provider model, wherein the provider acquires the fourth predicted value and the public key information provided by the coordinator, and determines the intermediate encryption quantity based on the fourth predicted value and the public key information;
the demander determining an encryption residual amount of the demander model based on the third predicted value, the tag amount, and the intermediate encryption amount;
the demander determines a fifth parameter of the demander model based on the encryption residual amount and the public key information to update a demander model parameter and train the demander model, and the provider determines a sixth parameter of the provider model based on the encryption residual amount and the public key information to update a provider model parameter and train the provider model.
Optionally, the determining, by the demander, a fifth parameter of the demander model based on the encryption residual amount and the public key information to update a demander model parameter and train the demander model, and the determining, by the provider, a sixth parameter of the provider model based on the encryption residual amount and the public key information to update a provider model parameter and train the provider model includes:
the demander determining a first encryption gradient of the demander model based on the third feature amount, the encryption residual amount, and the public key information;
the provider determining a second encryption gradient of the provider model based on the fourth feature quantity, the encryption residual quantity, and the public key information;
the demander determines fifth parameters of the demander model based on the first encryption gradient to update the demander model parameters and train the demander model, and the provider determines sixth parameters of the provider model based on the second encryption gradient to update the provider model parameters and train the provider model.
Optionally, the determining, by the demander, a fifth parameter of the demander model based on the first encryption gradient to update a demander model parameter and training the demander model, and the determining, by the provider, a sixth parameter of the provider model based on the second encryption gradient to update a provider model parameter and training the provider model, includes:
The coordinator is used for acquiring the first encryption gradient of the demander model, the second encryption gradient of the provider model and private key information corresponding to the public key information;
the coordinator is used for determining a first decryption gradient corresponding to the demander model based on the first encryption gradient and the private key information;
the coordinator is used for determining a second decryption gradient corresponding to the provider model based on the second encryption gradient and the private key information;
the demander determines fifth parameters of the demander model based on the first decryption gradient to update the demander model parameters and train the demander model, and the provider determines sixth parameters of the provider model based on the second decryption gradient to update the provider model parameters and train the provider model.
Optionally, the step of determining, by the demander, a fifth parameter of the demander model based on the first decryption gradient to update a demander model parameter and train the demander model, and determining, by the provider, a sixth parameter of the provider model based on the second decryption gradient to update a provider model parameter and train the provider model, further includes, after the step of:
The demander determining an encryption loss variation amount of the demander model based on the third predicted value, the intermediate encryption amount, and the second exposure amount;
the coordinator is used for acquiring the encryption loss variation of the demand side model, and detecting whether the encryption loss variation is smaller than or equal to a first preset threshold value;
the step of obtaining the first parameter updated by the demand side model by the demand side comprises the following steps:
if the encryption loss variation is smaller than or equal to the first preset threshold, the requester updates parameters of the requester model, acquires the fifth parameters, and takes the fifth parameters as first parameters to train the requester model;
the step of the provider for obtaining the updated second parameter of the provider model includes:
if the encryption loss variation is smaller than or equal to the first preset threshold, the provider updates parameters of the provider model, acquires the sixth parameters, and takes the sixth parameters as second parameters to train the provider model;
and if the encryption loss variation is greater than the first preset threshold, the requiring party continues to execute the step that the requiring party determines the fifth parameter of the requiring party model based on the first decryption gradient, and the providing party continues to execute the step that the providing party determines the sixth parameter of the providing party model based on the second decryption gradient.
Optionally, before the step of the demander obtaining the third parameter before updating the demander model, the third feature quantity of the demander training sample, and the second exposure quantity of the demander training sample, the method further includes:
the requiring party acquires the training samples of the requiring party, and the provider acquires the training sample amount of each training sample provided by the requiring party;
the demander determining a third feature quantity of the demander training sample and a second exposure quantity of the demander training sample based on the demander training sample;
the provider is configured to determine the provider training sample that matches the demander training sample based on the training sample size;
the provider is configured to determine a fourth feature quantity of the provider training sample based on the provider training sample.
Optionally, the step of determining, by the demander, a fifth parameter of the demander model based on the first decryption gradient to update a demander model parameter and train the demander model, and determining, by the provider, a sixth parameter of the provider model based on the second decryption gradient to update a provider model parameter and train the provider model, further includes, after the step of:
The coordinator is used for acquiring the model training wheel number of the model of the demander and detecting whether the model training wheel number is greater than or equal to a second preset threshold value;
the step of obtaining the first parameter updated by the demand side model by the demand side comprises the following steps:
if the number of the model training rounds is greater than or equal to a second preset threshold, the demand side updates parameters of the demand side model, the demand side obtains the fifth parameters, and the fifth parameters are used as first parameters to train the demand side model;
the step of the provider for obtaining the updated second parameter of the provider model includes:
if the number of model training rounds is greater than or equal to a second preset threshold, the provider updates parameters of the provider model, acquires the sixth parameters, and takes the sixth parameters as second parameters to train the provider model;
and if the number of model training rounds is smaller than a second preset threshold value, the requiring party continuously executes the step of determining a fifth parameter of the requiring party model based on the first decryption gradient, and the providing party continuously executes the step of determining a sixth parameter of the providing party model based on the second decryption gradient.
In addition, in order to achieve the above object, the present invention also provides a tag prediction apparatus including: the label prediction method comprises the steps of a memory, a processor and a label prediction program which is stored in the memory and can run on the processor, wherein the label prediction program is executed by the processor to realize the label prediction method.
In addition, in order to achieve the above object, the present invention also provides a computer-readable storage medium having stored thereon a label prediction program which, when executed by a processor, implements the steps of the label prediction method as described above.
The method comprises the steps that a first parameter updated by a demand side model, a first characteristic quantity of a demand side prediction sample and a first exposure quantity of the demand side prediction sample are obtained through a demand side; the demander determining a first predicted value of the demander model based on the first parameter, the first feature amount, and the first exposure amount; the demander acquires a second predicted value of a provider model and a poisson calculation rule, wherein the provider is used for acquiring a second parameter updated by the provider model and a second characteristic quantity of a provider predicted sample, and determining the second predicted value based on the second parameter and the second characteristic quantity; the demand side is based on the first predicted value, the second predicted value and the poisson calculation rule, the predicted label quantity of the demand side predicted sample is determined, the demand side model and the provider model in the longitudinal federal learning model are trained by combining the poisson regression implementation scheme, the predicted label quantity corresponding to the demand side predicted sample can be accurately predicted, the problem that accurate label data cannot be predicted in the prior art is solved, and the problem that terminal data and personal data privacy are easy to leak is solved by adopting a mode of building the longitudinal federal learning model.
Drawings
FIG. 1 is a schematic diagram of a label predicting device in a hardware running environment according to an embodiment of the label predicting method of the present invention;
FIG. 2 is a flowchart of a tag prediction method according to a first embodiment of the present invention;
FIG. 3 is a schematic diagram of a prediction flow of the label prediction method of the present invention;
FIG. 4 is a schematic diagram of a modeling flow of the label prediction method of the present invention;
FIG. 5 is a schematic diagram of a modeling flow of the label prediction method of the present invention;
FIG. 6 is a schematic diagram of a modeling flow of the label prediction method of the present invention;
FIG. 7 is a schematic diagram of a modeling flow of the label prediction method of the present invention.
The achievement of the objects, functional features and advantages of the present invention will be further described with reference to the accompanying drawings, in conjunction with the embodiments.
Detailed Description
It should be understood that the specific embodiments described herein are for purposes of illustration only and are not intended to limit the scope of the invention.
Referring to fig. 1, fig. 1 is a schematic structural diagram of a tag prediction apparatus of a hardware running environment according to an embodiment of the present invention.
The label predicting device of the embodiment of the invention can be a PC, and also can be mobile terminal equipment with a display function, such as a smart phone, a tablet personal computer, an electronic book reader, a portable computer and the like.
As shown in fig. 1, the tag prediction apparatus may include: a processor 1001, such as a CPU, a network interface 1004, a user interface 1003, a memory 1005, a communication bus 1002. Wherein the communication bus 1002 is used to enable connected communication between these components. The user interface 1003 may include a Display, an input unit such as a Keyboard (Keyboard), and the optional user interface 1003 may further include a standard wired interface, a wireless interface. The network interface 1004 may optionally include a standard wired interface, a wireless interface (e.g., WI-FI interface). The memory 1005 may be a high-speed RAM memory or a stable memory (non-volatile memory), such as a disk memory. The memory 1005 may also optionally be a storage device separate from the processor 1001 described above.
It will be appreciated by those skilled in the art that the tag prediction apparatus structure shown in fig. 1 is not limiting of the tag prediction apparatus and may include more or fewer components than shown, or certain components may be combined, or a different arrangement of components.
As shown in fig. 1, an operating system, a network communication module, a user interface module, and a tag prediction program may be included in a memory 1005, which is a type of computer storage medium.
In the tag prediction apparatus shown in fig. 1, the network interface 1004 is mainly used for connecting to a background server, and performing data communication with the background server; the user interface 1003 is mainly used for connecting a client (user side) and performing data communication with the client; and the processor 1001 may be used to invoke a tag prediction program stored in the memory 1005.
In this embodiment, the tag prediction apparatus includes: the tag prediction system comprises a memory 1005, a processor 1001 and a tag prediction program which is stored in the memory 1005 and can be run on the processor 1001, wherein when the processor 1001 calls the tag prediction program stored in the memory 1005, the following operations are executed:
the method comprises the steps that a demand side obtains a first parameter updated by a demand side model, a first characteristic quantity of a demand side prediction sample and a first exposure quantity of the demand side prediction sample;
the demander determining a first predicted value of the demander model based on the first parameter, the first feature amount, and the first exposure amount;
the demander acquires a second predicted value of a provider model and a poisson calculation rule, wherein the provider is used for acquiring a second parameter updated by the provider model and a second characteristic quantity of a provider predicted sample, and determining the second predicted value based on the second parameter and the second characteristic quantity;
The demander determines a predicted tag amount of the demander's predicted sample based on the first predicted value, the second predicted value, and the poisson calculation rule.
Further, the processor 1001 may call a tag prediction program stored in the memory 1005, and further perform the following operations:
the demander acquires a third parameter before updating the demander model, a third characteristic quantity of a demander training sample and a second exposure quantity of the demander training sample;
the demander determining a third predicted value of the demander model based on the third parameter, the third feature amount, and the second exposure amount;
the provider is used for acquiring a fourth parameter before updating the provider model and a fourth characteristic quantity of the provider training sample, and determining a fourth predicted value of the provider model based on the fourth parameter and the fourth characteristic quantity;
the demander determines fifth parameters of the demander model based on the third predicted value to update the demander model parameters and train the demander model, and the provider determines sixth parameters of the provider model based on the fourth predicted value to update the provider model parameters and train the provider model.
Further, the processor 1001 may call a tag prediction program stored in the memory 1005, and further perform the following operations:
the demander acquires the label quantity of the training sample of the demander, public key information provided by a coordinator and intermediate encryption quantity of the provider model, wherein the provider acquires the fourth predicted value and the public key information provided by the coordinator, and determines the intermediate encryption quantity based on the fourth predicted value and the public key information;
the demander determining an encryption residual amount of the demander model based on the third predicted value, the tag amount, and the intermediate encryption amount;
the demander determines a fifth parameter of the demander model based on the encryption residual amount and the public key information to update a demander model parameter and train the demander model, and the provider determines a sixth parameter of the provider model based on the encryption residual amount and the public key information to update a provider model parameter and train the provider model.
Further, the processor 1001 may call a tag prediction program stored in the memory 1005, and further perform the following operations:
The demander determining a first encryption gradient of the demander model based on the third feature amount, the encryption residual amount, and the public key information;
the provider determining a second encryption gradient of the provider model based on the fourth feature quantity, the encryption residual quantity, and the public key information;
the demander determines fifth parameters of the demander model based on the first encryption gradient to update the demander model parameters and train the demander model, and the provider determines sixth parameters of the provider model based on the second encryption gradient to update the provider model parameters and train the provider model.
Further, the processor 1001 may call a tag prediction program stored in the memory 1005, and further perform the following operations:
the coordinator is used for acquiring the first encryption gradient of the demander model, the second encryption gradient of the provider model and private key information corresponding to the public key information;
the coordinator is used for determining a first decryption gradient corresponding to the demander model based on the first encryption gradient and the private key information;
The coordinator is used for determining a second decryption gradient corresponding to the provider model based on the second encryption gradient and the private key information;
the demander determines fifth parameters of the demander model based on the first decryption gradient to update the demander model parameters and train the demander model, and the provider determines sixth parameters of the provider model based on the second decryption gradient to update the provider model parameters and train the provider model.
Further, the processor 1001 may call a tag prediction program stored in the memory 1005, and further perform the following operations:
the demander determining an encryption loss variation amount of the demander model based on the third predicted value, the intermediate encryption amount, and the second exposure amount;
the coordinator is used for acquiring the encryption loss variation of the demand side model, and detecting whether the encryption loss variation is smaller than or equal to a first preset threshold value;
the step of obtaining the first parameter updated by the demand side model by the demand side comprises the following steps:
if the encryption loss variation is smaller than or equal to the first preset threshold, the requester updates parameters of the requester model, acquires the fifth parameters, and takes the fifth parameters as first parameters to train the requester model;
The step of the provider for obtaining the updated second parameter of the provider model includes:
if the encryption loss variation is smaller than or equal to the first preset threshold, the provider updates parameters of the provider model, acquires the sixth parameters, and takes the sixth parameters as second parameters to train the provider model;
and if the encryption loss variation is greater than the first preset threshold, the requiring party continues to execute the step that the requiring party determines the fifth parameter of the requiring party model based on the first decryption gradient, and the providing party continues to execute the step that the providing party determines the sixth parameter of the providing party model based on the second decryption gradient.
Further, the processor 1001 may call a tag prediction program stored in the memory 1005, and further perform the following operations:
the requiring party acquires the training samples of the requiring party, and the provider acquires the training sample amount of each training sample provided by the requiring party;
the demander determining a third feature quantity of the demander training sample and a second exposure quantity of the demander training sample based on the demander training sample;
The provider is configured to determine the provider training sample that matches the demander training sample based on the training sample size;
the provider is configured to determine a fourth feature quantity of the provider training sample based on the provider training sample.
Further, the processor 1001 may call a tag prediction program stored in the memory 1005, and further perform the following operations:
the coordinator is used for acquiring the model training wheel number of the model of the demander and detecting whether the model training wheel number is greater than or equal to a second preset threshold value;
the step of obtaining the first parameter updated by the demand side model by the demand side comprises the following steps:
if the number of the model training rounds is greater than or equal to a second preset threshold, the demand side updates parameters of the demand side model, the demand side obtains the fifth parameters, and the fifth parameters are used as first parameters to train the demand side model;
the step of the provider for obtaining the updated second parameter of the provider model includes:
if the number of model training rounds is greater than or equal to a second preset threshold, the provider updates parameters of the provider model, acquires the sixth parameters, and takes the sixth parameters as second parameters to train the provider model;
And if the number of model training rounds is smaller than a second preset threshold value, the requiring party continuously executes the step of determining a fifth parameter of the requiring party model based on the first decryption gradient, and the providing party continuously executes the step of determining a sixth parameter of the providing party model based on the second decryption gradient.
The present invention also provides a label prediction method, referring to fig. 2, fig. 2 is a schematic flow chart of a first embodiment of the label prediction method of the present invention.
In this embodiment, the tag prediction method includes:
federal learning is a technology which is widely applied in the financial field, and is a machine learning method by combining different participants, so that high-efficiency machine learning is performed among multiple participants or multiple computing nodes on the premise of guaranteeing information security during large data exchange, protecting terminal data and personal data privacy and guaranteeing legal compliance. The longitudinal federation learning in federation learning is a method for training by splitting the data sets of two participants according to the longitudinal direction (i.e. feature dimension) and taking out the data of the two users with the same user features but not the same user features under the condition that the data sets of the two participants have more user overlaps and less user features overlap.
The embodiment is applied to a three-party vertical federal learning scenario, referring to fig. 4, as shown in the modeling flow of fig. 4, the set partner includes a provider a side, a demand side B side and a coordinator C side, the demand side B has a tag with the most commercial value, the provider a has some features that the B side does not have, and the C side is the coordinator. A. And the B side need to model and predict the Poisson distribution on the premise of not revealing the B side tag information and the characteristic information of the two sides.
Step S10, a demand side obtains a first parameter updated by a demand side model, a first characteristic quantity of a demand side prediction sample and a first exposure quantity of the demand side prediction sample;
referring to fig. 3, as shown in the prediction flow in fig. 3, the demand side is the side B in fig. 3, where the side B includes a federal learning model and model parameters, that is, a demand side model and model parameters thereof; the first parameters are model parameters in the demand side model, and are model parameters after the modeling flow is completed and the model is updated; the first feature quantity is sample features of a demand side prediction sample, namely user features of the demand side prediction sample, and if the demand side is a bank, the first feature quantity can be a balance behavior, a credit rating and the like of a bank user; the first exposure is a unit of collection of the tag characteristics of the predicted sample, and may be a time span, such as 1 year or 1 month, or may be a geographic range, such as 10 square kilometers or 10 meters, and the exposure is also referred to as exposure.
It can be understood that, in practice, the prediction sample of the B side of the demand side and the data information contained in the prediction sample of the a side provider cannot be exchanged, and first, the data exchange of the two enterprises violates the law, so that the terminal data and the user data are easy to leak; and secondly, the exchange of the sensitive data does not accord with the interests of both sides, and at the moment, the longitudinal federal learning starts to play a unique role, namely, the high-efficiency machine learning is carried out among multiple participants or multiple computing nodes on the premise of guaranteeing the information security during large data exchange, protecting the privacy of terminal data and personal data and guaranteeing legal compliance.
In this embodiment, after the modeling of the three-party vertical federal learning model in this embodiment is completed, referring to fig. 3, as shown in the prediction flow in fig. 3, the party B obtains first parameters of the model after updating, first feature values of the party B prediction samples, and first exposure values of the party B prediction samples, so as to predict the subsequent samples. Wherein the first parameter may be expressed as θ B The first feature quantity may be expressed asThe first exposure may be expressed as e i . And after the first parameter is trained by the A party and the B party in combination with the C party coordinator to train the three-party longitudinal federal learning model, updating the parameter in the demand party model so as to accurately predict the corresponding result of the B party prediction sample.
Step S20, the demander determines a first predicted value of the demander model based on the first parameter, the first feature quantity, and the first exposure quantity;
in the present embodiment, referring to fig. 3, as shown in the prediction flow of fig. 3, in the prediction flow, the first parameter θ is acquired at the demand side B side B First characteristic quantityAnd a first exposure e i After that, the demand side B side is based on the first parameter theta B First characteristic quantity->And a first exposure e i A first predictor of the demand B-party model is calculated. Wherein the calculation of the first predicted value comprises calculating +.>Recalculating->The calculation formula of the first predicted value is +.>
Step S30, the demander acquires a second predicted value of a provider model and a poisson calculation rule, wherein the provider is used for acquiring a second parameter updated by the provider model and a second characteristic quantity of a provider predicted sample, and determining the second predicted value based on the second parameter and the second characteristic quantity;
referring to fig. 3, as shown in the prediction flow of fig. 3, the provider is provider a in fig. 3, where provider a includes a federal learning model and model parameters, that is, a provider model and model parameters thereof; the second parameters are model parameters in the provider model and are model parameters after the modeling flow is completed and the provider model is updated; the second feature quantity is a sample feature of the provider prediction sample, that is, a user feature of the provider prediction sample, and if the provider a side is an e-commerce, the first feature quantity may be a browsing and purchasing history of the e-commerce user, or the like.
In the present embodiment, referring to fig. 3, as shown in the prediction flow of fig. 3, in the prediction flow, the provider a side first acquires the second parameter θ after updating its model A And a second feature quantity of its predicted sampleSo that the three-party longitudinal federal learning model can predict the subsequent samples. Obtaining the second parameter θ at provider A A And second characteristic quantity->After that, the provider A side based on the second parameter θ A And second characteristic quantity->A second predictor of the provider prediction samples is calculated. And after the provider A side calculates the second predicted value, the second predicted value is sent to the demand side, and the demand side B side acquires the second predicted value calculated by the provider model and acquires a poisson calculation rule preset by the demand side. Wherein the calculation of the second predicted value comprises calculating +.>RecalculatingThe calculation formula of the second predicted value is +.>
It can be understood that, before the prediction process begins, the A, B side first needs to complete matching of the common prediction samples through a matching mechanism, that is, the A, B side knows the sample id to be predicted, performs matching of the common prediction samples of both sides, and only A, B sides have the common prediction sample corresponding to the sample id to perform label feature prediction on the prediction samples, where the number of the prediction samples may be one or multiple.
Step S40, the demander determines a predicted tag amount of the demander prediction sample based on the first predicted value, the second predicted value and the poisson calculation rule.
The predicted tag amount is the number of times something happens within a certain indefinite time range, namely tag data which needs to be predicted by the demand side model, and the number of times includes the number of times, such as the number of times that a certain user purchases a fund in one month. The poisson calculation rule can be a poisson distribution model or formula, and can also be other models with effects on poisson distribution.
In this embodiment, referring to fig. 3, after the first predicted value is determined by the demand side and the second predicted value is determined by the provider side, the second predicted value is determined by the provider side a as shown in the prediction flow of fig. 3And sending the message to a party B of the demand party. The requiring party B receives the second predicted value +.>The model of the party B is based on the first predicted valueSecond predictive value->And a poisson calculation rule for calculating a predicted tag quantity of the client prediction sample to calculate a prediction result of the tag feature of the client B prediction sample. Wherein, the calculation formula of the predicted tag quantity based on the poisson calculation rule is +.>
In the vertical federal learning scenario in this embodiment, the requiring party B obtains a model after training including the first parameter and the second parameter based on the user feature, i.e., the first feature quantity, of the training sample owned by the requiring party B and the user feature, i.e., the second feature quantity, of the common sample provided by the joint provider a, and the joint provider B and the joint provider C, and can predict the label quantity of the training sample. For example, knowing the balance and credit rating of the B-party banking user, and the browsing and purchase history of the a-party e-commerce user, the number of purchases of funds by a user over a future period of time can be predicted by the vertical federal learning model.
According to the label prediction method provided by the embodiment, the first parameter updated by the demand side model, the first characteristic quantity of the demand side prediction sample and the first exposure quantity of the demand side prediction sample are obtained through the demand side, the first predicted value of the demand side model is determined based on the first parameter, the first characteristic quantity and the first exposure quantity, the second predicted value of the demand side model and a poisson calculation rule are obtained through the demand side, wherein the provider is used for obtaining the second parameter updated by the provider model and the second characteristic quantity of the provider prediction sample, determining the second predicted value based on the second parameter and the second characteristic quantity, determining the predicted label quantity of the demand side prediction sample based on the first predicted value, the second predicted value and the poisson calculation rule, and training the demand side model and the provider model in the longitudinal learning model by combining a poisson return implementation scheme, so that the predicted label quantity corresponding to the demand side prediction sample can be accurately predicted, and the problem that the personal data cannot be accurately found by adopting a longitudinal learning method of the personal label can be easily solved, and the problem that the personal data cannot be accurately predicted by adopting the longitudinal learning terminal can be solved.
Based on the first embodiment, a second embodiment of the method of the present invention is provided, and in this embodiment, before step S10, the method further includes:
step a, the demander acquires a third parameter of the demander model, a third characteristic quantity of a demander training sample and a second exposure quantity of the demander training sample;
referring to fig. 4, as shown in the modeling flow of fig. 4, the third parameter is a model parameter in the demand side model, and is a model parameter of the demand side model in the modeling flow process, unlike the first parameter, the first parameter is a model parameter of the demand side model after the modeling is completed, and the third parameter is a model parameter in the non-modeling or modeling process, where the longitudinal federal learning model is not completed; the third feature quantity is sample features in training samples of the party B of the demand party, is user features in training samples of the party B, and can be the balance behavior, credit rating and the like of a user of a bank if the demand party is the bank; the second exposure is a unit of acquisition of the tag features of the training sample, and may be a time span, such as 1 year or 1 month, or may be a geographic range, such as 10 square kilometers or 10 meters, and the exposure is also referred to as exposure.
In this embodiment, referring to fig. 4, as shown in the modeling flow of fig. 4, in the process of longitudinal federal learning modeling, the party B of the demand party obtains a third parameter of the model, a third feature quantity of a training sample of the party B, and a second exposure quantity of the training sample thereof, so as to provide training of a longitudinal federal learning model of a subsequent three party. Wherein the third parameter may be expressed as θ B The third feature quantity may be expressed as X B The second exposure amount may be denoted as E.
Step b, the demander determines a third predicted value of the demander model based on the third parameter, the third feature quantity and the second exposure quantity;
in the present embodiment, referring to fig. 4, as shown in the modeling flow of fig. 4, in the longitudinal federal learning modeling process, a third parameter θ is acquired at the party B of the demand B Third characteristic quantity X B And a second exposure E, the demand side B side based on a third parameter theta B Third characteristic quantity X B And a second exposure E, calculating a third predicted value of the demand side model. Wherein the calculation process of the third predicted value comprises calculating X B θ B The exp (X) B θ B ) E, the calculation formula of the third predicted value is exp (X B θ B )*E。
Step c, the provider is used for acquiring a fourth parameter before updating the provider model and a fourth characteristic quantity of the provider training sample, and the provider determines a fourth predicted value of the provider model based on the fourth parameter and the fourth characteristic quantity;
Referring to fig. 4, as shown in the modeling flow of fig. 4, the fourth parameter is a model parameter in the provider model, and is a parameter in the provider model in the modeling flow process, unlike the third parameter, the third parameter is a model parameter of the provider model after the modeling is completed, and the fourth parameter is a model parameter in the provider model is not modeled or in the modeling process, where the longitudinal federal learning model is not modeled; the fourth feature quantity is a sample feature in a training sample provided by the provider a, and is a user feature in the training sample provided by the provider a, and if the provider a is an e-commerce, the first feature quantity may be a browsing and purchasing history of a user of the e-commerce, and the like.
In this embodiment, referring to fig. 4, as shown in the modeling flow of fig. 4, during the longitudinal federal learning modeling process, the provider a first obtains a fourth parameter of the provider model and a fourth feature of the provider training sample for training of the subsequent three-party longitudinal federal learning model, where the fourth parameter may be expressed as θ A The fourth feature quantity may be expressed as X A . Obtaining the fourth parameter θ at provider A A And a fourth characteristic quantity X A After that, the provider a side is based on the fourth parameter θ A And a fourth characteristic quantity X A A fourth predictor of the provider training samples is calculated. Wherein the calculation process of the fourth predicted value comprises calculating X A θ A The exp (X) A θ A ) The calculation formula of the fourth predicted value is exp (X A θ A )。
It will be appreciated that the training samples of the requiring party B cannot be exchanged with the data information contained in the training samples of the party a provider, and before the modeling process begins, the A, B party first needs to complete matching of the common training samples through a matching mechanism, that is, A, B party completes common training sample screening through the encrypted ID intersection, and only A, B parties have the common training samples corresponding to the encrypted ID, so that the training samples can be modeled by the longitudinal federal learning model, where the training samples are generally multiple, or millions. The common training samples are screened by the encryption ID for the training samples of the A, B parties, so that the effect of developing high-efficiency machine learning among multiple participants or multiple computing nodes is achieved on the premise of guaranteeing information security during large data exchange, protecting terminal data and personal data privacy and guaranteeing legal compliance.
And d, the requiring party determines a fifth parameter of the requiring party model based on the encryption residual quantity and the public key information to update the requiring party model parameter and train the requiring party model, and the providing party determines a sixth parameter of the providing party model based on the encryption residual quantity and the public key information to update the providing party model parameter and train the providing party model.
In this embodiment, in the longitudinal federal learning modeling process, after determining the third predicted value on the side B of the demand side and the fourth predicted value on the side B of the demand side, by combining the poisson return implementation schemes of the three-party longitudinal federal learning frameworks of the side a, the side B and the side C, the demand side is based on the third predicted value exp (X B θ B ) E, determining a fifth parameter of the demand side model to update the demand side model parameter and training the demand side model, the provider based on a fourth prediction value exp (X A θ A ) A sixth parameter of the provider model is determined to update the provider model parameters and train the provider model.
Further, in an embodiment, the step of the demander determining a fifth parameter of the demander model based on the third predicted value to update a demander model parameter and train the demander model, and the step of the provider determining a sixth parameter of the provider model based on the fourth predicted value to update a provider model parameter and train the provider model comprises:
step e, the demander acquires the label quantity of the training sample of the demander, public key information provided by a coordinator and intermediate encryption quantity of the provider model, wherein the provider acquires the fourth predicted value and the public key information provided by the coordinator, and determines the intermediate encryption quantity based on the fourth predicted value and the public key information;
Referring to fig. 4, as shown in the modeling flow in fig. 4, the public key information is public key information provided by the coordinator C, which is an encryption rule for providing data encryption of A, B, and only the coordinator C has private key information corresponding to the public key information; the label quantity is the label characteristic Y in the training sample in the party B of the demand party, namely the label with the most commercial value in the training sample in the party B, and if the demand party is a bank, the label quantity can be the number of times that the bank user purchases the fund in a certain time period.
In this embodiment, referring to fig. 4, as shown in the modeling flow of fig. 4, in the longitudinal federal learning modeling process, the coordinator C side obtains public key information and sends the public key information to the demander and the provider. After the provider a side receives the public key information, a fourth predicted value exp (X A θ A ) And the public key information of the coordinator model, and the fourth predicted value exp (X A θ A ) Encryption is performed, and an intermediate encryption amount [ [ exp (X) corresponding to the fourth predicted value in the provider model is determined A θ A )]]. After the provider determines the intermediate encryption volume, the intermediate encryption volume is sent to the requester, and the requester B cannot decrypt the intermediate encryption volume. Then, the demander acquires the intermediate encryption amount, and simultaneously acquires the tag amount in the demander training sample and public key information provided by the coordinator.
Step f, the demander determines the encryption residual amount of the demander model based on the third predicted value, the tag amount and the intermediate encryption amount;
in the present embodiment, referring to fig. 5, as shown in the modeling flow of fig. 5, after the party B obtains the third predicted value, the tag amount, and the intermediate encryption amount in the process of longitudinal federal learning modeling, the party B obtains the third predicted value exp (X B θ B ) E, intermediate encryption volume of provider model [ [ exp (X) A θ A )]]And the label quantity Y of the training sample of the demand party, firstly determining the residual quantity d, then encrypting the residual quantity by using public key information based on homomorphic encryption technology, and determining the encrypted residual quantity [ [ d ] of the demand party model]]. Wherein the encryption residual amount [ [ d ]]]The calculation formula of (2) is as follows:
[[d]]=exp(X B θ B )*E*[[X A θ A ]]-Y
wherein exp (X) B θ B ) E is the third predicted value, [ [ exp (X) A θ A )]]And Y is the label quantity for the intermediate encryption quantity.
And g, the requiring party determines a fifth parameter of the requiring party model based on the encryption residual quantity and the public key information to update the requiring party model parameter and train the requiring party model, and the providing party determines a sixth parameter of the providing party model based on the encryption residual quantity and the public key information to update the providing party model parameter and train the providing party model.
In this embodiment, in the process of longitudinal federal learning modeling, after determining the encryption residual amount [ [ d ] of the demand side model, by combining the poisson return implementation schemes of the three-party longitudinal federal learning frameworks of the a side, the B side and the C side, the demand side determines the fifth parameter of the demand side model based on the encryption residual amount and the public key information to update the demand side model parameter and train the demand side model, and the provider determines the sixth parameter of the provider side model based on the encryption residual amount and the public key information to update the provider side model parameter and train the provider side model.
Further, in an embodiment, the determining, by the demander, a fifth parameter of the demander model based on the encryption residual amount and the public key information to update a demander model parameter and train the demander model, and the determining, by the provider, a sixth parameter of the provider model based on the encryption residual amount and the public key information to update a provider model parameter and train the provider model includes:
step h, the demander determines a first encryption gradient of the demander model based on the third feature quantity, the encryption residual quantity and the public key information;
In the present embodiment, referring to fig. 6, as shown in the modeling flow of fig. 6, in the longitudinal federal learning modeling process, the encryption residual amount [ [ d ] is determined on the demand side B side]]Later, based on the demandThird feature quantity X in square model B Encryption residual amount [ [ d ] in demand side model]]And public key information acquired by the requiring party, the requiring party B firstly calculates a gradient value corresponding to the first encryption gradientRecalculating the first encryption gradient +.>
Step i, the provider determines a second encryption gradient of the provider model based on the fourth feature quantity, the encryption residual quantity and the public key information;
in the present embodiment, referring to fig. 6, as shown in the modeling flow of fig. 6, in the longitudinal federal learning modeling process, the encryption residual amount [ [ d ] is determined on the demand side B side]]Then, the encryption residual quantity [ [ d ]]]To the provider a. The provider A receives the encryption residual quantity [ [ d ] sent by the requester B]]Then, based on the fourth feature quantity in the provider model, the received encryption residual quantity [ [ d ]]]And the received public key information, the provider A side calculates the gradient value corresponding to the second encryption gradient firstRe-calculating a second encryption gradient->
And j, determining a fifth parameter of the demand side model by the demand side based on the first encryption gradient so as to update the demand side model parameter and train the demand side model, and determining a sixth parameter of the provider side model by the provider side based on the second encryption gradient so as to update the provider side model parameter and train the provider side model.
In this embodiment, in the process of longitudinal federal learning modeling, after determining the first encryption gradient on the side B of the demand party and determining the second encryption gradient on the side a of the provider, by combining the poisson return implementation schemes of the three-party longitudinal federal learning frames on the side a, the side B and the side C, the demand party determines the fifth parameter of the demand party model based on the first encryption gradient to update the demand party model parameter and train the demand party model, and the provider determines the sixth parameter of the provider model based on the second encryption gradient to update the provider model parameter and train the provider model.
Further, in an embodiment, the determining, by the requestor, a fifth parameter of the requestor model based on the first encryption gradient to update the requestor model parameter and train the requestor model, and the determining, by the provider, a sixth parameter of the provider model based on the second encryption gradient to update the provider model parameter and train the provider model includes:
step k, the coordinator is used for acquiring the first encryption gradient of the demander model, the second encryption gradient of the provider model and private key information corresponding to the public key information;
The private key information is private key information provided by the coordinator C, is a decryption rule for providing encrypted data of the two sides A, B, and only the coordinator C has private key information corresponding to the public key information.
In the embodiment, in the longitudinal federal learning modeling process, after a first encryption gradient of a demand side model is determined by a demand side, the first encryption gradient is sent to a coordinator side C; after the provider determines a second encryption gradient for the provider model, the second encryption gradient is sent to coordinator C. And then, the coordinator C side acquires the received first encryption gradient, the second encryption gradient and private key information held by the coordinator C side so as to decrypt the data received from the demander B side and the provider A side.
Step l, the coordinator is used for determining a first decryption gradient corresponding to the demander model based on the first encryption gradient and the private key information;
in this embodiment, referring to FIG. 7, the process of federal learning modeling in the longitudinal direction is shown in the modeling flow of FIG. 7In the method, a coordinator C receives a first encryption gradientThen, the coordinator C side determines a first decryption gradient corresponding to the demander model through a decryption technology of private key information >
Step m, the coordinator is used for determining a second decryption gradient corresponding to the provider model based on the second encryption gradient and the private key information;
in this embodiment, referring to fig. 7, as shown in the modeling flow of fig. 7, in the longitudinal federal learning modeling process, the coordinator C receives the second encryption gradientThen, the coordinator C side determines a second decryption gradient corresponding to the demander model through a decryption technology of private key information>
And n, the demander determines fifth parameters of the demander model based on the first decryption gradient to update the parameters of the demander model and train the demander model, and the provider determines sixth parameters of the provider model based on the second decryption gradient to update the parameters of the provider model and train the provider model.
In the present embodiment, referring to fig. 7, as shown in the modeling flow of fig. 7, in the longitudinal federal learning modeling process, a first decryption gradient is determined at the coordinator C sideSecond decryption gradient->After that, the coordinator C respectively sends the firstDecryption gradient->To party B and to send a second decryption gradient +.>To the provider a. After the first decryption gradient is received by the party B, the party B determines a fifth parameter theta of the party model based on the first decryption gradient B To update the demand side model parameters and train the demand side model; after the provider A receives the second decryption gradient, the provider determines a sixth parameter theta of the provider model based on the second decryption gradient A To update the provider model parameters and to train the provider model.
Further, in an embodiment, the step of determining, by the party, a fifth parameter of the party model based on the first decryption gradient to update a party model parameter and train the party model, and the step of determining, by the party, a sixth parameter of the party model based on the second decryption gradient to update a party model parameter and train the party model further comprises, after:
step n1, the demander determines the encryption loss variation of the demander model based on the third predicted value, the intermediate encryption amount and the second exposure amount;
in the present embodiment, referring to fig. 5, as shown in the modeling flow of fig. 5, in the longitudinal federal learning modeling process, X in the third predicted value determined based on the party B of the demand party B θ B Intermediate encryption amount [ [ exp (X) A θ A )]]And a second exposure E of the training sample of the party B, the party B can first determine the encryption Loss [ [ Loss ] of its model ]]Wherein the encryption Loss amount [ [ Loss ]]]The calculation formula of (2) is as follows:
[[Loss]]=∑[[exp(X A θ A )]]*exp(X B θ B )*E-Y([[X A θ A ]]+X B θ B +log(E))
after the encryption Loss amount [ [ Loss ] ] of the demand side model is calculated, the encryption Loss variation delta L of the demand side model is determined, wherein the calculation formula of the encryption Loss variation is as follows:
ΔL=[[Loss]]-[[Loss]]'
wherein, [ [ Loss ] ] is the encryption Loss amount calculated at this time, and [ (Loss ] ] is the encryption Loss amount calculated and saved last time.
Step n2, the coordinator is used for obtaining the encryption loss variation of the demand side model, and detecting whether the encryption loss variation is smaller than or equal to a first preset threshold;
in the present embodiment, referring to fig. 5, as shown in the modeling flow of fig. 5, in the process of longitudinal federal learning modeling, after determining the encryption Loss variation [ [ Loss ] ] on the side of the demand side B, the demand side transmits the encryption Loss variation to the side of the coordinator side C. After the coordinator C side obtains the encryption Loss variation [ [ Loss ] ], the coordinator C side detects whether the encryption Loss variation is smaller than or equal to a first preset threshold value or not so as to detect whether the three-party longitudinal federal learning model converges or not.
Step n3, the step of obtaining the first parameter updated by the demand side model by the demand side includes: if the encryption loss variation is smaller than or equal to the first preset threshold, the requester updates parameters of the requester model, acquires the fifth parameters, and takes the fifth parameters as first parameters to train the requester model;
In this embodiment, after the coordinator C detects whether the encryption Loss variation is less than or equal to the first preset threshold, if it is detected that the encryption Loss variation [ [ Loss ] ] is less than or equal to the first preset threshold, the requester obtains a fifth parameter of the requester model, and updates the parameter of the requester model, that is, uses the fifth parameter as the first parameter. And updating parameters of the demand side model, and at the moment, describing that the modeling of the three-party longitudinal federal learning model is completed so as to predict the label quantity of the predicted sample by a subsequent model.
Step n4, the step of obtaining the updated second parameter of the provider model by the provider includes: if the encryption loss variation is smaller than or equal to the first preset threshold, the provider updates parameters of the provider model, acquires the sixth parameters, and takes the sixth parameters as second parameters to train the provider model;
in this embodiment, after the coordinator C detects whether the encryption Loss variation is less than or equal to the first preset threshold, if it is detected that the encryption Loss variation [ [ Loss ] ] is less than or equal to the first preset threshold, the provider acquires the sixth parameter of the provider model, and updates the parameter of the provider model, that is, uses the sixth parameter as the second parameter. And updating parameters of the provider model, and at the moment, describing that the modeling of the three-party longitudinal federal learning model is completed so as to predict the label quantity of the predicted sample by a subsequent model.
And n5, if the encryption loss variation is greater than the first preset threshold, the desiring party continues to execute the step of determining the fifth parameter of the desiring party model by the desiring party based on the first decryption gradient, and the providing party continues to execute the step of determining the sixth parameter of the providing party model by the providing party based on the second decryption gradient.
In this embodiment, after the coordinator C detects whether the encryption Loss variation is less than or equal to the first preset threshold, if it is detected that the encryption Loss variation [ [ Loss ] ] is greater than the first preset threshold, which indicates that the model does not converge, the requester continues to perform the step of determining the fifth parameter of the requester model by the requester based on the first decryption gradient, and the provider continues to perform the step of determining the sixth parameter of the provider model by the provider based on the second decryption gradient.
According to the label prediction method provided by the embodiment, the third parameter before updating the demand side model, the third characteristic quantity of the demand side training sample and the second exposure quantity of the demand side training sample are obtained through the demand side, the third predicted value of the demand side model is determined based on the third parameter, the third characteristic quantity and the second exposure quantity by the demand side, the provider is used for obtaining the fourth parameter before updating the provider model and the fourth characteristic quantity of the provider training sample, the provider determines the fourth predicted value of the provider model based on the fourth parameter and the fourth characteristic quantity, the fifth parameter of the demand side model is determined based on the third predicted value by the demand side so as to update the demand side model parameter and train the demand side model, the sixth parameter of the provider model is determined based on the fourth predicted value so as to update the provider model parameter and train the provider model, the provider model is updated so as to update the provider model parameter and build the parameter and the longitudinal learning model is set up, the longitudinal model is provided by the federal model is updated, the federal model is accurately predicted by the aid of the federal model, and the longitudinal model is trained, and the longitudinal model is easily provided by adopting a model-based on the longitudinal model-learning model, and the longitudinal model-based on the predicted model, and the longitudinal model-based on the user-learning model is provided by the longitudinal model, and the longitudinal model-based on the model.
Based on the second embodiment, a third embodiment of the method according to the present invention is provided, in this embodiment, before step a, further comprising:
step p, the demander acquires training samples of the demander, and the provider acquires the training sample amount of each training sample provided by the demander;
in this embodiment, referring to fig. 4, as shown in the modeling flow of fig. 4, before the modeling flow starts, the party B obtains the training sample size of each training sample provided by the party B and the training sample of the party B, and sends the obtained training sample size to the party a. After the provider A receives the training sample size sent by the demand B, the provider A acquires the training sample size. Wherein the training sample size is the size of the training sample used each time.
Step q, the demander determines a third feature quantity of the demander training sample and a second exposure quantity of the demander training sample based on the demander training sample;
in this embodiment, after determining the training sample of the demand side, the demand side determines, based on the training sample of the demand side, a third feature quantity of the training sample of the demand side and a second exposure quantity of the training sample of the demand side, for subsequent modeling and training of the three-party longitudinal federal learning model.
Step r, the provider is used for determining the provider training sample matched with the demander training sample based on the training sample size;
in this embodiment, after the provider a obtains the training sample size sent from the demander, the provider a completes matching of the common training samples through a matching mechanism, that is, the provider a completes screening of the training samples common to the two sides A, B through the training sample size, determines the provider training samples matched with the demander training samples, and can perform modeling and training on the longitudinal federal learning model only if the common training samples are screened out.
And step s, the provider is used for determining a fourth characteristic quantity of the provider training sample based on the provider training sample.
In this embodiment, after the provider determines the provider training sample, the provider may determine a fourth feature quantity of the provider training sample based on the provider training sample for subsequent modeling and training of the three-party longitudinal federal learning model.
Further, in an embodiment, the step of determining, by the party, a fifth parameter of the party model based on the first decryption gradient to update a party model parameter and train the party model, and the step of determining, by the party, a sixth parameter of the party model based on the second decryption gradient to update a party model parameter and train the party model further comprises, after:
Step t, the coordinator is used for obtaining the model training wheel number of the model of the demander and detecting whether the model training wheel number is greater than or equal to a second preset threshold value;
in this embodiment, in the longitudinal federal learning modeling process, the demander records and updates the model training round number of the demander model in real time, and the coordinator acquires the model training round number of the demander model. The model training wheel number is the wheel number of the longitudinal federal learning of the current training party, and the model training wheel number is increased once when the fourth parameter of the demand side model and the fifth parameter of the provider side model are determined once. After the coordinator acquires the model training round number of the model of the demand side, detecting whether the model training round number is larger than or equal to a second preset threshold value or not so as to detect whether the model reaches the maximum training round number, namely the second preset threshold value or not, and detecting whether the model converges or not.
Step u, the step of obtaining the first parameter updated by the demand side model by the demand side includes: if the number of the model training rounds is greater than or equal to a second preset threshold, the demand side updates parameters of the demand side model, the demand side obtains the fifth parameters, and the fifth parameters are used as first parameters to train the demand side model;
In this embodiment, after detecting whether the number of model training rounds is greater than or equal to the second preset threshold, if the number of model training rounds is greater than or equal to the second preset threshold, the demander acquires the fifth parameter of the demander model, and updates the parameter of the demander model, that is, takes the fifth parameter as the first parameter. And updating parameters of the demand side model, and at the moment, describing that the modeling of the three-party longitudinal federal learning model is completed so as to predict the label quantity of the predicted sample by a subsequent model.
Step v, the step of obtaining the updated second parameter of the provider model by the provider includes: if the number of model training rounds is greater than or equal to a second preset threshold, the provider updates parameters of the provider model, acquires the sixth parameters, and takes the sixth parameters as second parameters to train the provider model;
in this embodiment, after detecting whether the number of model training rounds is greater than or equal to the second preset threshold, if the number of model training rounds is greater than or equal to the second preset threshold, the provider obtains a sixth parameter of the provider model, and updates the parameter of the provider model, that is, uses the sixth parameter as the second parameter. And updating parameters of the provider model, and at the moment, describing that the modeling of the three-party longitudinal federal learning model is completed so as to predict the label quantity of the predicted sample by a subsequent model.
And step w, if the number of model training rounds is smaller than a second preset threshold value, the requiring party continues to execute the step that the requiring party determines the fifth parameter of the requiring party model based on the first decryption gradient, and the providing party continues to execute the step that the providing party determines the sixth parameter of the providing party model based on the second decryption gradient.
In this embodiment, after detecting whether the number of model training rounds is greater than or equal to the second preset threshold, if the number of model training rounds is detected to be less than the second preset threshold, indicating that training of the model is not complete, the demander continues to execute the step that the demander determines the fifth parameter of the demander model based on the first decryption gradient, and the provider continues to execute the step that the provider determines the sixth parameter of the provider model based on the second decryption gradient.
According to the label prediction method provided by the embodiment, the required side is used for acquiring the required side training sample, the provider is used for acquiring the training sample quantity of each training sample provided by the required side, the required side is used for determining the third characteristic quantity of the required side training sample and the second exposure quantity of the required side training sample based on the required side training sample, the provider is used for determining the provider training sample matched with the required side training sample based on the training sample quantity, the provider is used for determining the fourth characteristic quantity of the provider training sample based on the provider training sample, and the training sample quantity matched with the required side training sample is determined by accurately acquiring the training sample quantity to ensure that the common training sample screening of A, B two sides is completed, so that the training sample of the provider matched with the required side training sample is determined, and the training of a subsequent three-party longitudinal federal learning model is facilitated.
In addition, an embodiment of the present invention further proposes a computer-readable storage medium, on which a label prediction program is stored, which when executed by a processor implements the steps of the label prediction method as set forth in any one of the above.
The specific embodiments of the computer readable storage medium of the present invention are substantially the same as the embodiments of the tag prediction method described above, and will not be described in detail herein.
It should be noted that, in this document, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or system that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or system. Without further limitation, an element defined by the phrase "comprising one … …" does not exclude the presence of other like elements in a process, method, article, or system that comprises the element.
The foregoing embodiment numbers of the present invention are merely for the purpose of description, and do not represent the advantages or disadvantages of the embodiments.
From the above description of the embodiments, it will be clear to those skilled in the art that the above-described embodiment method may be implemented by means of software plus a necessary general hardware platform, but of course may also be implemented by means of hardware, but in many cases the former is a preferred embodiment. Based on such understanding, the technical solution of the present invention may be embodied essentially or in a part contributing to the prior art in the form of a software product stored in a storage medium (e.g. ROM/RAM, magnetic disk, optical disk) as described above, comprising instructions for causing a terminal device (which may be a mobile phone, a computer, a server, an air conditioner, or a network device, etc.) to perform the method according to the embodiments of the present invention.
The foregoing description is only of the preferred embodiments of the present invention, and is not intended to limit the scope of the invention, but rather is intended to cover any equivalents of the structures or equivalent processes disclosed herein or in the alternative, which may be employed directly or indirectly in other related arts.

Claims (8)

1. A label prediction method, characterized in that the label prediction method comprises the steps of:
The method comprises the steps that a demand side obtains a first parameter updated by a demand side model, a first characteristic quantity of a demand side prediction sample and a first exposure quantity of the demand side prediction sample, wherein the first parameter is a model parameter in the demand side model, the first characteristic quantity is a user characteristic of the demand side prediction sample, and the first exposure quantity is an acquisition unit of label characteristics of the demand side for the prediction sample;
the demander determining a first predicted value of the demander model based on the first parameter, the first feature amount, and the first exposure amount;
the method comprises the steps that a second predicted value and a poisson calculation rule of a provider model are obtained by a provider, wherein the provider is used for obtaining a second parameter updated by the provider model and a second characteristic quantity of a provider predicted sample, and determining the second predicted value based on the second parameter and the second characteristic quantity, wherein the second parameter is a model parameter in the provider model, the second characteristic quantity is a user characteristic of the provider predicted sample, and the provider predicted sample are the same predicted sample;
the demander determines a predicted tag amount of the demander predicted sample based on the first predicted value, the second predicted value and the poisson calculation rule, wherein the predicted tag amount is the number of times that something happens to the predicted sample within a certain indefinite time range;
Before the step of obtaining the first parameter after updating the demand side model, the first feature quantity of the demand side prediction sample and the first exposure quantity of the demand side prediction sample by the demand side, the method further comprises:
the demander acquires a third parameter before updating the demander model, a third characteristic quantity of a demander training sample and a second exposure quantity of the demander training sample;
the demander determining a third predicted value of the demander model based on the third parameter, the third feature amount, and the second exposure amount;
the provider is used for acquiring a fourth parameter before updating the provider model and a fourth characteristic quantity of the provider training sample, and determining a fourth predicted value of the provider model based on the fourth parameter and the fourth characteristic quantity;
the demander determining fifth parameters of the demander model based on the third predicted value to update the demander model parameters and train the demander model, and the provider determining sixth parameters of the provider model based on the fourth predicted value to update the provider model parameters and train the provider model;
The step of the demander determining fifth parameters of the demander model based on the third predicted value to update the demander model parameters and train the demander model, and the step of the provider determining sixth parameters of the provider model based on the fourth predicted value to update the provider model parameters and train the provider model includes:
the demander acquires the label quantity of the training sample of the demander, public key information provided by a coordinator and intermediate encryption quantity of the provider model, wherein the provider acquires the fourth predicted value and the public key information provided by the coordinator, and determines the intermediate encryption quantity based on the fourth predicted value and the public key information;
the demander determining an encryption residual amount of the demander model based on the third predicted value, the tag amount, and the intermediate encryption amount;
the demander determines a fifth parameter of the demander model based on the encryption residual amount and the public key information to update a demander model parameter and train the demander model, and the provider determines a sixth parameter of the provider model based on the encryption residual amount and the public key information to update a provider model parameter and train the provider model.
2. The tag prediction method of claim 1, wherein the determining of the fifth parameter of the requiring party model by the requiring party based on the encryption residual quantity and the public key information to update the requiring party model parameter and training the requiring party model, and the determining of the sixth parameter of the providing party model by the providing party based on the encryption residual quantity and the public key information to update the providing party model parameter and training the providing party model comprises:
the demander determining a first encryption gradient of the demander model based on the third feature amount, the encryption residual amount, and the public key information;
the provider determining a second encryption gradient of the provider model based on the fourth feature quantity, the encryption residual quantity, and the public key information;
the demander determines fifth parameters of the demander model based on the first encryption gradient to update the demander model parameters and train the demander model, and the provider determines sixth parameters of the provider model based on the second encryption gradient to update the provider model parameters and train the provider model.
3. The label prediction method of claim 2, wherein the demander determines fifth parameters of the demander model based on the first encryption gradient to update the demander model parameters and train the demander model, and the provider determines sixth parameters of the provider model based on the second encryption gradient to update the provider model parameters and train the provider model comprises:
the coordinator is used for acquiring the first encryption gradient of the demander model, the second encryption gradient of the provider model and private key information corresponding to the public key information;
the coordinator is used for determining a first decryption gradient corresponding to the demander model based on the first encryption gradient and the private key information;
the coordinator is used for determining a second decryption gradient corresponding to the provider model based on the second encryption gradient and the private key information;
the demander determines fifth parameters of the demander model based on the first decryption gradient to update the demander model parameters and train the demander model, and the provider determines sixth parameters of the provider model based on the second decryption gradient to update the provider model parameters and train the provider model.
4. The label prediction method of claim 3 wherein the requestor determines fifth parameters of the requestor model based on the first decryption gradient to update the requestor model parameters and train the requestor model, and wherein the provider determines sixth parameters of the provider model based on the second decryption gradient to update provider model parameters and train the provider model, further comprising, after the steps of:
the demander determining an encryption loss variation amount of the demander model based on the third predicted value, the intermediate encryption amount, and the second exposure amount;
the coordinator is used for acquiring the encryption loss variation of the demand side model, and detecting whether the encryption loss variation is smaller than or equal to a first preset threshold value;
the step of obtaining the first parameter updated by the demand side model by the demand side comprises the following steps:
if the encryption loss variation is smaller than or equal to the first preset threshold, the requester updates parameters of the requester model, acquires the fifth parameters, and takes the fifth parameters as first parameters to train the requester model;
The step of the provider for obtaining the updated second parameter of the provider model includes:
if the encryption loss variation is smaller than or equal to the first preset threshold, the provider updates parameters of the provider model, acquires the sixth parameters, and takes the sixth parameters as second parameters to train the provider model;
and if the encryption loss variation is greater than the first preset threshold, the requiring party continues to execute the step that the requiring party determines the fifth parameter of the requiring party model based on the first decryption gradient, and the providing party continues to execute the step that the providing party determines the sixth parameter of the providing party model based on the second decryption gradient.
5. The label prediction method according to claim 1, wherein before the step of the demander obtaining the third parameter before the demander model update, the third feature quantity of the demander training sample, and the second exposure quantity of the demander training sample, further comprising:
the requiring party acquires the training samples of the requiring party, and the provider acquires the training sample amount of each training sample provided by the requiring party;
The demander determining a third feature quantity of the demander training sample and a second exposure quantity of the demander training sample based on the demander training sample;
the provider is configured to determine the provider training sample that matches the demander training sample based on the training sample size;
the provider is configured to determine a fourth feature quantity of the provider training sample based on the provider training sample.
6. The label prediction method as recited in claim 3 or 4, wherein the demander determines fifth parameters of the demander model based on the first decryption gradient to update the demander model parameters and train the demander model, and the provider determines sixth parameters of the provider model based on the second decryption gradient to update the provider model parameters and train the provider model, further comprising, after the steps of:
the coordinator is used for acquiring the model training wheel number of the model of the demander and detecting whether the model training wheel number is greater than or equal to a second preset threshold value;
the step of obtaining the first parameter updated by the demand side model by the demand side comprises the following steps:
If the number of the model training rounds is greater than or equal to a second preset threshold, the demand side updates parameters of the demand side model, the demand side obtains the fifth parameters, and the fifth parameters are used as first parameters to train the demand side model;
the step of the provider for obtaining the updated second parameter of the provider model includes:
if the number of model training rounds is greater than or equal to a second preset threshold, the provider updates parameters of the provider model, acquires the sixth parameters, and takes the sixth parameters as second parameters to train the provider model;
and if the number of model training rounds is smaller than a second preset threshold value, the requiring party continuously executes the step of determining a fifth parameter of the requiring party model based on the first decryption gradient, and the providing party continuously executes the step of determining a sixth parameter of the providing party model based on the second decryption gradient.
7. A tag prediction apparatus, comprising: a memory, a processor and a tag prediction program stored on the memory and executable on the processor, which when executed by the processor implements the steps of the tag prediction method of any one of claims 1 to 6.
8. A computer-readable storage medium, wherein a label prediction program is stored on the computer-readable storage medium, which when executed by a processor, implements the steps of the label prediction method according to any one of claims 1 to 6.
CN201911083212.XA 2019-11-07 2019-11-07 Label prediction method, apparatus and computer readable storage medium Active CN110837653B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201911083212.XA CN110837653B (en) 2019-11-07 2019-11-07 Label prediction method, apparatus and computer readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201911083212.XA CN110837653B (en) 2019-11-07 2019-11-07 Label prediction method, apparatus and computer readable storage medium

Publications (2)

Publication Number Publication Date
CN110837653A CN110837653A (en) 2020-02-25
CN110837653B true CN110837653B (en) 2023-09-19

Family

ID=69576330

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201911083212.XA Active CN110837653B (en) 2019-11-07 2019-11-07 Label prediction method, apparatus and computer readable storage medium

Country Status (1)

Country Link
CN (1) CN110837653B (en)

Families Citing this family (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111368314B (en) * 2020-02-28 2024-08-06 深圳前海微众银行股份有限公司 Modeling and prediction method, device, equipment and storage medium based on cross characteristics
CN111753996A (en) * 2020-06-24 2020-10-09 中国建设银行股份有限公司 Optimization method, device, equipment and storage medium of scheme determination model
CN112766514B (en) * 2021-01-22 2021-12-24 支付宝(杭州)信息技术有限公司 Method, system and device for joint training of machine learning model
CN112818369B (en) * 2021-02-10 2024-03-29 中国银联股份有限公司 Combined modeling method and device
CN114187006A (en) * 2021-11-03 2022-03-15 杭州未名信科科技有限公司 Block chain supervision-based federal learning method
CN115409096B (en) * 2022-08-17 2023-06-16 北京融数联智科技有限公司 Training method, device and storage medium for two-party poisson regression privacy calculation model

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107993088A (en) * 2017-11-20 2018-05-04 北京三快在线科技有限公司 A kind of Buying Cycle Forecasting Methodology and device, electronic equipment
CN109165515A (en) * 2018-08-10 2019-01-08 深圳前海微众银行股份有限公司 Model parameter acquisition methods, system and readable storage medium storing program for executing based on federation's study
CN110276210A (en) * 2019-06-12 2019-09-24 深圳前海微众银行股份有限公司 Based on the determination method and device of the model parameter of federation's study

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9704102B2 (en) * 2013-03-15 2017-07-11 William Marsh Rice University Sparse factor analysis for analysis of user content preferences
US20190244680A1 (en) * 2018-02-07 2019-08-08 D-Wave Systems Inc. Systems and methods for generative machine learning

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107993088A (en) * 2017-11-20 2018-05-04 北京三快在线科技有限公司 A kind of Buying Cycle Forecasting Methodology and device, electronic equipment
CN109165515A (en) * 2018-08-10 2019-01-08 深圳前海微众银行股份有限公司 Model parameter acquisition methods, system and readable storage medium storing program for executing based on federation's study
CN110276210A (en) * 2019-06-12 2019-09-24 深圳前海微众银行股份有限公司 Based on the determination method and device of the model parameter of federation's study

Also Published As

Publication number Publication date
CN110837653A (en) 2020-02-25

Similar Documents

Publication Publication Date Title
CN110837653B (en) Label prediction method, apparatus and computer readable storage medium
CN110189192B (en) Information recommendation model generation method and device
CN111861569B (en) Product information recommendation method and device
CN109034660B (en) Method and related device for determining risk control strategy based on prediction model
KR102215246B1 (en) Blockchain-based product claim method and apparatus, and electronic device
CN110110229B (en) Information recommendation method and device
CN110326013A (en) The block catenary system of open transaction and privately owned transaction is supported under account model
CN108109011A (en) A kind of anti-cheat method of advertisement and computing device
CN110533419B (en) Block chain-based sharing method, device and server of wind control model
WO2019137049A1 (en) Prediction method and apparatus based on information sharing, electronic device and computer storage medium
CN109409693A (en) A kind of business associate mode recommended method and relevant device
CN106471543A (en) The user mutual association of the multiple applications on client device
CN111340558A (en) Online information processing method, device, equipment and medium based on federal learning
WO2022048195A1 (en) Longitudinal federation modeling method, apparatus, and device, and computer readable storage medium
US20150309962A1 (en) Method and apparatus for modeling a population to predict individual behavior using location data from social network messages
US11316830B2 (en) Digital content security and communication system using anonymized account classification and analysis
CN112533209A (en) Black product identification method and black product identification device
CN109816534B (en) Financing lease product recommendation method, financing lease product recommendation device, computer equipment and storage medium
WO2020181854A1 (en) Payment anomaly detection
CN108306891A (en) The method, apparatus and system of machine learning are executed using data to be exchanged
CN111815169A (en) Business approval parameter configuration method and device
CN111368196A (en) Model parameter updating method, device, equipment and readable storage medium
CN110969261B (en) Encryption algorithm-based model construction method and related equipment
CN111859360A (en) Safe multi-device joint data computing system, method and device
US20220058651A1 (en) Authentication of financial transaction

Legal Events

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